@openmrs/esm-stock-management-app 3.0.1-pre.895 → 3.1.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.
Files changed (183) hide show
  1. package/.tx/config +11 -0
  2. package/dist/{152.js → 122.js} +1 -1
  3. package/dist/{152.js.map → 122.js.map} +1 -1
  4. package/dist/1278.js +1 -0
  5. package/dist/1278.js.map +1 -0
  6. package/dist/1644.js +1 -0
  7. package/dist/1703.js +1 -0
  8. package/dist/1703.js.map +1 -0
  9. package/dist/1793.js +2 -0
  10. package/dist/1793.js.map +1 -0
  11. package/dist/1901.js +1 -0
  12. package/dist/2016.js +1 -0
  13. package/dist/236.js +1 -0
  14. package/dist/2628.js +1 -0
  15. package/dist/2757.js +1 -0
  16. package/dist/3027.js +1 -0
  17. package/dist/3027.js.map +1 -0
  18. package/dist/3574.js +1 -0
  19. package/dist/3652.js +1 -0
  20. package/dist/3935.js +2 -0
  21. package/dist/3935.js.map +1 -0
  22. package/dist/4272.js +1 -0
  23. package/dist/4378.js +1 -0
  24. package/dist/4444.js +1 -0
  25. package/dist/4444.js.map +1 -0
  26. package/dist/4460.js +1 -0
  27. package/dist/4705.js +1 -0
  28. package/dist/5060.js +1 -0
  29. package/dist/5226.js +1 -0
  30. package/dist/5226.js.map +1 -0
  31. package/dist/5240.js +1 -0
  32. package/dist/5336.js +1 -0
  33. package/dist/539.js +1 -0
  34. package/dist/5673.js +1 -0
  35. package/dist/5675.js +1 -0
  36. package/dist/5675.js.map +1 -0
  37. package/dist/5711.js +1 -0
  38. package/dist/5723.js +1 -0
  39. package/dist/5737.js +1 -0
  40. package/dist/5833.js +1 -0
  41. package/dist/5962.js +1 -0
  42. package/dist/6235.js +1 -0
  43. package/dist/6235.js.map +1 -0
  44. package/dist/6299.js +1 -0
  45. package/dist/6299.js.map +1 -0
  46. package/dist/6497.js +1 -0
  47. package/dist/6566.js +1 -0
  48. package/dist/6727.js +1 -0
  49. package/dist/7294.js +2 -0
  50. package/dist/7294.js.map +1 -0
  51. package/dist/7426.js +2 -0
  52. package/dist/7426.js.map +1 -0
  53. package/dist/744.js +1 -0
  54. package/dist/7484.js +1 -0
  55. package/dist/7484.js.map +1 -0
  56. package/dist/7629.js +1 -0
  57. package/dist/7629.js.map +1 -0
  58. package/dist/7807.js +1 -0
  59. package/dist/7998.js +1 -0
  60. package/dist/8026.js +2 -0
  61. package/dist/8026.js.map +1 -0
  62. package/dist/8197.js +1 -0
  63. package/dist/8271.js +1 -0
  64. package/dist/8319.js +1 -0
  65. package/dist/8323.js +1 -0
  66. package/dist/8467.js +1 -0
  67. package/dist/8467.js.map +1 -0
  68. package/dist/8765.js +1 -0
  69. package/dist/8788.js +1 -0
  70. package/dist/899.js +1 -0
  71. package/dist/9000.js +1 -0
  72. package/dist/9000.js.map +1 -0
  73. package/dist/9033.js +1 -0
  74. package/dist/9033.js.map +1 -0
  75. package/dist/9093.js +1 -0
  76. package/dist/9093.js.map +1 -0
  77. package/dist/9119.js +1 -0
  78. package/dist/9119.js.map +1 -0
  79. package/dist/9261.js +1 -0
  80. package/dist/9339.js +1 -0
  81. package/dist/9339.js.map +1 -0
  82. package/dist/9579.js +1 -0
  83. package/dist/main.js +1 -1
  84. package/dist/main.js.map +1 -1
  85. package/dist/openmrs-esm-stock-management-app.js +1 -1
  86. package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +867 -229
  87. package/dist/openmrs-esm-stock-management-app.js.map +1 -1
  88. package/dist/routes.json +1 -1
  89. package/package.json +2 -3
  90. package/src/core/components/card/metrics-card-component.tsx +0 -10
  91. package/src/stock-home/stock-home-metrics.component.tsx +0 -3
  92. package/translations/am.json +89 -45
  93. package/translations/ar.json +89 -45
  94. package/translations/ar_SY.json +346 -0
  95. package/translations/bn.json +346 -0
  96. package/translations/de.json +346 -0
  97. package/translations/en.json +0 -1
  98. package/translations/es.json +89 -45
  99. package/translations/es_MX.json +346 -0
  100. package/translations/fr.json +89 -45
  101. package/translations/he.json +89 -45
  102. package/translations/hi.json +346 -0
  103. package/translations/hi_IN.json +346 -0
  104. package/translations/id.json +346 -0
  105. package/translations/it.json +346 -0
  106. package/translations/km.json +90 -46
  107. package/translations/ku.json +346 -0
  108. package/translations/ky.json +346 -0
  109. package/translations/lg.json +346 -0
  110. package/translations/ne.json +346 -0
  111. package/translations/pl.json +346 -0
  112. package/translations/pt.json +346 -0
  113. package/translations/pt_BR.json +346 -0
  114. package/translations/qu.json +346 -0
  115. package/translations/ro_RO.json +346 -0
  116. package/translations/ru_RU.json +346 -0
  117. package/translations/si.json +346 -0
  118. package/translations/sw.json +346 -0
  119. package/translations/sw_KE.json +346 -0
  120. package/translations/tr.json +346 -0
  121. package/translations/tr_TR.json +346 -0
  122. package/translations/uk.json +346 -0
  123. package/translations/uz.json +346 -0
  124. package/translations/uz@Latn.json +346 -0
  125. package/translations/uz_UZ.json +346 -0
  126. package/translations/vi.json +346 -0
  127. package/translations/zh.json +89 -45
  128. package/translations/zh_CN.json +346 -0
  129. package/dist/0.js +0 -1
  130. package/dist/0.js.map +0 -1
  131. package/dist/119.js +0 -1
  132. package/dist/119.js.map +0 -1
  133. package/dist/226.js +0 -1
  134. package/dist/226.js.map +0 -1
  135. package/dist/235.js +0 -1
  136. package/dist/235.js.map +0 -1
  137. package/dist/26.js +0 -2
  138. package/dist/26.js.map +0 -1
  139. package/dist/27.js +0 -1
  140. package/dist/27.js.map +0 -1
  141. package/dist/271.js +0 -1
  142. package/dist/278.js +0 -1
  143. package/dist/278.js.map +0 -1
  144. package/dist/294.js +0 -2
  145. package/dist/294.js.map +0 -1
  146. package/dist/299.js +0 -1
  147. package/dist/299.js.map +0 -1
  148. package/dist/319.js +0 -1
  149. package/dist/33.js +0 -1
  150. package/dist/33.js.map +0 -1
  151. package/dist/339.js +0 -1
  152. package/dist/339.js.map +0 -1
  153. package/dist/426.js +0 -2
  154. package/dist/426.js.map +0 -1
  155. package/dist/444.js +0 -1
  156. package/dist/444.js.map +0 -1
  157. package/dist/460.js +0 -1
  158. package/dist/467.js +0 -1
  159. package/dist/467.js.map +0 -1
  160. package/dist/484.js +0 -1
  161. package/dist/484.js.map +0 -1
  162. package/dist/574.js +0 -1
  163. package/dist/629.js +0 -1
  164. package/dist/629.js.map +0 -1
  165. package/dist/675.js +0 -1
  166. package/dist/675.js.map +0 -1
  167. package/dist/703.js +0 -1
  168. package/dist/703.js.map +0 -1
  169. package/dist/757.js +0 -1
  170. package/dist/788.js +0 -1
  171. package/dist/793.js +0 -2
  172. package/dist/793.js.map +0 -1
  173. package/dist/807.js +0 -1
  174. package/dist/833.js +0 -1
  175. package/dist/93.js +0 -1
  176. package/dist/93.js.map +0 -1
  177. package/dist/935.js +0 -2
  178. package/dist/935.js.map +0 -1
  179. /package/dist/{793.js.LICENSE.txt → 1793.js.LICENSE.txt} +0 -0
  180. /package/dist/{935.js.LICENSE.txt → 3935.js.LICENSE.txt} +0 -0
  181. /package/dist/{294.js.LICENSE.txt → 7294.js.LICENSE.txt} +0 -0
  182. /package/dist/{426.js.LICENSE.txt → 7426.js.LICENSE.txt} +0 -0
  183. /package/dist/{26.js.LICENSE.txt → 8026.js.LICENSE.txt} +0 -0
package/dist/1793.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 1793.js.LICENSE.txt */
2
+ (globalThis.webpackChunk_openmrs_esm_stock_management_app=globalThis.webpackChunk_openmrs_esm_stock_management_app||[]).push([[1793],{6173:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-config","@openmrs/esm-navigation","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var u={},s={},c={},l={};return{setters:[function(e){u.Type=e.Type,u.defineConfigSchema=e.defineConfigSchema,u.getConfig=e.getConfig,u.validators=e.validators},function(e){s.navigate=e.navigate},function(e){c.reportError=e.reportError},function(e){l.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},824:function(e){"use strict";e.exports=u},254:function(e){"use strict";e.exports=c},513:function(e){"use strict";e.exports=s},738:function(e){"use strict";e.exports=l}},t={};function f(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,f),o.exports}f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}st(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},u=function(e){setTimeout((function(){throw e}),0)},s=function(e){return null!==e&&"object"==typeof e},c=function(e){return e.reduce((function(e,t){return e.concat(i(t,pt)?t.errors:t)}),[])},l=function(e){return e},h=function(e){if(e||(e=lt.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n){var r=g(e,t,n);Vt.length?Vt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},y=function(e){if("function"!=typeof e)throw Error(m(28,!1));Vt.push(e)},v=function(e){if("function"!=typeof e)throw Error(m(29,!1));var t=!1;return Vt=Vt.filter((function(n){var r=n===e;return t=t||r,!r})),t},m=function(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=")):"")},g=function(e,t,n){var r,o="".concat(E(t)," '").concat(_(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(m(30,!1,t.status,_(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=_(t),t.status=n,r},b=function(e){return e.status===Zt},w=function(e){try{return e.activeWhen(window.location)}catch(t){return p(t,e,nn),!1}},_=function(e){return e.name},S=function(e){return Boolean(e.unmountThisParcel)},E=function(e){return S(e)?"parcel":"application"},O=function(){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]},x=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},A=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!x(t,(function(e){return"function"!=typeof e}))));var t},k=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(e),o=_(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return T(n)?n:Promise.reject(m(15,!1,r,o,t,a))}))}),Promise.resolve())}},T=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},j=function(e,t){return Promise.resolve().then((function(){return e.status!==$t?e:(e.status=Wt,e.bootstrap?U(e,"bootstrap").then(n).catch((function(n){if(t)throw g(n,e,nn);return p(n,e,nn),e})):Promise.resolve().then(n))}));function n(){return e.status=Yt,e}},P=function(e,t){return Promise.resolve().then((function(){var n=function(){return U(e,"unmount").then((function(){e.status=Yt}),(function(n){if(t)throw g(n,e,nn);p(n,e,nn)}))};if(e.status!==Zt)return e;e.status=Xt;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw g(n,e,nn);p(n,e,nn)}))})).then((function(){return e}))}))},D=function(e,t){return Promise.resolve().then((function(){return e.status!==Yt?e:(on||(window.dispatchEvent(new Ht("single-spa:before-first-mount")),on=!0),e.status=Jt,U(e,"mount").then((function(){return e.status=Zt,an||(window.dispatchEvent(new Ht("single-spa:first-mount")),an=!0),e})).catch((function(n){var r=function(){if(t)throw g(n,e,nn);return p(n,e,nn),e};return e.status=Zt,P(e,!0).then(r,r)})))}))},C=function(){return I.apply(sn,arguments)},I=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(m(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(m(3,!1,a(e.name)));var r=un++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(m(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(m(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?qt:$t,customProps:t,parentName:_(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==Zt)throw Error(m(6,!1,o,c.status));return P(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=nn,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(m(7,!1));l=l.then((function(e){if(!e)throw Error(m(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(m(9,!1,o));if(!A(e.mount))throw Error(m(10,!1,o));if(!A(e.unmount))throw Error(m(11,!1,o));if(e.update&&!A(e.update))throw Error(m(12,!1,o));var t=k(e,"bootstrap"),n=k(e,"mount"),a=k(e,"unmount");c.status=$t,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=G(e.timeouts),e.update&&(c.update=k(e,"update"),i.update=function(e){return c.customProps=e,M((t=c,Promise.resolve().then((function(){if(t.status!==Zt)throw Error(m(32,!1,_(t)));return t.status=Qt,U(t,"update").then((function(){return t.status=Zt,t})).catch((function(e){throw g(e,t,nn)}))}))));var t})}));var f,d,h=l.then((function(){return j(c,!0)})),p=h.then((function(){return D(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return M(Promise.resolve().then((function(){if(c.status!==Yt)throw Error(m(13,!1,o,c.status));return n.parcels[r]=c,D(c)})))},unmount:function(){return M(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:M(l),bootstrapPromise:M(h),mountPromise:M(p),unmountPromise:M(y)}},M=function(e){return e.then((function(){return null}))},N=function(e){var t=_(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(m(40,!1),t,n));var r=O({},n,{name:t,mountParcel:I.bind(e),singleSpa:Gt});return S(e)&&(r.unmountSelf=e.unmountThisParcel),r},R=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(16,!1));cn.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},L=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(17,!1));cn.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},F=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(18,!1));cn.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},B=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(19,!1));cn.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},U=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=E(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](N(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=m(31,!1,t,o,_(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},G=function(e){var t={};for(var n in cn)t[n]=O({},cn[n],e&&e[n]||{});return t},z=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Kt&&e.status!==tn?e:(e.status=qt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(N(e));if(!T(r))throw n=!0,Error(m(33,!1,_(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);var o=E(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(m(r,!1,o,_(e),i),t),p(void 0,e,nn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=O({},e.devtools.overlays,t.devtools.overlays)),e.status=$t,e.bootstrap=k(t,"bootstrap"),e.mount=k(t,"mount"),e.unmount=k(t,"unmount"),e.unload=k(t,"unload"),e.timeouts=G(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=nn:(r=tn,e.loadErrorTime=(new Date).getTime()),p(t,e,r),e})));var t,n}))},H=function(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(m(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=W(window.location.href),r=W(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)},V=function(e){var t=this;if(e){var n=e[0].type;dn.indexOf(n)>=0&&fn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},K=function(){Sn([],arguments)},q=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Ut&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},$=function(e){if(pn)throw Error(m(43,!1));Ut=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,pn=!0,hn=window.history.replaceState,window.addEventListener("hashchange",K),window.addEventListener("popstate",K);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&dn.indexOf(e)>=0)||x(fn[e],(function(e){return e===n})))return t.apply(this,arguments);fn[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&dn.indexOf(e)>=0&&(fn[e]=fn[e].filter((function(e){return e!==t}))),n.apply(this,arguments)},window.history.pushState=q(window.history.pushState,"pushState"),window.history.replaceState=q(hn,"replaceState")},W=function(e){var t=document.createElement("a");return t.href=e,t},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!yn){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return J.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return J.call(this,n,window.removeEventListener,e,t,arguments)},yn=!0}},J=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){dn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},Z=function(e){return Promise.resolve().then((function(){var t=vn[_(e)];if(!t)return e;if(e.status===Kt)return Q(e,t),e;if(e.status===en)return t.promise.then((function(){return e}));if(e.status!==Yt&&e.status!==tn)return e;var n=e.status===tn?Promise.resolve():U(e,"unload");return e.status=en,n.then((function(){return Q(e,t),e})).catch((function(n){return function(e,t,n){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,p(n,e,nn),t.reject(n)}(e,t,n),e}))}))},Q=function(e,t){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Kt,t.resolve()},X=function(e,t,n,r){vn[_(e)]={app:e,resolve:n,reject:r},Object.defineProperty(vn[_(e)],"promise",{get:t})},ee=function(e){return vn[e]},te=function(){return mn.filter(b).map(_)},ne=function(){return mn.map(_)},re=function(e){var t=x(mn,(function(t){return _(t)===e}));return t?t.status:null},oe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(m(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(m(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(m(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(m(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(m(24,!1));if(!ce(e.customProps))throw Error(m(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(m(20,!1));if(!t)throw Error(m(23,!1));if("function"!=typeof n)throw Error(m(24,!1));if(!ce(r))throw Error(m(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:le(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(pe()||gn||(gn=!0,setTimeout((function(){pe()||console.warn(m(1,!1))}),5e3)),-1!==ne().indexOf(o.name))throw Error(m(21,!1,o.name));mn.push(O({loadErrorTime:null,status:Kt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ln&&(Y(),Sn())},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return mn.filter((function(t){return t.activeWhen(e)})).map(_)},ae=function(e){if(0===mn.filter((function(t){return _(t)===e})).length)throw Error(m(25,!1,e));return(ln?ue(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=mn.map(_).indexOf(e);mn.splice(t,1)}))},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(m(26,!1));var n=x(mn,(function(t){return _(t)===e}));if(!n)throw Error(m(27,!1,e));var r,o=ee(_(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){X(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,se(n,o.resolve,o.reject)):r=new Promise((function(e,t){X(n,(function(){return r}),e,t),se(n,e,t)})),r},se=function(e,t,n){Promise.resolve().then((function(){if(x(ie(),(function(t){return t===_(e)})))return fe()})).then((function(){return P(e).then(Z).then((function(){t(),setTimeout((function(){Sn()}))}))})).catch(n)},ce=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},fe=function(){return Sn()},de=function(e,t){return w(e)?j(e).then((function(e){return t.then((function(){return w(e)?D(e):e}))})):t.then((function(){return e}))},he=function(e){En=!0,ln&&($(e),Sn())},pe=function(){return En},ye=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},be=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=be(e);if(t.headers||(t.headers={}),Rt(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(Pn)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Dn)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r,o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(i){switch(i.label){case 0:return(t=e).ok?204!==t.status?[3,2]:[4,(0,Lt.getConfig)("@openmrs/esm-api")]:[3,4];case 1:return i.sent().followRedirects&&t.headers.has("location")&&(r=t.headers.get("location"))&&(0,Ft.navigate)({to:r}),t.data=null,[2,t];case 2:return[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))];case 3:return[3,6];case 4:return[4,(0,Lt.getConfig)("@openmrs/esm-api")];case 5:return o=i.sent().redirectAuthFailure,n===be(Cn)&&403===t.status||o.enabled&&o.errors.includes(t.status)?(sessionStorage.removeItem(xn),(0,Ft.navigate)({to:o.url}),[2,o.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new In(n,t,r,a)}),(function(e){throw new In(n,t,null,a)}))];case 6:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ve(i,n,r,a,u,"next",e)}function u(e){ve(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new wt((function(r){var o=!1;return we(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},Se=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ee=function(e,t){return we("".concat(Mn,"/").concat(e),{signal:t.signal})},Oe=function(e,t,n){return we("".concat(Mn,"?patient=").concat(e,"&includeEncounterless=").concat(t),{signal:n.signal})},xe=function(e,t){return Nn.apply(this,arguments)},Ae=function(e,t){return we("".concat(Mn,"/").concat(e),{method:"DELETE",signal:t.signal})},ke=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Te=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ke(i,r,o,a,u,"next",e)}function u(e){ke(i,r,o,a,u,"throw",e)}a(void 0)}))}},je=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),new wt((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Fn.getState()),Fn.subscribe(n)}))},De=function(){return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),Fn},Ce=function(e){var t,n,r,o=null!==(r=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&&o.includes("_")&&(o=o.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(o)&&o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)},Ie=function(e,t){Bn=Date.now();var n={};return e&&t&&(n.Authorization="Basic ".concat(window.btoa("".concat(e,":").concat(t)))),Ue(we(Cn,{headers:n}))},Me=function(){Fn.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},Ne=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ln(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ln(t.privileges.find((function(t){return e===t.display})))})):(Ln(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ln(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},Re=function(){var e,t;return new Promise((function(n){var r=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(Fn.getState()),e||(t=Fn.subscribe(r))}))},Le=function(){return new Promise((function(e,t){Pe().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},Fe=function(e,t){return Un.apply(this,arguments)},Be=function(e,t,n){return Gn.apply(this,arguments)},Ue=function(e){return new Promise((function(t,n){e.then((function(e){var r;"object"==typeof(null==e?void 0:e.data)?(r={loaded:!0,session:e.data},Fn.setState(r),t(r)):(r={loaded:!1,session:null},Fn.setState(r),n(r))})).catch((function(e){(0,Rn.reportError)("Failed to fetch new session information: ".concat(e));var t={loaded:!1,session:null};Fn.setState(t),n(t)}))}))},Ge=function(){(0,Lt.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Lt.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Lt.validators.isUrl]},errors:{_type:Lt.Type.Array,_default:[401],_elements:{_type:Lt.Type.Number,_validators:[Lt.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Lt.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}),Ie()},ze=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},He=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ve=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){He(i,r,o,a,u,"next",e)}function u(e){He(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ke=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},qe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},$e=function(e,t){return Hn.apply(this,arguments)},We=function(e){return Vn.apply(this,arguments)},Ye=function(){return(0,Bt.getGlobalStore)("visit",er)},Je=function(e,t){Ye().setState({patientUuid:e,manuallySetVisitUuid:t})},Ze=function(e,t){return we("".concat(Pn,"/visit"),{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},Qe=function(e,t,n){return we("".concat(Pn,"/visit/").concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},Xe=function(e,t,n){var r=null!=n?n:Xn;return we("".concat(Pn,"/visit?patient=").concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})},et=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new nr(e,t))}},tt=function(e){return function(t){return 0===e?ir:t.lift(new ar(e))}},nt=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},rt=function(){return _e("".concat(Pn,"/visittype")).pipe(et((function(e){return e.data.results.map(nt)}))).pipe(tt(1))},ot=function(e){return{uuid:e.uuid,display:e.display}},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);var r=n.toString();return _e("".concat(Pn,"/location").concat(r?"?"+r:"")).pipe(et((function(e){return e.data.results.map(ot)}))).pipe(tt(1))};f.r(d),f.d(d,{OpenmrsFetchError:function(){return In},VisitMode:function(){return Kn},VisitStatus:function(){return qn},attachmentUrl:function(){return Mn},backendDependencies:function(){return sr},clearCurrentUser:function(){return Me},createAttachment:function(){return xe},defaultVisitCustomRepresentation:function(){return Xn},deleteAttachmentPermanently:function(){return Ae},fetchCurrentPatient:function(){return $e},fhirBaseUrl:function(){return Dn},getAttachmentByUuid:function(){return Ee},getAttachments:function(){return Oe},getCurrentUser:function(){return Pe},getLocations:function(){return it},getLoggedInUser:function(){return Re},getSessionLocation:function(){return Le},getSessionStore:function(){return De},getStartedVisit:function(){return tr},getVisitStore:function(){return Ye},getVisitTypes:function(){return rt},getVisitsForPatient:function(){return Xe},makeUrl:function(){return be},openmrsFetch:function(){return we},openmrsObservableFetch:function(){return _e},refetchCurrentUser:function(){return Ie},restBaseUrl:function(){return Pn},saveVisit:function(){return Ze},sessionEndpoint:function(){return Cn},sessionStore:function(){return Fn},setCurrentVisit:function(){return Je},setSessionLocation:function(){return Fe},setUserLanguage:function(){return Ce},setUserProperties:function(){return Be},setupApiModule:function(){return Ge},toLocationObject:function(){return ot},toVisitTypeObject:function(){return nt},updateVisit:function(){return Qe},userHasAccess:function(){return Ne}});var at,ut,st=function(e,t){return st=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},st(e,t)},ct=!1,lt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,ct=e},get useDeprecatedSynchronousErrorHandling(){return ct}},ft={closed:!0,next:function(e){},error:function(e){if(lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},dt=Array.isArray||function(e){return e&&"number"==typeof e.length},ht=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}(),pt=ht,yt=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 n;if(!this.closed){var r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i(o,e))o.remove(this);else if(null!==o)for(var f=0;f<o.length;++f)o[f].remove(this);if(t(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){n=i(e,pt)?c(e.errors):[e]}}if(dt(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(s(h))try{h.unsubscribe()}catch(e){n=n||[],i(e,pt)?n=n.concat(c(e.errors)):n.push(e)}}}if(n)throw new pt(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":a(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(!i(n,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(i(o,e)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[n]:u.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}(),vt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),mt=function(t){function n(e,r,o){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=ft;break;case 1:if(!e){a.destination=ft;break}if("object"==typeof e){i(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new gt(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new gt(a,e,r,o)}return a}return e(n,t),n.prototype[vt]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(yt),gt=function(n){function r(e,r,o,i){var a,u=n.call(this)||this;u._parentSubscriber=e;var s=u;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==ft&&(t((s=Object.create(r)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=o,u._complete=i,u}return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=lt.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):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!lt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return lt.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(mt),bt="function"==typeof Symbol&&Symbol.observable||"@@observable",wt=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(i(e,mt))return e;if(e[vt])return e[vt]()}return e||t||n?new mt(e,t,n):new mt(ft)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||lt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),lt.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){lt.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&&i(r,mt)?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(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[bt]=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?l: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=h(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}(),_t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,St="object"==typeof self&&self&&self.Object===Object&&self,Et=(_t||St||Function("return this")()).Symbol,Ot=Object.prototype,xt=Ot.hasOwnProperty,At=Ot.toString,kt=Et?Et.toStringTag:void 0,Tt=Object.prototype.toString,jt=Et?Et.toStringTag:void 0,Pt=(at=Object.getPrototypeOf,ut=Object,function(e){return at(ut(e))}),Dt=Function.prototype,Ct=Object.prototype,It=Dt.toString,Mt=Ct.hasOwnProperty,Nt=It.call(Object),Rt=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]":jt&&jt in Object(e)?function(e){var t=xt.call(e,kt),n=e[kt];try{e[kt]=void 0;var r=!0}catch(e){}var o=At.call(e);return r&&(t?e[kt]=n:delete e[kt]),o}(e):function(e){return Tt.call(e)}(e)}(e))return!1;var t=Pt(e);if(null===t)return!0;var n=Mt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&i(n,n)&&It.call(n)==Nt},Lt=f(824),Ft=f(513),Bt=f(385);(0,Bt.createGlobalStore)("breadcrumbs",[]);var Ut,Gt=Object.freeze({__proto__:null,get start(){return he},get ensureJQuerySupport(){return Y},get setBootstrapMaxTime(){return R},get setMountMaxTime(){return L},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return B},get registerApplication(){return oe},get unregisterApplication(){return ae},get getMountedApps(){return te},get getAppStatus(){return re},get unloadApplication(){return ue},get checkActivityFunctions(){return ie},get getAppNames(){return ne},get pathToActiveWhen(){return le},get navigateToUrl(){return H},get patchHistoryApi(){return $},get triggerAppChange(){return fe},get addErrorHandler(){return y},get removeErrorHandler(){return v},get mountRootParcel(){return C},get NOT_LOADED(){return Kt},get LOADING_SOURCE_CODE(){return qt},get NOT_BOOTSTRAPPED(){return $t},get BOOTSTRAPPING(){return Wt},get NOT_MOUNTED(){return Yt},get MOUNTING(){return Jt},get UPDATING(){return Qt},get LOAD_ERROR(){return tn},get MOUNTED(){return Zt},get UNLOADING(){return en},get UNMOUNTING(){return Xt},get SKIP_BECAUSE_BROKEN(){return nn}}),zt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Ht=function(){try{var e=new zt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?zt:"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},Vt=[],Kt="NOT_LOADED",qt="LOADING_SOURCE_CODE",$t="NOT_BOOTSTRAPPED",Wt="BOOTSTRAPPING",Yt="NOT_MOUNTED",Jt="MOUNTING",Zt="MOUNTED",Qt="UPDATING",Xt="UNMOUNTING",en="UNLOADING",tn="LOAD_ERROR",nn="SKIP_BECAUSE_BROKEN",rn=[],on=!1,an=!1,un=0,sn={parcels:{}},cn={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}},ln="undefined"!=typeof window,fn={hashchange:[],popstate:[]},dn=["hashchange","popstate"],hn=null,pn=!1;ln&&(window.singleSpaNavigate?console.warn(m(41,!1)):window.singleSpaNavigate=H);var yn=!1,vn={},mn=[],gn=!1,bn=!1,wn=[],_n=ln&&window.location.href;function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(bn)return new Promise((function(e,n){wn.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return mn.forEach((function(i){var a=i.status!==nn&&w(i);switch(i.status){case tn:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Kt:case qt:a&&n.push(i);break;case $t:case Yt:!a&&ee(_(i))?e.push(i):a&&r.push(i);break;case Zt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=_n,d=_n=window.location.href;return pe()?(bn=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return g(0===r.length?"before-no-app-change":"before-app-change",v(!0)),g("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return hn.call(window.history,history.state,"",f.substring(location.origin.length)),_n=location.href,bn=!1,Sn(e,t,!0);var r=a.map(Z),o=u.map(P).map((function(e){return e.then(Z)})).concat(r),i=Promise.all(o);i.then((function(){g("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return z(e).then((function(e){return de(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return de(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(z);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(m(42,!1))),console.warn(e),!1})))}function p(){var t=te();e.forEach((function(e){return e.resolve(t)}));try{g(0===r.length?"no-app-change":"app-change",v()),g("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(bn=!1,wn.length>0){var n=wn;wn=[],Sn(n)}return t}function y(){n||(e.forEach((function(e){V(e.eventArguments)})),V(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},Zt,[]),o(e,Yt,[]),o(e,Kt,[]),o(e,nn,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,Zt)})),a.forEach((function(e){y(e,Kt)})),u.forEach((function(e){y(e,Yt)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&O(p.detail,i),p;function y(e,t){var n=_(e);t=t||re(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function g(e,t){n||window.dispatchEvent(new Ht("single-spa:".concat(e),t))}}var En=!1,On={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=mn)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Sn,NOT_LOADED:Kt,toLoadPromise:z,toBootstrapPromise:j,unregisterApplication:ae,getProfilerData:function(){return rn}};ln&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=On);var xn="openmrs:history";function An(e,t,n){return An=ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Tn(o,n.prototype),o},An.apply(null,arguments)}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(e)}function Tn(e,t){return Tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tn(e,t)}function jn(e){var t="function"==typeof Map?new Map:void 0;return jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return An(e,arguments,kn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Tn(r,e)},jn(e)}var Pn="/ws/rest/v1",Dn="/ws/fhir2/R4",Cn="".concat(Pn,"/session"),In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tn(e,t)}(o,e);var t,n,r=(t=o,n=ge(),function(){var e,r=kn(t);if(n){var o=kn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":a(n))&&"function"!=typeof t?ye(e):t;var n}(this,e)});function o(e,t,n,a){var u;return function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),me(ye(u=r.call(this)),"response",void 0),me(ye(u),"responseBody",void 0),u.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(jn(Error)),Mn="".concat(Pn,"/attachment");function Nn(){var e;return e=function(e,t){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){return(n=new FormData).append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),[2,we("".concat(Mn),{method:"POST",body:n})]}))},Nn=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))},Nn.apply(this,arguments)}var Rn=f(254),Ln=function(e){return void 0===e},Fn=(0,Bt.createGlobalStore)("session",{loaded:!1,session:null}),Bn=0;function Un(){return(Un=Te((function(e,t){return je(this,(function(n){return[2,Ue(we(Cn,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))]}))}))).apply(this,arguments)}function Gn(){return(Gn=Te((function(e,t,n){return je(this,(function(r){switch(r.label){case 0:return n||(n=new AbortController),[4,we("".concat(Pn,"/user/").concat(e),{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return r.sent(),[2,Ie()]}}))}))).apply(this,arguments)}Fn.subscribe((function(e){e.loaded&&e.session&&Ce(e.session)}));var zn=f(738);function Hn(){return Hn=Ve((function(e,t){var n,r,o,i,a,u=arguments;return qe(this,(function(s){switch(s.label){case 0:return n=!(u.length>2&&void 0!==u[2])||u[2],e?(r=null,[4,Promise.all([we("".concat(Dn,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?We(e):Promise.resolve(null)])]):[3,2];case 1:if(o=Ke.apply(void 0,[s.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;s.label=2;case 2:return[2,null]}}))})),Hn.apply(this,arguments)}function Vn(){return(Vn=Ve((function(e){var t,n,r;return qe(this,(function(o){switch(o.label){case 0:return[4,(0,zn.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Kn,qn,$n=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Wn=function(t){function n(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(yt),Yn=function(t){function n(e){var n=t.call(this,e)||this;return n.destination=e,n}return e(n,t),n}(mt),Jn=function(t){function n(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return e(n,t),n.prototype[vt]=function(){return new Yn(this)},n.prototype.lift=function(e){var t=new Zn(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new $n;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 $n;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 $n;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new $n;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new $n;return this.hasError?(e.error(this.thrownError),yt.EMPTY):this.isStopped?(e.complete(),yt.EMPTY):(this.observers.push(e),new Wn(this,e))},n.prototype.asObservable=function(){var e=new wt;return e.source=this,e},n.create=function(e,t){return new Zn(e,t)},n}(wt),Zn=function(t){function n(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):yt.EMPTY},n}(Jn),Qn=function(t){function n(e){var n=t.call(this)||this;return n._value=e,n}return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new $n;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Jn);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Kn||(Kn={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(qn||(qn={}));var Xn="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",er=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};Ye().subscribe((function(e){var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var tr=new Qn(null),nr=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new rr(e,this.project,this.thisArg))},e}(),rr=function(t){function n(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(mt),or=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}(),ir=new wt((function(e){return e.complete()})),ar=function(){function e(e){if(this.total=e,this.total<0)throw new or}return e.prototype.call=function(e,t){return t.subscribe(new ur(e,this.total))},e}(),ur=function(t){function n(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(mt),sr={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),d}())}}}))},1704:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state","@openmrs/esm-utils"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.shallowEqual=e.shallowEqual}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},618:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},s=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return de(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(v().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");var n=b(),r=function(n){var r;return null===(r=n.configs[e])||void 0===r?void 0:r[t]};return{getInitialState:function(){return r(n.getInitialState())},getState:function(){var e;return null!==(e=r(n.getState()))&&void 0!==e?e:{loaded:!1,config:null}},setState:function(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.setState((function(n){n.configs[e]||(n.configs[e]={});var i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n}))},subscribe:function(e){return n.subscribe((function(t,n){var o=r(t),i=r(n);(0,Ne.shallowEqual)(o,i)||e(o,i)}))},destroy:function(){}}},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=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){E(e,t,n[t])}))}return e},x=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},A=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||T(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.")}()},k=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)||T(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.")}()},T=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},j=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=y(u);if(e.moduleLoaded[u]){var c=K(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=q(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=W(V(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=A(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=A(d.value,2),y=p[0];H(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=A(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),u=a.getState(),s={slots:O({},u.slots,i)};he(u,s)||a.setState(s)},D=function(e,t){var n=function(e,t){var n=Ge(we(e.schemas)),r=k(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=A(u.value,2);n=W([n,ze(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},C=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=z(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=x(O({},r[c.slotName]),E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){He(e,t);var n=ve(t,We);Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n)),moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},M=function(e){Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,We))})}))},N=function(e){Re.setState((function(t){return x(O({},t),{moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},R=function(e){Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,$e))})}))},L=function(e,t){He(e,t);var n=ve(t,We);Re.getState().schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n))})}))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";Re.setState((function(n){return x(O({},n),{providedConfigs:k(n.providedConfigs).concat([{source:t,config:e}])})}))},B=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=me(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e,t,n){var r=[new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))];return t&&n&&r.push(new Promise((function(e){var r=function(t){if(t.loaded&&t.config){var n,r=null!==(n=t.config["Translation overrides"])&&void 0!==n?n:{};e(r),i&&i()}},o=w(t,n);r(o.getState());var i=o.subscribe(r)}))),Promise.all(r)},G=function(e,t,n){Y(e,t,n);var r=qe(e,t);return Ke(e,r,n),r},z=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return A(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=V(o,i),p=$(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=W([$(d,h),y]),m=null!=f?f:o.schemas[t];Y(m,v,d);var g=qe(m,v);return Ke(m,g,d),delete g.extensionSlots,g},H=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&ee(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||ee(r,o+".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}))||ee(r,o+".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}))||ee(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(X(e.configure)||ee(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},V=function(e,t){return k(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},K=function(e,t,n){var r=t.schemas[e],o=$(e,V(t,n));Y(r,o,e);var i=qe(r,o);return Ke(r,i,e),delete i.extensionSlots,i},q=function(e,t,n){var r=$(e,V(t,n)),o=qe(We,r);return Ke(We,o,e),delete o.extensionSlots,o},$=function(e,t){return W(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},W=function(e){return ke(ve)({},e)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?Ve(f,c,l):"extensionSlots"===s&&""!==n||ee(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},J=function(e,t,n){return!t||Z(e,[{Array:Te,Boolean:je,ConceptUuid:Ie,Number:Pe,Object:Ce,String:De,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},Z=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(ee(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},Q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},X=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},ee=function(e,t){var n="".concat(e,":::").concat(t);Ue||(Ue=new Set),Ue.has(n)||(console.error(t),Ue.add(n))},te=function(e){e?Ue.forEach((function(t){t.startsWith(e)&&Ue.delete(t)})):Ue.clear()};i.r(a),i.d(a,{Type:function(){return be},clearConfigErrors:function(){return te},configExtensionStore:function(){return Fe},configInternalStore:function(){return Re},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return L},getConfig:function(){return B},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Be},inRange:function(){return Ye},isUrl:function(){return Ze},isUrlWithTemplateParameters:function(){return Je},oneOf:function(){return Qe},processConfig:function(){return G},provide:function(){return F},registerModuleLoad:function(){return N},registerModuleWithConfigSystem:function(){return M},registerTranslationNamespace:function(){return R},temporaryConfigStore:function(){return Le},validator:function(){return p},validators:function(){return Xe}});var ne="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},re=Object.prototype.toString,oe=function(){return"[object Arguments]"===re.call(arguments)?function(e){return"[object Arguments]"===re.call(e)}:function(e){return s("callee",e)}}(),ie=oe,ae=!{toString:null}.propertyIsEnumerable("toString"),ue=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=function(){return arguments.propertyIsEnumerable("length")}(),ce=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},le="function"!=typeof Object.keys||se?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=se&&ie(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(ae)for(n=ue.length-1;n>=0;)s(t=ue[n],e)&&!ce(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),fe=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function de(t,n,r,o){if(ne(t,n))return!0;var i,a,u=fe(t);if(u!==fe(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ne(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ne(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=le(t);if(f.length!==le(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!s(p,n)||!de(n[p],t[p],d,h))return!1;l-=1}return!0}var he=r((function(e,t){return de(e,t,[],[])})),pe=l((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),ye=l((function e(t,n,r){return pe((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),ve=r((function(e,t){return ye((function(e,t,n){return n}),e,t)})),me=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ge(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ge(e[u],t,n,!0):e[u];return o};switch(fe(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 be,we=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ge(e,[],[],!0)})),_e=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Se=n((function(e){return!!_e(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))})),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=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),xe=Oe,Ae="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",ke=l((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 h(e,t,n,"fantasy-land/reduce");if(null!=n[Ae])return d(e,t,n[Ae]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(be||(be={}));var Te=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=p((function(e){return"number"==typeof e}),"must be a number"),De=p((function(e){return"string"==typeof e}),"must be a string"),Ce=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Ne=i(618),Re=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Le=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Fe=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});j(Re.getState(),Le.getState()),Re.subscribe((function(e){return j(e,Le.getState())})),Le.subscribe((function(e){return j(Re.getState(),e)})),D(Re.getState(),Le.getState()),Re.subscribe((function(e){return D(e,Le.getState())})),Le.subscribe((function(e){return D(Re.getState(),e)})),P(Re.getState(),Le.getState()),Re.subscribe((function(e){return P(e,Le.getState())})),Le.subscribe((function(e){return P(Re.getState(),e)})),C(Re.getState(),Fe.getState(),Le.getState()),Re.subscribe((function(e){C(e,Fe.getState(),Le.getState())})),Fe.subscribe((function(e){C(Re.getState(),e,Le.getState())})),Le.subscribe((function(e){C(Re.getState(),Fe.getState(),e)}));var Ue=new Set;function Ge(e){return e.hasOwnProperty("_default")?x(O({},e),{_value:e._default,_source:"default"}):X(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ge(e[n]),t}),{}):{}}function ze(e,t){return X(e)?Object.keys(e).reduce((function(n,r){return n[r]=ze(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!X(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||He(e,a,i);var s=a._elements;if(Q(s)&&He(e,s,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(be).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(be).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),s&&y&&![be.Array,be.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){J(n,e._type,t),X(t)?e._type===be.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];Ve(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||Y(e,t,n):e._type===be.Array&&function(e,t,n){if(J(n,be.Array,t)){if(Q(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;J("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Z(n,e._validators,t),X(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===be.Object&&e._elements?Ke(e._elements,c,l):Ke(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ke(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}var qe=function(e,t){var n=we(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Q(i))if(o._type===be.Array&&Array.isArray(r)){var u=r.map((function(e){return qe(i,e)}));n[t]=u}else if(o._type===be.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=qe(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(X(o)){var p=null!=r?r:{};X(p)&&(n[t]=qe(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},$e={"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:be.Object,_default:{},_validators:[p((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ".concat(t.join(", "),".")}))]}},We=O({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:be.Array,_default:[]}}},$e),Ye=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Je=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},Ze=Je([]),Qe=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Xe={inRange:Ye,isUrl:Ze,isUrlWithTemplateParameters:Je,oneOf:Qe}}(),a}())}}}))},7910:()=>{System.register(["@openmrs/esm-globals","@openmrs/esm-translations"],(function(e,t){var n={},r={};return{setters:[function(e){n.dispatchToastShown=e.dispatchToastShown},function(e){r.getCoreTranslation=e.getCoreTranslation}],execute:function(){e(function(){"use strict";var e={728:function(e){e.exports=n},901:function(e){e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){o.S={};var e={},t={};o.I=function(n,r){r||(r=[]);var i=t[n];if(i||(i=t[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),e[n])return e[n];o.o(o.S,n)||(o.S[n]={}),o.S[n];var a=[];return e[n]=a.length?Promise.all(a).then((function(){return e[n]=1})):1}}}();var i={};return function(){var e=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},t=function(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,s,"next",t)}function s(t){e(a,o,i,u,s,"throw",t)}u(void 0)}))}},n=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},r=function(e){return e.replace(/[\/\-@]/g,"_")},a=function(e){return f.apply(this,arguments)},u=function(e,t){return d.apply(this,arguments)},s=function(){return h.apply(this,arguments)};o.r(i),o.d(i,{getCurrentImportMap:function(){return s},importDynamic:function(){return a},preloadImport:function(){return u},slugify:function(){return r}});var c=o(728),l=o(901);function f(){return f=t((function(e){var t,i,a,s,c,l,f,d,h,p,y=arguments;return n(this,(function(n){switch(n.label){case 0:return t=y.length>1&&void 0!==y[1]?y[1]:"./start",a=!(null==(i=y.length>2?y[2]:void 0)?void 0:i.maxLoadingTime)||i.maxLoadingTime<=0?6e5:i.maxLoadingTime,s=void 0,[4,Promise.race([u(e,null==i?void 0:i.importMap),new Promise((function(t,n){s=setTimeout((function(){var t;n(new Error("Could not resolve requested script, ".concat(e,", within ").concat((t=a)<1e3?"".concat(t," milliseconds"):t<6e4?"".concat(Math.floor(t/1e3)," seconds"):t<36e5?"".concat(Math.floor(t/6e4)," minutes"):t<864e5?"".concat(Math.floor(t/36e5)," hours"):"".concat(Math.floor(t/864e5)," days"),".")))}),a)}))])];case 1:if(n.sent(),s&&clearTimeout(s),c=r(e),"object"!=typeof(v=l=window[c])||null===v||!("init"in v)||"function"!=typeof v.init||!("get"in v)||"function"!=typeof v.get)throw f="The global variable ".concat(c," does not refer to a federated module"),console.error(f),new Error(f);return l.init(o.S.default),[4,l.get(t)];case 2:if(d=n.sent(),"object"!=typeof(h=d())||null===h)throw p="Container for ".concat(e," did not return an ESM module as expected"),console.error(p),new Error(p);return[2,h]}var v}))})),f.apply(this,arguments)}function d(){return(d=t((function(e,t){var o,i,a,u,f,d,h,y;return n(this,(function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.trim().length)throw o="Attempted to call importDynamic() without supplying a package to load",console.error(o),new Error(o);return i=r(e),window[i]?[3,7]:null==t?[3,1]:(u=t,[3,3]);case 1:return[4,s()];case 2:u=n.sent(),n.label=3;case 3:if(!(a=u).imports.hasOwnProperty(e))throw f="Could not find the package ".concat(e," defined in the current importmap"),console.error(f),new Error(f);(d=a.imports[e]).startsWith("./")&&(d=window.spaBase+d.substring(1)),h=!!window.localStorage.getItem("import-map-override:".concat(e)),n.label=4;case 4:return n.trys.push([4,6,,7]),[4,new Promise((function(e,t){!function(e,t,n){var r=document.head.querySelector('script[src="'.concat(e,'"]')),o=window[p];if(o||(o=window[p]=new Set([])),r){var i,a,u;o.has(e)?(u=function(){i&&r.removeEventListener("load",i),a&&r.removeEventListener("error",a)},i=function(){u(),t(null)},a=function(e){u(),n(e.message)},r.addEventListener("load",i),r.addEventListener("error",a)):(console.warn("Script at ".concat(e," already loaded. Not loading it again.")),t(null))}else{o.add(e);var s=document.createElement("script");s.src=e,s.type="text/javascript",s.async=!0;var c,l,f,d=setTimeout((function(){console.error("The script at ".concat(e," did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration."))}),5e3);f=function(){clearTimeout(d),o.delete(e),c&&s.removeEventListener("load",c),l&&s.removeEventListener("error",l)},c=function(){f(),t(null)},l=function(t){f();var r,o="Failed to load script from ".concat(e);console.error(o,t),n(null!==(r=t.message)&&void 0!==r?r:o)},s.addEventListener("load",c),s.addEventListener("error",l),document.head.appendChild(s)}}(d,e,t)}))];case 5:return[2,n.sent()];case 6:return y=n.sent(),h&&(0,c.dispatchToastShown)({kind:"error",title:(0,l.getCoreTranslation)("scriptLoadingFailed","Error: Script failed to load"),description:(0,l.getCoreTranslation)("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:d}),actionButtonLabel:(0,l.getCoreTranslation)("resetOverrides","Reset overrides"),onActionButtonClick:function(){window.importMapOverrides.resetOverrides(),window.location.reload()}}),[2,Promise.reject(y)];case 7:return[2,Promise.resolve()]}}))}))).apply(this,arguments)}function h(){return(h=t((function(){return n(this,(function(e){return[2,window.importMapOverrides.getCurrentPageMap()]}))}))).apply(this,arguments)}var p=Symbol("__openmrs_script_loading")}(),i}())}}}))},9855:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchToastShown=e.dispatchToastShown}],execute:function(){e(function(){"use strict";var e={728:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};r.r(o),r.d(o,{createErrorHandler:function(){return t},reportError:function(){return e}});var i=r(728);window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.dispatchToastShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var t;console.error("Unhandled rejection: ",e.reason),(0,i.dispatchToastShown)({description:null!==(t=e.reason)&&void 0!==t?t:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}}(),o}())}}}))},525:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}System.register([],(function(e,n){return{execute:function(){e(function(){"use strict";var e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},u=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,s,"next",e)}function s(e){a(i,r,o,u,s,"throw",e)}u(void 0)}))}},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):(n=e,null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):n instanceof r);var n,r},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},f=function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},h=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},S)},p=function(e){return Z.apply(this,arguments)},y=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},v=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},m=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},g=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");null==t&&(t={});var r=function(e){return x(e,$)}(t),o=X("string"==typeof e?F(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}},w=function(e){return Q.apply(this,arguments)},_=function(e){return F(e)},S=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||c(e,Date)},E=function(e){return"boolean"==typeof e},O=function(e){return"number"==typeof e},x=function(e,t){var n={thisObj:void 0,variables:l({},e),globals:l({},t),addVariables:function(e){return this.variables=l({},this.variables,e),this}};return n.addVariables.bind(n),n},A=function(e){return function(t){return null===t?null:X(t,e)}},k=function(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}},T=function(e){return e?"MemberExpression"===e.type?null===(t=e.property)||void 0===t?void 0:t.name:e.name:null;var t},j=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},D=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e},C=function(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");var t,n={globals:D({},W),isLocalExpression:!1,variables:new Set};return ne("string"==typeof e?F(e):e,n),function(e){if(Array.isArray(e))return j(e)}(t=n.variables)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},I=function(e){return function(t){return null===t?null:ne(t,e)}},M={d:function(e,t){for(var n in t)M.o(t,n)&&!M.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},N={};M.r(N),M.d(N,{compile:function(){return _},evaluate:function(){return h},evaluateAsBoolean:function(){return y},evaluateAsBooleanAsync:function(){return v},evaluateAsNumber:function(){return m},evaluateAsNumberAsync:function(){return g},evaluateAsType:function(){return b},evaluateAsTypeAsync:function(){return w},evaluateAsync:function(){return p},extractVariableNames:function(){return C},jsep:function(){return F}});var R=function(){function e(n){t(this,e),this.expr=n,this.index=0}return r(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find((function(e){return e.call(n.context,n),n.node})),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,a,u,s,c;if(!(a=this.gobbleToken()))return a;if(!(n=this.gobbleBinaryOp()))return a;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=[a,i,u];n=this.gobbleBinaryOp();){if(0===(r=e.binaryPrecedence(n))){this.index-=n.length;break}i={value:n,prec:r,right_a:e.right_associative.has(n)},c=n;for(var l=function(e){return i.right_a&&e.right_a?r>e.prec:r<=e.prec};o.length>2&&l(o[o.length-2]);)u=o.pop(),n=o.pop().value,a=o.pop(),t={type:e.BINARY_EXP,operator:n,left:a,right:u},o.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+c),o.push(i,t)}for(t=o[s=o.length-1];s>1;)t={type:e.BINARY_EXP,operator:o[s-1].value,left:o[s-2],right:t},s-=2;return t}},{key:"gobbleToken",value:function(){var t,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"))return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(r=(n=this.expr.substr(this.index,e.max_unop_len)).length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:i,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,n,r="";e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(r+=this.expr.charAt(this.index++),"+"!==(t=this.char)&&"-"!==t||(r+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return n=this.code,e.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(n===e.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(r),raw:r}}},{key:"gobbleStringLiteral",value:function(){for(var t="",n=this.index,r=this.expr.charAt(this.index++),o=!1;this.index<this.expr.length;){var i=this.expr.charAt(this.index++);if(i===r){o=!0;break}if("\\"===i)switch(i=this.expr.charAt(this.index++),i){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=i}else t+=i}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:"gobbleArguments",value:function(t){for(var n=[],r=!1,o=0;this.index<this.expr.length;){this.gobbleSpaces();var i=this.code;if(i===t){r=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===e.COMMA_CODE){if(this.index++,++o!==n.length)if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=n.length;a<o;a++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{var u=this.gobbleExpression();u&&u.type!==e.COMPOUND||this.throwError("Expected comma"),n.push(u)}}return r||this.throwError("Expected "+String.fromCharCode(t)),n}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.3.9"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,n){return e.literals[t]=n,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t;return(t=Math).max.apply(t,[0].concat(o(Object.keys(e).map((function(e){return e.length})))))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}(),L=new(function(){function e(){t(this,e)}return r(e,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}]),e}());Object.assign(R,{hooks:L,plugins:new(function(){function e(n){t(this,e),this.jsep=n,this.registered={}}return r(e,[{key:"register",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this;t.forEach((function(e){if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");r.registered[e.name]||(e.init(r.jsep),r.registered[e.name]=e)}))}}]),e}())(R),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),R.max_unop_len=R.getMaxKeyLen(R.unary_ops),R.max_binop_len=R.getMaxKeyLen(R.binary_ops);var F=function(e){return new R(e).parse()},B=Object.getOwnPropertyNames((function e(){t(this,e)}));Object.getOwnPropertyNames(R).filter((function(e){return!B.includes(e)&&void 0===F[e]})).forEach((function(e){F[e]=R[e]})),F.Jsep=R,F.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}});var U,G,z="ArrowFunctionExpression",H={name:"arrow",init:function(e){function t(n){n&&(Object.values(n).forEach((function(e){e&&"object"==typeof e&&t(e)})),"=>"===n.operator&&(n.type=z,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",(function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var r=this.gobbleBinaryOp();if("=>"===r){var o=this.gobbleBinaryExpression();return o||this.throwError("Expected expression after "+r),void(t.node={type:z,params:null,body:o})}}this.index=n}})),e.hooks.add("after-expression",(function(e){t(e.node)}))}},V={name:"numbers",init:function(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8}function r(e,t){return 95===e||t.some((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||i(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.")}()}(t,2),r=n[0],o=n[1];return e>=r&&e<=o}))}function o(t){var n=this,r=this.index,o="",i=function(){for(;e.isDecimalDigit(n.code)||95===n.code;)95===n.code?n.index++:o+=n.expr.charAt(n.index++)};i(),this.code===e.PERIOD_CODE&&(o+=this.expr.charAt(this.index++),i());var a=this.char;"e"!==a&&"E"!==a||(o+=this.expr.charAt(this.index++),"+"!==(a=this.char)&&"-"!==a||(o+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+o+this.char+")"));var u=this.code;if(e.isIdentifierStart(u))this.throwError("Variable names cannot start with a number ("+o+this.char+")");else if(u===e.PERIOD_CODE)return o.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:u,number:o},null,2))),void(this.index=r);t.node={type:e.LITERAL,value:parseFloat(o),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",(function(i){if(48===this.code){var a=this.index,u=this.expr.charAt(this.index+1),s=t.call(this,u);if(!s)return;for(var c="";r(this.code,s);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0)))return this.index=a+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(c,n(u)),raw:this.expr.substring(a,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)}))}},K={name:"regex",init:function(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(47===this.code&&!r){for(var o=this.expr.slice(n,this.index),i=void 0,a="";++this.index<this.expr.length;){var u=this.code;if(!(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57))break;a+=this.char}try{i=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}},q={name:"jsepTemplateLiteral",init:function(e){function t(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(96===this.code){for(var n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",i="",a=!1,u=this.expr.length,s=function(){return n.quasis.push({type:"TemplateElement",value:{raw:i,cooked:r},tail:a})};this.index<u;){var c,l=this.expr.charAt(++this.index);if("`"===l)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===l&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),i="",r="",(c=n.expressions).push.apply(c,o(this.gobbleExpressions(125))),125!==this.code&&this.throwError("unclosed ${");else if("\\"===l)switch(i+=l,l=this.expr.charAt(++this.index),i+=l,l){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=l}else r+=l,i+=l}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",(function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node}))}},$={Array,Boolean,Symbol,Infinity:1/0,NaN:NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},W=(U=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){e(t,n,r[n])}))}return t}({},$),G=null!=(G={Promise})?G:{},Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(G)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(G)).forEach((function(e){Object.defineProperty(U,e,Object.getOwnPropertyDescriptor(G,e))})),U);function Y(e,t,n){return Y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&J(o,n.prototype),o},Y.apply(null,arguments)}function J(e,t){return J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},J(e,t)}function Z(){return Z=u((function(e){var t=arguments;return d(this,(function(n){return[2,w(e,t.length>1&&void 0!==t[1]?t[1]:{},S)]}))})),Z.apply(this,arguments)}function Q(){return Q=u((function(e){var t,n,r,o=arguments;return d(this,(function(i){return t=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,"string"==typeof e||"object"==typeof e&&e&&"type"in e?(null==t&&(t={}),r=function(e){return x(e,W)}(t),[2,Promise.resolve(X("string"==typeof e?F(e):e,r)).then((function(t){if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}}))]):[2,Promise.reject("Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string."))]}))})),Q.apply(this,arguments)}function X(e,t){switch(e.type){case"UnaryExpression":return function(e,t){var n=X(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw"Expression evaluator does not support operator '".concat(e.operator,"''")}}(e,t);case"BinaryExpression":return function(e,t){var n=X(e.left,t),r=X(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return Math.pow(n,r);case"==":return n==r;case"===":return n===r;case"!=":return n!=r;case"!==":return n!==r;case">":return n>r;case">=":return n>=r;case"<":return n<r;case"<=":return n<=r;case"in":return n in r;case"&&":return n&&r;case"||":return n||r;case"??":return null!=n?n:r;default:throw"Expression evaluator does not support operator '".concat(e.operator,"' operator")}}(e,t);case"ConditionalExpression":return function(e,t){var n=X(e.test,t);return X(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(A(t)),o=X(e.callee,t);if(!o)throw"No function named ".concat(T(e.callee)," is defined in this context");if("function"!=typeof o)throw"".concat(T(e.callee)," is not a function");return o.apply(void 0,f(r))}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o,i=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map((function(e){if("Identifier"===e.type)return e.name;throw"Cannot handle parameter of type ".concat(e.type)})))&&void 0!==r?r:[];return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r.length<i.length)throw"Required argument(s) ".concat(i.slice(r.length,-1).join(", ")," were not provided");var a=Object.fromEntries(i.reduce((function(e,t,n){var o=r[n];return te(o)&&e.push([t,o]),e}),[]));return X(e.body,t.addVariables(a))}.bind(null!==(o=t.thisObj)&&void 0!==o?o:null)}(e,t);case"MemberExpression":return function(e,t){var n=X(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":var r=ee(e.object,t);throw ReferenceError("ReferenceError: ".concat(r," is not defined"));case"MemberExpression":var o=ee(e.property,t);throw TypeError("TypeError: cannot read properties of undefined (reading '".concat(o,"')"));default:throw"VisitMemberExpression does not support operator '".concat(e.object.type,"' type")}var i,a=n;if("string"==typeof n)a=String.prototype;else if("number"==typeof n)a=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type ".concat(void 0===n?"undefined":function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;var t}(n));switch(t.thisObj=a,e.property.type){case"Identifier":case"MemberExpression":i=X(e.property,t);break;default:var u=X(e.property,t);if(void 0===u)throw{type:"Illegal property access",message:"No property was supplied to the property access"};k(u),i=n[u]}return"function"==typeof i?i.bind(n):i}(e,t);case"ArrayExpression":return function(e,t){var n;return null===(n=e.elements)||void 0===n?void 0:n.map(A(t))}(e,t);case"SequenceExpression":return function(e,t){var n=e.expressions.map(A(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(A(t));switch(e.callee.name){case"Date":return Y(Date,f(r));case"RegExp":return Y(RegExp,f(r));default:throw"Cannot instantiate object of type ".concat(e.callee.name)}}(e,t);case"Literal":return function(e,t){return k(e.value),e.value}(e);case"Identifier":return function(e,t){k(e.name);var n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){var r=n[e.name];return k(r),r}if(t.variables&&e.name in t.variables){var o=t.variables[e.name];return k(o),o}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){var n,r,o,i,a=null!==(o=null===(n=e.expressions)||void 0===n?void 0:n.map(A(t)))&&void 0!==o?o:[],u=null!==(i=null===(r=e.quasis)||void 0===r?void 0:r.map(A(t)))&&void 0!==i?i:[];return u.filter((function(e){return!e.tail})).map((function(e){return e.value})).join("")+a.join("")+u.filter((function(e){return e.tail})).map((function(e){return e.value})).join("")}(e,t);case"TemplateElement":return function(e,t){return{value:e.cooked,tail:e.tail}}(e);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}function ee(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ee(e.property,t);default:throw"VisitExpressionName does not support expression of type '".concat(e.type,"'")}}function te(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||c(e,RegExp))return!0;if("object"==typeof e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(!te(e[o.value]))return!1}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!0}if(Array.isArray(e)){var a=!0,u=!1,s=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0)if(!te(l.value))return!1}catch(e){u=!0,s=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw s}}}return!1}function ne(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return ne(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[ne(e.left,t),ne(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[ne(e.consequent,t),ne(e.test,t),ne(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){var n,r=ne(e.callee,t);return null===(n=e.arguments)||void 0===n||n.map(I(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o=D({},t);o.isLocalExpression=!0;var i,a=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map(I(o)))&&void 0!==r?r:[],u=null!==(i=ne(e.body,o))&&void 0!==i?i:[];if(u&&Array.isArray(u)){var s=!0,c=!1,l=void 0;try{for(var f,d=u[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;a.includes(h)||t.variables.add(h)}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}(e,t);case"MemberExpression":return function(e,t){ne(e.object,t);var n=D({},t);n.isLocalExpression=!0,ne(e.property,n)}(e,t);case"ArrayExpression":return function(e,t){var n;null===(n=e.elements)||void 0===n||n.map(I(t))}(e,t);case"SequenceExpression":return function(e,t){var n;null===(n=e.expressions)||void 0===n||n.map(I(t))}(e,t);case"NewExpression":return function(e,t){var n;null===(n=e.arguments)||void 0===n||n.map(I(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){var n,r;null===(n=e.expressions)||void 0===n||n.map(I(t)),null===(r=e.quasis)||void 0===r||r.map(I(t))}(e,t);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}return F.plugins.register(H),F.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",(function(t){var n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;for(var r=t.node;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}}))}}),F.plugins.register(V),F.plugins.register(K),F.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}}),F.plugins.register(q),F.addBinaryOp("in",7),F.addBinaryOp("??",1),N}())}}}))},1491:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","@openmrs/esm-expression-evaluator","@openmrs/esm-feature-flags","@openmrs/esm-utils","single-spa"],(function(i,a){var u={},s={},c={},l={},f={},d={},h={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){s.createGlobalStore=e.createGlobalStore,s.getGlobalStore=e.getGlobalStore},function(e){c.sessionStore=e.sessionStore,c.userHasAccess=e.userHasAccess},function(e){l.evaluateAsBoolean=e.evaluateAsBoolean},function(e){f.featureFlagsStore=e.featureFlagsStore},function(e){d.isOnline=e.isOnline},function(e){h.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},766:function(e){"use strict";e.exports=c},824:function(e){"use strict";e.exports=u},234:function(e){"use strict";e.exports=l},708:function(e){"use strict";e.exports=f},685:function(e){"use strict";e.exports=s},618:function(e){"use strict";e.exports=d},645:function(e){"use strict";e.exports=h}},a={};function p(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e](n,n.exports,p),n.exports}p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){"use strict";var i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},u=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},s=function(e){var t=this.__data__=new Be(e);this.size=t.size},c=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new vt;++t<n;)this.add(e[t])},l=function(e){var t=Pn.getState(),n=e(t);n!==t&&Pn.setState(n)},f=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;t.push({slotModuleName:h.slotModuleName,extensionModuleName:u.moduleName,slotName:h.slotName,extensionId:h.id})}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}kn(Tn.configExtensionStore.getState().mountedExtensions,t)||Tn.configExtensionStore.setState({mountedExtensions:t})},d=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=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){h(e,t,n[t])}))}return e},m=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},g=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||w(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.")}()},b=function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(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.")}()},w=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}},_=function(e,t,n,r,o){var i={},a=(0,Ln.isOnline)(),u=Object.entries(r.flags).filter((function(e){return g(e,2)[1].enabled})).map((function(e){return g(e,1)[0]})),s=!0,c=!1,l=void 0;try{for(var f,d=Object.entries(e.slots)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=g(f.value,2),p=h[0],y=h[1],v=D(p,e,(0,Tn.getExtensionSlotConfigFromStore)(t,y.name).config,n,u,a,o.session);i[p]={moduleName:y.moduleName,assignedExtensions:v}}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}kn(Bn.getState().slots,i)||Bn.setState({slots:i})},S=function(){_(Fn.getState(),Un.getState(),Gn.getState(),Nn.featureFlagsStore.getState(),In.sessionStore.getState())},E=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},O=function(e){return g(e.split("#"),1)[0]},x=function(e,t){var n=O(t);return e.extensions[n]},A=function(e){return x(Fn.getState(),e)},k=function(e,t){l((function(n){var r=n.slots[e];return m(v({},n),r?{slots:m(v({},n.slots),h({},e,m(v({},r),{attachedIds:b(r.attachedIds).concat([t])})))}:{slots:m(v({},n.slots),h({},e,m(v({},E(e)),{attachedIds:[t]})))})}))},T=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?m(v({},n),{slots:m(v({},n.slots),h({},e,m(v({},r),{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){l((function(t){var n=t.slots[e];return n?m(v({},t),{slots:m(v({},t.slots),h({},e,m(v({},n),{attachedIds:[]})))}):t}))},P=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},D=function(e,t,n,r,o,i,a){var u=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=Fn.getState().extensions;return b(t).concat(b(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=P(e,o,null===(r=i[O(e)])||void 0===r?void 0:r.order,t),s=P(n,o,null===(a=i[O(n)])||void 0===a?void 0:a.order,t);return-1===s?-1:-1===u?1:u-s}))}(n,t.slots[e].attachedIds),s=[],c=!0,l=!1,f=void 0;try{for(var d,h=u[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value,y=(0,Tn.getExtensionConfigFromStore)(r,e,p).config,v=O(p),m=t.extensions[v];if(m){var g,w,_,S,E,x,A,k=null!==(x=null!==(E=null==y||null===(g=y["Display conditions"])||void 0===g?void 0:g.privileges)&&void 0!==E?E:m.privileges)&&void 0!==x?x:[];if(k&&("string"==typeof k||Array.isArray(k)&&k.length>0)){if(!(null==a?void 0:a.user))continue;if(!(0,In.userHasAccess)(k,a.user))continue}var T,j,D,C,I=null!==(A=null==y||null===(w=y["Display conditions"])||void 0===w?void 0:w.expression)&&void 0!==A?A:null;if(null!==I)try{if(!(0,Mn.evaluateAsBoolean)(I,{session:a}))continue}catch(e){console.error("Error while evaluating expression ".concat(I),e);continue}if(m.featureFlag&&!o.includes(m.featureFlag))continue;if(window.offlineEnabled&&!Te(i,m.online,m.offline))continue;s.push({id:p,name:v,moduleName:m.moduleName,config:y,featureFlag:m.featureFlag,meta:m.meta,online:null===(j=null!==(T=null==y||null===(_=y["Display conditions"])||void 0===_?void 0:_.online)&&void 0!==T?T:m.online)||void 0===j||j,offline:null!==(C=null!==(D=null==y||null===(S=y["Display conditions"])||void 0===S?void 0:S.offline)&&void 0!==D?D:m.offline)&&void 0!==C&&C})}}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}return s},C=function(e){var t=Fn.getState(),n=(0,Tn.getExtensionSlotConfig)(e).config,r=Gn.getState(),o=Nn.featureFlagsStore.getState(),i=In.sessionStore.getState(),a=(0,Ln.isOnline)();return D(e,t,n,r,Object.entries(o.flags).filter((function(e){return g(e,2)[1].enabled})).map((function(e){return g(e,1)[0]})),a,i.session)},I=function(e){$n.setState((function(t){return t.modals[e.name]=e,t}))},M=function(e){var t=$n.getState().modals[e];if(!t){var n=A(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn("Modal ".concat(e,' was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.')),I(t))}return t},N=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},R=function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")},L=function(e){var t=function(e,t){if("object"!=Wn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Wn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wn(t)?t:t+""},F=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,L(r.key),r)}},B=function(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},U=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},G=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yn(e,t)},z=function(e,t){if(t&&("object"==Wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)},H=function(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},V=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},K=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},q=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},$=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},W=function(e){return null==e?"":""+e},Y=function(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())}},J=function(e,t,n){var r=Y(e,t,Object);r.obj[r.k]=n},Z=function(e,t){var n=Y(e,t),r=n.obj,o=n.k;if(r)return r[o]},Q=function(e,t,n){var r=Z(e,n);return void 0!==r?r:Z(t,n)},X=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},ee=function(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return nr[e]})):e},te=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ne=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},re=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},oe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},ie=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ae=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ue=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},se=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ce=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},le=function(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}},fe=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},de=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},he=function(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.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e},pe=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ye=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},ve=function(){},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=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){be(e,t,n[t])}))}return e},_e=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},Se=function(e){return function(e){if(Array.isArray(e))return ge(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ee=function(e){var t,n,r,o,i,a;Er.setState((function(u){return{workspaces:_e(we({},u.workspaces),be({},e.name,_e(we({},e),{preferredWindowSize:null!==(t=e.preferredWindowSize)&&void 0!==t?t:"normal",type:null!==(n=e.type)&&void 0!==n?n:"form",canHide:null!==(r=e.canHide)&&void 0!==r&&r,canMaximize:null!==(o=e.canMaximize)&&void 0!==o&&o,width:null!==(i=e.width)&&void 0!==i?i:"narrow",groups:null!==(a=e.groups)&&void 0!==a?a:[]})))}}))},Oe=function(e){Or.setState((function(t){var n=t.workspaceGroups[e.name];return n?{workspaceGroups:_e(we({},t.workspaceGroups),be({},e.name,_e(we({},n),{members:Array.from(new Set(Se(n.members).concat(Se(e.members))))})))}:{workspaceGroups:_e(we({},t.workspaceGroups),be({},e.name,{name:e.name,members:e.members}))}}))},xe=function(e){var t=Er.getState().workspaces;if(t[e])return t[e];var n,r,o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w=A(e);if(w)return xr.has(e)||(console.warn("The workspace '".concat(e,'\' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.')),xr.add(e)),{name:w.name,title:(m=w,b=null==m||null===(g=m.meta)||void 0===g?void 0:g.title,"string"==typeof b?b:b&&"object"==typeof b?(p=m.moduleName,y=b.key,v=b.default,Sr.t(y,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){me(e,t,n[t])}))}return e}({ns:p,defaultValue:v},void 0))):m.name),moduleName:w.moduleName,preferredWindowSize:null!==(s=null===(n=w.meta)||void 0===n?void 0:n.screenSize)&&void 0!==s?s:"normal",load:w.load,type:null!==(c=null===(r=w.meta)||void 0===r?void 0:r.type)&&void 0!==c?c:"form",canHide:null!==(l=null===(o=w.meta)||void 0===o?void 0:o.canHide)&&void 0!==l&&l,canMaximize:null!==(f=null===(i=w.meta)||void 0===i?void 0:i.canMaximize)&&void 0!==f&&f,width:null!==(d=null===(a=w.meta)||void 0===a?void 0:a.width)&&void 0!==d?d:"narrow",groups:null!==(h=null===(u=w.meta)||void 0===u?void 0:u.groups)&&void 0!==h?h:[]};throw new Error("No workspace named '".concat(e,"' has been registered."))},Ae=function(e){var t=Or.getState().workspaceGroups;if(t[e])return t[e];throw new Error("No workspace group named '".concat(e,"' has been registered."))},ke=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Te((0,Ln.isOnline)(),e,t)},Te=function(e){return Boolean(e?!(arguments.length>1&&void 0!==arguments[1])||arguments[1]:arguments.length>2&&void 0!==arguments[2]&&arguments[2])},je=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Pe=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},De=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ce=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){De(e,t,n[t])}))}return e},Ie=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},Me=function(e,t,n,r){return Tr.apply(this,arguments)};p.r(y),p.d(y,{attach:function(){return k},checkStatus:function(){return ke},checkStatusFor:function(){return Te},detach:function(){return T},detachAll:function(){return j},extensionStore:function(){return jr},getAssignedExtensions:function(){return C},getExtensionInternalStore:function(){return Dn},getExtensionNameFromId:function(){return O},getExtensionRegistration:function(){return A},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Cn},getModalRegistration:function(){return M},getWorkspaceGroupRegistration:function(){return Ae},getWorkspaceRegistration:function(){return xe},registerExtension:function(){return Vn},registerExtensionSlot:function(){return Kn},registerModal:function(){return I},registerWorkspace:function(){return Ee},registerWorkspaceGroup:function(){return Oe},renderExtension:function(){return Me},reset:function(){return qn},updateInternalExtensionStore:function(){return l}});var Ne=function(e,t){return e===t||e!=e&&t!=t},Re=function(e,t){for(var n=e.length;n--;)if(Ne(e[n][0],t))return n;return-1},Le=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=Re(t,e);return!(n<0||(n==t.length-1?t.pop():Le.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return Re(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Fe,Be=i,Ue="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=Ue||Ge||Function("return this")(),He=ze.Symbol,Ve=Object.prototype,Ke=Ve.hasOwnProperty,qe=Ve.toString,$e=He?He.toStringTag:void 0,We=Object.prototype.toString,Ye=He?He.toStringTag:void 0,Je=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ye&&Ye in Object(e)?function(e){var t=Ke.call(e,$e),n=e[$e];try{e[$e]=void 0;var r=!0}catch(e){}var o=qe.call(e);return r&&(t?e[$e]=n:delete e[$e]),o}(e):function(e){return We.call(e)}(e)},Ze=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Qe=function(e){if(!Ze(e))return!1;var t=Je(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Xe=ze["__core-js_shared__"],et=(Fe=/[^.]+$/.exec(Xe&&Xe.keys&&Xe.keys.IE_PROTO||""))?"Symbol(src)_1."+Fe:"",tt=Function.prototype.toString,nt=function(e){if(null!=e){try{return tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rt=/^\[object .+?Constructor\]$/,ot=Function.prototype,it=Object.prototype,at=ot.toString,ut=it.hasOwnProperty,st=RegExp("^"+at.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ze(e)||(t=e,et&&et in t))&&(Qe(e)?st:rt).test(nt(e));var t}(n)?n:void 0},lt=ct(ze,"Map"),ft=ct(Object,"create"),dt=Object.prototype.hasOwnProperty,ht=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=ft?ft(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(ft){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return dt.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return ft?void 0!==t[e]:ht.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ft&&void 0===t?"__lodash_hash_undefined__":t,this};var pt=a,yt=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new pt,map:new(lt||Be),string:new pt}},u.prototype.delete=function(e){var t=yt(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return yt(this,e).get(e)},u.prototype.has=function(e){return yt(this,e).has(e)},u.prototype.set=function(e,t){var n=yt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var vt=u;s.prototype.clear=function(){this.__data__=new Be,this.size=0},s.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var n=this.__data__;if(r(n,Be)){var o=n.__data__;if(!lt||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new vt(o)}return n.set(e,t),this.size=n.size,this};var mt=s;c.prototype.add=c.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},c.prototype.has=function(e){return this.__data__.has(e)};var gt=c,bt=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},wt=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new gt:void 0;for(i.set(e,t),i.set(t,e);++f<u;){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(!bt(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},_t=ze.Uint8Array,St=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Et=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ot=He?He.prototype:void 0,xt=Ot?Ot.valueOf:void 0,At=Array.isArray,kt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,jt=Tt?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}(Tt(e),(function(t){return kt.call(e,t)})))}:function(){return[]},Pt=function(e){return null!=e&&"object"==typeof e},Dt=function(e){return Pt(e)&&"[object Arguments]"==Je(e)},Ct=Object.prototype,It=Ct.hasOwnProperty,Mt=Ct.propertyIsEnumerable,Nt=Dt(function(){return arguments}())?Dt:function(e){return Pt(e)&&It.call(e,"callee")&&!Mt.call(e,"callee")},Rt=Nt,Lt=t&&!t.nodeType&&t,Ft=Lt&&e&&!e.nodeType&&e,Bt=Ft&&Ft.exports===Lt?ze.Buffer:void 0,Ut=(Bt?Bt.isBuffer:void 0)||function(){return!1},Gt=/^(?:0|[1-9]\d*)$/,zt=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Gt.test(e))&&e>-1&&e%1==0&&e<t},Ht=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Vt={};Vt["[object Float32Array]"]=Vt["[object Float64Array]"]=Vt["[object Int8Array]"]=Vt["[object Int16Array]"]=Vt["[object Int32Array]"]=Vt["[object Uint8Array]"]=Vt["[object Uint8ClampedArray]"]=Vt["[object Uint16Array]"]=Vt["[object Uint32Array]"]=!0,Vt["[object Arguments]"]=Vt["[object Array]"]=Vt["[object ArrayBuffer]"]=Vt["[object Boolean]"]=Vt["[object DataView]"]=Vt["[object Date]"]=Vt["[object Error]"]=Vt["[object Function]"]=Vt["[object Map]"]=Vt["[object Number]"]=Vt["[object Object]"]=Vt["[object RegExp]"]=Vt["[object Set]"]=Vt["[object String]"]=Vt["[object WeakMap]"]=!1;var Kt,qt=t&&!t.nodeType&&t,$t=qt&&e&&!e.nodeType&&e,Wt=$t&&$t.exports===qt&&Ue.process,Yt=function(){try{return $t&&$t.require&&$t.require("util").types||Wt&&Wt.binding&&Wt.binding("util")}catch(e){}}(),Jt=Yt&&Yt.isTypedArray,Zt=Jt?(Kt=Jt,function(e){return Kt(e)}):function(e){return Pt(e)&&Ht(e.length)&&!!Vt[Je(e)]},Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype,en=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),tn=Object.prototype.hasOwnProperty,nn=function(e){return null!=(t=e)&&Ht(t.length)&&!Qe(t)?function(e,t){var n=At(e),r=!n&&Rt(e),o=!n&&!r&&Ut(e),i=!n&&!r&&!o&&Zt(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!Qt.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||zt(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Xt))return en(e);var t,n,r=[];for(var o in Object(e))tn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},rn=function(e){return function(e,t,n){var r=t(e);return At(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,nn,jt)},on=Object.prototype.hasOwnProperty,an=ct(ze,"DataView"),un=ct(ze,"Promise"),sn=ct(ze,"Set"),cn=ct(ze,"WeakMap"),ln="[object Map]",fn="[object Promise]",dn="[object Set]",hn="[object WeakMap]",pn="[object DataView]",yn=nt(an),vn=nt(lt),mn=nt(un),gn=nt(sn),bn=nt(cn),wn=Je;(an&&wn(new an(new ArrayBuffer(1)))!=pn||lt&&wn(new lt)!=ln||un&&wn(un.resolve())!=fn||sn&&wn(new sn)!=dn||cn&&wn(new cn)!=hn)&&(wn=function(e){var t=Je(e),n="[object Object]"==t?e.constructor:void 0,r=n?nt(n):"";if(r)switch(r){case yn:return pn;case vn:return ln;case mn:return fn;case gn:return dn;case bn:return hn}return t});var _n=wn,Sn="[object Arguments]",En="[object Array]",On="[object Object]",xn=Object.prototype.hasOwnProperty,An=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Pt(t)&&!Pt(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=At(e),s=At(t),c=u?En:_n(e),l=s?En:_n(t),f=(c=c==Sn?On:c)==On,d=(l=l==Sn?On:l)==On,h=c==l;if(h&&Ut(e)){if(!Ut(t))return!1;u=!0,f=!1}if(h&&!f)return a||(a=new mt),u||Zt(e)?wt(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new _t(e),new _t(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ne(+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=St;case"[object Set]":var s=1&r;if(u||(u=Et),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=wt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(xt)return xt.call(e)==xt.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var p=f&&xn.call(e,"__wrapped__"),y=d&&xn.call(t,"__wrapped__");if(p||y){var v=p?e.value():e,m=y?t.value():t;return a||(a=new mt),i(v,m,n,o,a)}}return!!h&&(a||(a=new mt),function(e,t,n,o,i,a){var u=1&n,s=rn(e),c=s.length;if(c!=rn(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:on.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);for(var y=u;++l<c;){var v=e[f=s[l]],m=t[f];if(o)var g=u?o(m,v,f,t,e,a):o(v,m,f,e,t,a);if(!(void 0===g?v===m||i(v,m,n,o,a):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,o,i,a))}(t,n,o,i,e,a))},kn=function(e,t){return An(e,t)},Tn=p(824),jn=p(685),Pn=(0,jn.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Dn=function(){return(0,jn.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Cn=function(){return(0,jn.getGlobalStore)("extensions",{slots:{}})};f(Pn.getState()),Pn.subscribe(f);var In=p(766),Mn=p(234),Nn=p(708),Rn=p(103),Ln=p(618),Fn=Dn(),Bn=Cn(),Un=(0,Tn.getExtensionSlotsConfigStore)(),Gn=(0,Tn.getExtensionsConfigStore)();Fn.subscribe((function(e){_(e,Un.getState(),Gn.getState(),Nn.featureFlagsStore.getState(),In.sessionStore.getState())})),Un.subscribe((function(e){_(Fn.getState(),e,Gn.getState(),Nn.featureFlagsStore.getState(),In.sessionStore.getState())})),Gn.subscribe((function(e){_(Fn.getState(),Un.getState(),e,Nn.featureFlagsStore.getState(),In.sessionStore.getState())})),Nn.featureFlagsStore.subscribe((function(e){_(Fn.getState(),Un.getState(),Gn.getState(),e,In.sessionStore.getState())})),In.sessionStore.subscribe((function(e){_(Fn.getState(),Un.getState(),Gn.getState(),Nn.featureFlagsStore.getState(),e)})),S(),(0,Rn.subscribeConnectivityChanged)(S);var zn,Hn,Vn=function(e){return Fn.setState((function(t){return t.extensions[e.name]=m(v({},e),{instances:[]}),t}))},Kn=function(e,t){return Fn.setState((function(n){var r,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 '".concat(t,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),n;if(o&&o==e)return n;if(n.slots[t])return m(v({},n),{slots:m(v({},n.slots),h({},t,m(v({},n.slots[t]),{moduleName:e})))});var i=E(t,e);return m(v({},n),{slots:m(v({},n.slots),h({},t,i))})}))},qn=function(){return Bn.setState((function(){return{slots:{},extensions:{}}}))},$n=(0,jn.createGlobalStore)("modalRegistry",{modals:{}});function Wn(e){return Wn="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)},Wn(e)}function Yn(e,t){return Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yn(e,t)}function Jn(e){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jn(e)}zn=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){N(e,t,n[t])}))}return e}({},{address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State"},{closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header"}),Hn=null!=(Hn={actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"})?Hn:{},Object.getOwnPropertyDescriptors?Object.defineProperties(zn,Object.getOwnPropertyDescriptors(Hn)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(Hn)).forEach((function(e){Object.defineProperty(zn,e,Object.getOwnPropertyDescriptor(Hn,e))}));var Zn={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)}},Qn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,e),this.init(t,n)}return B(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||Zn,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,q(q({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),Xn=new Qn,er=function(){function e(){R(this,e),this.observers={}}return B(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 tr(e,t,n){for(var o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||r(e[o],String)||"string"==typeof t[o]||r(t[o],String)?n&&(e[o]=t[o]):tr(e[o],t[o],n):e[o]=t[o]);return e}var nr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},rr="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,or=[" ",",","?","!",";"];function ir(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,u=r.slice(i,i+a).join(n),s=o[u];void 0===s&&r.length>i+a;)a++,s=o[u=r.slice(i,i+a).join(n)];if(void 0===s)return;if(null===s)return null;if(t.endsWith(u)){if("string"==typeof s)return s;if(u&&"string"==typeof s[u])return s[u]}var c=r.slice(i+a).join(n);return c?ir(s,c,n):void 0}o=o[r[i]]}return o}}var ar=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Jn(t);if(n){var o=Jn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return z(this,e)});function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return R(this,o),t=r.call(this),rr&&er.call(U(t)),t.data=e||{},t.options=n,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return B(o,[{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=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var u=Z(this.data,a);return u||!i||"string"!=typeof n?u:ir(this.data&&this.data[e]&&this.data[e][t],n,o)}},{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),J(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 u=Z(this.data,a)||{};r?tr(u,n,o):u=ne(ne({},u),n),J(this.data,a,u),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?ne(ne({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(er),ur={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}},sr={},cr=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Jn(t);if(n){var o=Jn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return z(this,e)});function o(e){var t,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,o),t=r.call(this),rr&&er.call(U(t)),n=e,i=U(t),["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){n[e]&&(i[e]=n[e])})),t.options=a,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=Xn.create("translator"),t}return B(o,[{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:{}};if(null==e)return!1;var 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||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=or.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:o};var s=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(s[0])>-1)&&(o=s.shift()),e=s.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,n){var r=this;if("object"!==Wn(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],t),s=u.key,c=u.namespaces,l=c[c.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(d){var h=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(l).concat(h).concat(s),p):"".concat(l).concat(h).concat(s)}return i?(p.res=s,p):s}var p=this.resolve(e,t),y=p&&p.res,v=p&&p.usedKey||s,m=p&&p.exactUsedKey||s,g=Object.prototype.toString.apply(y),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0&&("string"!=typeof b||"[object Array]"!==g)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,oe(oe({},t),{},{ns:c})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=_,p):_}if(a){var S="[object Array]"===g,E=S?[]:{},O=S?m:v;for(var x in y)if(Object.prototype.hasOwnProperty.call(y,x)){var A="".concat(O).concat(a).concat(x);E[x]=this.translate(A,oe(oe({},t),{joinArrays:!1,ns:c})),E[x]===A&&(E[x]=y[x])}y=E}}else if(w&&"string"==typeof b&&"[object Array]"===g)(y=y.join(b))&&(y=this.extendTranslation(y,e,t,n));else{var k=!1,T=!1,j=void 0!==t.count&&"string"!=typeof t.count,P=o.hasDefaultValue(t),D=j?this.pluralResolver.getSuffix(f,t.count,t):"",C=t["defaultValue".concat(D)]||t.defaultValue;!this.isValidLookup(y)&&P&&(k=!0,y=C),this.isValidLookup(y)||(T=!0,y=s);var I=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:y,M=P&&C!==y&&this.options.updateMissing;if(T||k||M){if(this.logger.log(M?"updateKey":"missingKey",f,l,s,M?C:y),a){var N=this.resolve(s,oe(oe({},t),{},{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 R=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var F=0;F<L.length;F++)R.push(L[F]);else"all"===this.options.saveMissingTo?R=this.languageUtils.toResolveHierarchy(t.lng||this.language):R.push(t.lng||this.language);var B=function(e,n,o){var i=P&&o!==y?o:I;r.options.missingKeyHandler?r.options.missingKeyHandler(e,l,n,i,M,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,l,n,i,M,t),r.emit("missingKey",e,l,n,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?R.forEach((function(e){r.pluralResolver.getSuffixes(e,t).forEach((function(n){B([e],s+n,t["defaultValue".concat(n)]||C)}))})):B(R,s,C))}y=this.extendTranslation(y,e,t,p,n),T&&y===s&&this.options.appendNamespaceToMissingKey&&(y="".concat(l,":").concat(s)),(T||k)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(l,":").concat(s):s,k?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(p.res=y,p):y}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,oe(oe({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(oe(oe({},n),{interpolation:oe(oe({},this.options.interpolation),n.interpolation)}));var a,u="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var s=e.match(this.interpolator.nestingRegexp);a=s&&s.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=oe(oe({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.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=ur.handle(d,e,t,this.options&&this.options.postProcessPassResolved?oe({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var s=a.extractFromKey(e,u),c=s.key;n=c;var l=s.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,d=f&&!u.ordinal&&0===u.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==u.context&&("string"==typeof u.context||"number"==typeof u.context)&&""!==u.context,p=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!sr["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(sr["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.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!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,s=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(s,c,n,e,u);else{var l;f&&(l=a.pluralResolver.getSuffix(n,u.count,u));var p="".concat(a.options.pluralSeparator,"zero");if(f&&(s.push(c+l),d&&s.push(c+p)),h){var y="".concat(c).concat(a.options.contextSeparator).concat(u.context);s.push(y),f&&(s.push(y+l),d&&s.push(y+p))}}for(;i=s.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,u))}})))}))}})),{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}}]),o}(er),lr=function(){function e(t){R(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xn.create("languageUtils")}return B(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]=ie(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]=ie(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=ie(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():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}(),fr=[{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","kk","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","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}],dr={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)}},hr=["v1","v2","v3"],pr={zero:0,one:1,two:2,few:3,many:4,other:5},yr=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,e),this.languageUtils=t,this.options=r,this.logger=Xn.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},fr.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:dr[e.fc]}}))})),n)}return B(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return pr[e]-pr[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!hr.includes(this.options.compatibilityJSON)}}]),e}(),vr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,e),this.logger=Xn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return B(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:ee,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?X(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?X(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?X(t.nestingPrefix):t.nestingPrefixEscaped||X("$t("),this.nestingSuffix=t.nestingSuffix?X(t.nestingSuffix):t.nestingSuffixEscaped||X(")"),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,u=this,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=Q(t,s,e);return u.alwaysFormat?u.format(o,void 0,n,ue(ue(ue({},r),t),{},{interpolationkey:e})):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),c=i.join(u.formatSeparator).trim();return u.format(Q(t,s,a),c,n,ue(ue(ue({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?c(u.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=l(n)))if("function"==typeof f){var s=f(e,o,r);i="string"==typeof s?s:""}else if(r&&r.hasOwnProperty(n))i="";else{if(d){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=W(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=u.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=ue({},i);function u(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];var i=(o=this.interpolate(o,a)).match(/'/g),u=o.match(/"/g);(i&&i.length%2==0&&!u||u.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=ue(ue({},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 s=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),s=l,c=!0}if((r=t(u.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=W(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=s.reduce((function(e,t){return o.format(e,t,i.lng,ue(ue({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),mr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,e),this.logger=Xn.create("formatter"),this.options=t,this.formats={number:le((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:le((function(e,t){var n=new Intl.NumberFormat(e,ce(ce({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:le((function(e,t){var n=new Intl.DateTimeFormat(e,ce({},t));return function(e){return n.format(e)}})),relativetime:le((function(e,t){var n=new Intl.RelativeTimeFormat(e,ce({},t));return function(e){return n.format(e,t.range||"day")}})),list:le((function(e,t){var n=new Intl.ListFormat(e,ce({},t));return function(e){return n.format(e)}}))},this.init(t)}return B(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=le(t)}},{key:"format",value:function(e,t,n,r){var o=this;return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n={}.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)?V(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}var i}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,u=i.formatOptions;if(o.formats[a]){var s=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=c.locale||c.lng||r.locale||r.lng||n;s=o.formats[a](e,l,ce(ce(ce({},u),r),c))}catch(e){o.logger.warn(e)}return s}return o.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}(),gr=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Jn(t);if(n){var o=Jn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return z(this,e)});function o(e,t,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return R(this,o),i=r.call(this),rr&&er.call(U(i)),i.backend=e,i.store=t,i.services=n,i.languageUtils=n.languageUtils,i.options=a,i.logger=Xn.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,a.backend,a),i}return B(o,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},u={},s={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?void 0===a[u]&&(a[u]=!0):(o.state[u]=1,r=!1,void 0===a[u]&&(a[u]=!0),void 0===i[u]&&(i[u]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(u[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(s)}}},{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){var r,u,s,c,l;r=n.loaded,u=i,(c=(s=Y(r,[o],Object)).obj)[l=s.k]=c[l]||[],c[l].push(u),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),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]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(u,s){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}u&&s&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,s)}))):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,de(de({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),o}(er),br=function(e){G(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Jn(t);if(n){var o=Jn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return z(this,e)});function o(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(R(this,o),e=r.call(this),rr&&er.call(U(e)),e.options=he(n),e.services={},e.logger=Xn,e.modules={external:[]},t=U(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),z(e,U(e));setTimeout((function(){e.init(n,i)}),0)}return e}return B(o,[{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"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!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"===Wn(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Wn(e[2])||"object"===Wn(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:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=ye(ye(ye({},r),this.options),he(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ye(ye({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?Xn.init(o(this.modules.logger),this.options):Xn.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=mr);var a=new lr(this.options);this.store=new ar(this.options.resources,this.options);var u=this.services;u.logger=Xn,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new yr(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(u.formatter=o(i),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new vr(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new gr(o(this.modules.backend),u.resourceStore,u,this.options),u.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&&(u.languageDetector=o(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=o(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new cr(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.format=this.options.interpolation.format,n||(n=ve),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[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 c=$(),l=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&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),c.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?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve,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,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=$();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ve),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&&ur.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=$();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==Wn(o)){for(var a=arguments.length,u=new Array(a>2?a-2:0),s=2;s<a;s++)u[s-2]=arguments[s];i=r.options.overloadTranslationOptionHandler([t,o].concat(u))}else i=ye({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",l=i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t;return r.t(l,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{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.resolvedLanguage||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 u=n.precheck(this,a);if(void 0!==u)return u}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=$();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=$();"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.resolvedLanguage||(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","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ve,r=ye(ye(ye({},this.options),t),{isClone:!0}),i=new o(r);return void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t)),["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=ye({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new cr(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(r,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(er);H(br,"createInstance",(function(){return new br(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var wr=br.createInstance();wr.createInstance=br.createInstance,wr.createInstance,wr.init,wr.loadResources,wr.reloadResources,wr.use,wr.changeLanguage,wr.getFixedT,wr.t,wr.exists,wr.setDefaultNamespace,wr.hasLoadedNamespace,wr.loadNamespaces,wr.loadLanguages;var _r=wr,Sr=_r.default||_r;Sr.on("initialized",(function(){window.i18next.loadNamespaces(["core"])}));var Er=(0,jn.createGlobalStore)("workspaceRegistrations",{workspaces:{}}),Or=(0,jn.createGlobalStore)("workspaceGroups",{workspaceGroups:{}}),xr=new Set,Ar=p(645),kr=0;function Tr(){var e;return e=function(e,t,n,r){var o,i,a,u,s,c,f,d,h,p,y,v,m,g,b=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(w){switch(w.label){case 0:if(o=b.length>4&&void 0!==b[4]?b[4]:function(e){return e},i=b.length>5&&void 0!==b[5]?b[5]:{},a=O(r),u=A(r),s=null,!e)return[3,3];if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));return c=u.load,f=u.meta,d=u.moduleName,h=u.online,p=u.offline,ke(h,p)?(l((function(o){var i,u={domElement:e,id:r,slotName:t,slotModuleName:n};return Ie(Ce({},o),{extensions:Ie(Ce({},o.extensions),De({},a,Ie(Ce({},o.extensions[a]),{instances:(i=o.extensions[a].instances,function(e){if(Array.isArray(e))return je(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}(i)||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.")}()).concat([u])})))})})),[4,c()]):[3,2];case 1:y=w.sent(),v=y.default,m=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}(y,["default"]),g=kr++,s=(0,Ar.mountRootParcel)(o(Ie(Ce({},null!=v?v:m),{name:"".concat(t,"/").concat(a,"-").concat(g)})),Ie(Ce({},i),{_meta:f,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d},domElement:e})),w.label=2;case 2:return[3,4];case 3:console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available.")),w.label=4;case 4:return[2,s]}}))},Tr=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Pe(i,r,o,a,u,"next",e)}function u(e){Pe(i,r,o,a,u,"throw",e)}a(void 0)}))},Tr.apply(this,arguments)}var jr=Dn()}(),y}())}}}))},6362:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;h.setState((function(u){var s;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(s=u.flags[e])||void 0===s?void 0:s.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(){var e=h.getState().flags;Object.keys(localStorage).filter((function(e){return e.startsWith("openmrs:feature-flag:")})).forEach((function(t){var n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem("openmrs:feature-flag-meta:".concat(n)))}))},s=function(e){return h.getState().flags[e].enabled},c=function(e,t){h.subscribe((function(n){t(n.flags[e].enabled)}))},l=function(e,r){h.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{cleanupObsoleteFeatureFlags:function(){return u},featureFlagsStore:function(){return h},getFeatureFlag:function(){return s},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return l},subscribeToFeatureFlag:function(){return c}});var f=r(685),d={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var s=u.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=n({enabled:"true"===localStorage.getItem(u)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},h=(0,f.getGlobalStore)("feature-flags",d);h.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],l=s[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},1793:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addRoutesOverride:()=>y.Uo,finishRegisteringAllApps:()=>y.QZ,getCoreTranslation:()=>g.R,initializeApp:()=>y.ZF,isOpenmrsAppRoutes:()=>y.tW,isOpenmrsRoutes:()=>y.Hs,localStorageRoutesPrefix:()=>y.F,registerApp:()=>y.VG,removeRoutesOverride:()=>y.n,resetAllRoutesOverrides:()=>y.O$,translateFrom:()=>g.a,tryRegisterExtension:()=>y.VN});var r=n(6173),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(1704);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(7910);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(9855);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var s=n(525);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var c=n(1491);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var l=n(6362);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(9032);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var d=n(2431);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var h=n(1912);o={};for(const e in h)"default"!==e&&(o[e]=()=>h[e]);n.d(t,o);var p=n(3419);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var y=n(3691),v=n(8050);o={};for(const e in v)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension"].indexOf(e)<0&&(o[e]=()=>v[e]);n.d(t,o);var m=n(3219);o={};for(const e in m)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension"].indexOf(e)<0&&(o[e]=()=>m[e]);n.d(t,o);var g=n(58),b=n(9523);o={};for(const e in b)["default","addRoutesOverride","finishRegisteringAllApps","initializeApp","isOpenmrsAppRoutes","isOpenmrsRoutes","localStorageRoutesPrefix","registerApp","removeRoutesOverride","resetAllRoutesOverrides","tryRegisterExtension","getCoreTranslation","translateFrom"].indexOf(e)<0&&(o[e]=()=>b[e]);n.d(t,o)},9032:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},2431:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state"],(function(e,t){var u={};return{setters:[function(e){u.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=u}},t={};function s(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){var e=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},t=function(e){return e&&e.sensitive?"":"i"},u=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},l=function(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},f=function(e){return t=e.matcher,(null!=(n=RegExp)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):i(t,n))?e.matcher:"string"==typeof e.matcher?Te(e.matcher):Te(e.path);var t,n},d=function(e){return h([e])},h=function(e){var t=p(),n=e.map((function(e){return{matcher:f(e),settings:e}})),r=l(t).concat(l(n));je.setState(r,!0)},p=function(){return je.getState()},y=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t){if(e.length>0){var n=Pe(e,t);if(n){for(var r=[n],o=Pe(e,n.settings.parent);void 0!==o;)r.push(o),o=Pe(e,o.settings.parent);return r.reverse()}}return[]},m=function(e){return v(p(),e)},g=function(e,t,n){var r=S(e,t,n);Ne.length?Ne.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},b=function(e){if("function"!=typeof e)throw Error(_(28,!1));Ne.push(e)},w=function(e){if("function"!=typeof e)throw Error(_(29,!1));var t=!1;return Ne=Ne.filter((function(n){var r=n===e;return t=t||r,!r})),t},_=function(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=")):"")},S=function(e,t,n){var r,o="".concat(k(t)," '").concat(x(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(_(30,!1,t.status,x(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=x(t),t.status=n,r},E=function(e){return e.status===ze},O=function(e){try{return e.activeWhen(window.location)}catch(t){return g(t,e,$e),!1}},x=function(e){return e.name},A=function(e){return Boolean(e.unmountThisParcel)},k=function(e){return A(e)?"parcel":"application"},T=function(){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]},j=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},P=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!j(t,(function(e){return"function"!=typeof e}))));var t},D=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=k(e),o=x(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return C(n)?n:Promise.reject(_(15,!1,r,o,t,a))}))}),Promise.resolve())}},C=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},I=function(e,t){return Promise.resolve().then((function(){return e.status!==Fe?e:(e.status=Be,e.bootstrap?V(e,"bootstrap").then(n).catch((function(n){if(t)throw S(n,e,$e);return g(n,e,$e),e})):Promise.resolve().then(n))}));function n(){return e.status=Ue,e}},M=function(e,t){return Promise.resolve().then((function(){var n=function(){return V(e,"unmount").then((function(){e.status=Ue}),(function(n){if(t)throw S(n,e,$e);g(n,e,$e)}))};if(e.status!==ze)return e;e.status=Ve;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw S(n,e,$e);g(n,e,$e)}))})).then((function(){return e}))}))},N=function(e,t){return Promise.resolve().then((function(){return e.status!==Ue?e:(Ye||(window.dispatchEvent(new Me("single-spa:before-first-mount")),Ye=!0),e.status=Ge,V(e,"mount").then((function(){return e.status=ze,Je||(window.dispatchEvent(new Me("single-spa:first-mount")),Je=!0),e})).catch((function(n){var r=function(){if(t)throw S(n,e,$e);return g(n,e,$e),e};return e.status=ze,M(e,!0).then(r,r)})))}))},R=function(){return L.apply(Qe,arguments)},L=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(_(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(_(3,!1,a(e.name)));var r=Ze++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(_(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(_(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?Le:Fe,customProps:t,parentName:x(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==ze)throw Error(_(6,!1,o,c.status));return M(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=$e,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(_(7,!1));l=l.then((function(e){if(!e)throw Error(_(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!P(e.bootstrap))throw Error(_(9,!1,o));if(!P(e.mount))throw Error(_(10,!1,o));if(!P(e.unmount))throw Error(_(11,!1,o));if(e.update&&!P(e.update))throw Error(_(12,!1,o));var t=D(e,"bootstrap"),n=D(e,"mount"),a=D(e,"unmount");c.status=Fe,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=K(e.timeouts),e.update&&(c.update=D(e,"update"),i.update=function(e){return c.customProps=e,F((t=c,Promise.resolve().then((function(){if(t.status!==ze)throw Error(_(32,!1,x(t)));return t.status=He,V(t,"update").then((function(){return t.status=ze,t})).catch((function(e){throw S(e,t,$e)}))}))));var t})}));var f,d,h=l.then((function(){return I(c,!0)})),p=h.then((function(){return N(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return F(Promise.resolve().then((function(){if(c.status!==Ue)throw Error(_(13,!1,o,c.status));return n.parcels[r]=c,N(c)})))},unmount:function(){return F(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:F(l),bootstrapPromise:F(h),mountPromise:F(p),unmountPromise:F(y)}},F=function(e){return e.then((function(){return null}))},B=function(e){var t=x(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(_(40,!1),t,n));var r=T({},n,{name:t,mountParcel:L.bind(e),singleSpa:Ce});return A(e)&&(r.unmountSelf=e.unmountThisParcel),r},U=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(16,!1));Xe.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},G=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(17,!1));Xe.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},z=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(18,!1));Xe.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},H=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(19,!1));Xe.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},V=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=k(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](B(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=_(31,!1,t,o,x(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},K=function(e){var t={};for(var n in Xe)t[n]=T({},Xe[n],e&&e[n]||{});return t},q=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Re&&e.status!==qe?e:(e.status=Le,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(B(e));if(!C(r))throw n=!0,Error(_(33,!1,x(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!P(t.bootstrap)&&(r=35),P(t.mount)||(r=36),P(t.unmount)||(r=37);var o=k(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(_(r,!1,o,x(e),i),t),g(void 0,e,$e),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=T({},e.devtools.overlays,t.devtools.overlays)),e.status=Fe,e.bootstrap=D(t,"bootstrap"),e.mount=D(t,"mount"),e.unmount=D(t,"unmount"),e.unload=D(t,"unload"),e.timeouts=K(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=$e:(r=qe,e.loadErrorTime=(new Date).getTime()),g(t,e,r),e})));var t,n}))},$=function(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(_(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Q(window.location.href),r=Q(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)},W=function(e){var t=this;if(e){var n=e[0].type;nt.indexOf(n)>=0&&tt[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},Y=function(){dt([],arguments)},J=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return De&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},Z=function(e){if(ot)throw Error(_(43,!1));De=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ot=!0,rt=window.history.replaceState,window.addEventListener("hashchange",Y),window.addEventListener("popstate",Y);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&nt.indexOf(e)>=0)||j(tt[e],(function(e){return e===n})))return t.apply(this,arguments);tt[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&nt.indexOf(e)>=0&&(tt[e]=tt[e].filter((function(e){return e!==t}))),n.apply(this,arguments)},window.history.pushState=J(window.history.pushState,"pushState"),window.history.replaceState=J(rt,"replaceState")},Q=function(e){var t=document.createElement("a");return t.href=e,t},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!it){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return ee.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return ee.call(this,n,window.removeEventListener,e,t,arguments)},it=!0}},ee=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){nt.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},te=function(e){return Promise.resolve().then((function(){var t=at[x(e)];if(!t)return e;if(e.status===Re)return ne(e,t),e;if(e.status===Ke)return t.promise.then((function(){return e}));if(e.status!==Ue&&e.status!==qe)return e;var n=e.status===qe?Promise.resolve():V(e,"unload");return e.status=Ke,n.then((function(){return ne(e,t),e})).catch((function(n){return function(e,t,n){delete at[x(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,g(n,e,$e),t.reject(n)}(e,t,n),e}))}))},ne=function(e,t){delete at[x(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Re,t.resolve()},re=function(e,t,n,r){at[x(e)]={app:e,resolve:n,reject:r},Object.defineProperty(at[x(e)],"promise",{get:t})},oe=function(e){return at[e]},ie=function(){return ut.filter(E).map(x)},ae=function(){return ut.map(x)},ue=function(e){var t=j(ut,(function(t){return x(t)===e}));return t?t.status:null},se=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(_(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(_(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(_(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(_(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(_(24,!1));if(!he(e.customProps))throw Error(_(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(_(20,!1));if(!t)throw Error(_(23,!1));if("function"!=typeof n)throw Error(_(24,!1));if(!he(r))throw Error(_(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:pe(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(ge()||st||(st=!0,setTimeout((function(){ge()||console.warn(_(1,!1))}),5e3)),-1!==ae().indexOf(o.name))throw Error(_(21,!1,o.name));ut.push(T({loadErrorTime:null,status:Re,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),et&&(X(),dt())},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return ut.filter((function(t){return t.activeWhen(e)})).map(x)},le=function(e){if(0===ut.filter((function(t){return x(t)===e})).length)throw Error(_(25,!1,e));return(et?fe(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=ut.map(x).indexOf(e);ut.splice(t,1)}))},fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(_(26,!1));var n=j(ut,(function(t){return x(t)===e}));if(!n)throw Error(_(27,!1,e));var r,o=oe(x(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){re(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,de(n,o.resolve,o.reject)):r=new Promise((function(e,t){re(n,(function(){return r}),e,t),de(n,e,t)})),r},de=function(e,t,n){Promise.resolve().then((function(){if(j(ce(),(function(t){return t===x(e)})))return ye()})).then((function(){return M(e).then(te).then((function(){t(),setTimeout((function(){dt()}))}))})).catch(n)},he=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},pe=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},ye=function(){return dt()},ve=function(e,t){return O(e)?I(e).then((function(e){return t.then((function(){return O(e)?N(e):e}))})):t.then((function(){return e}))},me=function(e){ht=!0,et&&(Z(e),dt())},ge=function(){return ht},be=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return _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){be(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},_e=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},Se=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=we(t,n).replace(window.location.origin,"");o.startsWith(r)?$(o):window.location.assign(o)},Ee=function(e){var t,n=JSON.parse(null!==(t=sessionStorage.getItem(yt))&&void 0!==t?t:"[]")||[];n.push(e),n.length>50&&(n=n.slice(-50)),sessionStorage.setItem(yt,JSON.stringify(n))},Oe=function(){var e;0===JSON.parse(null!==(e=sessionStorage.getItem(yt))&&void 0!==e?e:"[]").length&&document.referrer&&Ee(document.referrer),window.addEventListener("single-spa:routing-event",(function(e){var t,n,r=xe();"replaceState"==(null===(t=e.detail.originalEvent)||void 0===t?void 0:t.singleSpaTrigger)?(r[r.length-1]=window.location.href,sessionStorage.setItem(yt,JSON.stringify(r))):!(null===(n=e.detail.originalEvent)||void 0===n?void 0:n.singleSpa)&&r.includes(window.location.href)?Ae({toUrl:window.location.href}):r[r.length-1]!==window.location.href&&Ee(window.location.href)}))},xe=function(){var e;return JSON.parse(null!==(e=sessionStorage.getItem(yt))&&void 0!==e?e:"[]")},Ae=function(e){var t=e.toUrl,n=xe(),r=n.lastIndexOf(t);if(-1==r)throw new Error("URL ".concat(t," not found in history; cannot go back to it."));var o=n.slice(0,r+1);Se({to:n[r]}),sessionStorage.setItem(yt,JSON.stringify(o))},ke=function(){sessionStorage.removeItem(yt)};function Te(n,r,o){return i(n,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}(n,r):Array.isArray(n)?function(e,n,r){var o=e.map((function(e){return Te(e,n,r).source}));return new RegExp("(?:"+o.join("|")+")",t(r))}(n,r,o):function(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,d=void 0===f?function(e){return e}:f,h="["+e(o.endsWith||"")+"]|$",p="["+e(o.delimiter||"/#?")+"]",y=s?"^":"",v=0,m=n;v<m.length;v++){var g=m[v];if("string"==typeof g)y+=e(d(g));else{var b=e(d(g.prefix)),w=e(d(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";y+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else y+="("+g.pattern+")"+g.modifier;else y+="(?:"+b+w+")"+g.modifier}}if(l)a||(y+=p+"?"),y+=o.endsWith?"(?="+h+")":"$";else{var S=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[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var s=e.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var p=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var m=p||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:y||s++,prefix:m,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var g=p||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=h();var b=f("NAME")||"",w=f("PATTERN")||"",_=h();d("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return u}(n,o),r,o)}(n,r,o)}s.r(c),s.d(c,{clearHistory:function(){return ke},filterBreadcrumbs:function(){return v},getBreadcrumbs:function(){return p},getBreadcrumbsFor:function(){return m},getHistory:function(){return xe},goBackInHistory:function(){return Ae},interpolateString:function(){return _e},interpolateUrl:function(){return we},navigate:function(){return Se},registerBreadcrumb:function(){return d},registerBreadcrumbs:function(){return h},setupHistory:function(){return Oe}});var je=(0,s(685).createGlobalStore)("breadcrumbs",[]);function Pe(e,t){if(t)return function(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,1):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.filter((function(e){return e.matcher.test(t)})));return n[0]}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=Pe(e,n.join("/"));if(r)return r}}(e,t)}var De,Ce=Object.freeze({__proto__:null,get start(){return me},get ensureJQuerySupport(){return X},get setBootstrapMaxTime(){return U},get setMountMaxTime(){return G},get setUnmountMaxTime(){return z},get setUnloadMaxTime(){return H},get registerApplication(){return se},get unregisterApplication(){return le},get getMountedApps(){return ie},get getAppStatus(){return ue},get unloadApplication(){return fe},get checkActivityFunctions(){return ce},get getAppNames(){return ae},get pathToActiveWhen(){return pe},get navigateToUrl(){return $},get patchHistoryApi(){return Z},get triggerAppChange(){return ye},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return R},get NOT_LOADED(){return Re},get LOADING_SOURCE_CODE(){return Le},get NOT_BOOTSTRAPPED(){return Fe},get BOOTSTRAPPING(){return Be},get NOT_MOUNTED(){return Ue},get MOUNTING(){return Ge},get UPDATING(){return He},get LOAD_ERROR(){return qe},get MOUNTED(){return ze},get UNLOADING(){return Ke},get UNMOUNTING(){return Ve},get SKIP_BECAUSE_BROKEN(){return $e}}),Ie=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Me=function(){try{var e=new Ie("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Ie:"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},Ne=[],Re="NOT_LOADED",Le="LOADING_SOURCE_CODE",Fe="NOT_BOOTSTRAPPED",Be="BOOTSTRAPPING",Ue="NOT_MOUNTED",Ge="MOUNTING",ze="MOUNTED",He="UPDATING",Ve="UNMOUNTING",Ke="UNLOADING",qe="LOAD_ERROR",$e="SKIP_BECAUSE_BROKEN",We=[],Ye=!1,Je=!1,Ze=0,Qe={parcels:{}},Xe={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}},et="undefined"!=typeof window,tt={hashchange:[],popstate:[]},nt=["hashchange","popstate"],rt=null,ot=!1;et&&(window.singleSpaNavigate?console.warn(_(41,!1)):window.singleSpaNavigate=$);var it=!1,at={},ut=[],st=!1,ct=!1,lt=[],ft=et&&window.location.href;function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ct)return new Promise((function(e,n){lt.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return ut.forEach((function(i){var a=i.status!==$e&&O(i);switch(i.status){case qe:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Re:case Le:a&&n.push(i);break;case Fe:case Ue:!a&&oe(x(i))?e.push(i):a&&r.push(i);break;case ze:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=ft,d=ft=window.location.href;return ge()?(ct=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return m(0===r.length?"before-no-app-change":"before-app-change",v(!0)),m("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return rt.call(window.history,history.state,"",f.substring(location.origin.length)),ft=location.href,ct=!1,dt(e,t,!0);var r=a.map(te),o=u.map(M).map((function(e){return e.then(te)})).concat(r),i=Promise.all(o);i.then((function(){m("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return q(e).then((function(e){return ve(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return ve(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(q);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(_(42,!1))),console.warn(e),!1})))}function p(){var t=ie();e.forEach((function(e){return e.resolve(t)}));try{m(0===r.length?"no-app-change":"app-change",v()),m("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(ct=!1,lt.length>0){var n=lt;lt=[],dt(n)}return t}function y(){n||(e.forEach((function(e){W(e.eventArguments)})),W(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},ze,[]),o(e,Ue,[]),o(e,Re,[]),o(e,$e,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,ze)})),a.forEach((function(e){y(e,Re)})),u.forEach((function(e){y(e,Ue)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&T(p.detail,i),p;function y(e,t){var n=x(e);t=t||ue(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function m(e,t){n||window.dispatchEvent(new Me("single-spa:".concat(e),t))}}var ht=!1,pt={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=ut)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:dt,NOT_LOADED:Re,toLoadPromise:q,toBootstrapPromise:I,unregisterApplication:le,getProfilerData:function(){return We}};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=pt);var yt="openmrs:history"}(),c}())}}}))},1912:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function l(e,t){return 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 f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function p(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={766:function(e){e.exports=r},685:function(e){e.exports=i}},t={};function p(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,p),o.exports}p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},v=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},m=function(){},g=function(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()},b=function(e,t){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Cn(e,t);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},w=function(){return null!=In?In:Promise.resolve(void 0)},S=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},E=function(e){return Ln.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},x=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},k=function(){return Fn.apply(this,arguments)},T=function(){return Bn.apply(this,arguments)},j=function(){return Un.apply(this,arguments)},P=function(){return Gn.apply(this,arguments)},D=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},C=function(e){"unavailable"!==Hn&&"unavailable"!==e&&(localStorage.setItem(zn,"on"===e?"active":"disabled"),Hn=e)},I=function(){return Vn.apply(this,arguments)},M=function(e,t){return"object"!=typeof t||qn(t).forEach((function(n){e[n]=t[n]})),e},N=function(e,t){return Yn.call(e,t)},R=function(e,t){"function"==typeof t&&(t=t(Wn(e))),("undefined"==typeof Reflect?qn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Jn(e,t,M(n&&N(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},F=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:R.bind(null,e.prototype)}}}},B=function(e,t,n){return Xn.call(e,t,n)},U=function(e,t){return t(e)},G=function(e){if(!e)throw new Error("Assertion Failed")},z=function(e){Kn.setImmediate?setImmediate(e):setTimeout(e,0)},H=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},V=function(e){var t={};for(var n in e)N(e,n)&&(t[n]=e[n]);return t},K=function(e){return nr.apply([],e)},q=function(e){ir="undefined"!=typeof WeakMap&&new WeakMap;var t=ar(e);return ir=null,t},$=function(e){return ur.call(e).slice(8,-1)},W=function(e){var t,n,r,o;if(1===arguments.length){if($n(e))return e.slice();if(this===lr&&"string"==typeof e)return[e];if(o=cr(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},Y=function(e,t){dr=e,hr=t},J=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(hr).map((function(e){return"\n"+e})).join("")):""},Z=function(e,t){this._e=yr(),this.name=e,this.message=t},Q=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},X=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Q(e,t)},ee=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Q(e,t)},te=function(){},ne=function(e){return e},re=function(e,t){return null==e||e===ne?t:function(n){return t(e(n))}},oe=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},ie=function(e,t){return e===te?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?oe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:n}},ae=function(e,t){return e===te?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?oe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?oe(r,this.onerror):r)}},ue=function(e,t){return e===te?t:function(n){var r=e.apply(this,arguments);M(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?oe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:M(r,a)}},se=function(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(e,t){return e===te?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)}},le=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=zr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Or)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&de(this,this._value))}this._state=null,this._value=null,++t.ref,$r(this,e)},fe=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},de=function(e,t){if(Fr.push(t),null===e._state){var n=e._lib&&ge();t=Ur(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=Qn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Cr?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Lr.some((function(t){return t._value===e._value}))||Lr.push(e)}(e),he(e),n&&be()}},he=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Vr&&(++Vr,Mr((function(){0==--Vr&&we()}),[]))},pe=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Vr,Mr(ye,[n,e,t])}else e._listeners.push(t)},ye=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Fr.length&&(Fr=[]),r=e(o),-1===Fr.indexOf(o)&&function(e){for(var t=Lr.length;t;)if(Lr[--t]._value===e._value)return void Lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--Vr&&we(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},me=function(){ge()&&be()},ge=function(){var e=Nr;return Nr=!1,Rr=!1,e},be=function(){var e,t,n;do{for(;Hr.length>0;)for(e=Hr,Hr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Hr.length>0);Nr=!0,Rr=!0},we=function(){var e=Lr;Lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Kr.slice(0),n=t.length;n;)t[--n]()},_e=function(e){return new le(Or,!1,e)},Se=function(e,t){var n=zr;return function(){var r=ge(),o=zr;try{return je(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{je(o,!1),r&&be()}}},Ee=function(e,t,n,r){var o=zr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var a=Gr.env;i.env=Dr?{Promise:le,PromiseProp:{value:le,configurable:!0,writable:!0},all:le.all,race:le.race,allSettled:le.allSettled,any:le.any,resolve:le.resolve,reject:le.reject,nthen:Me(a.nthen,i),gthen:Me(a.gthen,i)}:{},t&&M(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=De(i,e,n,r);return 0===i.ref&&i.finalize(),u},Oe=function(){return Yr.id||(Yr.id=++Jr),++Yr.awaits,Yr.echoes+=100,Yr.id},xe=function(){return!!Yr.awaits&&(0==--Yr.awaits&&(Yr.id=0),Yr.echoes=100*Yr.awaits,!0)},Ae=function(e){return Yr.echoes&&e&&e.constructor===Pr?(Oe(),e.then((function(e){return xe(),e}),(function(e){return xe(),to(e)}))):e},ke=function(e){++Xr,Yr.echoes&&0!=--Yr.echoes||(Yr.echoes=Yr.id=0),Zr.push(zr),je(e,!0)},Te=function(){var e=Zr[Zr.length-1];Zr.pop(),je(e,!1)},je=function(e,t){var n=zr;if((t?!Yr.echoes||Qr++&&e===zr:!Qr||--Qr&&e===zr)||Ce(t?ke.bind(null,e):Te),e!==zr&&(zr=e,n===Gr&&(Gr.env=Pe()),Dr)){var r=Gr.env.Promise,o=e.env;kr.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Kn,"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))}},Pe=function(){var e=Kn.Promise;return Dr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Kn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:kr.then,gthen:e.prototype.then}:{}},De=function(e,t,n,r,o){var i=zr;try{return je(e,!0),t(n,r,o)}finally{je(i,!1)}},Ce=function(e){jr.call(Ar,e)},Ie=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=zr;n&&Oe(),je(t,!0);try{return e.apply(this,arguments)}finally{je(o,!1),r&&Ce(xe)}}},Me=function(e,t){return function(n,r){return e.call(this,Ie(n,t),Ie(r,t))}},Ne=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Kn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),M(r,o)):Kn.CustomEvent&&M(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Kn.dispatchEvent&&(dispatchEvent(r),!Kn.PromiseRejectionEvent&&Kn.onunhandledrejection))try{Kn.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Re=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=q(t))[e],t}},Fe=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){qn(e).forEach((function(t){var n=e[t];if($n(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new _r.InvalidArgument("Invalid event config");var r=i(t,ne,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){z((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=se),o||(o=te);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}},Be=function(e,t){return F(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Ge=function(e,t){e.filter=Re(e.filter,t)},ze=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Re(r(),t())}:t,e.justLimit=n&&!r},He=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new _r.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ve=function(e,t,n){var r=He(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},Ke=function(e,t,n,r){var o=e.replayFilter?Re(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),N(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),qe(Ve(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return qe(Ve(e,r,n),Re(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},qe=function(e,t,n,r){var o=Se(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=te}),(function(t){e.fail(t),n=te}))||o(e.value,e,(function(e){return n=e})),n()}))}))},$e=function(e){var t=void 0===e?"undefined":h(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=$(e);return"ArrayBuffer"===n?"binary":n},We=function(e){return s(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ye=function(e,t){return e<t?-1:e===t?0:1},Je=function(e,t){return e>t?-1:e===t?0:1},Ze=function(e,t,n){var r=s(e,vo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Qe=function(e){return new e.Collection(e,(function(){return nt("")})).limit(0)},Xe=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},et=function(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Ze(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Ye:Je;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(function(){return tt(u[0],s[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,s,p))return!0;for(var h=null,y=p;y<f;++y){var v=Xe(o,d,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},tt=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},nt=function(e){return{type:1,lower:e,upper:e}},rt=function(e){return Se((function(t){return ot(t),e(t.target.error),!1}))},ot=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},it=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+at(t)}},at=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ut=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:H(n,(function(e){return[e.name,e]}))}},st=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return er(t,e)}}(e):function(t){return er(t,e)}},ct=function(e){return[].slice.call(e)},lt=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},ft=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return c({},e,(0,t.create)(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");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=ct(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=$n(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:st(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:$n(o),keyPath:o,unique:n,multiEntry:r,extractKey:st(o)};return i[lt(o)]=a,a})),getIndexByKeyPath:function(e){return i[lt(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[lt(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),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=Se(e);var c=n.objectStore(t),l=null==c.keyPath,d="put"===o||"add"===o;if(!d&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var h,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ot(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(h=c.clear()):y.push(h=c.delete(r(u)))}else{var b=f(d?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(d)for(var S=0;S<p;++S)y.push(h=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),h.onerror=g;else for(var E=0;E<p;++E)y.push(h=c[o](w[E])),h.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};h.onerror=function(e){g(e),O(e)},h.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=Se(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=rt(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=Se(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=rt(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=Se(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=rt(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=rt(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=Se(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=rt(s),p.onsuccess=Se((function(t){var r=p.result;if(r){r.___id=++wo,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Se(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Se(e),p.onerror=rt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=Se((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=Se((function(t){return e(t.target.result)})),l.onerror=rt(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:bo(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),s(n[t],n.Table)&&(n[t].core=e.core))}))},dt=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Qn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||s(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Jn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},ht=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)s(e[t],n.Table)&&delete e[t]}))},pt=function(e,t){return e._cfg.version-t._cfg.version},yt=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return mt(o,e)})),o},mt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},gt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=it(at(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=it(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=ut(e,i,a)})),r},bt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var l=u.indexNames[c],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Kn.WorkerGlobalScope&&s(Kn,Kn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},wt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Do("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},_t=function(e){return e&&"function"==typeof e.databases},St=function(e){return Ee((function(){return zr.letThrough=!0,e()}))},Et=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},Ot=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):$n(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},xt=function(e,t,n){var r=arguments.length;if(r<2)throw new _r.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,K(o),n]},At=function(e,t,n){for(var r=$n(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},kt=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Tt=function(e){return!("from"in e)},jt=function(e,t){Tt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;To(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Pt=function(e){var t=Tt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||ho(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Dt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=c({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Ct(a)}e.d=Ct(e)},Ct=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},It=function(e,t){return qn(t).forEach((function(n){jt(e[n]||(e[n]=new ko),t[n])})),e},Mt=function(e){var t=No;try{No=!0,mo.storagemutated.fire(e)}finally{No=t}},Nt=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Rt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Lt=function(){return new zo},Ft=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Bt=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ut=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bt(i,r,o,a,u,"next",e)}function u(e){Bt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Gt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},zt=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){Gt(e,t,n[t])}))}return e},Ht=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Vt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Kt=function(){return Ko},qt=function(){return qo.apply(this,arguments)},$t=function(){return Wo.apply(this,arguments)},Wt=function(e,t,n,r){return Yo.apply(this,arguments)},Yt=function(e,t,n){return Jo.apply(this,arguments)},Jt=function(e,t){return Zo.apply(this,arguments)},Zt=function(e,t){return Qo.apply(this,arguments)},Qt=function(e){return Xo.apply(this,arguments)},Xt=function(e){return ei.apply(this,arguments)},en=function(e){return ti.apply(this,arguments)},tn=function(e){var t;return!!(null===(t=Vo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},nn=function(e){return ni.apply(this,arguments)},rn=function(e){return ri.apply(this,arguments)},on=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Vo[e]={type:e,dependsOn:t,process:n,options:r}},an=function(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(ai)},un=function(){return li+ci()},sn=function(e){return e.startsWith(li)},cn=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ln=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},fn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,u,"next",e)}function u(e){ln(i,r,o,a,u,"throw",e)}a(void 0)}))}},dn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},hn=function(){return Object.values(fi)},pn=function(e){fi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),fi[e.id]=e},yn=function(e){return di.apply(this,arguments)},vn=function(e,t){return hi.apply(this,arguments)},mn=function(e,t){return pi.apply(this,arguments)},gn=function(e,t,n){return yi.apply(this,arguments)},bn=function(e,t){return vi.apply(this,arguments)},wn=function(e,t,n){return mi.apply(this,arguments)},_n=function(e,t){return gi.apply(this,arguments)},Sn=function(e,t,n){return bi.apply(this,arguments)},En=function(){return wi.apply(this,arguments)},On=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},xn=function(){return Tn(),_i},An=function(e,t){Tn(),pn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},kn=function(e){return Si.apply(this,arguments)},Tn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};p.r(y),p.d(y,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return nn},canBeginEditSynchronizationItemsOfType:function(){return tn},deleteSynchronizationItem:function(){return rn},generateOfflineUuid:function(){return un},getCurrentOfflineMode:function(){return D},getDynamicOfflineDataEntries:function(){return yn},getDynamicOfflineDataEntriesFor:function(){return vn},getDynamicOfflineDataHandlers:function(){return hn},getFullSynchronizationItems:function(){return Xt},getFullSynchronizationItemsFor:function(){return Zt},getOfflineDb:function(){return Lt},getOfflinePatientDataStore:function(){return xn},getOfflineSynchronizationStore:function(){return Kt},getOmrsServiceWorker:function(){return w},getSynchronizationItem:function(){return en},getSynchronizationItems:function(){return Qt},getSynchronizationItemsFor:function(){return Jt},isOfflineUuid:function(){return sn},messageOmrsServiceWorker:function(){return E},offlineUuidPrefix:function(){return li},omrsOfflineCachingStrategyHttpHeaderName:function(){return Rn},omrsOfflineResponseBodyHttpHeaderName:function(){return Mn},omrsOfflineResponseStatusHttpHeaderName:function(){return Nn},putDynamicOfflineData:function(){return mn},putDynamicOfflineDataFor:function(){return gn},queueSynchronizationItem:function(){return Yt},queueSynchronizationItemFor:function(){return Wt},registerOfflinePatientHandler:function(){return An},registerOmrsServiceWorker:function(){return b},removeDynamicOfflineData:function(){return bn},removeDynamicOfflineDataFor:function(){return wn},runSynchronization:function(){return qt},setCurrentOfflineMode:function(){return C},setupDynamicOfflineDataHandler:function(){return pn},setupOfflineSync:function(){return on},syncAllDynamicOfflineData:function(){return _n},syncDynamicOfflineData:function(){return Sn},syncOfflinePatientData:function(){return kn}});try{self["workbox:window:6.5.4"]&&_()}catch(e){}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var jn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Pn=function(e,t){this.type=e,Object.assign(this,t)},Dn={type:"SKIP_WAITING"},Cn=function(t){var n,r;function o(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new jn,r.en=new jn,r.on=new jn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Pn(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Pn("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 Pn("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 v(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Pn("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t=(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 g(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),v(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&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Pn("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)}},u.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return v(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Dn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return v(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)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){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=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),In=void 0,Mn="x-omrs-offline-response-body",Nn="x-omrs-offline-response-status",Rn="x-omrs-offline-caching-strategy";function Ln(){return Ln=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){var t,n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){switch(r.label){case 0:return[4,w()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))})),Ln.apply(this,arguments)}function Fn(){return Fn=x((function(){var e;return A(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),Fn.apply(this,arguments)}function Bn(){return(Bn=x((function(){return A(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function Un(){return Un=x((function(){return A(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),Un.apply(this,arguments)}function Gn(){return(Gn=x((function(){var e,t;return A(this,(function(n){switch(n.label){case 0:return[4,j()];case 1:return(t=n.sent())?[3,3]:[4,T()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,k()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var zn="openmrs3:offline-mode",Hn="unavailable";function Vn(){return(Vn=x((function(){return A(this,(function(e){switch(e.label){case 0:return[4,P()];case 1:return e.sent()||(Hn="active"===localStorage.getItem(zn)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}var Kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,qn=Object.keys,$n=Array.isArray;"undefined"==typeof Promise||Kn.Promise||(Kn.Promise=Promise);var Wn=Object.getPrototypeOf,Yn={}.hasOwnProperty,Jn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor;function Qn(e,t){var n;return Zn(e,t)||(n=Wn(e))&&Qn(n,t)}var Xn=[].slice;function er(e,t){if(N(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=er(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:er(u,t.substr(a+1))}}function tr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){G("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)tr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?$n(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&N(e,a)||(s=e[a]={}),tr(s,u,n)}}else void 0===n?$n(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var nr=[].concat,rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(K([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return Kn[e]})),or=rr.map((function(e){return Kn[e]}));H(rr,(function(e){return[e,!0]}));var ir=null;function ar(e){if(!e||"object"!=typeof e)return e;var t=ir&&ir.get(e);if(t)return t;if($n(e)){t=[],ir&&ir.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ar(e[n]))}else if(or.indexOf(e.constructor)>=0)t=e;else{var o=Wn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ir&&ir.set(e,t),e)N(e,i)&&(t[i]=ar(e[i]))}return t}var ur={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",cr="symbol"==(void 0===sr?"undefined":h(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},lr={},fr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},pr=!new Error("").stack;function yr(){if(pr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var vr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vr),gr={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"};F(Z).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+J(this._e,2))}},toString:function(){return this.name+": "+this.message}}),F(X).from(Z),F(ee).from(Z);var br=mr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),wr=Z,_r=mr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=gr[t]||r,this.inner=null)},r=t+"Error";return F(n).from(wr),e[t]=n,e}),{});_r.Syntax=SyntaxError,_r.Type=TypeError,_r.Range=RangeError;var Sr=vr.reduce((function(e,t){return e[t+"Error"]=_r[t],e}),{}),Er=mr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=_r[t]),e}),{});Er.ModifyError=X,Er.DexieError=Z,Er.BulkError=ee;var Or={},xr=f("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Wn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Wn(t),e]}(),3),Ar=xr[0],kr=xr[1],Tr=xr[2],jr=kr&&kr.then,Pr=Ar&&Ar.constructor,Dr=!!Tr,Cr=!1,Ir=Tr?function(){Tr.then(me)}:Kn.setImmediate?setImmediate.bind(null,me):Kn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){me(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(me,0)},Mr=function(e,t){Hr.push([e,t]),Rr&&(Ir(),Rr=!1)},Nr=!0,Rr=!0,Lr=[],Fr=[],Br=null,Ur=ne,Gr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ne,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Ne(e[0],e[1])}catch(e){}}))}},zr=Gr,Hr=[],Vr=0,Kr=[],qr={get:function(){var e=zr,t=Xr;function n(n,r){var o=this,i=!e.global&&(e!==zr||t!==Xr),a=i&&!xe(),u=new le((function(t,u){pe(o,new fe(Ie(n,e,i,a),Ie(r,e,i,a),t,u,e))}));return dr&&ve(u,this),u}return n.prototype=Or,n},set:function(e){L(this,"then",e&&e.prototype===Or?qr:{get:function(){return e},set:qr.set})}};function $r(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ge();t&&"function"==typeof t.then?$r(e,(function(e,n){s(t,le)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,he(e)),n&&be()}}),de.bind(null,e))}catch(t){de(e,t)}}function Wr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=J(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=J(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Wr(e._prev,t,n)),t}R(le.prototype,{then:qr,_then:function(e,t){pe(this,new fe(null,null,e,t,zr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return s(e,t)?n(e):_e(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):_e(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),_e(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Cr=!0;var e=Wr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Cr=!1}}},timeout:function(e,t){var n=this;return e<1/0?new le((function(r,o){var i=setTimeout((function(){return o(new _r.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(le.prototype,Symbol.toStringTag,"Dexie.Promise"),Gr.env=Pe(),R(le,{all:function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return le.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(s(e,le))return e;if(e&&"function"==typeof e.then)return new le((function(t,n){e.then(t,n)}));var t=new le(Or,!0,e);return ve(t,Br),t},reject:_e,race:function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){e.map((function(e){return le.resolve(e).then(t,n)}))}))},PSD:{get:function(){return zr},set:function(e){return zr=e}},totalEchoes:{get:function(){return Xr}},newPSD:Ee,usePSD:De,scheduler:{get:function(){return Mr},set:function(e){Mr=e}},rejectionMapper:{get:function(){return Ur},set:function(e){Ur=e}},follow:function(e,t){return new le((function(n,r){return Ee((function(t,n){var r=zr;r.unhandleds=[],r.onunhandled=n,r.finalize=oe((function(){var e=this;!function(e){Kr.push((function t(){e(),Kr.splice(Kr.indexOf(t),1)})),++Vr,Mr((function(){0==--Vr&&we()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Pr&&(Pr.allSettled&&L(le,"allSettled",(function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return le.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Pr.any&&"undefined"!=typeof AggregateError&&L(le,"any",(function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return le.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var Yr={awaits:0,echoes:0,id:0},Jr=0,Zr=[],Qr=0,Xr=0,eo=0;-1===(""+jr).indexOf("[native code]")&&(Oe=xe=te);var to=le.reject;function no(e,t,n,r){if(e.idbdb&&(e._state.openComplete||zr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return no(e,t,n,r)}))):to(o)}return o._promise(t,(function(e,t){return Ee((function(){return zr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return to(new _r.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return to(new _r.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((function(){return no(e,t,n,r)}))}var ro=String.fromCharCode(65535),oo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",io=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uo=ao,so=ao,co=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},lo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},fo=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=this._tx||zr.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new _r.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}var a=ge();try{return r&&r.db===this.db?r===zr.trans?r._promise(e,i,n):Ee((function(){return r._promise(e,i,n)}),{trans:r,transless:zr.transless||zr}):no(this.db,e,[this.name],i)}finally{a&&be()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if($n(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=qn(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(n&&this.db._maxKey!==ro)return this.where(n.name).equals(n.keyPath.map((function(t){return e[t]})));!n&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(t.join("+"),"]"));var r=this.schema.idxByName,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}var a=f(t.reduce((function(t,n){var o=f(t,2),a=o[0],u=o[1],s=r[n],c=e[n];return[a||s,a||!s?Re(u,s&&s.multi?function(e){var t=er(e,n);return $n(t)&&t.some((function(e){return i(c,e)}))}:function(e){return i(c,er(e,n))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,$n(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(N(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){M(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||$n(e))return this.where(":id").equals(e).modify(t);var n=er(e,this.schema.primKey.keyPath);if(void 0===n)return to(new _r.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?qn(t).forEach((function(n){tr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:lo})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new ee("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=$e(e),r=$e(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(We(e),We(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var po=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,to.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,to.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Re(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return Ke(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&M(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return Ke(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:He(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return Ke(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var 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 u(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(u)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=He(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return Ke(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?ze(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):ze(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),ze(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Ge(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Ge(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Re(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=He(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Ge(this._ctx,(function(e){var t=e.primaryKey.toString(),r=N(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=qn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];er(t,o)!==u&&(tr(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=qn(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:q(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===ho(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new X("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new X("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},vo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Qe(this):new this.Collection(this,(function(){return tt(e,t,!n,!r)}))}catch(e){return Ze(this,oo)}}},{key:"equals",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return nt(e)}))}},{key:"above",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Ze(this,"String expected."):this.between(e,e+ro,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):et(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ro)}},{key:"equalsIgnoreCase",value:function(e){return et(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=W.apply(lr,arguments);return 0===e.length?Qe(this):et(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=W.apply(lr,arguments);return 0===e.length?Qe(this):et(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ro)}},{key:"anyOf",value:function(){var e=this,t=W.apply(lr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Ze(this,oo)}if(0===t.length)return Qe(this);var r=new this.Collection(this,(function(){return tt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=W.apply(lr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Ze(this,oo)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=this._cmp,o=this._ascending,i=this._descending,a=this._min,u=this._max;if(0===e.length)return Qe(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&o(e[0],e[1])<=0})))return Ze(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",_r.InvalidArgument);var s,c=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,f=o;function d(e,t){return f(e[0],t[0])}try{s=e.reduce((function(e,t){for(var n=0,o=e.length;n<o;++n){var i=e[n];if(r(t[0],i[1])<0&&r(t[1],i[0])>0){i[0]=a(i[0],t[0]),i[1]=u(i[1],t[1]);break}}return n===o&&e.push(t),e}),[]),s.sort(d)}catch(e){return Ze(this,oo)}var h=0,p=l?function(e){return o(e,s[h][1])>0}:function(e){return o(e,s[h][1])>=0},y=c?function(e){return i(e,s[h][0])>0}:function(e){return i(e,s[h][0])>=0},v=p,m=new this.Collection(this,(function(){return tt(s[0][0],s[s.length-1][1],!c,!l)}));return m._ondirectionchange=function(e){"next"===e?(v=p,f=o):(v=y,f=i),s.sort(d)},m._addAlgorithm((function(e,t,r){for(var i=e.key;v(i);)if(++h===s.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(i)||(0===n._cmp(i,s[h][1])||0===n._cmp(i,s[h][0])||t((function(){f===o?e.continue(s[h][0]):e.continue(s[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=W.apply(lr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Qe(this):this.inAnyRange(e.map((function(e){return[e,e+ro]}))):Ze(this,"startsWithAnyOf() only works with strings")}}]),e}(),mo=Fe(null,"storagemutated"),go=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return G(!zr.global),++this._reculock,1!==this._reculock||zr.global||(zr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(G(!zr.global),0==--this._reculock)for(zr.global||(zr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{De(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&zr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(G(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new _r.DatabaseClosed(r);case"MissingAPIError":throw new _r.MissingAPI(r.message,r);default:throw new _r.OpenFailed(r)}if(!this.active)throw new _r.TransactionInactive;return G(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Se((function(n){ot(n),t._reject(e.error)})),e.onabort=Se((function(n){ot(n),t.active&&t._reject(new _r.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Se((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&mo.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return to(new _r.ReadOnly("Transaction is readonly"));if(!this.active)return to(new _r.TransactionInactive);if(this._locked())return new le((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},zr])}));if(n)return Ee((function(){var e=new le((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new le((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=le.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new le((function(e,r){n.then((function(n){return t._waitingQueue.push(Se(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Se(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new _r.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(N(t,e))return t[e];var n=this.schema[e];if(!n)throw new _r.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),bo=function(e){try{return e.only([[]]),bo=function(){return[[]]},[[]]}catch(e){return bo=function(){return ro},ro}},wo=0,_o=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){qn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return it(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),$n(r),0===t)})),o=r.shift();if(o.multi)throw new _r.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new _r.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new _r.Schema("Index must have a name and cannot be an empty string")})),t[n]=ut(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?M(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){M(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,ht(t,[t._allTables,t,t.Transaction.prototype]),dt(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],qn(o),o),t._storeNames=qn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||te,e),this}}]),e}();function So(e,t,n,r,o){return le.resolve().then((function(){var i=zr.transless||zr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return So(e,t,n,null,o)}))):to(r)}var s,c=fr(o);c&&Oe();var l=le.follow((function(){if(s=o.call(a,a))if(c){var e=xe.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=Ot(s))}),u);return(s&&"function"==typeof s.then?le.resolve(s).then((function(e){return a.active?e:to(new _r.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),to(e)}))}))}var Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return l(c({},e),{table:function(t){var n=e.table(t),r=n.schema,o={},i=[];function a(e,t,n){var r=lt(e),u=o[r]=o[r]||[],s=null==e?0:"string"==typeof e?1:e.length,f=t>0,d=l(c({},n),{isVirtual:f,keyTail:t,keyLength:s,extractKey:st(e),unique:!f&&n.unique});return u.push(d),d.isPrimaryKey||i.push(d),s>1&&a(2===s?e[0]:e.slice(0,s-1),t+1,n),u.sort((function(e,t){return e.keyTail-t.keyTail})),d}var u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];var s=!0,f=!1,d=void 0;try{for(var h,p=r.indexes[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var y=h.value;a(y.keyPath,0,y)}}catch(e){f=!0,d=e}finally{try{s||null==p.return||p.return()}finally{if(f)throw d}}function v(t){var n,r,o=t.query.index;return o.isVirtual?l(c({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:At(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:At(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t}var m=l(c({},n),{schema:l(c({},r),{primaryKey:u,indexes:i,getIndexByKeyPath:function(e){var t=o[lt(e)];return t&&t[0]}}),count:function(e){return n.count(v(e))},query:function(e){return n.query(v(e))},openCursor:function(t){var r=t.query.index,o=r.keyTail,i=r.isVirtual,a=r.keyLength;return i?n.openCursor(v(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(At(r,t.reverse?e.MAX_KEY:e.MIN_KEY,o)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,o)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(At(t,e.MAX_KEY,o),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return n.value}}});return r}(n)})):n.openCursor(t)}});return m}})}};function Oo(e,t,n,r){return n=n||{},r=r||"",qn(e).forEach((function(o){if(N(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=$(i);u!==$(a)?n[r+o]=t[o]:"Object"===u?Oo(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})),qn(t).forEach((function(o){N(e,o)||(n[r+o]=t[o])})),n}var xo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return l(c({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=l(c({},n),{mutate:function(e){var o=zr.trans,i=o.table(t).hook,a=i.deleting,u=i.creating,s=i.updating;switch(e.type){case"add":if(u.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"put":if(u.fire===te&&s.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"delete":if(a.fire===te)break;return o._promise("readwrite",(function(){return f(e)}),!0);case"deleteRange":if(a.fire===te)break;return o._promise("readwrite",(function(){return function(e){return h(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function f(e){var t=zr.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?l(c({},e),{keys:o}):c({},e)).type&&(e.values=d(e.values)),e.keys&&(e.keys=d(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((function(i){var c=o.map((function(n,o){var c=i[o],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){var f=u.fire.call(l,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||tr(e.values[o],r.keyPath,n))}else{var d=Oo(c,e.values[o]),h=s.fire.call(l,d,n,c,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){N(p,e)?p[e]=h[e]:tr(p,e,h[e])}))}}return l}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,a=t.numFailures,u=t.lastResult,s=0;s<o.length;++s){var l=r?r[s]:o[s],f=c[s];null==l?f.onerror&&f.onerror(n[s]):f.onsuccess&&f.onsuccess("put"===e.type&&i[s]?e.values[s]:l)}return{failures:n,results:r,numFailures:a,lastResult:u}})).catch((function(e){return c.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function h(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((function(n){var r=n.result;return f({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:h(e,l(c({},t),{lower:r[r.length-1],lowerOpen:!0}),o)}))}))}}});return o}})}},Ao={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return l(c({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=kt(e.keys,e.trans._cache,"clone"===e.cache);return t?le.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?q(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},ko=function(e,t){if(!this){var n=new ko;return e&&"d"in e&&M(n,e),n}M(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function To(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Tt(e))return M(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?To(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Dt(e);if(ho(t,e.to)>0)return i?To(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Dt(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&jt(e,o),i&&a&&jt(e,i)}}R(ko.prototype,u({add:function(e){return jt(this,e),this},addKey:function(e){return To(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return To(t,e,e)})),this}},sr,(function(){return Pt(this)})));var jo,Po={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new ko(e.MIN_KEY,e.MAX_KEY);return l(c({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,d=l(c({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new ko)},c=s(""),l=s(":dels"),d=e.type,h=f("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=h[0],y=h[1],v=e.trans._cache;return o.mutate(e).then((function(e){if($n(p)){"delete"!==d&&(p=e.results),c.addKeys(p);var t=kt(p,v);t||"add"===d||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&$n(e)?e.forEach((function(e){return o.addKey(e)})):o.addKey(e)};(n||r).forEach((function(e,t){var o=n&&i(n[t]),u=r&&i(r[t]);0!==ho(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),h=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new ko(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new ko(e.key)]},getMany:function(e){return[a,(new ko).addKeys(e.keys)]},count:h,query:h,openCursor:h};return qn(p).forEach((function(e){d[e]=function(i){var a=zr.subscr;if(a){var d=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new ko)},h=d(""),y=d(":dels"),v=f(p[e](i),2),m=v[0],g=v[1];if(d(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(l(c({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return h.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?h.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),d}})}},Do=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=c({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new le((function(e){s.dbReadyResolve=e})),s.openCanceller=new le((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Fe(this,"populate","blocked","versionchange","close",{ready:[ce,te]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||le.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(po.prototype,(function(e,t){this.db=u;var n=lo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==ne?a:null}}))),this.Table=function(e){return Be(fo.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:Fe(null,{creating:[ie,te],reading:[re,ne],updating:[ue,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return Be(go.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Fe(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 le((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),to(e)}))}))}(this),this.Version=function(e){return Be(_o.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Be(vo.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new _r.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=bo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),io.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Eo),this.use(xo),this.use(Po),this.use(Ao),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new _r.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new _r.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(pt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||zr.letThrough||this._vip)?e():new le((function(e,n){if(t._state.openComplete)return n(new _r.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new _r.DatabaseClosed);t.open().catch(te)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?to(t.dbOpenError):e}));dr&&(t.openCanceller._stackHolder=yr()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new _r.DatabaseClosed("db.open() was cancelled")}var i=t.dbReadyResolve,a=null,u=!1;return le.race([r,("undefined"==typeof navigator?le.resolve():Et()).then((function(){return new le((function(r,i){if(o(),!n)throw new _r.MissingAPI;var s=e.name,c=t.autoSchema?n.open(s):n.open(s,Math.round(10*e.verno));if(!c)throw new _r.MissingAPI;c.onerror=rt(i),c.onblocked=Se(e._fireOnBlocked),c.onupgradeneeded=Se((function(r){if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=ot,a.abort(),c.result.close();var o=n.deleteDatabase(s);o.onsuccess=o.onerror=Se((function(){i(new _r.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=rt(i);var l=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=zr.transless||zr;Ee((function(){zr.trans=i,zr.transless=u,0===t?(qn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),ft(e,n),le.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=gt(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;bt(o,i,r),bt(o,a,r),u=o._dbSchema=a;var c=yt(i,a);c.add.forEach((function(e){vt(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new _r.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return mt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),mt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){ft(o,r),n._memoizedTables={},s=!0;var f=V(a);c.del.forEach((function(e){f[e]=i[e]})),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],qn(f),f),n.schema=f;var d,h=fr(l);h&&Oe();var p=le.follow((function(){if((d=l(n))&&h){var e=xe.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?le.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&uo||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?le.resolve(i.shift()(n.idbtrans)).then(e):le.resolve()}().then((function(){var e,t;t=r,qn(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=Se((function(){a=null;var n,o=e._novip.idbdb=c.result,i=B(o.objectStoreNames);if(i.length>0)try{var l=o.transaction(1===(n=i).length?n[0]:n,"readonly");t.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=gt(0,t,n);r._storeNames=B(t.objectStoreNames,0),dt(r,[r._allTables],qn(o),o)}(e,o,l):(bt(e,e._dbSchema,l),function(e,t){var n=yt(gt(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ft(e,l)}catch(e){}io.push(e),o.onversionchange=Se((function(n){t.vcFired=!0,e.on("versionchange").fire(n)})),o.onclose=Se((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).put({name:t}).catch(te)}(e._deps,s),r()}),i)}))}))]).then((function(){return o(),t.onReadyBeingFired=[],le.resolve(St((function(){return e.on.ready.fire(e.vip)}))).then((function n(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(ce,te);return t.onReadyBeingFired=[],le.resolve(St((function(){return r(e.vip)}))).then(n)}}))})).finally((function(){t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((function(){return e})).catch((function(n){t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),to(n)})).finally((function(){t.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=io.indexOf(this);if(t>=0&&io.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new le((function(t){e.dbReadyResolve=t})),e.openCanceller=new le((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new _r.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new le((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Se((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).delete(t).catch(te)}(e._deps,e.name),r()})),t.onerror=rt(o),t.onblocked=e._fireOnBlocked};if(t)throw new _r.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return qn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=xt.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=zr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=s(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new _r.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new _r.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new _r.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):to(e)}var c=So.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):zr.trans?De(zr.transless,(function(){return r._whenReady(c)})):this._whenReady(c)}},{key:"table",value:function(e){if(!N(this._allTables,e))throw new _r.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Co="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Io=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Co,value:function(){return this}}]),e}();try{jo={indexedDB:Kn.indexedDB||Kn.mozIndexedDB||Kn.webkitIndexedDB||Kn.msIndexedDB,IDBKeyRange:Kn.IDBKeyRange||Kn.webkitIDBKeyRange}}catch(r){jo={indexedDB:null,IDBKeyRange:null}}var Mo=Do;R(Mo,l(c({},Er),{delete:function(e){return new Mo(e,{addons:[]}).delete()},exists:function(e){return new Mo(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return _t(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):wt(t,n).toCollection().primaryKeys()}(Mo.dependencies).then(e)}catch(e){return to(new _r.MissingAPI)}},defineClass:function(){return function(e){M(this,e)}},ignoreTransaction:function(e){return zr.trans?De(zr.transless,e):e()},vip:St,async:function(e){return function(){try{var t=Ot(e.apply(this,arguments));return t&&"function"==typeof t.then?t:le.resolve(t)}catch(e){return to(e)}}},spawn:function(e,t,n){try{var r=Ot(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:le.resolve(r)}catch(e){return to(e)}},currentTransaction:{get:function(){return zr.trans||null}},waitFor:function(e,t){var n=le.resolve("function"==typeof e?Mo.ignoreTransaction(e):e).timeout(t||6e4);return zr.trans?zr.trans.waitFor(n):n},Promise:le,debug:{get:function(){return dr},set:function(e){Y(e,"dexie"===e?function(){return!0}:co)}},derive:F,extend:M,props:R,override:U,Events:Fe,on:mo,liveQuery:function(e){return new Io((function(t){var n=function(){return qn(a).some((function(e){return i[e]&&function(e,t){var n=Pt(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Pt(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=fr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){It(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&Oe();var n=function(){return Ee(e,{subscr:t,trans:null})},o=zr.trans?De(zr.transless,n):n();return r&&o.then(xe,xe),o}(d);c||(mo("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:It,getByKeyPath:er,setByKeyPath:tr,delByKeyPath:function(e,t){"string"==typeof t?tr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){tr(e,t,void 0)}))},shallowClone:V,deepClone:q,getObjectDiff:Oo,cmp:ho,asap:z,minKey:-1/0,addons:[],connections:io,errnames:br,dependencies:jo,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Mo.maxKey=bo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(e){var t;No||(ao?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),No=!0,dispatchEvent(t),No=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;No||Mt(t)})));var No=!1;if("undefined"!=typeof BroadcastChannel){var Ro=new BroadcastChannel("x-storagemutated-1");"function"==typeof Ro.unref&&Ro.unref(),mo("storagemutated",(function(e){No||Ro.postMessage(e)})),Ro.onmessage=function(e){e.data&&Mt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(e){try{No||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&d(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Mt(t.changedParts)}}));var Lo=self.document&&navigator.serviceWorker;Lo&&Lo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Mt(t.changedParts)}))}le.rejectionMapper=function(e,t){if(!e||s(e,Z)||s(e,TypeError)||s(e,SyntaxError)||!e.name||!Sr[e.name])return e;var n=new Sr[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},Y(dr,co);var Fo=p(766),Bo=p(685);function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}var zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uo(e);if(t){var o=Uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":h(n))&&"function"!=typeof t?Nt(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!s(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Rt(Nt(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Rt(Nt(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(Do),Ho=new zo,Vo={},Ko=(0,Bo.createGlobalStore)("offline-synchronization",{});function qo(){return qo=Ut((function(){var e,t,n,r,o,i,a,u,s,c,l,f,d;return Vt(this,(function(h){switch(h.label){case 0:return Ko.getState().synchronization?[2]:[4,Ho.syncQueue.count()];case 1:e=h.sent(),t={},n=Object.entries(Vo),r=n.length,o={},i=new AbortController,a=function(){var e,t,n=Ko.getState().synchronization;Ko.setState({synchronization:(e=zt({},n),t={pendingCount:n.pendingCount-1},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)})},h.label=2;case 2:h.trys.push([2,,10,11]),Ko.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),u=0,h.label=3;case 3:if(!(u<r&&n.length>0))return[3,8];s=n.length,h.label=4;case 4:return s--?(c=Ht(n[s],2),l=c[0],f=c[1],(d=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(d)]):[3,6]):[3,7];case 5:h.sent(),t[l]=function(e,t,n,r){return $o.apply(this,arguments)}(f,o,i,a),n.splice(s,1),h.label=6;case 6:return[3,4];case 7:return u++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return h.sent(),[3,11];case 10:return Ko.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),qo.apply(this,arguments)}function $o(){return $o=Ut((function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w;return Vt(this,(function(_){switch(_.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,u=[],s=[],[4,$t()];case 1:return c=_.sent(),[4,Ho.syncQueue.where({type:o,userId:c}).each((function(e,t){u.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}))];case 2:_.sent(),l=0,_.label=3;case 3:if(!(l<u.length))return[3,11];f=Ht(u[l],3),d=f[0],h=f[1],p=f[2],y=p.id,v=p.dependencies,m=void 0===v?[]:v,_.label=4;case 4:return _.trys.push([4,7,9,10]),[4,a(h,{abort:n,index:l,items:s,userId:c,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return g=_.sent(),void 0!==y&&(t[o][y]=g),[4,Ho.syncQueue.delete(d)];case 6:return _.sent(),[3,10];case 7:return b=_.sent(),[4,Ho.syncQueue.update(d,{lastError:{name:null==b?void 0:b.name,message:null!==(w=null==b?void 0:b.message)&&void 0!==w?w:null==b?void 0:b.toString()}})];case 8:return _.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),$o.apply(this,arguments)}function Wo(){return(Wo=Ut((function(){var e;return Vt(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function Yo(){return(Yo=Ut((function(e,t,n,r){var o;return Vt(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Ho.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(Do.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Ho.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(Do.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function Jo(){return(Jo=Ut((function(e,t,n){return Vt(this,(function(r){switch(r.label){case 0:return[4,$t()];case 1:return[4,Wt(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function Zo(){return(Zo=Ut((function(e,t){return Vt(this,(function(n){switch(n.label){case 0:return[4,Zt(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function Qo(){return(Qo=Ut((function(e,t){var n;return Vt(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Ho.syncQueue.where(n).toArray().catch(Do.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Xo(){return(Xo=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,$t()];case 1:return[4,Jt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ei(){return(ei=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,$t()];case 1:return[4,Zt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ti(){return(ti=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,Ho.syncQueue.get(e).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function ni(){return(ni=Ut((function(e){var t,n,r;return Vt(this,(function(o){switch(o.label){case 0:return[4,en(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=Vo[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function ri(){return(ri=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,Ho.syncQueue.delete(e).catch(Do.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}for(var oi,ii={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ai=new Uint8Array(16),ui=[],si=0;si<256;++si)ui.push((si+256).toString(16).slice(1));var ci=function(e,t,n){if(ii.randomUUID&&!t&&!e)return ii.randomUUID();var r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]}(r)},li="OFFLINE+",fi={};function di(){return(di=fn((function(e){return dn(this,(function(t){switch(t.label){case 0:return[4,En()];case 1:return[4,vn(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function hi(){return(hi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new zo).dynamicOfflineData.where(n).toArray().catch(Do.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function pi(){return(pi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,gn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function yi(){return yi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new zo).dynamicOfflineData.get({type:t,identifier:n}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(Do.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:(a=o.users,function(e){if(Array.isArray(e))return cn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(a)||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.")}()).concat([e])}).catch(Do.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}var a}))})),yi.apply(this,arguments)}function vi(){return(vi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,wn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function mi(){return mi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new zo).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(Do.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(Do.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),mi.apply(this,arguments)}function gi(){return gi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return[4,yn(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=fn((function(e){return dn(this,(function(n){return[2,Sn(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),gi.apply(this,arguments)}function bi(){return bi=fn((function(e,t,n){var r,o,i,a,u,s,c,l,f;return dn(this,(function(d){switch(d.label){case 0:return[4,mn(e,t)];case 1:return d.sent(),r=new zo,[4,En()];case 2:return o=d.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 3:return i=d.sent(),a=hn().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((h=fn((function(e){var r,o,i;return dn(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return h.apply(this,arguments)})))]:[2];case 4:return u=d.sent(),s=u.filter((function(e){return!e.error})).map((function(e){return e.id})),c=u.filter((function(e){return e.error})).map((function(e){return e.id})),l=u.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:s,erroredHandlers:c,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(Do.errnames.DatabaseClosed)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2]}var h}))})),bi.apply(this,arguments)}function wi(){return(wi=fn((function(){var e;return dn(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}var _i=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Si(){return Si=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){On(i,r,o,a,u,"next",e)}function u(e){On(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return Tn(),[4,Sn("patient",e)];case 1:return t.sent(),[2]}}))})),Si.apply(this,arguments)}}(),y}())}}}))},3419:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function c(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 l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}e=n.nmd(e),System.register(["react","@openmrs/esm-navigation","@openmrs/esm-extensions","@openmrs/esm-context","@openmrs/esm-utils","@openmrs/esm-api","react-dom","react-i18next","swr","@openmrs/esm-config","@openmrs/esm-globals","@openmrs/esm-feature-flags","dayjs"],(function(r,o){var a={},h={},v={},m={},g={},b={},w={},_={},S={},E={},O={},x={},A={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(w,"__esModule",{value:!0}),{setters:[function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){h.interpolateUrl=e.interpolateUrl,h.navigate=e.navigate},function(e){v.getExtensionInternalStore=e.getExtensionInternalStore,v.getExtensionStore=e.getExtensionStore,v.registerExtensionSlot=e.registerExtensionSlot,v.renderExtension=e.renderExtension},function(e){m.registerContext=e.registerContext,m.subscribeToContext=e.subscribeToContext,m.unregisterContext=e.unregisterContext,m.updateContext=e.updateContext},function(e){g.isOnline=e.isOnline,g.shallowEqual=e.shallowEqual},function(e){b.attachmentUrl=e.attachmentUrl,b.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,b.fetchCurrentPatient=e.fetchCurrentPatient,b.getCurrentUser=e.getCurrentUser,b.getLocations=e.getLocations,b.getSessionStore=e.getSessionStore,b.getVisitStore=e.getVisitStore,b.getVisitTypes=e.getVisitTypes,b.makeUrl=e.makeUrl,b.openmrsFetch=e.openmrsFetch,b.restBaseUrl=e.restBaseUrl,b.userHasAccess=e.userHasAccess},function(e){Object.keys(e).forEach((function(t){w[t]=e[t]}))},function(e){_.I18nextProvider=e.I18nextProvider},function(e){S.SWRConfig=e.SWRConfig,S.default=e.default},function(e){E.getConfigStore=e.getConfigStore,E.getExtensionConfigFromStore=e.getExtensionConfigFromStore,E.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){O.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){x.featureFlagsStore=e.featureFlagsStore},function(e){A.default=e.default}],execute:function(){r(function(){var r={332: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)}}}()},645:function(e,t,n){"use strict";var r=n(493);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},290:function(e,t,n){"use strict";var r=function(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}},o=n(954),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useState,u=o.useEffect,s=o.useLayoutEffect,c=o.useDebugValue,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=a({inst:{value:n,getSnapshot:t}}),i=o[0].inst,l=o[1];return s((function(){i.value=n,i.getSnapshot=t,r(i)&&l({inst:i})}),[e,n,t]),u((function(){return r(i)&&l({inst:i}),e((function(){r(i)&&l({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:l},374:function(e,t,n){"use strict";e.exports=n(290)},766:function(e){"use strict";e.exports=b},824:function(e){"use strict";e.exports=E},743:function(e){"use strict";e.exports=m},45:function(e){"use strict";e.exports=v},708:function(e){"use strict";e.exports=x},728:function(e){"use strict";e.exports=O},513:function(e){"use strict";e.exports=h},618:function(e){"use strict";e.exports=g},688:function(e){"use strict";e.exports=A},954:function(e){"use strict";e.exports=a},493:function(e){"use strict";e.exports=w},281:function(e){"use strict";e.exports=_},725:function(e){"use strict";e.exports=S}},o={};function k(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e].call(n.exports,n,n.exports,k),n.exports}k.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return k.d(t,{a:t}),t},k.d=function(e,t){for(var n in t)k.o(t,n)&&!k.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},k.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},k.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var T={};return function(){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e){var t=e.to,n=e.templateParams,o=e.onBeforeNavigate,i=e.children,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","onBeforeNavigate","children"]);return(0,ft.useEffect)((function(){a.href&&console.warn("ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '".concat(a.href,"'")),a.onClick&&console.warn("ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ".concat(t))}),[]),ft.default.createElement("a",function(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}({onClick:function(e){return function(e,t,n,r){0!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||(e.preventDefault(),null==r||r(e),(0,ht.navigate)({to:t,templateParams:n})),0===e.button&&(e.ctrlKey||e.metaKey)&&(null==r||r(e)),0===e.button&&e.shiftKey&&(null==r||r(e)),1===e.button&&(null==r||r(e))}(e,t,n,o)},href:(0,ht.interpolateUrl)(t,n)},a),i)},a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},h=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){a(e,t,n[t])}))}return e},v=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},g=function(e){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){m(e,t,n[t])}))}return e},b=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},w=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}},_=function(e,t){"function"==typeof t&&(t=t(e));var n={},r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=b(a.value,2),r=t[0],o=t[1];n[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.setState((function(e){return o.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return v(e)}(t=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var t}))}},s=Object.entries(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt(),n=arguments.length>2?arguments[2]:void 0,r=b((0,ft.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];return(0,ft.useEffect)((function(){return(0,vt.subscribeTo)(e,t,i)}),[e,t]),g({},o,(0,ft.useMemo)((function(){return n?_(e,n):{}}),[e,n]))},E=function(e,t){return S(e,mt(),t)},O=function(e){return function(t){var n=b((0,ft.useState)(e.getState()),2),r=n[0],o=n[1];return(0,ft.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),g({},r,(0,ft.useMemo)((function(){return t?_(e,t):{}}),[t]))}},x=function(e){var t,n=gt(e);return null!==(t=null==n?void 0:n.assignedExtensions)&&void 0!==t?t:[]},A=function(e){var t=(0,ft.useContext)(dt).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,ft.useEffect)((function(){(0,pt.registerExtensionSlot)(t,e)}),[]),{extensions:x(e),extensionSlotName:e,extensionSlotModuleName:t}},j=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=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){j(e,t,n[t])}))}return e},D=function(e){return e},C=function(e){var t=e.name,n=e.extensionSlotName,r=e.select,o=void 0===r?D:r,i=e.children,a=e.state,u=e.style,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["name","extensionSlotName","select","children","state","style"]);if(i&&a)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var c,l,f,d,h=null!=t?t:n,p=(0,ft.useRef)(null),y=A(h),v=y.extensions,m=y.extensionSlotModuleName,g=(0,ft.useMemo)((function(){return o(v)}),[o,v]),b=(0,ft.useMemo)((function(){if("function"==typeof i&&!ft.default.isValidElement(i))return g.map((function(e){return i(e,a)}))}),[i,g]);return ft.default.createElement("div",P({ref:p,"data-extension-slot-name":h,"data-extension-slot-module-name":m,style:(f=P({},u),d={position:"relative"},d=null!=d?d:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(d)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(d)).forEach((function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(d,e))})),f)},s),h&&(null==g?void 0:g.map((function(e,t){return ft.default.createElement(dt.Provider,{key:e.id,value:{moduleName:m,featureName:"",extension:{extensionId:e.id,extensionSlotName:h,extensionSlotModuleName:m}}},null!==(l=null!==(c=null==b?void 0:b[t])&&void 0!==c?c:"function"!=typeof i?i:null)&&void 0!==l?l:ft.default.createElement(yt,{state:a}))}))))},I=function(e,t){var n=(0,ft.useRef)(null!=t?t:{}),r=(0,ft.useRef)((function(t){return(0,bt.updateContext)(e,t)}));return(0,ft.useEffect)((function(){return(0,bt.registerContext)(e,null!=t?t:{}),function(){(0,bt.unregisterContext)(e)}}),[e]),(0,ft.useEffect)((function(){var r=null!=t?t:{};(0,wt.shallowEqual)(n.current,r)||((0,bt.updateContext)(e,(function(){return r})),n.current=r)}),[t]),r.current},M=function(e){return I(e.namespace,e.value),null},N=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},R=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},L=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},F=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},B=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(At(n)));return function(){var e=n(t);if(!u(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(At(e)));return e}},U=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},G=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=q(e,t,(function(){n(this)})),i=B(e,t)(),a=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:V(e),renderType:K(e)});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},z=function(e,t){return new Promise((function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():V(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},H=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=q(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=B(e,t)();V(e).render(r,i)}}))},V=function(e){return e.ReactDOMClient||e.ReactDOM},K=function(e){return"function"==typeof e.renderType?e.renderType():e.renderType},q=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=kt?e.React.createElement(kt.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,L(L({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)},$=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},W=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},It,e);return function(e){var n;return n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ct(e,t)}(i,n);var r,o=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var o=Dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":d(n))&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}(this,n)}}(i);function i(e){var n;return function(e,t){if(!u(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}},n}return r=[{key:"componentDidCatch",value:function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})}},{key:"render",value:function(){if(this.state.caughtError)return ft.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=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){$(e,t,n[t])}))}return e}({},Mt,t.swrConfig),r=ft.default.createElement(ft.Suspense,{fallback:null},ft.default.createElement(Pt.SWRConfig,{value:n},ft.default.createElement(dt.Provider,{value:this.state.config},t.disableTranslations?ft.default.createElement(e,this.props):ft.default.createElement(jt.I18nextProvider,{i18n:window.i18next,defaultNS:this.props._extensionContext?"".concat(t.moduleName,"___").concat(this.props._extensionContext.extensionSlotName,"___").concat(this.props._extensionContext.extensionId):t.moduleName},ft.default.createElement(e,this.props)))));return t.strictMode&&ft.default.StrictMode?ft.default.createElement(ft.default.StrictMode,null,r):r}}],r&&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)}}(i.prototype,r),i}(ft.default.Component),$(n,"displayName","OpenmrsReactComponent(".concat(t.featureName,")")),n}},Y=function(e,t){return function(e){if("object"!==xt(e))throw new Error("single-spa-react requires a configuration object");var t,n=L(L({},Tt),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!kt&&n.React.createContext&&(kt=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:U.bind(null,n),mount:G.bind(null,n),unmount:z.bind(null,n)};return n.parcelCanUpdate&&(r.update=H.bind(null,n)),r}({React:ft.default,ReactDOMClient:Ot,rootComponent:W(t)(e)})},J=function(e,t){return function(){return e().then((function(e){return Y(e.default,t)}))}},Z=function(e,t){return function(){return Promise.resolve(Y(e,t))}},Q=function(){var e=(0,ft.useRef)();return e.current&&!e.current.signal.aborted||(e.current=new AbortController),(0,ft.useEffect)((function(){var t=e.current;return function(){return null==t?void 0:t.abort()}}),[]),e.current},X=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ee=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return null!=e?e:{}},r=function(e){if(Array.isArray(e))return e}(t=(0,ft.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return X(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,ft.useEffect)((function(){if(null==e||""===e.replace(" ",""))throw new Error('The namespace supplied to useAppContext must be a non-empty string, but was "'.concat(e,'".'))}),[e]),(0,ft.useEffect)((function(){return(0,bt.subscribeToContext)(e,(function(e){if(void 0!==e){var t=n?n(e):null!=e?e:{};(0,wt.shallowEqual)(o,t)||i(t)}}))}),[]),o},te=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])}},ne=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])}},re=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])}},oe=function(e){var t=this.__data__=new Gt(e);this.size=t.size},ie=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new bn;++t<n;)this.add(e[t])},ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ue=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,ft.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ae(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,ft.useEffect)((function(){return(0,pt.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];Pr(a,r)||o(a)}))}),[]),r},se=function(e,t){var n,r=(0,Pt.default)("".concat(St.attachmentUrl,"?patient=").concat(e,"&includeEncounterless=").concat(t),St.openmrsFetch),o=r.data,i=r.error,a=r.mutate,u=r.isLoading,s=r.isValidating;return(0,ft.useMemo)((function(){return{isLoading:u,data:null!==(n=null==o?void 0:o.data.results)&&void 0!==n?n:[],error:i,mutate:a,isValidating:s}}),[o,i,u,s,a])},ce=function(e){(0,ft.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},le=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},fe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},de=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){fe(e,t,n[t])}))}return e},he=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},pe=function(e){var t,n=(0,ft.useContext)(dt),r=n.moduleName,o=n.extension,i=null!==(t=null==e?void 0:e.externalModuleName)&&void 0!==t?t:r;if(!i&&!o)throw Error(Ir);var a=function(e){var t=(0,ft.useMemo)((function(){return(0,Dr.getConfigStore)(e)}),[e]),n=e,r=function(e){var t=he((0,ft.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],r=t[1];return(0,ft.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&r(e.config)}))}),[e]),n}(t);if(!r)throw Cr[n]||(Cr[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Cr[n];return r}(i),u=function(e){var t=(0,ft.useMemo)(Dr.getExtensionsConfigStore,[]),n=function(e,t){var n=he((0,ft.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,Dr.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),r=n[0],o=n[1];return(0,ft.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,Dr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!Pr(n.config,r)&&o(n.config)}))}),[e,t,r]),r}(t,e);if(!n&&e){var r="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!Cr[r]&&t&&(Cr[r]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,Dr.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Cr[r]}return n||{}}(o);return(0,ft.useMemo)((function(){return(null==e?void 0:e.externalModuleName)&&i===e.externalModuleName?de({},a):de({},a,u)}),[i,null==e?void 0:e.externalModuleName,a,u])},ye=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ve=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)((0,wt.isOnline)()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ye(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,ft.useEffect)((function(){return(0,Nr.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},me=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ge=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,r=function(e){if(Array.isArray(e))return e}(t=(0,ft.useState)(e))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return me(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,ft.useEffect)((function(){var t=setTimeout((function(){i(e)}),n);return function(){clearTimeout(t)}}),[e,n]),o},be=function(){return yo.apply(this,arguments)},we=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},_e=function(){var e="".concat(St.restBaseUrl,"/emrapi/configuration?v=").concat(Bo),t=Fo(e,St.openmrsFetch);return(0,ft.useMemo)((function(){var e;return{emrConfiguration:null===(e=t.data)||void 0===e?void 0:e.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}}),[t])},Se=function(e){var t=x(e);return(0,ft.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},Ee=function(e){var t,n;return null!==(n=null===(t=S(zo.featureFlagsStore).flags[e])||void 0===t?void 0:t.enabled)&&void 0!==n&&n},Oe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},xe=function(){var e,t=(e=(0,ft.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Oe(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,ft.useCallback)((function(){t((function(e){return e+1}))}),[])},Ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ke=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Te=function(e,t){return je(e,t,Ho,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})},je=function(e,t,n){var r,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=n.getPaginatedUrl,u=n.getTotalCount,s=n.getCurrentPageSize,c=n.getData,l=i.immutable,f=i.swrConfig,d=null!==(r=i.fetcher)&&void 0!==r?r:St.openmrsFetch,h=function(e){if(Array.isArray(e))return e}(o=(0,ft.useState)(1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(e,t){if(e){if("string"==typeof e)return Ae(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,2):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=h[0],y=h[1],v=(0,ft.useRef)(Number.NaN),m=(0,ft.useRef)(Number.NaN),g=t,b=(p-1)*t,w=(0,ft.useMemo)((function(){return a(e,g,b)}),[e,g,b]),_=(l?Fo:Pt.default)(w,d,f),S=_.data,E=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}(_,["data"]);(null==S?void 0:S.data)&&(v.current=u(null==S?void 0:S.data),m.current=s(null==S?void 0:S.data));var O=Math.ceil(v.current/t),x=(0,ft.useCallback)((function(e){0<e&&e<=O?y(e):console.warn("Invalid attempt to go to out of bounds page: "+e)}),[e,p,O]),A=(0,ft.useCallback)((function(){x(p+1)}),[e,p,O]),k=(0,ft.useCallback)((function(){x(p-1)}),[e,p,O]);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){ke(e,t,n[t])}))}return e}({data:c(null==S?void 0:S.data),totalPages:O,totalCount:v.current,currentPage:p,currentPageSize:m,paginated:O>1,showNextButton:p<O,showPreviousButton:p>1,goTo:x,goToNext:A,goToPrevious:k},E)},Pe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return je(e,t,De(),n)},De=function(){var e,t;return{getPaginatedUrl:function(e,t,n){if(e){var r=new URL((0,St.makeUrl)(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.toString()}return null},getNextUrl:function(e){var t,n,r=null===(t=null==e||null===(n=e.link)||void 0===n?void 0:n.find((function(e){return"next"==e.relation})))||void 0===t?void 0:t.url;if(r){var o=new URL(r);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()}return null},getTotalCount:function(t){return null!==(e=null==t?void 0:t.total)&&void 0!==e?e:Number.NaN},getCurrentPageSize:function(e){var n;return null!==(t=null==e||null===(n=e.entry)||void 0===n?void 0:n.length)&&void 0!==t?t:Number.NaN},getData:function(e){var t;return null==e||null===(t=e.entry)||void 0===t?void 0:t.map((function(e){return e.resource}))}}},Ce=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ie=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){Ce(e,t,n[t])}))}return e},Me=function(e){return Ne(e,Ho,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},Ne=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.swrInfiniteConfig,a=o.immutable,u=t.getNextUrl,s=t.getTotalCount,c=t.getData,l=null!==(r=o.fetcher)&&void 0!==r?r:St.openmrsFetch,f=(0,ft.useCallback)((function(n,r){var o;return 0==n?null!==(o=null==e?void 0:e.toString())&&void 0!==o?o:null:t.getNextUrl(r.data)}),[e]),d=Yo(f,l,Ie({},i,a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{})),h=d.data,p=(d.size,d.setSize),y=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}(d,["data","size","setSize"]),v=u(null==h?void 0:h[h.length-1].data),m=null!=v,g=s(null==h||null===(n=h[0])||void 0===n?void 0:n.data);return Ie({data:null==h?void 0:h.flatMap((function(e){return c(e.data)})),totalCount:g,hasMore:m,loadMore:function(){var e;p((null!==(e=null==h?void 0:h.length)&&void 0!==e?e:0)+1)},nextUri:v},y)},Re=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Le=function(e){return Fe(e,Ho,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},Fe=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Ne(e,t,o),a=i.hasMore,u=i.error,s=i.data,c=i.loadMore,l=i.isLoading,f=i.nextUri;return(0,ft.useEffect)((function(){a&&!u&&c()}),[a,f]),o.partialData?i:(n=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){Re(e,t,n[t])}))}return e}({},i),r=null!=(r={data:a||u?void 0:s,isLoading:l||a})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n)},Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Fe(e,De(),t)},Ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ne(e,De(),t)},Ge=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ze=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e},He=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)(ze))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ge(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,ft.useEffect)((function(){var e=function(){r(ze())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},Ve=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ke=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];return(0,ft.useEffect)((function(){var e=(0,St.getLocations)(t,n).subscribe((function(e){i(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[t,n]),o},qe=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,ft.useRef)(null);return(0,ft.useEffect)((function(){var r=function(r){t&&n.current&&!n.current.contains(r.target)&&e(r)};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),function(){window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}}),[e,t]),n},$e=function(e){var t=(0,ft.useRef)();return(0,ft.useEffect)((function(){var n=new IntersectionObserver((function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)if(i.value.isIntersecting)return void e()}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}),{threshold:1});return t.current&&n.observe(t.current),function(){t.current&&n.unobserve(t.current)}}),[t.current,e]),t},We=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ye=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.abortController,i=r.fetchInit,a=r.url,u=r.swrConfig,s=Rt(),c=(0,ft.useMemo)((function(){return null!==(n=null!==(t=null==i?void 0:i.signal)&&void 0!==t?t:null==o?void 0:o.signal)&&void 0!==n?n:s.signal}),[null==o?void 0:o.signal,null==i?void 0:i.signal,s.signal]),l=(0,ft.useCallback)((function(e){var t,n,r=function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw new Error("When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ".concat(e,"."))}(e,a);return(0,St.openmrsFetch)(r,(t=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){We(e,t,n[t])}))}return e}({},i),n=null!=(n={signal:c})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t))}),[c,i,a]);return(0,Pt.default)(e,l,u)},Je=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ze=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zo,r=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)(1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Je(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1],a=(0,ft.useMemo)((function(){return"number"==typeof n&&n>0?Math.max(1,Math.ceil(t.length/n)):1}),[t.length,n]),u=(0,ft.useMemo)((function(){var e=(o-1)*n,r=(o+0)*n;return t.slice(e,r)}),[t,o,n]),s=(0,ft.useCallback)((function(e){i(Math.max(1,Math.min(a,e)))}),[i,a]),c=(0,ft.useCallback)((function(){o<a&&i(o+1)}),[o,a,i]),l=(0,ft.useCallback)((function(){o>1&&i(o-1)}),[o,i]);return(0,ft.useMemo)((function(){return{results:u,totalPages:a,currentPage:o,paginated:t.length>n,showNextButton:o<a,showPreviousButton:o>1,goTo:s,goToNext:c,goToPrevious:l}}),[u,a,t.length,n,o,s,c,l])},Qe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Xe=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},et=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,ft.useState)(null!=e?e:Xe()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Qe(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=(0,Pt.default)(r?["patient",r]:null,(function(){return(0,St.fetchCurrentPatient)(r,{})})),a=i.data,u=i.error,s=i.isValidating;return(0,ft.useEffect)((function(){var e=function(){var e=Xe();e!==r&&o(e)};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r]),(0,ft.useMemo)((function(){return{isLoading:s&&!u&&!a,patient:a,patientUuid:r,error:u}}),[s,u,a,r])},tt=function(){var e="".concat(St.restBaseUrl,"/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType"),t=(0,Pt.default)(e,St.openmrsFetch),n=t.data,r=t.error,o=t.isLoading;return(0,ft.useMemo)((function(){var e,t;return{primaryIdentifierCode:null===(e=null==n||null===(t=n.data)||void 0===t?void 0:t.results[0])||void 0===e?void 0:e.metadataUuid,isLoading:o,error:r}}),[n,r,o])},nt=function(e){var t=A(e),n=t.extensions,r=t.extensionSlotModuleName;return e?n.map((function(t){return function(n){var o=n.state;return ft.default.createElement(dt.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},ft.default.createElement(yt,{state:o}))}})):[]},rt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ot=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){rt(e,t,n[t])}))}return e},it=function(e){var t=(0,ft.useId)();return(0,ft.useEffect)((function(){var n,r,o=(0,St.getVisitStore)();return e&&o.setState({mutateVisitCallbacks:(n=ot({},o.getState().mutateVisitCallbacks),r=rt({},t,e),r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n)}),function(){if(e){var n=ot({},o.getState().mutateVisitCallbacks);delete n[t],o.setState({mutateVisitCallbacks:n})}}}),[t,e]),E((0,St.getVisitStore)(),ti)},at=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:St.defaultVisitCustomRepresentation,r=it(),o=r.patientUuid,i=r.manuallySetVisitUuid,a=r.setVisitContext,u=e&&o==e?i:null,s="?patient=".concat(e,"&v=").concat(n,"&includeInactive=false"),c="/".concat(u,"?v=").concat(n),l=(0,Pt.default)(e?"".concat(St.restBaseUrl,"/visit").concat(s):null,St.openmrsFetch),f=l.data,d=l.error,h=l.mutate,p=l.isValidating,y=(0,Pt.default)(e&&u?"".concat(St.restBaseUrl,"/visit").concat(c):null,St.openmrsFetch),v=y.data,m=y.error,g=y.mutate,b=y.isValidating,w=(0,ft.useMemo)((function(){return null!==(t=null==f?void 0:f.data.results.find((function(e){return null===e.stopDatetime})))&&void 0!==t?t:null}),[f]),_=(0,ft.useMemo)((function(){return u&&v?v.data:null}),[v,u]),S=(0,ft.useRef)(!1);(0,ft.useEffect)((function(){null==i&&!p&&w&&a(w),b||(S&&!b&&_&&_.stopDatetime&&a(null),S.current=!!_&&!_.stopDatetime)}),[_,i,w,p,b]);var E=(0,ft.useCallback)((function(){h(),g()}),[w,_,h,g]);return it(E),{error:d||m,mutate:E,isValidating:p||b,activeVisit:w,currentVisit:_,currentVisitIsRetrospective:Boolean(u),isLoading:Boolean((!f||u&&!v)&&(!d||!m))}},ut=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},st=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ut(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1];return(0,ft.useEffect)((function(){var e=(0,St.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},ct=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},lt=function(){var e,t=(0,ft.useRef)(),n=function(e){if(Array.isArray(e))return e}(e=(0,ft.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ct(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=null;if(!r){if(qo){var a=(0,St.getSessionStore)().getState();a.loaded&&(i=a.session)}else qo=new Promise((function(e){var n=function(n){var r=n.loaded,o=n.session;r&&(e(o),i=o,t.current&&t.current(),t.current=void 0)};n((0,St.getSessionStore)().getState()),i||(t.current=(0,St.getSessionStore)().subscribe(n))}));if(!i)throw qo;o(i)}(0,ft.useEffect)((function(){return t.current||(t.current=(0,St.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(i=n,o(n))}))),function(){t.current&&t.current(),t.current=void 0}}),[]);var u=r||i;if(!u)throw qo?(console.warn("useSession is in an unexpected state. Attempting to recover."),qo):Error("useSession is in an invalid state.");return u};k.r(T),k.d(T,{ComponentContext:function(){return dt},ConfigurableLink:function(){return o},Extension:function(){return yt},ExtensionSlot:function(){return C},OpenmrsAppContext:function(){return M},RenderIfValueIsTruthy:function(){return _t},UserHasAccess:function(){return Et},createUseStore:function(){return O},getAsyncExtensionLifecycle:function(){return Nt},getAsyncLifecycle:function(){return J},getFhirServerPaginationHandlers:function(){return De},getLifecycle:function(){return Y},getSyncLifecycle:function(){return Z},isDesktop:function(){return Jo},openmrsComponentDecorator:function(){return W},useAbortController:function(){return Q},useAppContext:function(){return ee},useAssignedExtensionIds:function(){return ue},useAssignedExtensions:function(){return x},useAttachments:function(){return se},useBodyScrollLock:function(){return ce},useConfig:function(){return pe},useConnectedExtensions:function(){return Mr},useConnectivity:function(){return ve},useDebounce:function(){return ge},useDefineAppContext:function(){return I},useEmrConfiguration:function(){return _e},useExtensionInternalStore:function(){return Uo},useExtensionSlot:function(){return A},useExtensionSlotMeta:function(){return Se},useExtensionSlotStore:function(){return gt},useExtensionStore:function(){return Go},useFeatureFlag:function(){return Ee},useFhirFetchAll:function(){return Be},useFhirInfinite:function(){return Ue},useFhirPagination:function(){return Pe},useForceUpdate:function(){return xe},useLayoutType:function(){return He},useLocations:function(){return Ke},useOnClickOutside:function(){return qe},useOnVisible:function(){return $e},useOpenmrsFetchAll:function(){return Le},useOpenmrsInfinite:function(){return Me},useOpenmrsPagination:function(){return Te},useOpenmrsSWR:function(){return Ye},usePagination:function(){return Ze},usePatient:function(){return et},usePrimaryIdentifierCode:function(){return tt},useRenderableExtensions:function(){return nt},useSession:function(){return lt},useStore:function(){return S},useStoreWithActions:function(){return E},useVisit:function(){return at},useVisitContextStore:function(){return it},useVisitTypes:function(){return st}});var ft=k(954),dt=ft.default.createContext({moduleName:"",featureName:""}),ht=k(513),pt=k(45),yt=function(e){var t=e.state,n=(e.children,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["state","children"])),r=(0,ft.useContext)(dt).extension,o=(0,ft.useRef)(null),i=(0,ft.useRef)(Promise.resolve()),a=(0,ft.useCallback)((function(e){(null==r?void 0:r.extensionSlotName)&&r.extensionSlotModuleName&&r.extensionSlotModuleName&&!o.current&&(0,pt.renderExtension)(e,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,t).then((function(e){o.current=e}))}),[]);return(0,ft.useEffect)((function(){return function(){if(o&&o.current)switch(o.current.getStatus()){case"MOUNTING":o.current.mountPromise.then((function(){var e;"MOUNTED"===(null===(e=o.current)||void 0===e?void 0:e.getStatus())&&o.current.unmount()}));break;case"MOUNTED":o.current.unmount();break;case"UPDATING":i.current&&i.current.then((function(){var e;"MOUNTED"===(null===(e=o.current)||void 0===e?void 0:e.getStatus())&&o.current.unmount()}))}}}),[]),(0,ft.useEffect)((function(){o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,i.current]).then((function(){var e;"MOUNTED"===(null==o||null===(e=o.current)||void 0===e?void 0:e.getStatus())&&o.current.update&&(i.current=o.current.update(h({},t)).catch((function(e){var t,n,r;if(n=e,!(null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):u(n,r))||!e.message.includes("minified message #32")||"MOUNTED"===(null===(t=o.current)||void 0===t?void 0:t.getStatus()))throw e})))}))}),[t]),r?ft.default.createElement("div",h({ref:a,"data-extension-id":null==r?void 0:r.extensionId,style:{position:"relative"}},n)):null},vt=k(385),mt=function(){return function(e){return e}},gt=function(e){return S((0,pt.getExtensionStore)(),(function(t){var n;return null===(n=t.slots)||void 0===n?void 0:n[e]}))},bt=k(743),wt=k(618),_t=function(e){var t=e.children,n=e.value,r=e.fallback;return Boolean(n)?ft.default.createElement(ft.default.Fragment,null,t):r?ft.default.createElement(ft.default.Fragment,null,r):null},St=k(766),Et=function(e){var t,n=e.privilege,r=e.fallback,o=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,ft.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return N(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i[1];return(0,ft.useEffect)((function(){var e=(0,St.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,St.userHasAccess)(n,a)?ft.default.createElement(ft.default.Fragment,null,o):r?ft.default.createElement(ft.default.Fragment,null,r):null},Ot=k(645);function xt(e){return(xt="function"==typeof Symbol&&"symbol"==d(Symbol.iterator)?function(e){return void 0===e?"undefined":d(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":d(e)})(e)}function At(e){return(At="function"==typeof Symbol&&"symbol"==d(Symbol.iterator)?function(e){return void 0===e?"undefined":d(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":d(e)})(e)}var kt=null;try{kt=n(1672).createContext()}catch(R){}var Tt={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}},jt=k(281),Pt=k(725);function Dt(e){return Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dt(e)}function Ct(e,t){return Ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ct(e,t)}var It={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},Mt={errorRetryCount:3,fetcher:St.openmrsFetch,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0},Nt=J,Rt=Q,Lt=function(e,t){return e===t||e!=e&&t!=t},Ft=function(e,t){for(var n=e.length;n--;)if(Lt(e[n][0],t))return n;return-1},Bt=Array.prototype.splice;te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=Ft(t,e);return!(n<0||(n==t.length-1?t.pop():Bt.call(t,n,1),--this.size,0))},te.prototype.get=function(e){var t=this.__data__,n=Ft(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return Ft(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=Ft(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ut,Gt=te,zt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ht="object"==typeof self&&self&&self.Object===Object&&self,Vt=zt||Ht||Function("return this")(),Kt=Vt.Symbol,qt=Object.prototype,$t=qt.hasOwnProperty,Wt=qt.toString,Yt=Kt?Kt.toStringTag:void 0,Jt=Object.prototype.toString,Zt=Kt?Kt.toStringTag:void 0,Qt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in Object(e)?function(e){var t=$t.call(e,Yt),n=e[Yt];try{e[Yt]=void 0;var r=!0}catch(e){}var o=Wt.call(e);return r&&(t?e[Yt]=n:delete e[Yt]),o}(e):function(e){return Jt.call(e)}(e)},Xt=function(e){var t=void 0===e?"undefined":d(e);return null!=e&&("object"==t||"function"==t)},en=function(e){if(!Xt(e))return!1;var t=Qt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},tn=Vt["__core-js_shared__"],nn=(Ut=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||""))?"Symbol(src)_1."+Ut:"",rn=Function.prototype.toString,on=function(e){if(null!=e){try{return rn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},an=/^\[object .+?Constructor\]$/,un=Function.prototype,sn=Object.prototype,cn=un.toString,ln=sn.hasOwnProperty,fn=RegExp("^"+cn.call(ln).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dn=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Xt(e)||(t=e,nn&&nn in t))&&(en(e)?fn:an).test(on(e));var t}(n)?n:void 0},hn=dn(Vt,"Map"),pn=dn(Object,"create"),yn=Object.prototype.hasOwnProperty,vn=Object.prototype.hasOwnProperty;ne.prototype.clear=function(){this.__data__=pn?pn(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(pn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return yn.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return pn?void 0!==t[e]:vn.call(t,e)},ne.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pn&&void 0===t?"__lodash_hash_undefined__":t,this};var mn=ne,gn=function(e,t){var n,r,o=e.__data__;return("string"==(r=d(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};re.prototype.clear=function(){this.size=0,this.__data__={hash:new mn,map:new(hn||Gt),string:new mn}},re.prototype.delete=function(e){var t=gn(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return gn(this,e).get(e)},re.prototype.has=function(e){return gn(this,e).has(e)},re.prototype.set=function(e,t){var n=gn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var bn=re;oe.prototype.clear=function(){this.__data__=new Gt,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var n=this.__data__;if(u(n,Gt)){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bn(r)}return n.set(e,t),this.size=n.size,this};var wn=oe;ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)};var _n=ie,Sn=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},En=function(e,t){return e.has(t)},On=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new _n:void 0;for(i.set(e,t),i.set(t,e);++f<u;){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(!Sn(t,(function(e,t){if(!En(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},xn=Vt.Uint8Array,An=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},kn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Tn=Kt?Kt.prototype:void 0,jn=Tn?Tn.valueOf:void 0,Pn=Array.isArray,Dn=Object.prototype.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,In=Cn?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}(Cn(e),(function(t){return Dn.call(e,t)})))}:function(){return[]},Mn=function(e){return null!=e&&"object"==typeof e},Nn=function(e){return Mn(e)&&"[object Arguments]"==Qt(e)},Rn=Object.prototype,Ln=Rn.hasOwnProperty,Fn=Rn.propertyIsEnumerable,Bn=Nn(function(){return arguments}())?Nn:function(e){return Mn(e)&&Ln.call(e,"callee")&&!Fn.call(e,"callee")},Un=Bn,Gn=t&&!t.nodeType&&t,zn=Gn&&e&&!e.nodeType&&e,Hn=zn&&zn.exports===Gn?Vt.Buffer:void 0,Vn=(Hn?Hn.isBuffer:void 0)||function(){return!1},Kn=/^(?:0|[1-9]\d*)$/,qn=function(e,t){var n=void 0===e?"undefined":d(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Kn.test(e))&&e>-1&&e%1==0&&e<t},$n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Wn={};Wn["[object Float32Array]"]=Wn["[object Float64Array]"]=Wn["[object Int8Array]"]=Wn["[object Int16Array]"]=Wn["[object Int32Array]"]=Wn["[object Uint8Array]"]=Wn["[object Uint8ClampedArray]"]=Wn["[object Uint16Array]"]=Wn["[object Uint32Array]"]=!0,Wn["[object Arguments]"]=Wn["[object Array]"]=Wn["[object ArrayBuffer]"]=Wn["[object Boolean]"]=Wn["[object DataView]"]=Wn["[object Date]"]=Wn["[object Error]"]=Wn["[object Function]"]=Wn["[object Map]"]=Wn["[object Number]"]=Wn["[object Object]"]=Wn["[object RegExp]"]=Wn["[object Set]"]=Wn["[object String]"]=Wn["[object WeakMap]"]=!1;var Yn,Jn=t&&!t.nodeType&&t,Zn=Jn&&e&&!e.nodeType&&e,Qn=Zn&&Zn.exports===Jn&&zt.process,Xn=function(){try{return Zn&&Zn.require&&Zn.require("util").types||Qn&&Qn.binding&&Qn.binding("util")}catch(e){}}(),er=Xn&&Xn.isTypedArray,tr=er?(Yn=er,function(e){return Yn(e)}):function(e){return Mn(e)&&$n(e.length)&&!!Wn[Qt(e)]},nr=Object.prototype.hasOwnProperty,rr=Object.prototype,or=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ir=Object.prototype.hasOwnProperty,ar=function(e){return null!=(t=e)&&$n(t.length)&&!en(t)?function(e,t){var n=Pn(e),r=!n&&Un(e),o=!n&&!r&&Vn(e),i=!n&&!r&&!o&&tr(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!nr.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||qn(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||rr))return or(e);var t,n,r=[];for(var o in Object(e))ir.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},ur=function(e){return function(e,t,n){var r=t(e);return Pn(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,ar,In)},sr=Object.prototype.hasOwnProperty,cr=dn(Vt,"DataView"),lr=dn(Vt,"Promise"),fr=dn(Vt,"Set"),dr=dn(Vt,"WeakMap"),hr="[object Map]",pr="[object Promise]",yr="[object Set]",vr="[object WeakMap]",mr="[object DataView]",gr=on(cr),br=on(hn),wr=on(lr),_r=on(fr),Sr=on(dr),Er=Qt;(cr&&Er(new cr(new ArrayBuffer(1)))!=mr||hn&&Er(new hn)!=hr||lr&&Er(lr.resolve())!=pr||fr&&Er(new fr)!=yr||dr&&Er(new dr)!=vr)&&(Er=function(e){var t=Qt(e),n="[object Object]"==t?e.constructor:void 0,r=n?on(n):"";if(r)switch(r){case gr:return mr;case br:return hr;case wr:return pr;case _r:return yr;case Sr:return vr}return t});var Or=Er,xr="[object Arguments]",Ar="[object Array]",kr="[object Object]",Tr=Object.prototype.hasOwnProperty,jr=function e(t,n,r,o,i){return t===n||(null==t||null==n||!Mn(t)&&!Mn(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=Pn(e),s=Pn(t),c=a?Ar:Or(e),l=s?Ar:Or(t),f=(c=c==xr?kr:c)==kr,d=(l=l==xr?kr:l)==kr,h=c==l;if(h&&Vn(e)){if(!Vn(t))return!1;a=!0,f=!1}if(h&&!f)return i||(i=new wn),a||tr(e)?On(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 xn(e),new xn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Lt(+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=An;case"[object Set]":var s=1&r;if(u||(u=kn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=On(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(jn)return jn.call(e)==jn.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var p=f&&Tr.call(e,"__wrapped__"),y=d&&Tr.call(t,"__wrapped__");if(p||y){var v=p?e.value():e,m=y?t.value():t;return i||(i=new wn),o(v,m,n,r,i)}}return!!h&&(i||(i=new wn),function(e,t,n,r,o,i){var a=1&n,s=ur(e),c=s.length;if(c!=ur(t).length&&!a)return!1;for(var l=c;l--;){var f=s[l];if(!(a?f in t:sr.call(t,f)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var y=a;++l<c;){var v=e[f=s[l]],m=t[f];if(r)var g=a?r(m,v,f,t,e,i):r(v,m,f,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&u(b,b)&&"function"==typeof w&&u(w,w)||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}(t,n,r,o,e,i))},Pr=function(e,t){return jr(e,t)},Dr=k(824),Cr={},Ir='No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".',Mr=x,Nr=k(728),Rr=k(374),Lr=function(){},Fr=void 0,Br=Object,Ur=function(e){return e===Fr},Gr=function(e){return"function"==typeof e},zr=function(e,t){return s({},e,t)},Hr=new WeakMap,Vr=0,Kr=function(e){var t,n,r=void 0===e?"undefined":d(e),o=e&&e.constructor,i=o==Date;if(Br(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Hr.get(e))return t;if(t=++Vr+"~",Hr.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=Kr(e[n])+",";Hr.set(e,t)}if(o==Br){t="#";for(var a=Br.keys(e).sort();!Ur(n=a.pop());)Ur(e[n])||(t+=n+":"+Kr(e[n])+",");Hr.set(e,t)}}return t},qr=new WeakMap,$r={},Wr={},Yr="undefined",Jr=("undefined"==typeof window?"undefined":d(window))!=Yr,Zr=("undefined"==typeof document?"undefined":d(document))!=Yr,Qr=function(e,t){var n=qr.get(e);return[function(){return!Ur(t)&&e.get(t)||$r},function(r){if(!Ur(t)){var o=e.get(t);t in Wr||(Wr[t]=o),n[5](t,zr(o,r),o||$r)}},n[6],function(){return!Ur(t)&&t in Wr?Wr[t]:!Ur(t)&&e.get(t)||$r}]},Xr=!0,eo=l(Jr&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Lr,Lr],2),to=eo[0],no=eo[1],ro={isOnline:function(){return Xr},isVisible:function(){var e=Zr&&document.visibilityState;return Ur(e)||"hidden"!==e}},oo={initFocus:function(e){return Zr&&document.addEventListener("visibilitychange",e),to("focus",e),function(){Zr&&document.removeEventListener("visibilitychange",e),no("focus",e)}},initReconnect:function(e){var t=function(){Xr=!0,e()},n=function(){Xr=!1};return to("online",t),to("offline",n),function(){no("online",t),no("offline",n)}}},io=!ft.default.useId,ao=!Jr||"Deno"in window,uo=function(e){return Jr&&d(window.requestAnimationFrame)!=Yr?window.requestAnimationFrame(e):setTimeout(e,1)},so=ao?ft.useEffect:ft.useLayoutEffect,co="undefined"!=typeof navigator&&navigator.connection,lo=!ao&&co&&(["slow-2g","2g"].includes(co.effectiveType)||co.saveData),fo=function(e){if(Gr(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Kr(e):"",t]},ho=0,po=function(){return++ho};function yo(){return yo=i((function(){var e,t,n,r,o,a,u,s,c,f,d,h,y,v,m,g,b,w,_,S,E,O,x=arguments;function A(e){return k.apply(this,arguments)}function k(){return k=i((function(e){var n,r,i,a,s,v,m,g,b,w,_,S,E,O,x,A,k,T,j,P;return p(this,(function(p){switch(p.label){case 0:if(n=l(fo(e),1),!(r=n[0]))return[2];if(i=l(Qr(o,r),2),a=i[0],s=i[1],v=l(qr.get(o),4),m=v[0],g=v[1],b=v[2],w=v[3],_=function(){var t=m[r];return(Gr(c.revalidate)?c.revalidate(a().data,e):!1!==c.revalidate)&&(delete b[r],delete w[r],t&&t[0])?t[0](2).then((function(){return a().data})):a().data},t.length<3)return[2,_()];if(E=u,O=po(),g[r]=[O,0],x=!Ur(h),A=a(),k=A.data,T=A._c,j=Ur(T)?k:T,x&&(h=Gr(h)?h(j,k):h,s({data:h,_c:j})),Gr(E))try{E=E(j)}catch(e){S=e}return E&&Gr(E.then)?[4,E.catch((function(e){S=e}))]:[3,2];case 1:if(E=p.sent(),O!==g[r][0]){if(S)throw S;return[2,E]}S&&x&&function(e){return"function"==typeof d?d(e):!1!==d}(S)&&(f=!0,s({data:j,_c:Fr})),p.label=2;case 2:if(f&&!S&&(Gr(f)?(P=f(E,j),s({data:P,error:Fr,_c:Fr})):s({data:E,error:Fr,_c:Fr})),g[r][1]=po(),Promise.resolve(_()).then((function(){s({_c:Fr})})),!S)return[2,E];if(y)throw S;return[2]}}))})),k.apply(this,arguments)}return p(this,(function(i){for(e=x.length,t=new Array(e),n=0;n<e;n++)t[n]=x[n];if(r=l(t,4),o=r[0],a=r[1],u=r[2],s=r[3],c=zr({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),f=c.populateCache,d=c.rollbackOnError,h=c.optimisticData,y=c.throwOnError,Gr(a)){v=a,m=[],g=o.keys(),b=!0,w=!1,_=void 0;try{for(S=g[Symbol.iterator]();!(b=(E=S.next()).done);b=!0)O=E.value,!/^\$(inf|sub)\$/.test(O)&&v(o.get(O)._k)&&m.push(O)}catch(e){w=!0,_=e}finally{try{b||null==S.return||S.return()}finally{if(w)throw _}}return[2,Promise.all(m.map(A))]}return[2,A(a)]}))})),yo.apply(this,arguments)}var vo=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},mo=function(e,t){if(!qr.has(e)){var n=zr(oo,t),r={},o=be.bind(Fr,e),i=Lr,a={},u=function(e,t){var n=a[e]||[];return a[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},s=function(t,n,r){e.set(t,n);var o=a[t],i=!0,u=!1,s=void 0;if(o)try{for(var c,l=o[Symbol.iterator]();!(i=(c=l.next()).done);i=!0)(0,c.value)(n,r)}catch(e){u=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(u)throw s}}},c=function(){if(!qr.has(e)&&(qr.set(e,[r,{},{},{},o,s,u]),!ao)){var t=n.initFocus(setTimeout.bind(Fr,vo.bind(Fr,r,0))),a=n.initReconnect(setTimeout.bind(Fr,vo.bind(Fr,r,1)));i=function(){t&&t(),a&&a(),qr.delete(e)}}};return c(),[e,o,c,i]}return[e,qr.get(e)[4]]},go=l(mo(new Map),2),bo=go[0],wo=go[1],_o=zr({onLoadingSlow:Lr,onSuccess:Lr,onError:Lr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Ur(i)&&a>i||setTimeout(r,u,o)},onDiscarded:Lr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:lo?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:lo?5e3:3e3,compare:function(e,t){return Kr(e)==Kr(t)},isPaused:function(){return!1},cache:bo,mutate:wo,fallback:{}},ro),So=function(e,t){var n=zr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=zr(o,a))}return n},Eo=(0,ft.createContext)({}),Oo=function(e){var t=e.value,n=(0,ft.useContext)(Eo),r=Gr(t),o=(0,ft.useMemo)((function(){return r?t(n):t}),[r,n,t]),i=(0,ft.useMemo)((function(){return r?o:So(n,o)}),[r,n,o]),a=o&&o.provider,u=(0,ft.useRef)(Fr);a&&!u.current&&(u.current=mo(a(i.cache||bo),o));var s=u.current;return s&&(i.cache=s[0],i.mutate=s[1]),so((function(){if(s)return s[2]&&s[2](),s[3]}),[]),(0,ft.createElement)(Eo.Provider,zr(e,{value:i}))},xo="$inf$",Ao=Jr&&window.__SWR_DEVTOOLS_USE__,ko=Ao?window.__SWR_DEVTOOLS_USE__:[],To=function(e){return Gr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},jo=ko.concat((function(e){return function(t,n,r){return e(t,n&&function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=l(fo(t),1)[0],a=l(qr.get(bo),4)[3];if(i.startsWith(xo))return n.apply(void 0,f(r));var u=a[i];return Ur(u)?n.apply(void 0,f(r)):(delete a[i],u)},r)}})),Po=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=zr(_o,(0,ft.useContext)(Eo)),i=l(To(n),3),a=i[0],u=i[1],s=i[2],c=So(o,s),f=e,d=(c.use||[]).concat(jo),h=d.length;h--;)f=d[h](f);return f(a,u||c.fetcher||null,c)}},Do=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Co=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l(To(r),3),a=i[0],u=i[1],f=i[2],d=(f.use||[]).concat(t);return e(a,u,c(s({},f),{use:d}))}};Ao&&(window.__SWR_DEVTOOLS_REACT__=ft.default);var Io=ft.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},Mo={dedupe:!0};Br.defineProperty(Oo,"defaultValue",{value:_o});var No,Ro,Lo=Po((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,c=n.revalidateOnMount,d=n.revalidateIfStale,h=n.refreshInterval,y=n.refreshWhenHidden,v=n.refreshWhenOffline,m=n.keepPreviousData,g=l(qr.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=l(fo(e),2),O=E[0],x=E[1],A=(0,ft.useRef)(!1),k=(0,ft.useRef)(!1),T=(0,ft.useRef)(O),j=(0,ft.useRef)(t),P=(0,ft.useRef)(n),D=function(){return P.current},C=function(){return D().isVisible()&&D().isOnline()},I=l(Qr(r,O),4),M=I[0],N=I[1],R=I[2],L=I[3],F=(0,ft.useRef)({}).current,B=Ur(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!Ur(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,ft.useMemo)((function(){var e=!!O&&!!t&&(Ur(c)?!D().isPaused()&&!a&&(!!Ur(d)||d):c),n=function(t){var n=zr(t);return delete n._k,e?s({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),z=(0,Rr.useSyncExternalStore)((0,ft.useCallback)((function(e){return R(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),H=!A.current,V=b[O]&&b[O].length>0,K=z.data,q=Ur(K)?B:K,$=z.error,W=(0,ft.useRef)(q),Y=m?Ur(K)?W.current:K:q,J=!(V&&!Ur($))&&(H&&!Ur(c)?c:!D().isPaused()&&(a?!Ur(q)&&d:Ur(q)||d)),Z=!!(O&&t&&H&&J),Q=Ur(z.isValidating)?Z:z.isValidating,X=Ur(z.isLoading)?Z:z.isLoading,ee=(0,ft.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,f,d,h,y,v,m,g,S,E,P;return p(this,(function(p){switch(p.label){case 0:if(t=j.current,!O||!t||k.current||D().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return io?!k.current&&O===T.current&&A.current:O===T.current},f={isValidating:!1,isLoading:!1},d=function(){N(f)},h=function(){var e=_[O];e&&e[1]===i&&delete _[O]},y={isValidating:!0},Ur(M().data)&&(y.isLoading=!0),p.label=1;case 1:return p.trys.push([1,3,,4]),s&&(N(y),n.loadingTimeout&&Ur(M().data)&&setTimeout((function(){a&&c()&&D().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),po()]),v=l(_[O],2),r=v[0],i=v[1],[4,r];case 2:return r=p.sent(),s&&setTimeout(h,n.dedupingInterval),_[O]&&_[O][1]===i?(f.error=Fr,m=w[O],!Ur(m)&&(i<=m[0]||i<=m[1]||0===m[1])?[2,(d(),s&&c()&&D().onDiscarded(O),!1)]:(g=M().data,f.data=o(g,r)?g:r,s&&c()&&D().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&D().onDiscarded(O),!1)];case 3:return S=p.sent(),h(),E=D(),P=E.shouldRetryOnError,E.isPaused()||(f.error=S,s&&c()&&(E.onError(S,O,E),(!0===P||Gr(P)&&P(S))&&(D().revalidateOnFocus&&D().revalidateOnReconnect&&!C()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,d(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,ft.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return be.apply(void 0,[r,T.current].concat(f(t)))}),[]);if(so((function(){j.current=t,P.current=n,Ur(K)||(W.current=K)})),so((function(){if(O){var e=ee.bind(Fr,Mo),t=0,n=Do(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();D().revalidateOnFocus&&o>t&&C()&&(t=o+D().focusThrottleInterval,e())}else if(1==n)D().revalidateOnReconnect&&C()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return k.current=!1,T.current=O,A.current=!0,N({_k:x}),J&&(Ur(q)||ao?e():uo(e)),function(){k.current=!0,n()}}}),[O]),so((function(){var e,t=function(){var t=Gr(h)?h(M().data):h;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!y&&!D().isVisible()||!v&&!D().isOnline()?t():ee(Mo).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[h,y,v,O]),(0,ft.useDebugValue)(Y),a&&Ur(q)&&O){if(!io&&ao)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,P.current=n,k.current=!1;var ne=S[O];if(!Ur(ne)){var re=te(ne);Io(re)}if(!Ur($))throw $;var oe=ee(Mo);Ur(Y)||(oe.status="fulfilled",oe.value=!0),Io(oe)}return{mutate:te,get data(){return F.data=!0,Y},get error(){return F.error=!0,$},get isValidating(){return F.isValidating=!0,Q},get isLoading(){return F.isLoading=!0,X}}})),Fo=Co(Lo,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}})),Bo="custom:".concat([["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map((function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return we(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return"".concat(r,":").concat(o)})).join(",")),Uo=O((0,pt.getExtensionInternalStore)()),Go=O((0,pt.getExtensionStore)()),zo=k(708),Ho={getPaginatedUrl:function(e,t,n){if(e){var r=new URL((0,St.makeUrl)(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.toString()}return null},getNextUrl:function(e){var t,n,r=null===(t=null==e||null===(n=e.links)||void 0===n?void 0:n.find((function(e){return"next"==e.rel})))||void 0===t?void 0:t.uri;if(r){var o=new URL(r);return o.host=window.location.host,o.protocol=window.location.protocol,o.toString()}return null},getTotalCount:function(e){return null!==(No=null==e?void 0:e.totalCount)&&void 0!==No?No:Number.NaN},getCurrentPageSize:function(e){var t;return null!==(Ro=null==e||null===(t=e.results)||void 0===t?void 0:t.length)&&void 0!==Ro?Ro:Number.NaN},getData:function(e){return null==e?void 0:e.results}},Vo=ft.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},Ko={dedupe:!0};Br.defineProperty(Oo,"defaultValue",{value:_o});var qo,$o=Po((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,c=n.revalidateOnMount,d=n.revalidateIfStale,h=n.refreshInterval,y=n.refreshWhenHidden,v=n.refreshWhenOffline,m=n.keepPreviousData,g=l(qr.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=l(fo(e),2),O=E[0],x=E[1],A=(0,ft.useRef)(!1),k=(0,ft.useRef)(!1),T=(0,ft.useRef)(O),j=(0,ft.useRef)(t),P=(0,ft.useRef)(n),D=function(){return P.current},C=function(){return D().isVisible()&&D().isOnline()},I=l(Qr(r,O),4),M=I[0],N=I[1],R=I[2],L=I[3],F=(0,ft.useRef)({}).current,B=Ur(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!Ur(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,ft.useMemo)((function(){var e=!!O&&!!t&&(Ur(c)?!D().isPaused()&&!a&&(!!Ur(d)||d):c),n=function(t){var n=zr(t);return delete n._k,e?s({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),z=(0,Rr.useSyncExternalStore)((0,ft.useCallback)((function(e){return R(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),H=!A.current,V=b[O]&&b[O].length>0,K=z.data,q=Ur(K)?B:K,$=z.error,W=(0,ft.useRef)(q),Y=m?Ur(K)?W.current:K:q,J=!(V&&!Ur($))&&(H&&!Ur(c)?c:!D().isPaused()&&(a?!Ur(q)&&d:Ur(q)||d)),Z=!!(O&&t&&H&&J),Q=Ur(z.isValidating)?Z:z.isValidating,X=Ur(z.isLoading)?Z:z.isLoading,ee=(0,ft.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,f,d,h,y,v,m,g,S,E,P;return p(this,(function(p){switch(p.label){case 0:if(t=j.current,!O||!t||k.current||D().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return io?!k.current&&O===T.current&&A.current:O===T.current},f={isValidating:!1,isLoading:!1},d=function(){N(f)},h=function(){var e=_[O];e&&e[1]===i&&delete _[O]},y={isValidating:!0},Ur(M().data)&&(y.isLoading=!0),p.label=1;case 1:return p.trys.push([1,3,,4]),s&&(N(y),n.loadingTimeout&&Ur(M().data)&&setTimeout((function(){a&&c()&&D().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),po()]),v=l(_[O],2),r=v[0],i=v[1],[4,r];case 2:return r=p.sent(),s&&setTimeout(h,n.dedupingInterval),_[O]&&_[O][1]===i?(f.error=Fr,m=w[O],!Ur(m)&&(i<=m[0]||i<=m[1]||0===m[1])?[2,(d(),s&&c()&&D().onDiscarded(O),!1)]:(g=M().data,f.data=o(g,r)?g:r,s&&c()&&D().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&D().onDiscarded(O),!1)];case 3:return S=p.sent(),h(),E=D(),P=E.shouldRetryOnError,E.isPaused()||(f.error=S,s&&c()&&(E.onError(S,O,E),(!0===P||Gr(P)&&P(S))&&(D().revalidateOnFocus&&D().revalidateOnReconnect&&!C()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,d(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,ft.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return be.apply(void 0,[r,T.current].concat(f(t)))}),[]);if(so((function(){j.current=t,P.current=n,Ur(K)||(W.current=K)})),so((function(){if(O){var e=ee.bind(Fr,Ko),t=0,n=Do(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();D().revalidateOnFocus&&o>t&&C()&&(t=o+D().focusThrottleInterval,e())}else if(1==n)D().revalidateOnReconnect&&C()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return k.current=!1,T.current=O,A.current=!0,N({_k:x}),J&&(Ur(q)||ao?e():uo(e)),function(){k.current=!0,n()}}}),[O]),so((function(){var e,t=function(){var t=Gr(h)?h(M().data):h;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!y&&!D().isVisible()||!v&&!D().isOnline()?t():ee(Ko).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[h,y,v,O]),(0,ft.useDebugValue)(Y),a&&Ur(q)&&O){if(!io&&ao)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,P.current=n,k.current=!1;var ne=S[O];if(!Ur(ne)){var re=te(ne);Vo(re)}if(!Ur($))throw $;var oe=ee(Ko);Ur(Y)||(oe.status="fulfilled",oe.value=!0),Vo(oe)}return{mutate:te,get data(){return F.data=!0,Y},get error(){return F.error=!0,$},get isValidating(){return F.isValidating=!0,Q},get isLoading(){return F.isLoading=!0,X}}})),Wo=Promise.resolve(),Yo=Co($o,(function(e){return function(t,n,r){var o,a=(0,ft.useRef)(!1),u=r.cache,f=r.initialSize,d=void 0===f?1:f,h=r.revalidateAll,v=void 0!==h&&h,m=r.persistSize,g=void 0!==m&&m,b=r.revalidateFirstPage,w=void 0===b||b,_=r.revalidateOnMount,S=void 0!==_&&_,E=r.parallel,O=void 0!==E&&E,x=l(qr.get(bo),4)[3];try{o=function(e){return fo(e?e(0,null):null)[0]}(t),o&&(o=xo+o)}catch(e){}var A=l(Qr(u,o),3),k=A[0],T=A[1],j=A[2],P=(0,ft.useCallback)((function(){return Ur(k()._l)?d:k()._l}),[u,o,d]);(0,Rr.useSyncExternalStore)((0,ft.useCallback)((function(e){return o?j(o,(function(){e()})):function(){}}),[u,o]),P,P);var D=(0,ft.useCallback)((function(){var e=k()._l;return Ur(e)?d:e}),[o,d]),C=(0,ft.useRef)(D());so((function(){a.current?o&&T({_l:g?C.current:D()}):a.current=!0}),[o,u]);var I=S&&!a.current,M=e(o,function(){var e=i((function(e){var o,a,s,c,f,d,h,m,g,b,_;return p(this,(function(S){switch(S.label){case 0:o=function(e){var o,f,d,h,y,_,S,E,A;return p(this,(function(k){switch(k.label){case 0:return o=l(fo(t(e,O?null:b)),2),f=o[0],d=o[1],f?(h=l(Qr(u,f),2),y=h[0],_=h[1],S=y().data,E=v||a||Ur(S)||w&&!e&&!Ur(m)||I||m&&!Ur(m[e])&&!r.compare(m[e],S),n&&("function"==typeof s?s(S,d):E)?(A=function(){var t=i((function(){var t;return p(this,(function(r){switch(r.label){case 0:return f in x?(t=x[f],delete x[f],[4,t]):[3,2];case 1:return S=r.sent(),[3,4];case 2:return[4,n(d)];case 3:S=r.sent(),r.label=4;case 4:return _({data:S,_k:d}),c[e]=S,[2]}}))}));return function(){return t.apply(this,arguments)}}(),O?(g.push(A),[3,3]):[3,1]):[3,4]):[2,"break"];case 1:return[4,A()];case 2:k.sent(),k.label=3;case 3:return[3,5];case 4:c[e]=S,k.label=5;case 5:return O||(b=S),[2]}}))},a=k()._i,s=k()._r,T({_r:Fr}),c=[],f=D(),d=l(Qr(u,e),1),h=d[0],m=h().data,g=[],b=null,_=0,S.label=1;case 1:return _<f?[5,y(o(_))]:[3,4];case 2:if("break"===S.sent())return[3,4];S.label=3;case 3:return++_,[3,1];case 4:return O?[4,Promise.all(g.map((function(e){return e()})))]:[3,6];case 5:S.sent(),S.label=6;case 6:return[2,(T({_i:Fr}),c)]}}))}));return function(t){return e.apply(this,arguments)}}(),r),N=(0,ft.useCallback)((function(e,t){var n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return o?(r&&(Ur(e)?T({_i:!0,_r:n.revalidate}):T({_i:!1,_r:n.revalidate})),arguments.length?M.mutate(e,c(s({},n),{revalidate:r})):M.mutate()):Wo}),[o,u]),R=(0,ft.useCallback)((function(e){if(!o)return Wo;var n,r=l(Qr(u,o),2)[1];if(Gr(e)?n=e(D()):"number"==typeof e&&(n=e),"number"!=typeof n)return Wo;r({_l:n}),C.current=n;for(var i=[],a=l(Qr(u,o),1)[0],s=null,c=0;c<n;++c){var f=l(fo(t(c,s)),1)[0],d=l(Qr(u,f),1)[0],h=f?d().data:Fr;if(Ur(h))return N(a().data);i.push(h),s=h}return N(i)}),[o,u,N,D]);return{size:D(),setSize:R,mutate:N,get data(){return M.data},get error(){return M.error},get isValidating(){return M.isValidating},get isLoading(){return M.isLoading}}}})),Jo=function(e){return"small-desktop"===e||"large-desktop"===e},Zo=10,Qo=k(688),Xo=k(332),ei=k.n(Xo),ti={setVisitContext:function(e,t){var n,r,o;return{manuallySetVisitUuid:null!==(r=null==t?void 0:t.uuid)&&void 0!==r?r:null,patientUuid:null!==(o=null==t||null===(n=t.patient)||void 0===n?void 0:n.uuid)&&void 0!==o?o:null}},mutateVisit:function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(null!==(t=e.mutateVisitCallbacks)&&void 0!==t?t:{})[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)(0,i.value)()}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return{}}};Qo.default.extend(ei())}(),T}())}}}))},3691:(e,t,n)=>{"use strict";n.d(t,{Uo:()=>lt,QZ:()=>at,ZF:()=>d,tW:()=>pt,Hs:()=>yt,F:()=>r,VG:()=>it,n:()=>ft,O$:()=>dt,VN:()=>tt});var r="openmrs-routes:",o=n(7910),i=n(1704),a={bootstrap:function(){return Promise.resolve()},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}};function u(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)}))}}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var l=new Map;function f(e,t){return s((function(){var n,r,i,u,s;return c(this,(function(c){switch(c.label){case 0:return n=t.indexOf("#"),i=(r=n>=0)?t.substring(0,n):e,u=r?t.substring(n+1):t,[4,(0,o.importDynamic)(i)];case 1:return(s=c.sent())&&Object.hasOwn(s,u)&&"function"==typeof s[u]?[2,d(i,s).then((function(){return s[u]()}))]:(s?s&&Object.hasOwn(s,u)?console.warn("The export ".concat(t,", defined in ").concat(e,"'s routes.json, is not a function")):console.warn("".concat(i,' does not define a component called "').concat(u,'", referenced in ').concat(e,"'s routes.json. This cannot be loaded.")):console.warn("Unknown app ".concat(i," for ").concat(t," defined in ").concat(e,"'s routes.json")),[2,a])}}))}))}function d(e,t){return h.apply(this,arguments)}function h(){return(h=s((function(e,t){var n,r;return c(this,(function(a){switch(a.label){case 0:return e in l?[3,5]:null==t?[3,1]:(r=t,[3,3]);case 1:return[4,(0,o.importDynamic)(e)];case 2:r=a.sent(),a.label=3;case 3:return n=r,[4,l[e]=new Promise((function(t,r){if(Object.hasOwn(n,"startupApp")){var o=n.startupApp;if("function"==typeof o)return Promise.resolve(o()).then((function(){(0,i.registerModuleLoad)(e),t(null)})).catch(r)}(0,i.registerModuleLoad)(e),t(null)}))];case 4:return a.sent(),[3,7];case 5:return[4,l[e]];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))).apply(this,arguments)}var p=Object.freeze({__proto__:null,get start(){return Je},get ensureJQuerySupport(){return Oe},get setBootstrapMaxTime(){return oe},get setMountMaxTime(){return ie},get setUnmountMaxTime(){return ae},get setUnloadMaxTime(){return ue},get registerApplication(){return Re},get unregisterApplication(){return Fe},get getMountedApps(){return Ce},get getAppStatus(){return Me},get unloadApplication(){return Be},get checkActivityFunctions(){return Le},get getAppNames(){return Ie},get pathToActiveWhen(){return ze},get navigateToUrl(){return pe},get patchHistoryApi(){return _e},get triggerAppChange(){return qe},get addErrorHandler(){return b},get removeErrorHandler(){return w},get mountRootParcel(){return X},get NOT_LOADED(){return E},get LOADING_SOURCE_CODE(){return O},get NOT_BOOTSTRAPPED(){return x},get BOOTSTRAPPING(){return A},get NOT_MOUNTED(){return k},get MOUNTING(){return T},get UPDATING(){return P},get LOAD_ERROR(){return I},get MOUNTED(){return j},get UNLOADING(){return C},get UNMOUNTING(){return D},get SKIP_BECAUSE_BROKEN(){return M}}),y=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,v=function(){try{var e=new y("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?y:"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};let m=[];function g(e,t,n){const r=S(e,t,n);m.length?m.forEach((e=>e(r))):setTimeout((()=>{throw r}))}function b(e){if("function"!=typeof e)throw Error(_(28,!1));m.push(e)}function w(e){if("function"!=typeof e)throw Error(_(29,!1));let t=!1;return m=m.filter((n=>{const r=n===e;return t=t||r,!r})),t}function _(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function S(e,t,n){const r=`${B(t)} '${L(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=r+e.message}catch(e){}o=e}else{console.warn(_(30,!1,t.status,L(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=L(t),t.status=n,o}const E="NOT_LOADED",O="LOADING_SOURCE_CODE",x="NOT_BOOTSTRAPPED",A="BOOTSTRAPPING",k="NOT_MOUNTED",T="MOUNTING",j="MOUNTED",P="UPDATING",D="UNMOUNTING",C="UNLOADING",I="LOAD_ERROR",M="SKIP_BECAUSE_BROKEN";function N(e){return e.status===j}function R(e){try{return e.activeWhen(window.location)}catch(t){return g(t,e,M),!1}}function L(e){return e.name}function F(e){return Boolean(e.unmountThisParcel)}function B(e){return F(e)?"parcel":"application"}function U(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function G(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function z(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!G(t,(e=>"function"!=typeof e))));var t}function H(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=B(e),o=L(e);return function(e){return n.reduce(((n,i,a)=>n.then((()=>{const n=i(e);return V(n)?n:Promise.reject(_(15,!1,r,o,t,a))}))),Promise.resolve())}}function V(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let K=[];function q(e,t){return Promise.resolve().then((()=>e.status!==x?e:(e.status=A,e.bootstrap?se(e,"bootstrap").then(n).catch((n=>{if(t)throw S(n,e,M);return g(n,e,M),e})):Promise.resolve().then(n))));function n(){return e.status=k,e}}function $(e,t){return Promise.resolve().then((()=>{if(e.status!==j)return e;e.status=D;const n=Object.keys(e.parcels).map((t=>e.parcels[t].unmountThisParcel()));return Promise.all(n).then(r,(n=>r().then((()=>{const r=Error(n.message);if(t)throw S(r,e,M);g(r,e,M)})))).then((()=>e));function r(){return se(e,"unmount").then((()=>{e.status=k}),(n=>{if(t)throw S(n,e,M);g(n,e,M)}))}}))}let W=!1,Y=!1;function J(e,t){return Promise.resolve().then((()=>e.status!==k?e:(W||(window.dispatchEvent(new v("single-spa:before-first-mount")),W=!0),e.status=T,se(e,"mount").then((()=>(e.status=j,Y||(window.dispatchEvent(new v("single-spa:first-mount")),Y=!0),e))).catch((n=>{return e.status=j,$(e,!0).then(r,r);function r(){if(t)throw S(n,e,M);return g(n,e,M),e}})))))}let Z=0;const Q={parcels:{}};function X(){return ee.apply(Q,arguments)}function ee(e,t){const n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(_(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(_(3,!1,typeof e.name));const r=Z++;let o=e.name||`parcel-${r}`;if("object"!=typeof t)throw Error(_(4,!1,o,typeof t));if(!t.domElement)throw Error(_(5,!1,o));const i="function"==typeof e,a=i?e:()=>Promise.resolve(e),u={id:r,parcels:{},status:i?O:x,customProps:t,parentName:L(n),unmountThisParcel:()=>f.then((()=>{if(u.status!==j)throw Error(_(6,!1,o,u.status));return $(u,!0)})).then((e=>(u.parentName&&delete n.parcels[u.id],e))).then((e=>(d(e),e))).catch((e=>{throw u.status=M,h(e),e}))};let s;n.parcels[r]=u;let c=a();if(!c||"function"!=typeof c.then)throw Error(_(7,!1));c=c.then((e=>{if(!e)throw Error(_(8,!1));if(o=e.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!z(e.bootstrap))throw Error(_(9,!1,o));if(!z(e.mount))throw Error(_(10,!1,o));if(!z(e.unmount))throw Error(_(11,!1,o));if(e.update&&!z(e.update))throw Error(_(12,!1,o));const t=H(e,"bootstrap"),n=H(e,"mount"),i=H(e,"unmount");u.status=x,u.name=o,u.bootstrap=t,u.mount=n,u.unmount=i,u.timeouts=ce(e.timeouts),e.update&&(u.update=H(e,"update"),s.update=function(e){return u.customProps=e,te((t=u,Promise.resolve().then((()=>{if(t.status!==j)throw Error(_(32,!1,L(t)));return t.status=P,se(t,"update").then((()=>(t.status=j,t))).catch((e=>{throw S(e,t,M)}))}))));var t})}));const l=c.then((()=>q(u,!0))),f=l.then((()=>J(u,!0)));let d,h;const p=new Promise(((e,t)=>{d=e,h=t}));return s={mount:()=>te(Promise.resolve().then((()=>{if(u.status!==k)throw Error(_(13,!1,o,u.status));return n.parcels[r]=u,J(u)}))),unmount:()=>te(u.unmountThisParcel()),getStatus:()=>u.status,loadPromise:te(c),bootstrapPromise:te(l),mountPromise:te(f),unmountPromise:te(p)},s}function te(e){return e.then((()=>null))}function ne(e){const t=L(e);let n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(_(40,!1),t,n));const r=U({},n,{name:t,mountParcel:ee.bind(e),singleSpa:p});return F(e)&&(r.unmountSelf=e.unmountThisParcel),r}const re={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 oe(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(16,!1));re.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ie(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(17,!1));re.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ae(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(18,!1));re.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ue(e,t,n){if("number"!=typeof e||e<=0)throw Error(_(19,!1));re.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function se(e,t){const n=e.timeouts[t],r=n.warningMillis,o=B(e);return new Promise(((i,a)=>{let u=!1,s=!1;e[t](ne(e)).then((e=>{u=!0,i(e)})).catch((e=>{u=!0,a(e)})),setTimeout((()=>l(1)),r),setTimeout((()=>l(!0)),n.millis);const c=_(31,!1,t,o,L(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){const t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((()=>l(t+1)),r)}}}))}function ce(e){const t={};for(let n in re)t[n]=U({},re[n],e&&e[n]||{});return t}function le(e){return Promise.resolve().then((()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==E&&e.status!==I)return e;let t,n;return e.status=O,e.loadPromise=Promise.resolve().then((()=>{const r=e.loadApp(ne(e));if(!V(r))throw n=!0,Error(_(33,!1,L(e)));return r.then((n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!z(t.bootstrap)&&(r=35),z(t.mount)||(r=36),z(t.unmount)||(r=37);const o=B(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(_(r,!1,o,L(e),n),t),g(void 0,e,M),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=U({},e.devtools.overlays,t.devtools.overlays)),e.status=x,e.bootstrap=H(t,"bootstrap"),e.mount=H(t,"mount"),e.unmount=H(t,"unmount"),e.unload=H(t,"unload"),e.timeouts=ce(t.timeouts),delete e.loadPromise,e}))})).catch((t=>{let r;return delete e.loadPromise,n?r=M:(r=I,e.loadErrorTime=(new Date).getTime()),g(t,e,r),e}))}))}const fe="undefined"!=typeof window,de={hashchange:[],popstate:[]},he=["hashchange","popstate"];function pe(e){let 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(_(14,!1));t=e.currentTarget.href,e.preventDefault()}const n=Se(window.location.href),r=Se(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 ye(e){if(e){const t=e[0].type;he.indexOf(t)>=0&&de[t].forEach((t=>{try{t.apply(this,e)}catch(e){setTimeout((()=>{throw e}))}}))}}let ve;function me(){$e([],arguments)}function ge(e,t){return function(){const n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ve&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let be=null,we=!1;function _e(e){if(we)throw Error(_(43,!1));ve=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,we=!0,be=window.history.replaceState,window.addEventListener("hashchange",me),window.addEventListener("popstate",me);const t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&he.indexOf(e)>=0)||G(de[e],(e=>e===n)))return t.apply(this,arguments);de[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&he.indexOf(e)>=0&&(de[e]=de[e].filter((e=>e!==t))),n.apply(this,arguments)},window.history.pushState=ge(window.history.pushState,"pushState"),window.history.replaceState=ge(be,"replaceState")}function Se(e){const t=document.createElement("a");return t.href=e,t}fe&&(window.singleSpaNavigate?console.warn(_(41,!1)):window.singleSpaNavigate=pe);let Ee=!1;function Oe(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Ee){const t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return xe.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return xe.call(this,n,window.removeEventListener,e,t,arguments)},Ee=!0}}function xe(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((e=>{he.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}const Ae={};function ke(e){return Promise.resolve().then((()=>{const t=Ae[L(e)];if(!t)return e;if(e.status===E)return Te(e,t),e;if(e.status===C)return t.promise.then((()=>e));if(e.status!==k&&e.status!==I)return e;const n=e.status===I?Promise.resolve():se(e,"unload");return e.status=C,n.then((()=>(Te(e,t),e))).catch((n=>(function(e,t,n){delete Ae[L(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,g(n,e,M),t.reject(n)}(e,t,n),e)))}))}function Te(e,t){delete Ae[L(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=E,t.resolve()}function je(e,t,n,r){Ae[L(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Ae[L(e)],"promise",{get:t})}function Pe(e){return Ae[e]}const De=[];function Ce(){return De.filter(N).map(L)}function Ie(){return De.map(L)}function Me(e){const t=G(De,(t=>L(t)===e));return t?t.status:null}let Ne=!1;function Re(e,t,n,r){const o=function(e,t,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(_(39,!1));const t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce(((e,n)=>t.indexOf(n)>=0?e:e.concat(n)),[]);if(0!==n.length)throw Error(_(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(_(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(_(20,!1));const r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(_(24,!1));if(!Ge(e.customProps))throw Error(_(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(_(20,!1));if(!t)throw Error(_(23,!1));if("function"!=typeof n)throw Error(_(24,!1));if(!Ge(r))throw Error(_(22,!1))}(e,t,n,r),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map((e=>"function"==typeof e?e:ze(e))),e=>t.some((t=>t(e)))}(o.activeWhen),o;var i}(e,t,n,r);if(Ze()||Ne||(Ne=!0,setTimeout((()=>{Ze()||console.warn(_(1,!1))}),5e3)),-1!==Ie().indexOf(o.name))throw Error(_(21,!1,o.name));De.push(U({loadErrorTime:null,status:E,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),fe&&(Oe(),$e())}function Le(e=window.location){return De.filter((t=>t.activeWhen(e))).map(L)}function Fe(e){if(0===De.filter((t=>L(t)===e)).length)throw Error(_(25,!1,e));return(fe?Be(e,{waitForUnmount:!1}):Promise.resolve()).then((()=>{const t=De.map(L).indexOf(e);De.splice(t,1)}))}function Be(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(_(26,!1));const n=G(De,(t=>L(t)===e));if(!n)throw Error(_(27,!1,e));const r=Pe(L(n));if(t&&t.waitForUnmount){if(r)return r.promise;{const e=new Promise(((t,r)=>{je(n,(()=>e),t,r)}));return e}}{let e;return r?(e=r.promise,Ue(n,r.resolve,r.reject)):e=new Promise(((t,r)=>{je(n,(()=>e),t,r),Ue(n,t,r)})),e}}function Ue(e,t,n){Promise.resolve().then((()=>{if(G(Le(),(t=>t===L(e))))return qe()})).then((()=>$(e).then(ke).then((()=>{t(),setTimeout((()=>{$e()}))})))).catch(n)}function Ge(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function ze(e,t){const n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const n=e[t];(!r&&":"===n||r&&"/"===n)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let He=!1,Ve=[],Ke=fe&&window.location.href;function qe(){return $e()}function $e(e=[],t,n=!1){if(He)return new Promise(((e,n)=>{Ve.push({resolve:e,reject:n,eventArguments:t})}));const{appsToUnload:r,appsToUnmount:o,appsToLoad:i,appsToMount:a}=function(){const e=[],t=[],n=[],r=[],o=(new Date).getTime();return De.forEach((i=>{const a=i.status!==M&&R(i);switch(i.status){case I:a&&o-i.loadErrorTime>=200&&n.push(i);break;case E:case O:a&&n.push(i);break;case x:case k:!a&&Pe(L(i))?e.push(i):a&&r.push(i);break;case j:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}();let u,s=[],c=Ke,l=Ke=window.location.href;return Ze()?(He=!0,u=r.concat(i,o,a),Promise.resolve().then((()=>(y(0===u.length?"before-no-app-change":"before-app-change",p(!0)),y("before-routing-event",p(!0,{cancelNavigation:f})),Promise.all(s).then((n=>{if(n.some((e=>e)))return be.call(window.history,history.state,"",c.substring(location.origin.length)),Ke=location.href,He=!1,$e(e,t,!0);const u=r.map(ke),s=o.map($).map((e=>e.then(ke))).concat(u),l=Promise.all(s);l.then((()=>{y("before-mount-routing-event",p(!0))}),(e=>{throw e}));const f=i.map((e=>le(e).then((e=>We(e,l))))),v=a.filter((e=>i.indexOf(e)<0)).map((e=>We(e,l)));return l.catch((e=>{throw h(),e})).then((()=>(h(),Promise.all(f.concat(v)).catch((t=>{throw e.forEach((e=>e.reject(t))),t})).then(d).then((()=>{}),(e=>{throw e})))))})))))):(u=i,Promise.resolve().then((()=>{const e=i.map(le);return Promise.all(e).then(h).then((()=>[])).catch((e=>{throw h(),e})).finally((()=>{}))})));function f(e=!0){const t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);s.push(t.catch((e=>(console.warn(Error(_(42,!1))),console.warn(e),!1))))}function d(){const t=Ce();e.forEach((e=>e.resolve(t)));try{y(0===u.length?"no-app-change":"app-change",p()),y("routing-event",p())}catch(e){setTimeout((()=>{throw e}))}if(He=!1,Ve.length>0){const e=Ve;Ve=[],$e(e)}return t}function h(){n||(e.forEach((e=>{ye(e.eventArguments)})),ye(t))}function p(e=!1,n){const s={},f={[j]:[],[k]:[],[E]:[],[M]:[]};e?(i.concat(a).forEach(((e,t)=>{h(e,j)})),r.forEach((e=>{h(e,E)})),o.forEach((e=>{h(e,k)}))):u.forEach((e=>{h(e)}));const d={detail:{newAppStatuses:s,appsByNewStatus:f,totalAppChanges:u.length,originalEvent:null==t?void 0:t[0],oldUrl:c,newUrl:l}};return n&&U(d.detail,n),d;function h(e,t){const n=L(e);t=t||Me(n),s[n]=t,(f[t]=f[t]||[]).push(n)}}function y(e,t){n||window.dispatchEvent(new v(`single-spa:${e}`,t))}}function We(e,t){return R(e)?q(e).then((e=>t.then((()=>R(e)?J(e):e)))):t.then((()=>e))}let Ye=!1;function Je(e){Ye=!0,fe&&(_e(e),$e())}function Ze(){return Ye}var Qe={getRawAppData:function(){return[...De]},reroute:$e,NOT_LOADED:E,toLoadPromise:le,toBootstrapPromise:q,unregisterApplication:Fe,getProfilerData:function(){return K}};fe&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Qe);var Xe=n(6362),et=n(1491);function tt(e,t){var n=t.name;if(n){t.slots&&t.slot&&console.warn("The extension ".concat(n," from ").concat(e," declares both a 'slots' property and\na 'slot' property. Only the 'slots' property will be honored."));var r=t.slots?t.slots:t.slot?[t.slot]:[];if(t.component||t.load){var o,i,a=void 0;if(t.component)a=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The extension ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the extension will not be loaded."));a=t.load}a&&(0,et.registerExtension)({name:n,load:a,meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:null===(o=t.online)||void 0===o||o,offline:null!==(i=t.offline)&&void 0!==i&&i,featureFlag:t.featureFlag});var u=!0,s=!1,c=void 0;try{for(var l,d=r[Symbol.iterator]();!(u=(l=d.next()).done);u=!0){var h=l.value;(0,et.attach)(h,n)}}catch(e){s=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(s)throw c}}}else console.error("The extension ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition."),t)}else console.error("An extension definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.'),t)}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rt=[];function ot(e){if(Array.isArray(e)){var t=e.map(ot);return function(e){return t.some((function(t){return t(e)}))}}return"string"==typeof e?ze(window.getOpenmrsSpaBase()+e):(n=e,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)?function(t){return function(e,t){return e.test(t.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,t)}:function(){return e});var n,r}function it(e,t){if(e&&t&&"object"==typeof t){var n,r;(0,i.registerModuleWithConfigSystem)(e);var o,a,u,s,c=null!==(r=t.extensions)&&void 0!==r?r:[],l=null!==(o=t.modals)&&void 0!==o?o:[],d=null!==(a=t.workspaces)&&void 0!==a?a:[],h=null!==(u=t.workspaceGroups)&&void 0!==u?u:[],p=null!==(s=t.featureFlags)&&void 0!==s?s:[];null===(n=t.pages)||void 0===n||n.forEach((function(t){var n,r,o;t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?rt.push((r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){nt(e,t,n[t])}))}return e}({},t),o=null!=(o={order:null!==(n=t.order)&&void 0!==n?n:Number.MAX_SAFE_INTEGER,appName:e})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r)):console.warn("A page for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),c.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?tt(e,t):console.warn("An extension for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),l.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n)if(t.component||t.load){var r=void 0;if(t.component)r=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The modal ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the modal will not be loaded."));r=t.load}r&&(0,et.registerModal)({name:n,load:r,moduleName:e})}else console.error("The modal ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the modal definition."),t);else console.error("A modal definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nmodal definition.'),t)}(e,t):console.warn("A modal for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),d.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n){var r=t.title;if(r)if(t.component||t.load){var o=void 0;if(t.component)o=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The workspace ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the workspace will not be loaded."));o=t.load}o&&(0,et.registerWorkspace)({name:n,title:r,load:o,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups});var i=!0,a=!1,u=void 0;try{for(var s,c=(t.groups||[])[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;(0,et.registerWorkspaceGroup)({name:l,members:[n]})}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}}else console.error("The workspace ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the workspace definition."),t);else console.error("A workspace definition in ".concat(e,' is missing a title and thus cannot be registered.\nTo fix this, ensure that you define the "title" field inside the workspace definition.'),t)}else console.error("A workspace definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.'),t)}(e,t):console.warn("A workspace for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),h.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")?function(e,t){var n,r=t.name;r?(0,et.registerWorkspaceGroup)({name:r,members:null!==(n=t.members)&&void 0!==n?n:[]}):console.error("A workspace group definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.'),t)}(e,t):console.warn("A workspace group for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),p.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"flagName")?function(e,t){t.flagName?t.label?t.description?(0,Xe.registerFeatureFlag)(t.flagName,t.label,t.description):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "description" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "label" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the feature flag definition.'),t)}(e,t):console.warn("A feature flag for ".concat(e," could not be registered as it does not appear to have the required properties"),t)}))}}function at(){rt.sort((function(e,t){var n=e.order-t.order;return 0!=n?n:e.appName.localeCompare(t.appName,"en")}));var e=new Map,t=!0,n=!1,r=void 0;try{for(var o,i=rt[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.has(a.appName)?e.set(a.appName,e.get(a.appName)+1):e.set(a.appName,0);var u=e.get(a.appName),s="".concat(a.appName,"-page-").concat(u),c=document.createElement("div");c.id="single-spa-application:".concat(s),document.body.appendChild(c),ut(s,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}function ut(e,t){var n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1!==n)if(t.component){var r=function(e,t){var n=t.online,r=t.offline,o=t.featureFlag;return window.offlineEnabled?function(t){return!!(navigator.onLine&&(null==n||n)||!navigator.onLine&&null!=r&&r)&&!(o&&!(0,Xe.getFeatureFlag)(o))&&e(t)}:e}(ot(n),t);Re(e,f(t.appName,t.component),r)}else console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);else console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e)}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ct=(0,n(9523).canAccessStorage)();function lt(e,t){if(ct){if("string"==typeof t){if(t.startsWith("http"))return ht(e,t);try{var n=JSON.parse(t);if(pt(n))return ht(e,n);console.error("The supplied routes for ".concat(e," is not a valid OpenmrsAppRoutes object"),t)}catch(t){console.error("Could not add routes override for ".concat(e,": "),t)}}else{if(r=t,null!=(o=URL)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):r instanceof o)return ht(e,t.toString());if(pt(t))return ht(e,t)}var r,o;console.error("Override for ".concat(e," is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL"),t)}}function ft(e){if(ct){var t=r+e;localStorage.removeItem(t)}}function dt(){if(ct)for(var e=window.localStorage,t=0;t<e.length;t++){var n=e.key(t);(null==n?void 0:n.startsWith(r))&&e.removeItem(n)}}function ht(e,t){var n=r+e;localStorage.setItem(n,JSON.stringify(t))}function pt(e){if(e&&"object"==typeof e){var t=Object.prototype.hasOwnProperty,n=e;return!!((!t.call(e,"pages")||Boolean(n.pages)&&Array.isArray(n.pages))&&(!t.call(e,"extensions")||Boolean(n.extensions)&&Array.isArray(n.extensions))&&(!t.call(e,"workspaces")||Boolean(n.workspaces)&&Array.isArray(n.workspaces))&&(!t.call(e,"modals")||Boolean(n.modals)&&Array.isArray(n.modals)))}return!1}function yt(e){if(e&&"object"==typeof e){var t=e;return Object.entries(t).every((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],r=t[1];return"string"==typeof n&&pt(r)}))}return!1}},8050:()=>{System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},3219:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function u(e){o(a,r,i,u,s,"next",e)}function s(e){o(a,r,i,u,s,"throw",e)}u(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function f(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){c(e,t,n[t])}))}return e}function d(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 h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||v(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 p(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function v(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}e=n.nmd(e),System.register(["@openmrs/esm-error-handling","@openmrs/esm-extensions","@openmrs/esm-navigation","@openmrs/esm-react-utils","@openmrs/esm-state","@openmrs/esm-translations","dayjs","i18next","react","react-dom","react-i18next","rxjs"],(function(r,o){var u={},v={},b={},w={},S={},E={},O={},x={},A={},k={},T={},j={};return Object.defineProperty(A,"__esModule",{value:!0}),Object.defineProperty(k,"__esModule",{value:!0}),{setters:[function(){},function(e){v.getExtensionInternalStore=e.getExtensionInternalStore,v.getExtensionStore=e.getExtensionStore},function(){},function(){},function(e){S.createGlobalStore=e.createGlobalStore,S.getGlobalStore=e.getGlobalStore},function(){},function(e){O.default=e.default},function(e){x.default=e.default},function(e){Object.keys(e).forEach((function(t){A[t]=e[t]}))},function(e){Object.keys(e).forEach((function(t){k[t]=e[t]}))},function(){},function(e){j.BehaviorSubject=e.BehaviorSubject,j.Subject=e.Subject}],execute:function(){r(function(){var r={701:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},353:function(e,t,n){!function(t){"use strict";var r=function(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=(new Date).toString()),n||(n={}),e.call(this,t,n)}},o=n(42),i=e.exports={generate:r((function(e,t){return new o(e,t)}))};t&&(t.fn.geopattern=r((function(e,n){return this.each((function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var o=i.generate(e,n);t(this).css("background-image",o.toDataUrl())}))})))}("undefined"!=typeof jQuery?jQuery:null)},851:function(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map((function(t){return("0"+e[t].toString(16)).slice(-2)})).join("")},rgb2hsl:function(e){var t=e.r,n=e.g,r=e.b;t/=255,n/=255,r/=255;var o,i,a=Math.max(t,n,r),u=Math.min(t,n,r),s=(a+u)/2;if(a===u)o=i=0;else{var c=a-u;switch(i=s>.5?c/(2-a-u):c/(a+u),a){case t:o=(n-r)/c+(n<r?6:0);break;case n:o=(r-t)/c+2;break;case r:o=(t-n)/c+4}o/=6}return{h:o,s:i,l:s}},hsl2rgb:function(e){var t,n,r,o=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},i=e.h,a=e.s,u=e.l;if(0===a)t=n=r=u;else{var s=u<.5?u*(1+a):u+a-u*a,c=2*u-s;t=o(c,s,i+1/3),n=o(c,s,i),r=o(c,s,i-1/3)}return{r:Math.round(255*t),g:Math.round(255*n),b:Math.round(255*r)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},42:function(e,t,n){"use strict";var r=function(e,t,n){return parseInt(e.substr(t,n||1),16)},o=function(e,t,n,r,o){return(parseFloat(e)-t)*(o-r)/(n-t)+r},i=function(e){return e%2==0?g:m},a=function(e){return o(e,0,15,_,S)},u=function(e){return[[e,0,e,3*e],[0,e,3*e,e]]},s=function(e){return[0,0,e,e,0,e,0,0].join(",")},c=function(e,t,n,r,o){var u=s(r),c=a(o[0]),l=i(o[0]),f={stroke:b,"stroke-opacity":w,"fill-opacity":c,fill:l};e.polyline(u,f).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(u,f).transform({translate:[t+r,n+2*r],scale:[1,-1]}),c=a(o[1]),l=i(o[1]),f={stroke:b,"stroke-opacity":w,"fill-opacity":c,fill:l},e.polyline(u,f).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(u,f).transform({translate:[t+r,n],scale:[1,1]})},l=function(e,t,n,r,o){var u=a(o),c=i(o),l=s(r),f={stroke:b,"stroke-opacity":w,"fill-opacity":u,fill:c};e.polyline(l,f).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(l,f).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(l,f).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(l,f).transform({translate:[t+2*r,n+r],scale:[-1,1]})},f=n(495),d=n(851),h=n(451),p=n(138),y={baseColor:"#933c3c"},v=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],m="#222",g="#ddd",b="#000",w=.02,_=.02,S=.15,E=e.exports=function(e,t){return this.opts=f({},y,t),this.hash=t.hash||h(e),this.svg=new p,this.generateBackground(),this.generatePattern(),this};E.prototype.toSvg=function(){return this.svg.toString()},E.prototype.toString=function(){return this.toSvg()},E.prototype.toBase64=function(){var e=this.toSvg();return"undefined"!=typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},E.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},E.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},E.prototype.generateBackground=function(){var e,t,n,i;this.opts.color?n=d.hex2rgb(this.opts.color):(t=o(r(this.hash,14,3),0,4095,0,359),i=r(this.hash,17),(e=d.rgb2hsl(d.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,e.s=i%2==0?Math.min(1,(100*e.s+i)/100):Math.max(0,(100*e.s-i)/100),n=d.hsl2rgb(e)),this.color=d.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:d.rgb2rgbString(n)})},E.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(v.indexOf(e)<0)throw new Error("The generator "+e+" does not exist.")}else e=v[r(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},E.prototype.geoHexagons=function(){var e,t,n,u,s,c,l,f=o(r(this.hash,0),0,15,8,60),d=f*Math.sqrt(3),h=2*f,p=function(e){var t=e,n=t/2,r=Math.sin(60*Math.PI/180)*t;return[0,r,n,0,n+t,0,2*t,r,n+t,2*r,n,2*r,0,r].join(",")}(f);for(this.svg.setWidth(3*h+3*f),this.svg.setHeight(6*d),t=0,l=0;l<6;l++)for(c=0;c<6;c++)e=c%2==0?l*d:l*d+d/2,n=a(s=r(this.hash,t)),u={fill:i(s),"fill-opacity":n,stroke:b,"stroke-opacity":w},this.svg.polyline(p,u).transform({translate:[c*f*1.5-h/2,e-d/2]}),0===c&&this.svg.polyline(p,u).transform({translate:[6*f*1.5-h/2,e-d/2]}),0===l&&(e=c%2==0?6*d:6*d+d/2,this.svg.polyline(p,u).transform({translate:[c*f*1.5-h/2,e-d/2]})),0===c&&0===l&&this.svg.polyline(p,u).transform({translate:[6*f*1.5-h/2,5*d+d/2]}),t++},E.prototype.geoSineWaves=function(){var e,t,n,u,s,c,l=Math.floor(o(r(this.hash,0),0,15,100,400)),f=Math.floor(o(r(this.hash,1),0,15,30,100)),d=Math.floor(o(r(this.hash,2),0,15,3,30));for(this.svg.setWidth(l),this.svg.setHeight(36*d),e=0;e<36;e++)t=a(s=r(this.hash,e)),u={fill:"none",stroke:i(s),opacity:t,"stroke-width":d+"px"},n="M0 "+f+" C "+(c=l/4*.7)+" 0, "+(l/2-c)+" 0, "+l/2+" "+f+" S "+(l-c)+" "+2*f+", "+l+" "+f+" S "+(1.5*l-c)+" 0, "+1.5*l+", "+f,this.svg.path(n,u).transform({translate:[-l/4,d*e-1.5*f]}),this.svg.path(n,u).transform({translate:[-l/4,d*e-1.5*f+36*d]})},E.prototype.geoChevrons=function(){var e,t,n,u,s,c,l,f,d,h,p=o(r(this.hash,0),0,15,30,80),y=o(r(this.hash,0),0,15,30,80),v=[[0,0,(e=p)/2,(t=y)-(n=.66*t),e/2,t,0,n,0,0],[e/2,t-n,e,0,e,n,e/2,t,e/2,t-n]].map((function(e){return e.join(",")}));for(this.svg.setWidth(6*p),this.svg.setHeight(6*y*.66),s=0,h=0;h<6;h++)for(d=0;d<6;d++)c=a(f=r(this.hash,s)),u=i(f),l={stroke:b,"stroke-opacity":w,fill:u,"fill-opacity":c,"stroke-width":1},this.svg.group(l).transform({translate:[d*p,h*y*.66-y/2]}).polyline(v).end(),0===h&&this.svg.group(l).transform({translate:[d*p,6*y*.66-y/2]}).polyline(v).end(),s+=1},E.prototype.geoPlusSigns=function(){var e,t,n,s,c,l,f,d=o(r(this.hash,0),0,15,10,25),h=3*d,p=u(d);for(this.svg.setWidth(12*d),this.svg.setHeight(12*d),t=0,f=0;f<6;f++)for(l=0;l<6;l++)n=a(c=r(this.hash,t)),e=f%2==0?0:1,s={fill:i(c),stroke:b,"stroke-opacity":w,"fill-opacity":n},this.svg.group(s).transform({translate:[l*h-l*d+e*d-d,f*h-f*d-h/2]}).rect(p).end(),0===l&&this.svg.group(s).transform({translate:[4*h-l*d+e*d-d,f*h-f*d-h/2]}).rect(p).end(),0===f&&this.svg.group(s).transform({translate:[l*h-l*d+e*d-d,4*h-f*d-h/2]}).rect(p).end(),0===l&&0===f&&this.svg.group(s).transform({translate:[4*h-l*d+e*d-d,4*h-f*d-h/2]}).rect(p).end(),t++},E.prototype.geoXes=function(){var e,t,n,s,c,l,f,d=o(r(this.hash,0),0,15,10,25),h=u(d),p=3*d*.943;for(this.svg.setWidth(3*p),this.svg.setHeight(3*p),t=0,f=0;f<6;f++)for(l=0;l<6;l++)n=a(c=r(this.hash,t)),e=l%2==0?f*p-.5*p:f*p-.5*p+p/4,s={fill:i(c),opacity:n},this.svg.group(s).transform({translate:[l*p/2-p/2,e-f*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===l&&this.svg.group(s).transform({translate:[6*p/2-p/2,e-f*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===f&&(e=l%2==0?6*p-p/2:6*p-p/2+p/4,this.svg.group(s).transform({translate:[l*p/2-p/2,e-6*p/2],rotate:[45,p/2,p/2]}).rect(h).end()),5===f&&this.svg.group(s).transform({translate:[l*p/2-p/2,e-11*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),0===l&&0===f&&this.svg.group(s).transform({translate:[6*p/2-p/2,e-6*p/2],rotate:[45,p/2,p/2]}).rect(h).end(),t++},E.prototype.geoOverlappingCircles=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:i(u),opacity:t},this.svg.circle(s*l,c*l,l,n),0===s&&this.svg.circle(6*l,c*l,l,n),0===c&&this.svg.circle(s*l,6*l,l,n),0===s&&0===c&&this.svg.circle(6*l,6*l,l,n),e++},E.prototype.geoOctogons=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=function(e){var t=.33*e;return[t,0,e-t,0,e,t,e,e-t,e-t,e,t,e,0,e-t,0,t,t,0].join(",")}(l);for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.polyline(f,{fill:e,"fill-opacity":n,stroke:b,"stroke-opacity":w}).transform({translate:[s*l,c*l]}),t+=1},E.prototype.geoSquares=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.rect(s*l,c*l,l,l,{fill:e,"fill-opacity":n,stroke:b,"stroke-opacity":w}),t+=1},E.prototype.geoConcentricCircles=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=l/5;for(this.svg.setWidth(6*(l+f)),this.svg.setHeight(6*(l+f)),t=0,c=0;c<6;c++)for(s=0;s<6;s++)n=a(u=r(this.hash,t)),e=i(u),this.svg.circle(s*l+s*f+(l+f)/2,c*l+c*f+(l+f)/2,l/2,{fill:"none",stroke:e,opacity:n,"stroke-width":f+"px"}),n=a(u=r(this.hash,39-t)),e=i(u),this.svg.circle(s*l+s*f+(l+f)/2,c*l+c*f+(l+f)/2,l/4,{fill:e,"fill-opacity":n}),t+=1},E.prototype.geoOverlappingRings=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,10,60),f=l/4;for(this.svg.setWidth(6*l),this.svg.setHeight(6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":f+"px"},this.svg.circle(s*l,c*l,l-f/2,n),0===s&&this.svg.circle(6*l,c*l,l-f/2,n),0===c&&this.svg.circle(s*l,6*l,l-f/2,n),0===s&&0===c&&this.svg.circle(6*l,6*l,l-f/2,n),e+=1},E.prototype.geoTriangles=function(){var e,t,n,u,s,c,l,f=o(r(this.hash,0),0,15,15,80),d=f/2*Math.sqrt(3),h=function(e,t){var n=e/2;return[n,0,e,t,0,t,n,0].join(",")}(f,d);for(this.svg.setWidth(3*f),this.svg.setHeight(6*d),e=0,l=0;l<6;l++)for(c=0;c<6;c++)t=a(s=r(this.hash,e)),u={fill:i(s),"fill-opacity":t,stroke:b,"stroke-opacity":w},n=l%2==0?c%2==0?180:0:c%2!=0?180:0,this.svg.polyline(h,u).transform({translate:[c*f*.5-f/2,d*l],rotate:[n,f/2,d/2]}),0===c&&this.svg.polyline(h,u).transform({translate:[6*f*.5-f/2,d*l],rotate:[n,f/2,d/2]}),e+=1},E.prototype.geoDiamonds=function(){var e,t,n,u,s,c,l,f,d,h=o(r(this.hash,0),0,15,10,50),p=o(r(this.hash,1),0,15,10,50),y=[(e=h)/2,0,e,(t=p)/2,e/2,t,0,t/2].join(",");for(this.svg.setWidth(6*h),this.svg.setHeight(3*p),u=0,d=0;d<6;d++)for(f=0;f<6;f++)s=a(l=r(this.hash,u)),c={fill:i(l),"fill-opacity":s,stroke:b,"stroke-opacity":w},n=d%2==0?0:h/2,this.svg.polyline(y,c).transform({translate:[f*h-h/2+n,p/2*d-p/2]}),0===f&&this.svg.polyline(y,c).transform({translate:[6*h-h/2+n,p/2*d-p/2]}),0===d&&this.svg.polyline(y,c).transform({translate:[f*h-h/2+n,p/2*6-p/2]}),0===f&&0===d&&this.svg.polyline(y,c).transform({translate:[6*h-h/2+n,p/2*6-p/2]}),u+=1},E.prototype.geoNestedSquares=function(){var e,t,n,u,s,c,l=o(r(this.hash,0),0,15,4,12),f=7*l;for(this.svg.setWidth(6*(f+l)+6*l),this.svg.setHeight(6*(f+l)+6*l),e=0,c=0;c<6;c++)for(s=0;s<6;s++)t=a(u=r(this.hash,e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":l+"px"},this.svg.rect(s*f+s*l*2+l/2,c*f+c*l*2+l/2,f,f,n),t=a(u=r(this.hash,39-e)),n={fill:"none",stroke:i(u),opacity:t,"stroke-width":l+"px"},this.svg.rect(s*f+s*l*2+l/2+2*l,c*f+c*l*2+l/2+2*l,3*l,3*l,n),e+=1},E.prototype.geoMosaicSquares=function(){var e,t,n,i=o(r(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*i),this.svg.setHeight(8*i),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?l(this.svg,t*i*2,n*i*2,i,r(this.hash,e)):c(this.svg,t*i*2,n*i*2,i,[r(this.hash,e),r(this.hash,e+1)]):n%2==0?c(this.svg,t*i*2,n*i*2,i,[r(this.hash,e),r(this.hash,e+1)]):l(this.svg,t*i*2,n*i*2,i,r(this.hash,e)),e+=1},E.prototype.geoPlaid=function(){var e,t,n,o,u,s,c=0,l=0;for(t=0;t<36;)c+=r(this.hash,t)+5,n=a(s=r(this.hash,t+1)),e=i(s),o=s+5,this.svg.rect(0,c,"100%",o,{opacity:n,fill:e}),c+=o,t+=2;for(t=0;t<36;)l+=r(this.hash,t)+5,n=a(s=r(this.hash,t+1)),e=i(s),u=s+5,this.svg.rect(l,0,u,"100%",{opacity:n,fill:e}),l+=u,t+=2;this.svg.setWidth(l),this.svg.setHeight(c)},E.prototype.geoTessellation=function(){var e,t,n,u,s,c=o(r(this.hash,0),0,15,5,40),l=c*Math.sqrt(3),f=2*c,d=c/2*Math.sqrt(3),h=function(e,t){return[0,0,t,e/2,0,e,0,0].join(",")}(c,d),p=3*c+2*d,y=2*l+2*c;for(this.svg.setWidth(p),this.svg.setHeight(y),t=0;t<20;t++)switch(n=a(s=r(this.hash,t)),e=i(s),u={stroke:b,"stroke-opacity":w,fill:e,"fill-opacity":n,"stroke-width":1},t){case 0:this.svg.rect(-c/2,-c/2,c,c,u),this.svg.rect(p-c/2,-c/2,c,c,u),this.svg.rect(-c/2,y-c/2,c,c,u),this.svg.rect(p-c/2,y-c/2,c,c,u);break;case 1:this.svg.rect(f/2+d,l/2,c,c,u);break;case 2:this.svg.rect(-c/2,y/2-c/2,c,c,u),this.svg.rect(p-c/2,y/2-c/2,c,c,u);break;case 3:this.svg.rect(f/2+d,1.5*l+c,c,c,u);break;case 4:this.svg.polyline(h,u).transform({translate:[c/2,-c/2],rotate:[0,c/2,d/2]}),this.svg.polyline(h,u).transform({translate:[c/2,y- -c/2],rotate:[0,c/2,d/2],scale:[1,-1]});break;case 5:this.svg.polyline(h,u).transform({translate:[p-c/2,-c/2],rotate:[0,c/2,d/2],scale:[-1,1]}),this.svg.polyline(h,u).transform({translate:[p-c/2,y+c/2],rotate:[0,c/2,d/2],scale:[-1,-1]});break;case 6:this.svg.polyline(h,u).transform({translate:[p/2+c/2,l/2]});break;case 7:this.svg.polyline(h,u).transform({translate:[p-p/2-c/2,l/2],scale:[-1,1]});break;case 8:this.svg.polyline(h,u).transform({translate:[p/2+c/2,y-l/2],scale:[1,-1]});break;case 9:this.svg.polyline(h,u).transform({translate:[p-p/2-c/2,y-l/2],scale:[-1,-1]});break;case 10:this.svg.polyline(h,u).transform({translate:[c/2,y/2-c/2]});break;case 11:this.svg.polyline(h,u).transform({translate:[p-c/2,y/2-c/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,c,c,u).transform({translate:[c/2,c/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,c,c,u).transform({scale:[-1,1],translate:[c/2-p,c/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,c,c,u).transform({translate:[c/2,y/2-c/2-c],rotate:[30,0,c]});break;case 15:this.svg.rect(0,0,c,c,u).transform({scale:[-1,1],translate:[c/2-p,y/2-c/2-c],rotate:[30,0,c]});break;case 16:this.svg.rect(0,0,c,c,u).transform({scale:[1,-1],translate:[c/2,y/2-y-c/2-c],rotate:[30,0,c]});break;case 17:this.svg.rect(0,0,c,c,u).transform({scale:[-1,-1],translate:[c/2-p,y/2-y-c/2-c],rotate:[30,0,c]});break;case 18:this.svg.rect(0,0,c,c,u).transform({scale:[1,-1],translate:[c/2,c/2-y],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,c,c,u).transform({scale:[-1,-1],translate:[c/2-p,c/2-y],rotate:[-30,0,0]})}}},451:function(e){"use strict";var t=function(){var e=function(){for(var e=16;e<80;e++){var t=s[e-3]^s[e-8]^s[e-14]^s[e-16];s[e]=t<<1|t>>>31}var n,l,f=r,d=o,h=i,p=a,y=u;for(e=0;e<80;e++){e<20?(n=p^d&(h^p),l=1518500249):e<40?(n=d^h^p,l=1859775393):e<60?(n=d&h|p&(d|h),l=2400959708):(n=d^h^p,l=3395469782);var v=(f<<5|f>>>27)+n+y+l+(0|s[e]);y=p,p=h,h=d<<30|d>>>2,d=f,f=v}for(r=r+f|0,o=o+d|0,i=i+h|0,a=a+p|0,u=u+y|0,c=0,e=0;e<16;e++)s[e]=0},t=function(t){s[c]|=(255&t)<<l,l?l-=8:(c++,l=24),16===c&&e()},n=function(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t},r=1732584193,o=4023233417,i=2562383102,a=271733878,u=3285377520,s=new Uint32Array(80),c=0,l=24,f=0;return{update:function(e){if("string"==typeof e)return function(e){var n=e.length;f+=8*n;for(var r=0;r<n;r++)t(e.charCodeAt(r))}(e);var n=e.length;f+=8*n;for(var r=0;r<n;r++)t(e[r])},digest:function(){t(128),(c>14||14===c&&l<24)&&e(),c=14,l=24,t(0),t(0),t(f>0xffffffffff?f/1099511627776:0),t(f>4294967295?f/4294967296:0);for(var s=24;s>=0;s-=8)t(f>>s);return n(r)+n(o)+n(i)+n(a)+n(u)}}};e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},138:function(e,t,n){"use strict";var r=function(){return this.width=100,this.height=100,this.svg=i("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this},o=n(495),i=n(97);e.exports=r,r.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},r.prototype.end=function(){return this.context.pop(),this},r.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},r.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map((function(t){return t+"("+e[t].join(",")+")"})).join(" ")),this},r.prototype.setAttributes=function(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))},r.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},r.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},r.prototype.toString=function(){return this.svg.toString()},r.prototype.rect=function(e,t,n,r,a){var u=this;if(Array.isArray(e))return e.forEach((function(e){u.rect.apply(u,e.concat(a))})),this;var s=i("rect");return this.currentContext().appendChild(s),this.setAttributes(s,o({x:e,y:t,width:n,height:r},a)),this},r.prototype.circle=function(e,t,n,r){var a=i("circle");return this.currentContext().appendChild(a),this.setAttributes(a,o({cx:e,cy:t,r:n},r)),this},r.prototype.path=function(e,t){var n=i("path");return this.currentContext().appendChild(n),this.setAttributes(n,o({d:e},t)),this},r.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach((function(e){n.polyline(e,t)})),this;var r=i("polyline");return this.currentContext().appendChild(r),this.setAttributes(r,o({points:e},t)),this},r.prototype.group=function(e){var t=i("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,o({},e)),this}},97:function(e){"use strict";var t=e.exports=function(e){return(null!=(n=t)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](this):l(this,n))?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e);var n};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map((function(t){return[" ",t,'="',e.attributes[t],'"'].join("")})).join(""),">",e.children.map((function(e){return e.toString()})).join(""),"</",e.tagName,">"].join("")}},495:function(e){var t=function(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var t,o=n.call(e,"constructor"),i=n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function e(){var n,r,o,i,a,u,s=arguments[0]||{},c=1,l=arguments.length,f=!1;for("boolean"==typeof s&&(f=s,s=arguments[1]||{},c=2),"object"!=typeof s&&"function"!=typeof s&&(s={});c<l;c++)if(null!=(n=arguments[c]))for(r in n)o=s[r],s!==(i=n[r])&&(f&&i&&(t(i)||(a=Array.isArray(i)))?(a?(a=!1,u=o&&Array.isArray(o)?o:[]):u=o&&t(o)?o:{},s[r]=e(f,u,i)):void 0!==i&&(s[r]=i));return s}},279:function(e,t,n){"use strict";var r=n(493);r.createRoot,r.hydrateRoot},801:function(e,t,n){"use strict";var r=function(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}},o=n(954),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useState,u=o.useEffect,s=o.useLayoutEffect,c=o.useDebugValue,l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=a({inst:{value:n,getSnapshot:t}}),i=o[0].inst,l=o[1];return s((function(){i.value=n,i.getSnapshot=t,r(i)&&l({inst:i})}),[e,n,t]),u((function(){return r(i)&&l({inst:i}),e((function(){r(i)&&l({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:l},921:function(e,t,n){"use strict";e.exports=n(801)},641:function(e,t,n){var r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},i=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},a=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)};System.register(["@openmrs/esm-config","@openmrs/esm-navigation","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var u={},s={},c={},l={};return{setters:[function(e){u.Type=e.Type,u.defineConfigSchema=e.defineConfigSchema,u.getConfig=e.getConfig,u.validators=e.validators},function(e){s.navigate=e.navigate},function(e){c.reportError=e.reportError},function(e){l.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(o)||function(t,n){if(t){if("string"==typeof t)return e(t,3);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},824:function(e){"use strict";e.exports=u},254:function(e){"use strict";e.exports=c},513:function(e){"use strict";e.exports=s},738:function(e){"use strict";e.exports=l}},t={};function f(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,f),o.exports}f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}st(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},u=function(e){setTimeout((function(){throw e}),0)},s=function(e){return null!==e&&"object"==typeof e},c=function(e){return e.reduce((function(e,t){return e.concat(i(t,pt)?t.errors:t)}),[])},l=function(e){return e},h=function(e){if(e||(e=lt.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n){var r=g(e,t,n);Vt.length?Vt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},y=function(e){if("function"!=typeof e)throw Error(m(28,!1));Vt.push(e)},v=function(e){if("function"!=typeof e)throw Error(m(29,!1));var t=!1;return Vt=Vt.filter((function(n){var r=n===e;return t=t||r,!r})),t},m=function(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=")):"")},g=function(e,t,n){var r,o="".concat(E(t)," '").concat(_(t),"' died in status ").concat(t.status,": ");if(i(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(m(30,!1,t.status,_(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=_(t),t.status=n,r},b=function(e){return e.status===Zt},w=function(e){try{return e.activeWhen(window.location)}catch(t){return p(t,e,nn),!1}},_=function(e){return e.name},S=function(e){return Boolean(e.unmountThisParcel)},E=function(e){return S(e)?"parcel":"application"},O=function(){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]},x=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},A=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!x(t,(function(e){return"function"!=typeof e}))));var t},k=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(e),o=_(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return T(n)?n:Promise.reject(m(15,!1,r,o,t,a))}))}),Promise.resolve())}},T=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},j=function(e,t){return Promise.resolve().then((function(){return e.status!==$t?e:(e.status=Wt,e.bootstrap?U(e,"bootstrap").then(n).catch((function(n){if(t)throw g(n,e,nn);return p(n,e,nn),e})):Promise.resolve().then(n))}));function n(){return e.status=Yt,e}},P=function(e,t){return Promise.resolve().then((function(){if(e.status!==Zt)return e;e.status=Xt;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 g(r,e,nn);p(r,e,nn)}))})).then((function(){return e}));function r(){return U(e,"unmount").then((function(){e.status=Yt}),(function(n){if(t)throw g(n,e,nn);p(n,e,nn)}))}}))},D=function(e,t){return Promise.resolve().then((function(){return e.status!==Yt?e:(on||(window.dispatchEvent(new Ht("single-spa:before-first-mount")),on=!0),e.status=Jt,U(e,"mount").then((function(){return e.status=Zt,an||(window.dispatchEvent(new Ht("single-spa:first-mount")),an=!0),e})).catch((function(n){return e.status=Zt,P(e,!0).then(r,r);function r(){if(t)throw g(n,e,nn);return p(n,e,nn),e}})))}))},C=function(){return I.apply(sn,arguments)},I=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(m(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(m(3,!1,a(e.name)));var r=un++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(m(4,!1,o,void 0===t?"undefined":a(t)));if(!t.domElement)throw Error(m(5,!1,o));var i,u="function"==typeof e,s=u?e:function(){return Promise.resolve(e)},c={id:r,parcels:{},status:u?qt:$t,customProps:t,parentName:_(n),unmountThisParcel:function(){return p.then((function(){if(c.status!==Zt)throw Error(m(6,!1,o,c.status));return P(c,!0)})).then((function(e){return c.parentName&&delete n.parcels[c.id],e})).then((function(e){return f(e),e})).catch((function(e){throw c.status=nn,d(e),e}))}};n.parcels[r]=c;var l=s();if(!l||"function"!=typeof l.then)throw Error(m(7,!1));l=l.then((function(e){if(!e)throw Error(m(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(m(9,!1,o));if(!A(e.mount))throw Error(m(10,!1,o));if(!A(e.unmount))throw Error(m(11,!1,o));if(e.update&&!A(e.update))throw Error(m(12,!1,o));var t=k(e,"bootstrap"),n=k(e,"mount"),a=k(e,"unmount");c.status=$t,c.name=o,c.bootstrap=t,c.mount=n,c.unmount=a,c.timeouts=G(e.timeouts),e.update&&(c.update=k(e,"update"),i.update=function(e){return c.customProps=e,M((t=c,Promise.resolve().then((function(){if(t.status!==Zt)throw Error(m(32,!1,_(t)));return t.status=Qt,U(t,"update").then((function(){return t.status=Zt,t})).catch((function(e){throw g(e,t,nn)}))}))));var t})}));var f,d,h=l.then((function(){return j(c,!0)})),p=h.then((function(){return D(c,!0)})),y=new Promise((function(e,t){f=e,d=t}));return i={mount:function(){return M(Promise.resolve().then((function(){if(c.status!==Yt)throw Error(m(13,!1,o,c.status));return n.parcels[r]=c,D(c)})))},unmount:function(){return M(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:M(l),bootstrapPromise:M(h),mountPromise:M(p),unmountPromise:M(y)}},M=function(e){return e.then((function(){return null}))},N=function(e){var t=_(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(m(40,!1),t,n));var r=O({},n,{name:t,mountParcel:I.bind(e),singleSpa:Gt});return S(e)&&(r.unmountSelf=e.unmountThisParcel),r},R=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(16,!1));cn.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},L=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(17,!1));cn.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},F=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(18,!1));cn.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},B=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(m(19,!1));cn.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},U=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=E(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](N(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=m(31,!1,t,o,_(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},G=function(e){var t={};for(var n in cn)t[n]=O({},cn[n],e&&e[n]||{});return t},z=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Kt&&e.status!==tn?e:(e.status=qt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(N(e));if(!T(r))throw n=!0,Error(m(33,!1,_(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);var o=E(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(m(r,!1,o,_(e),i),t),p(void 0,e,nn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=O({},e.devtools.overlays,t.devtools.overlays)),e.status=$t,e.bootstrap=k(t,"bootstrap"),e.mount=k(t,"mount"),e.unmount=k(t,"unmount"),e.unload=k(t,"unload"),e.timeouts=G(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=nn:(r=tn,e.loadErrorTime=(new Date).getTime()),p(t,e,r),e})));var t,n}))},H=function(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(m(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=W(window.location.href),r=W(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)},V=function(e){var t=this;if(e){var n=e[0].type;dn.indexOf(n)>=0&&fn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},K=function(){Sn([],arguments)},q=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Ut&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},$=function(e){if(pn)throw Error(m(43,!1));Ut=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,pn=!0,hn=window.history.replaceState,window.addEventListener("hashchange",K),window.addEventListener("popstate",K);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&dn.indexOf(e)>=0)||x(fn[e],(function(e){return e===n})))return t.apply(this,arguments);fn[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&dn.indexOf(e)>=0&&(fn[e]=fn[e].filter((function(e){return e!==t}))),n.apply(this,arguments)},window.history.pushState=q(window.history.pushState,"pushState"),window.history.replaceState=q(hn,"replaceState")},W=function(e){var t=document.createElement("a");return t.href=e,t},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!yn){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return J.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return J.call(this,n,window.removeEventListener,e,t,arguments)},yn=!0}},J=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){dn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},Z=function(e){return Promise.resolve().then((function(){var t=vn[_(e)];if(!t)return e;if(e.status===Kt)return Q(e,t),e;if(e.status===en)return t.promise.then((function(){return e}));if(e.status!==Yt&&e.status!==tn)return e;var n=e.status===tn?Promise.resolve():U(e,"unload");return e.status=en,n.then((function(){return Q(e,t),e})).catch((function(n){return function(e,t,n){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,p(n,e,nn),t.reject(n)}(e,t,n),e}))}))},Q=function(e,t){delete vn[_(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Kt,t.resolve()},X=function(e,t,n,r){vn[_(e)]={app:e,resolve:n,reject:r},Object.defineProperty(vn[_(e)],"promise",{get:t})},ee=function(e){return vn[e]},te=function(){return mn.filter(b).map(_)},ne=function(){return mn.map(_)},re=function(e){var t=x(mn,(function(t){return _(t)===e}));return t?t.status:null},oe=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(m(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(m(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(m(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(m(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(m(24,!1));if(!ce(e.customProps))throw Error(m(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(m(20,!1));if(!t)throw Error(m(23,!1));if("function"!=typeof n)throw Error(m(24,!1));if(!ce(r))throw Error(m(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:le(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(pe()||gn||(gn=!0,setTimeout((function(){pe()||console.warn(m(1,!1))}),5e3)),-1!==ne().indexOf(o.name))throw Error(m(21,!1,o.name));mn.push(O({loadErrorTime:null,status:Kt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ln&&(Y(),Sn())},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return mn.filter((function(t){return t.activeWhen(e)})).map(_)},ae=function(e){if(0===mn.filter((function(t){return _(t)===e})).length)throw Error(m(25,!1,e));return(ln?ue(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=mn.map(_).indexOf(e);mn.splice(t,1)}))},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(m(26,!1));var n=x(mn,(function(t){return _(t)===e}));if(!n)throw Error(m(27,!1,e));var r,o=ee(_(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){X(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,se(n,o.resolve,o.reject)):r=new Promise((function(e,t){X(n,(function(){return r}),e,t),se(n,e,t)})),r},se=function(e,t,n){Promise.resolve().then((function(){if(x(ie(),(function(t){return t===_(e)})))return fe()})).then((function(){return P(e).then(Z).then((function(){t(),setTimeout((function(){Sn()}))}))})).catch(n)},ce=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},fe=function(){return Sn()},de=function(e,t){return w(e)?j(e).then((function(e){return t.then((function(){return w(e)?D(e):e}))})):t.then((function(){return e}))},he=function(e){En=!0,ln&&($(e),Sn())},pe=function(){return En},ye=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},ve=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},be=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=be(e);if(t.headers||(t.headers={}),Rt(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(Pn)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Dn)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r,o;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(i){switch(i.label){case 0:return(t=e).ok?204!==t.status?[3,2]:[4,(0,Lt.getConfig)("@openmrs/esm-api")]:[3,4];case 1:return i.sent().followRedirects&&t.headers.has("location")&&(r=t.headers.get("location"))&&(0,Ft.navigate)({to:r}),t.data=null,[2,t];case 2:return[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))];case 3:return[3,6];case 4:return[4,(0,Lt.getConfig)("@openmrs/esm-api")];case 5:return o=i.sent().redirectAuthFailure,n===be(Cn)&&403===t.status||o.enabled&&o.errors.includes(t.status)?(sessionStorage.removeItem(xn),(0,Ft.navigate)({to:o.url}),[2,o.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new In(n,t,r,a)}),(function(e){throw new In(n,t,null,a)}))];case 6:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){ve(i,n,r,a,u,"next",e)}function u(e){ve(i,n,r,a,u,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},_e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new wt((function(r){var o=!1;return we(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},Se=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ee=function(e,t){return we("".concat(Mn,"/").concat(e),{signal:t.signal})},Oe=function(e,t,n){return we("".concat(Mn,"?patient=").concat(e,"&includeEncounterless=").concat(t),{signal:n.signal})},xe=function(e,t){return Nn.apply(this,arguments)},Ae=function(e,t){return we("".concat(Mn,"/").concat(e),{method:"DELETE",signal:t.signal})},ke=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Te=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ke(i,r,o,a,u,"next",e)}function u(e){ke(i,r,o,a,u,"throw",e)}a(void 0)}))}},je=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),new wt((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Fn.getState()),Fn.subscribe(n)}))},De=function(){return(Bn<Date.now()-6e4||!Fn.getState().loaded)&&Ie(),Fn},Ce=function(e){var t,n,r,o=null!==(r=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&&o.includes("_")&&(o=o.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(o)&&o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)},Ie=function(e,t){Bn=Date.now();var n={};return e&&t&&(n.Authorization="Basic ".concat(window.btoa("".concat(e,":").concat(t)))),Ue(we(Cn,{headers:n}))},Me=function(){Fn.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},Ne=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ln(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ln(t.privileges.find((function(t){return e===t.display})))})):(Ln(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ln(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},Re=function(){var e,t;return new Promise((function(n){var r=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(Fn.getState()),e||(t=Fn.subscribe(r))}))},Le=function(){return new Promise((function(e,t){Pe().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},Fe=function(e,t){return Un.apply(this,arguments)},Be=function(e,t,n){return Gn.apply(this,arguments)},Ue=function(e){return new Promise((function(t,n){e.then((function(e){var r;"object"==typeof(null==e?void 0:e.data)?(r={loaded:!0,session:e.data},Fn.setState(r),t(r)):(r={loaded:!1,session:null},Fn.setState(r),n(r))})).catch((function(e){(0,Rn.reportError)("Failed to fetch new session information: ".concat(e));var t={loaded:!1,session:null};Fn.setState(t),n(t)}))}))},Ge=function(){(0,Lt.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Lt.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Lt.validators.isUrl]},errors:{_type:Lt.Type.Array,_default:[401],_elements:{_type:Lt.Type.Number,_validators:[Lt.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Lt.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:Lt.Type.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}),Ie()},ze=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},He=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ve=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){He(i,r,o,a,u,"next",e)}function u(e){He(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ke=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},qe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},$e=function(e,t){return Hn.apply(this,arguments)},We=function(e){return Vn.apply(this,arguments)},Ye=function(){return(0,Bt.getGlobalStore)("visit",er)},Je=function(e,t){Ye().setState({patientUuid:e,manuallySetVisitUuid:t})},Ze=function(e,t){return we("".concat(Pn,"/visit"),{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},Qe=function(e,t,n){return we("".concat(Pn,"/visit/").concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},Xe=function(e,t,n){var r=null!=n?n:Xn;return we("".concat(Pn,"/visit?patient=").concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})},et=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new nr(e,t))}},tt=function(e){return function(t){return 0===e?ir:t.lift(new ar(e))}},nt=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},rt=function(){return _e("".concat(Pn,"/visittype")).pipe(et((function(e){return e.data.results.map(nt)}))).pipe(tt(1))},ot=function(e){return{uuid:e.uuid,display:e.display}},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);var r=n.toString();return _e("".concat(Pn,"/location").concat(r?"?"+r:"")).pipe(et((function(e){return e.data.results.map(ot)}))).pipe(tt(1))};f.r(d),f.d(d,{OpenmrsFetchError:function(){return In},VisitMode:function(){return Kn},VisitStatus:function(){return qn},attachmentUrl:function(){return Mn},backendDependencies:function(){return sr},clearCurrentUser:function(){return Me},createAttachment:function(){return xe},defaultVisitCustomRepresentation:function(){return Xn},deleteAttachmentPermanently:function(){return Ae},fetchCurrentPatient:function(){return $e},fhirBaseUrl:function(){return Dn},getAttachmentByUuid:function(){return Ee},getAttachments:function(){return Oe},getCurrentUser:function(){return Pe},getLocations:function(){return it},getLoggedInUser:function(){return Re},getSessionLocation:function(){return Le},getSessionStore:function(){return De},getStartedVisit:function(){return tr},getVisitStore:function(){return Ye},getVisitTypes:function(){return rt},getVisitsForPatient:function(){return Xe},makeUrl:function(){return be},openmrsFetch:function(){return we},openmrsObservableFetch:function(){return _e},refetchCurrentUser:function(){return Ie},restBaseUrl:function(){return Pn},saveVisit:function(){return Ze},sessionEndpoint:function(){return Cn},sessionStore:function(){return Fn},setCurrentVisit:function(){return Je},setSessionLocation:function(){return Fe},setUserLanguage:function(){return Ce},setUserProperties:function(){return Be},setupApiModule:function(){return Ge},toLocationObject:function(){return ot},toVisitTypeObject:function(){return nt},updateVisit:function(){return Qe},userHasAccess:function(){return Ne}});var at,ut,st=function(e,t){return st=Object.setPrototypeOf||i({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},st(e,t)},ct=!1,lt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,ct=e},get useDeprecatedSynchronousErrorHandling(){return ct}},ft={closed:!0,next:function(e){},error:function(e){if(lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},dt=Array.isArray||function(e){return e&&"number"==typeof e.length},ht=function(){var e=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this};return e.prototype=Object.create(Error.prototype),e}(),pt=ht,yt=function(){var e=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return e.prototype.unsubscribe=function(){var n;if(!this.closed){var r=this,o=r._parentOrParents,a=r._ctorUnsubscribe,u=r._unsubscribe,l=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i(o,e))o.remove(this);else if(null!==o)for(var f=0;f<o.length;++f)o[f].remove(this);if(t(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){n=i(e,pt)?c(e.errors):[e]}}if(dt(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(s(h))try{h.unsubscribe()}catch(e){n=n||[],i(e,pt)?n=n.concat(c(e.errors)):n.push(e)}}}if(n)throw new pt(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":a(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(!i(n,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(i(o,e)){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[n]:u.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}(),vt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),mt=function(t){function n(e,r,o){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=ft;break;case 1:if(!e){a.destination=ft;break}if("object"==typeof e){i(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new gt(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new gt(a,e,r,o)}return a}return e(n,t),n.prototype[vt]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(yt),gt=function(n){var r=function(e,r,o,i){var a,u=n.call(this)||this;u._parentSubscriber=e;var s=u;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==ft&&(t((s=Object.create(r)).unsubscribe)&&u.add(s.unsubscribe.bind(s)),s.unsubscribe=u.unsubscribe.bind(u))),u._context=s,u._next=a,u._error=o,u._complete=i,u};return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=lt.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):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};lt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),lt.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!lt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return lt.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(mt),bt="function"==typeof Symbol&&Symbol.observable||"@@observable",wt=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(i(e,mt))return e;if(e[vt])return e[vt]()}return e||t||n?new mt(e,t,n):new mt(ft)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||lt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),lt.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){lt.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&&i(r,mt)?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(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[bt]=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?l: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=h(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}(),_t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,St="object"==typeof self&&self&&self.Object===Object&&self,Et=(_t||St||Function("return this")()).Symbol,Ot=Object.prototype,xt=Ot.hasOwnProperty,At=Ot.toString,kt=Et?Et.toStringTag:void 0,Tt=Object.prototype.toString,jt=Et?Et.toStringTag:void 0,Pt=(at=Object.getPrototypeOf,ut=Object,function(e){return at(ut(e))}),Dt=Function.prototype,Ct=Object.prototype,It=Dt.toString,Mt=Ct.hasOwnProperty,Nt=It.call(Object),Rt=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]":jt&&jt in Object(e)?function(e){var t=xt.call(e,kt),n=e[kt];try{e[kt]=void 0;var r=!0}catch(e){}var o=At.call(e);return r&&(t?e[kt]=n:delete e[kt]),o}(e):function(e){return Tt.call(e)}(e)}(e))return!1;var t=Pt(e);if(null===t)return!0;var n=Mt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&i(n,n)&&It.call(n)==Nt},Lt=f(824),Ft=f(513),Bt=f(385);(0,Bt.createGlobalStore)("breadcrumbs",[]);var Ut,Gt=Object.freeze({__proto__:null,get start(){return he},get ensureJQuerySupport(){return Y},get setBootstrapMaxTime(){return R},get setMountMaxTime(){return L},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return B},get registerApplication(){return oe},get unregisterApplication(){return ae},get getMountedApps(){return te},get getAppStatus(){return re},get unloadApplication(){return ue},get checkActivityFunctions(){return ie},get getAppNames(){return ne},get pathToActiveWhen(){return le},get navigateToUrl(){return H},get patchHistoryApi(){return $},get triggerAppChange(){return fe},get addErrorHandler(){return y},get removeErrorHandler(){return v},get mountRootParcel(){return C},get NOT_LOADED(){return Kt},get LOADING_SOURCE_CODE(){return qt},get NOT_BOOTSTRAPPED(){return $t},get BOOTSTRAPPING(){return Wt},get NOT_MOUNTED(){return Yt},get MOUNTING(){return Jt},get UPDATING(){return Qt},get LOAD_ERROR(){return tn},get MOUNTED(){return Zt},get UNLOADING(){return en},get UNMOUNTING(){return Xt},get SKIP_BECAUSE_BROKEN(){return nn}}),zt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Ht=function(){try{var e=new zt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?zt:"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},Vt=[],Kt="NOT_LOADED",qt="LOADING_SOURCE_CODE",$t="NOT_BOOTSTRAPPED",Wt="BOOTSTRAPPING",Yt="NOT_MOUNTED",Jt="MOUNTING",Zt="MOUNTED",Qt="UPDATING",Xt="UNMOUNTING",en="UNLOADING",tn="LOAD_ERROR",nn="SKIP_BECAUSE_BROKEN",rn=[],on=!1,an=!1,un=0,sn={parcels:{}},cn={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}},ln="undefined"!=typeof window,fn={hashchange:[],popstate:[]},dn=["hashchange","popstate"],hn=null,pn=!1;ln&&(window.singleSpaNavigate?console.warn(m(41,!1)):window.singleSpaNavigate=H);var yn=!1,vn={},mn=[],gn=!1,bn=!1,wn=[],_n=ln&&window.location.href;function Sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(bn)return new Promise((function(e,n){wn.push({resolve:e,reject:n,eventArguments:t})}));var r,i=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return mn.forEach((function(i){var a=i.status!==nn&&w(i);switch(i.status){case tn:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Kt:case qt:a&&n.push(i);break;case $t:case Yt:!a&&ee(_(i))?e.push(i):a&&r.push(i);break;case Zt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),a=i.appsToUnload,u=i.appsToUnmount,s=i.appsToLoad,c=i.appsToMount,l=[],f=_n,d=_n=window.location.href;return pe()?(bn=!0,r=a.concat(s,u,c),Promise.resolve().then((function(){return g(0===r.length?"before-no-app-change":"before-app-change",v(!0)),g("before-routing-event",v(!0,{cancelNavigation:h})),Promise.all(l).then((function(n){if(n.some((function(e){return e})))return hn.call(window.history,history.state,"",f.substring(location.origin.length)),_n=location.href,bn=!1,Sn(e,t,!0);var r=a.map(Z),o=u.map(P).map((function(e){return e.then(Z)})).concat(r),i=Promise.all(o);i.then((function(){g("before-mount-routing-event",v(!0))}),(function(e){throw e}));var l=s.map((function(e){return z(e).then((function(e){return de(e,i)}))})),d=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return de(e,i)}));return i.catch((function(e){throw y(),e})).then((function(){return y(),Promise.all(l.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(p).then((function(){}),(function(e){throw e}))}))}))}))):(r=s,Promise.resolve().then((function(){var e=s.map(z);return Promise.all(e).then(y).then((function(){return[]})).catch((function(e){throw y(),e})).finally((function(){}))})));function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);l.push(t.catch((function(e){return console.warn(Error(m(42,!1))),console.warn(e),!1})))}function p(){var t=te();e.forEach((function(e){return e.resolve(t)}));try{g(0===r.length?"no-app-change":"app-change",v()),g("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(bn=!1,wn.length>0){var n=wn;wn=[],Sn(n)}return t}function y(){n||(e.forEach((function(e){V(e.eventArguments)})),V(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,l={},h=(o(e={},Zt,[]),o(e,Yt,[]),o(e,Kt,[]),o(e,nn,[]),e);n?(s.concat(c).forEach((function(e,t){y(e,Zt)})),a.forEach((function(e){y(e,Kt)})),u.forEach((function(e){y(e,Yt)}))):r.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:l,appsByNewStatus:h,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:d}};return i&&O(p.detail,i),p;function y(e,t){var n=_(e);t=t||re(n),l[n]=t,(h[t]=h[t]||[]).push(n)}}function g(e,t){n||window.dispatchEvent(new Ht("single-spa:".concat(e),t))}}var En=!1,On={getRawAppData:function(){return function(e){if(Array.isArray(e))return r(e)}(e=mn)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Sn,NOT_LOADED:Kt,toLoadPromise:z,toBootstrapPromise:j,unregisterApplication:ae,getProfilerData:function(){return rn}};ln&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=On);var xn="openmrs:history";function An(e,t,n){return An=ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Tn(o,n.prototype),o},An.apply(null,arguments)}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(e)}function Tn(e,t){return Tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tn(e,t)}function jn(e){var t="function"==typeof Map?new Map:void 0;return jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return An(e,arguments,kn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Tn(r,e)},jn(e)}var Pn="/ws/rest/v1",Dn="/ws/fhir2/R4",Cn="".concat(Pn,"/session"),In=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tn(e,t)}(o,e);var t,n,r=(t=o,n=ge(),function(){var e,r=kn(t);if(n){var o=kn(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":a(n))&&"function"!=typeof t?ye(e):t;var n}(this,e)});function o(e,t,n,a){var u;return function(e,t){if(!i(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),me(ye(u=r.call(this)),"response",void 0),me(ye(u),"responseBody",void 0),u.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return o}(jn(Error)),Mn="".concat(Pn,"/attachment");function Nn(){var e;return e=function(e,t){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){return(n=new FormData).append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),[2,we("".concat(Mn),{method:"POST",body:n})]}))},Nn=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))},Nn.apply(this,arguments)}var Rn=f(254),Ln=function(e){return void 0===e},Fn=(0,Bt.createGlobalStore)("session",{loaded:!1,session:null}),Bn=0;function Un(){return(Un=Te((function(e,t){return je(this,(function(n){return[2,Ue(we(Cn,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))]}))}))).apply(this,arguments)}function Gn(){return(Gn=Te((function(e,t,n){return je(this,(function(r){switch(r.label){case 0:return n||(n=new AbortController),[4,we("".concat(Pn,"/user/").concat(e),{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return r.sent(),[2,Ie()]}}))}))).apply(this,arguments)}Fn.subscribe((function(e){e.loaded&&e.session&&Ce(e.session)}));var zn=f(738);function Hn(){return Hn=Ve((function(e,t){var n,r,o,i,a,u=arguments;return qe(this,(function(s){switch(s.label){case 0:return n=!(u.length>2&&void 0!==u[2])||u[2],e?(r=null,[4,Promise.all([we("".concat(Dn,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?We(e):Promise.resolve(null)])]):[3,2];case 1:if(o=Ke.apply(void 0,[s.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;s.label=2;case 2:return[2,null]}}))})),Hn.apply(this,arguments)}function Vn(){return(Vn=Ve((function(e){var t,n,r;return qe(this,(function(o){switch(o.label){case 0:return[4,(0,zn.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Kn,qn,$n=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Wn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(yt),Yn=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(mt),Jn=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[vt]=function(){return new Yn(this)},n.prototype.lift=function(e){var t=new Zn(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new $n;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 $n;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 $n;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new $n;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new $n;return this.hasError?(e.error(this.thrownError),yt.EMPTY):this.isStopped?(e.complete(),yt.EMPTY):(this.observers.push(e),new Wn(this,e))},n.prototype.asObservable=function(){var e=new wt;return e.source=this,e},n.create=function(e,t){return new Zn(e,t)},n}(wt),Zn=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):yt.EMPTY},n}(Jn),Qn=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new $n;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Jn);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Kn||(Kn={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(qn||(qn={}));var Xn="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",er=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};Ye().subscribe((function(e){var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var tr=new Qn(null),nr=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new rr(e,this.project,this.thisArg))},e}(),rr=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(mt),or=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),ir=new wt((function(e){return e.complete()})),ar=function(){var e=function(e){if(this.total=e,this.total<0)throw new or};return e.prototype.call=function(e,t){return t.subscribe(new ur(e,this.total))},e}(),ur=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(mt),sr={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),d}())}}}))},714:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)};System.register(["@openmrs/esm-state","@openmrs/esm-utils"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.shallowEqual=e.shallowEqual}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},618:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},s=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return de(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(v().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");var n=b(),r=function(n){var r;return null===(r=n.configs[e])||void 0===r?void 0:r[t]};return{getInitialState:function(){return r(n.getInitialState())},getState:function(){var e;return null!==(e=r(n.getState()))&&void 0!==e?e:{loaded:!1,config:null}},setState:function(r){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.setState((function(n){n.configs[e]||(n.configs[e]={});var i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n}))},subscribe:function(e){return n.subscribe((function(t,n){var o=r(t),i=r(n);(0,Ne.shallowEqual)(o,i)||e(o,i)}))},destroy:function(){}}},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=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){E(e,t,n[t])}))}return e},x=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},A=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||T(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.")}()},k=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)||T(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.")}()},T=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},j=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=y(u);if(e.moduleLoaded[u]){var c=K(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=q(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=W(V(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=A(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=A(d.value,2),y=p[0];H(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=A(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),u=a.getState(),s={slots:O({},u.slots,i)};he(u,s)||a.setState(s)},D=function(e,t){var n=function(e,t){var n=Ge(we(e.schemas)),r=k(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=A(u.value,2);n=W([n,ze(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},C=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=z(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=x(O({},r[c.slotName]),E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){He(e,t);var n=ve(t,We);Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n)),moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},M=function(e){Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,We))})}))},N=function(e){Re.setState((function(t){return x(O({},t),{moduleLoaded:x(O({},t.moduleLoaded),E({},e,!0))})}))},R=function(e){Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,$e))})}))},L=function(e,t){He(e,t);var n=ve(t,We);Re.getState().schemas[e]&&console.error("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Re.setState((function(t){return x(O({},t),{schemas:x(O({},t.schemas),E({},e,n))})}))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";Re.setState((function(n){return x(O({},n),{providedConfigs:k(n.providedConfigs).concat([{source:t,config:e}])})}))},B=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=me(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},U=function(e,t,n){var r=[new Promise((function(t){var n=function(e){if(e.translationOverridesLoaded&&e.config){var n,r=null!==(n=e.config["Translation overrides"])&&void 0!==n?n:{};t(r),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))];return t&&n&&r.push(new Promise((function(e){var r=function(t){if(t.loaded&&t.config){var n,r=null!==(n=t.config["Translation overrides"])&&void 0!==n?n:{};e(r),i&&i()}},o=w(t,n);r(o.getState());var i=o.subscribe(r)}))),Promise.all(r)},G=function(e,t,n){Y(e,t,n);var r=qe(e,t);return Ke(e,r,n),r},z=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return A(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=V(o,i),p=$(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=W([$(d,h),y]),m=null!=f?f:o.schemas[t];Y(m,v,d);var g=qe(m,v);return Ke(m,g,d),delete g.extensionSlots,g},H=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&ee(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||ee(r,o+".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}))||ee(r,o+".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}))||ee(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(X(e.configure)||ee(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},V=function(e,t){return k(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},K=function(e,t,n){var r=t.schemas[e],o=$(e,V(t,n));Y(r,o,e);var i=qe(r,o);return Ke(r,i,e),delete i.extensionSlots,i},q=function(e,t,n){var r=$(e,V(t,n)),o=qe(We,r);return Ke(We,o,e),delete o.extensionSlots,o},$=function(e,t){return W(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},W=function(e){return ke(ve)({},e)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?Ve(f,c,l):"extensionSlots"===s&&""!==n||ee(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},J=function(e,t,n){return!t||Z(e,[{Array:Te,Boolean:je,ConceptUuid:Ie,Number:Pe,Object:Ce,String:De,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},Z=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(ee(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},Q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},X=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},ee=function(e,t){var n="".concat(e,":::").concat(t);Ue||(Ue=new Set),Ue.has(n)||(console.error(t),Ue.add(n))},te=function(e){e?Ue.forEach((function(t){t.startsWith(e)&&Ue.delete(t)})):Ue.clear()};i.r(a),i.d(a,{Type:function(){return be},clearConfigErrors:function(){return te},configExtensionStore:function(){return Fe},configInternalStore:function(){return Re},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return L},getConfig:function(){return B},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},getTranslationOverrides:function(){return U},implementerToolsConfigStore:function(){return Be},inRange:function(){return Ye},isUrl:function(){return Ze},isUrlWithTemplateParameters:function(){return Je},oneOf:function(){return Qe},processConfig:function(){return G},provide:function(){return F},registerModuleLoad:function(){return N},registerModuleWithConfigSystem:function(){return M},registerTranslationNamespace:function(){return R},temporaryConfigStore:function(){return Le},validator:function(){return p},validators:function(){return Xe}});var ne="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},re=Object.prototype.toString,oe=function(){return"[object Arguments]"===re.call(arguments)?function(e){return"[object Arguments]"===re.call(e)}:function(e){return s("callee",e)}}(),ie=oe,ae=!{toString:null}.propertyIsEnumerable("toString"),ue=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=function(){return arguments.propertyIsEnumerable("length")}(),ce=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},le="function"!=typeof Object.keys||se?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=se&&ie(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(ae)for(n=ue.length-1;n>=0;)s(t=ue[n],e)&&!ce(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),fe=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function de(t,n,r,o){if(ne(t,n))return!0;var i,a,u=fe(t);if(u!==fe(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ne(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ne(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=le(t);if(f.length!==le(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!s(p,n)||!de(n[p],t[p],d,h))return!1;l-=1}return!0}var he=r((function(e,t){return de(e,t,[],[])})),pe=l((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),ye=l((function e(t,n,r){return pe((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),ve=r((function(e,t){return ye((function(e,t,n){return n}),e,t)})),me=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ge(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ge(e[u],t,n,!0):e[u];return o};switch(fe(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 be,we=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ge(e,[],[],!0)})),_e=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Se=n((function(e){return!!_e(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))})),Ee=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Oe=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),xe=Oe,Ae="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",ke=l((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 h(e,t,n,"fantasy-land/reduce");if(null!=n[Ae])return d(e,t,n[Ae]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(be||(be={}));var Te=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=p((function(e){return"number"==typeof e}),"must be a number"),De=p((function(e){return"string"==typeof e}),"must be a string"),Ce=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Ne=i(618),Re=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Le=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Le.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Fe=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});j(Re.getState(),Le.getState()),Re.subscribe((function(e){return j(e,Le.getState())})),Le.subscribe((function(e){return j(Re.getState(),e)})),D(Re.getState(),Le.getState()),Re.subscribe((function(e){return D(e,Le.getState())})),Le.subscribe((function(e){return D(Re.getState(),e)})),P(Re.getState(),Le.getState()),Re.subscribe((function(e){return P(e,Le.getState())})),Le.subscribe((function(e){return P(Re.getState(),e)})),C(Re.getState(),Fe.getState(),Le.getState()),Re.subscribe((function(e){C(e,Fe.getState(),Le.getState())})),Fe.subscribe((function(e){C(Re.getState(),e,Le.getState())})),Le.subscribe((function(e){C(Re.getState(),Fe.getState(),e)}));var Ue=new Set;function Ge(e){return e.hasOwnProperty("_default")?x(O({},e),{_value:e._default,_source:"default"}):X(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ge(e[n]),t}),{}):{}}function ze(e,t){return X(e)?Object.keys(e).reduce((function(n,r){return n[r]=ze(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(){var o=u.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!X(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||He(e,a,i);var s=a._elements;if(Q(s)&&He(e,s,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(be).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(be).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),s&&y&&![be.Array,be.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){J(n,e._type,t),X(t)?e._type===be.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];Ve(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||Y(e,t,n):e._type===be.Array&&function(e,t,n){if(J(n,be.Array,t)){if(Q(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;J("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&Z(n,e._validators,t),X(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===be.Object&&e._elements?Ke(e._elements,c,l):Ke(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ke(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}var qe=function(e,t){var n=we(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Q(i))if(o._type===be.Array&&Array.isArray(r)){var u=r.map((function(e){return qe(i,e)}));n[t]=u}else if(o._type===be.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=qe(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(X(o)){var p=null!=r?r:{};X(p)&&(n[t]=qe(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},$e={"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:be.Object,_default:{},_validators:[p((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ".concat(t.join(", "),".")}))]}},We=O({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:be.Array,_default:[]}}},$e),Ye=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Je=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},Ze=Je([]),Qe=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Xe={inRange:Ye,isUrl:Ze,isUrlWithTemplateParameters:Je,oneOf:Qe}}(),a}())}}}))},863:function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},n=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=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},o=function(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}};System.register([],(function(e,n){return{execute:function(){e(function(){"use strict";var e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},u=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,s,"next",e)}function s(e){a(i,r,o,u,s,"throw",e)}u(void 0)}))}},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):(n=e,null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):l(n,r));var n,r},f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},d=function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},h=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},p=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},v=function(e){return X.apply(this,arguments)},m=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x)},g=function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x)},b=function(e){return _(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A)},w=function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A)},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");null==t&&(t={});var r=function(e){return k(e,Y)}(t),o=te("string"==typeof e?U(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}},S=function(e){return ee.apply(this,arguments)},E=function(e){return U(e)},O=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||c(e,Date)},x=function(e){return"boolean"==typeof e},A=function(e){return"number"==typeof e},k=function(e,t){var n={thisObj:void 0,variables:f({},e),globals:f({},t),addVariables:function(e){return this.variables=f({},this.variables,e),this}};return n.addVariables.bind(n),n},T=function(e){return function(t){return null===t?null:te(t,e)}},j=function(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}},P=function(e){return e?"MemberExpression"===e.type?null===(t=e.property)||void 0===t?void 0:t.name:e.name:null;var t},D=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},C=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},I=function(e){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){C(e,t,n[t])}))}return e},M=function(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");var t,n={globals:I({},J),isLocalExpression:!1,variables:new Set};return oe("string"==typeof e?U(e):e,n),function(e){if(Array.isArray(e))return D(e)}(t=n.variables)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},N=function(e){return function(t){return null===t?null:oe(t,e)}},R={d:function(e,t){for(var n in t)R.o(t,n)&&!R.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},L={};R.r(L),R.d(L,{compile:function(){return E},evaluate:function(){return p},evaluateAsBoolean:function(){return m},evaluateAsBooleanAsync:function(){return g},evaluateAsNumber:function(){return b},evaluateAsNumberAsync:function(){return w},evaluateAsType:function(){return _},evaluateAsTypeAsync:function(){return S},evaluateAsync:function(){return v},extractVariableNames:function(){return M},jsep:function(){return U}});var F=function(){function e(n){t(this,e),this.expr=n,this.index=0}return r(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find((function(e){return e.call(n.context,n),n.node})),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,a,u,s,c;if(!(a=this.gobbleToken()))return a;if(!(n=this.gobbleBinaryOp()))return a;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=[a,i,u];n=this.gobbleBinaryOp();){if(0===(r=e.binaryPrecedence(n))){this.index-=n.length;break}i={value:n,prec:r,right_a:e.right_associative.has(n)},c=n;for(var l=function(e){return i.right_a&&e.right_a?r>e.prec:r<=e.prec};o.length>2&&l(o[o.length-2]);)u=o.pop(),n=o.pop().value,a=o.pop(),t={type:e.BINARY_EXP,operator:n,left:a,right:u},o.push(t);(t=this.gobbleToken())||this.throwError("Expected expression after "+c),o.push(i,t)}for(t=o[s=o.length-1];s>1;)t={type:e.BINARY_EXP,operator:o[s-1].value,left:o[s-2],right:t},s-=2;return t}},{key:"gobbleToken",value:function(){var t,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"))return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(r=(n=this.expr.substr(this.index,e.max_unop_len)).length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:i,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}},{key:"gobbleTokenProperty",value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?((t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:"gobbleNumericLiteral",value:function(){for(var t,n,r="";e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(r+=this.expr.charAt(this.index++),"+"!==(t=this.char)&&"-"!==t||(r+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return n=this.code,e.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(n===e.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(r),raw:r}}},{key:"gobbleStringLiteral",value:function(){for(var t="",n=this.index,r=this.expr.charAt(this.index++),o=!1;this.index<this.expr.length;){var i=this.expr.charAt(this.index++);if(i===r){o=!0;break}if("\\"===i)switch(i=this.expr.charAt(this.index++),i){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=i}else t+=i}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:"gobbleIdentifier",value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:"gobbleArguments",value:function(t){for(var n=[],r=!1,o=0;this.index<this.expr.length;){this.gobbleSpaces();var i=this.code;if(i===t){r=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===e.COMMA_CODE){if(this.index++,++o!==n.length)if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(var a=n.length;a<o;a++)n.push(null)}else if(n.length!==o&&0!==o)this.throwError("Expected comma");else{var u=this.gobbleExpression();u&&u.type!==e.COMPOUND||this.throwError("Expected comma"),n.push(u)}}return r||this.throwError("Expected "+String.fromCharCode(t)),n}},{key:"gobbleGroup",value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:e.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}},{key:"gobbleArray",value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:"version",get:function(){return"1.3.9"}},{key:"toString",value:function(){return"JavaScript Expression Parser (JSEP) v"+e.version}},{key:"addUnaryOp",value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:"addBinaryOp",value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:"addIdentifierChar",value:function(t){return e.additional_identifier_chars.add(t),e}},{key:"addLiteral",value:function(t,n){return e.literals[t]=n,e}},{key:"removeUnaryOp",value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:"removeAllUnaryOps",value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:"removeIdentifierChar",value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:"removeBinaryOp",value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:"removeAllBinaryOps",value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:"removeLiteral",value:function(t){return delete e.literals[t],e}},{key:"removeAllLiterals",value:function(){return e.literals={},e}},{key:"parse",value:function(t){return new e(t).parse()}},{key:"getMaxKeyLen",value:function(e){var t;return(t=Math).max.apply(t,[0].concat(o(Object.keys(e).map((function(e){return e.length})))))}},{key:"isDecimalDigit",value:function(e){return e>=48&&e<=57}},{key:"binaryPrecedence",value:function(t){return e.binary_ops[t]||0}},{key:"isIdentifierStart",value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:"isIdentifierPart",value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}]),e}(),B=new(function(){function e(){t(this,e)}return r(e,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}]),e}());Object.assign(F,{hooks:B,plugins:new(function(){function e(n){t(this,e),this.jsep=n,this.registered={}}return r(e,[{key:"register",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this;t.forEach((function(e){if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");r.registered[e.name]||(e.init(r.jsep),r.registered[e.name]=e)}))}}]),e}())(F),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),F.max_unop_len=F.getMaxKeyLen(F.unary_ops),F.max_binop_len=F.getMaxKeyLen(F.binary_ops);var U=function(e){return new F(e).parse()},G=Object.getOwnPropertyNames((function e(){t(this,e)}));Object.getOwnPropertyNames(F).filter((function(e){return!G.includes(e)&&void 0===U[e]})).forEach((function(e){U[e]=F[e]})),U.Jsep=F,U.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}});var z,H,V="ArrowFunctionExpression",K={name:"arrow",init:function(e){function t(n){n&&(Object.values(n).forEach((function(e){e&&"object"==typeof e&&t(e)})),"=>"===n.operator&&(n.type=V,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",(function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){var n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;var r=this.gobbleBinaryOp();if("=>"===r){var o=this.gobbleBinaryExpression();return o||this.throwError("Expected expression after "+r),void(t.node={type:V,params:null,body:o})}}this.index=n}})),e.hooks.add("after-expression",(function(e){t(e.node)}))}},q={name:"numbers",init:function(e){var t=function(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null},n=function(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8},r=function(e,t){return 95===e||t.some((function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||i(e,2)||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.")}()}(t),r=n[0],o=n[1];return e>=r&&e<=o}))},o=function(t){var n=this,r=this.index,o="",i=function(){for(;e.isDecimalDigit(n.code)||95===n.code;)95===n.code?n.index++:o+=n.expr.charAt(n.index++)};i(),this.code===e.PERIOD_CODE&&(o+=this.expr.charAt(this.index++),i());var a=this.char;"e"!==a&&"E"!==a||(o+=this.expr.charAt(this.index++),"+"!==(a=this.char)&&"-"!==a||(o+=this.expr.charAt(this.index++)),i(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+o+this.char+")"));var u=this.code;if(e.isIdentifierStart(u))this.throwError("Variable names cannot start with a number ("+o+this.char+")");else if(u===e.PERIOD_CODE)return o.length>1&&this.throwError("Unexpected period ".concat(JSON.stringify({chCode:u,number:o},null,2))),void(this.index=r);t.node={type:e.LITERAL,value:parseFloat(o),raw:this.expr.substring(r,this.index)}};e.hooks.add("gobble-token",(function(i){if(48===this.code){var a=this.index,u=this.expr.charAt(this.index+1),s=t.call(this,u);if(!s)return;for(var c="";r(this.code,s);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0)))return this.index=a+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(c,n(u)),raw:this.expr.substring(a,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)}))}},$={name:"regex",init:function(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(47===this.code&&!r){for(var o=this.expr.slice(n,this.index),i=void 0,a="";++this.index<this.expr.length;){var u=this.code;if(!(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57))break;a+=this.char}try{i=new RegExp(o,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}},W={name:"jsepTemplateLiteral",init:function(e){var t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(96===this.code){for(var n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",i="",a=!1,u=this.expr.length,s=function(){return n.quasis.push({type:"TemplateElement",value:{raw:i,cooked:r},tail:a})};this.index<u;){var c,l=this.expr.charAt(++this.index);if("`"===l)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===l&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),i="",r="",(c=n.expressions).push.apply(c,o(this.gobbleExpressions(125))),125!==this.code&&this.throwError("unclosed ${");else if("\\"===l)switch(i+=l,l=this.expr.charAt(++this.index),i+=l,l){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=l}else r+=l,i+=l}this.throwError("Unclosed `")}};e.hooks.add("gobble-token",t),e.hooks.add("after-token",(function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node}))}},Y={Array,Boolean,Symbol,Infinity:1/0,NaN:NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},J=(z=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){e(t,n,r[n])}))}return t}({},Y),H=null!=(H={Promise})?H:{},Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(H)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(H)).forEach((function(e){Object.defineProperty(z,e,Object.getOwnPropertyDescriptor(H,e))})),z);function Z(e,t,n){return Z=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Q(o,n.prototype),o},Z.apply(null,arguments)}function Q(e,t){return Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Q(e,t)}function X(){return X=u((function(e){var t=arguments;return h(this,(function(n){return[2,S(e,t.length>1&&void 0!==t[1]?t[1]:{},O)]}))})),X.apply(this,arguments)}function ee(){return ee=u((function(e){var t,n,r,o=arguments;return h(this,(function(i){return t=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2?o[2]:void 0,"string"==typeof e||"object"==typeof e&&e&&"type"in e?(null==t&&(t={}),r=function(e){return k(e,J)}(t),[2,Promise.resolve(te("string"==typeof e?U(e):e,r)).then((function(t){if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}}))]):[2,Promise.reject("Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string."))]}))})),ee.apply(this,arguments)}function te(e,t){switch(e.type){case"UnaryExpression":return function(e,t){var n=te(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw"Expression evaluator does not support operator '".concat(e.operator,"''")}}(e,t);case"BinaryExpression":return function(e,t){var n=te(e.left,t),r=te(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return Math.pow(n,r);case"==":return n==r;case"===":return n===r;case"!=":return n!=r;case"!==":return n!==r;case">":return n>r;case">=":return n>=r;case"<":return n<r;case"<=":return n<=r;case"in":return n in r;case"&&":return n&&r;case"||":return n||r;case"??":return null!=n?n:r;default:throw"Expression evaluator does not support operator '".concat(e.operator,"' operator")}}(e,t);case"ConditionalExpression":return function(e,t){var n=te(e.test,t);return te(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(T(t)),o=te(e.callee,t);if(!o)throw"No function named ".concat(P(e.callee)," is defined in this context");if("function"!=typeof o)throw"".concat(P(e.callee)," is not a function");return o.apply(void 0,d(r))}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o,i=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map((function(e){if("Identifier"===e.type)return e.name;throw"Cannot handle parameter of type ".concat(e.type)})))&&void 0!==r?r:[];return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r.length<i.length)throw"Required argument(s) ".concat(i.slice(r.length,-1).join(", ")," were not provided");var a=Object.fromEntries(i.reduce((function(e,t,n){var o=r[n];return re(o)&&e.push([t,o]),e}),[]));return te(e.body,t.addVariables(a))}.bind(null!==(o=t.thisObj)&&void 0!==o?o:null)}(e,t);case"MemberExpression":return function(e,t){var n=te(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":var r=ne(e.object,t);throw ReferenceError("ReferenceError: ".concat(r," is not defined"));case"MemberExpression":var o=ne(e.property,t);throw TypeError("TypeError: cannot read properties of undefined (reading '".concat(o,"')"));default:throw"VisitMemberExpression does not support operator '".concat(e.object.type,"' type")}var i,a=n;if("string"==typeof n)a=String.prototype;else if("number"==typeof n)a=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type ".concat(void 0===n?"undefined":function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":y(t);var t}(n));switch(t.thisObj=a,e.property.type){case"Identifier":case"MemberExpression":i=te(e.property,t);break;default:var u=te(e.property,t);if(void 0===u)throw{type:"Illegal property access",message:"No property was supplied to the property access"};j(u),i=n[u]}return"function"==typeof i?i.bind(n):i}(e,t);case"ArrayExpression":return function(e,t){var n;return null===(n=e.elements)||void 0===n?void 0:n.map(T(t))}(e,t);case"SequenceExpression":return function(e,t){var n=e.expressions.map(T(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';var n,r=null===(n=e.arguments)||void 0===n?void 0:n.map(T(t));switch(e.callee.name){case"Date":return Z(Date,d(r));case"RegExp":return Z(RegExp,d(r));default:throw"Cannot instantiate object of type ".concat(e.callee.name)}}(e,t);case"Literal":return function(e,t){return j(e.value),e.value}(e);case"Identifier":return function(e,t){j(e.name);var n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){var r=n[e.name];return j(r),r}if(t.variables&&e.name in t.variables){var o=t.variables[e.name];return j(o),o}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){var n,r,o,i,a=null!==(o=null===(n=e.expressions)||void 0===n?void 0:n.map(T(t)))&&void 0!==o?o:[],u=null!==(i=null===(r=e.quasis)||void 0===r?void 0:r.map(T(t)))&&void 0!==i?i:[];return u.filter((function(e){return!e.tail})).map((function(e){return e.value})).join("")+a.join("")+u.filter((function(e){return e.tail})).map((function(e){return e.value})).join("")}(e,t);case"TemplateElement":return function(e,t){return{value:e.cooked,tail:e.tail}}(e);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}function ne(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ne(e.property,t);default:throw"VisitExpressionName does not support expression of type '".concat(e.type,"'")}}function re(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||c(e,RegExp))return!0;if("object"==typeof e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(!re(e[o.value]))return!1}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!0}if(Array.isArray(e)){var a=!0,u=!1,s=void 0;try{for(var l,f=e[Symbol.iterator]();!(a=(l=f.next()).done);a=!0)if(!re(l.value))return!1}catch(e){u=!0,s=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw s}}}return!1}function oe(e,t){switch(e.type){case"UnaryExpression":return function(e,t){return oe(e.argument,t)}(e,t);case"BinaryExpression":return function(e,t){return[oe(e.left,t),oe(e.right,t)].filter(Boolean)}(e,t);case"ConditionalExpression":return function(e,t){return[oe(e.consequent,t),oe(e.test,t),oe(e.alternate,t)].filter(Boolean)}(e,t);case"CallExpression":return function(e,t){var n,r=oe(e.callee,t);return null===(n=e.arguments)||void 0===n||n.map(N(t)),r}(e,t);case"ArrowFunctionExpression":return function(e,t){var n,r,o=I({},t);o.isLocalExpression=!0;var i,a=null!==(r=null===(n=e.params)||void 0===n?void 0:n.map(N(o)))&&void 0!==r?r:[],u=null!==(i=oe(e.body,o))&&void 0!==i?i:[];if(u&&Array.isArray(u)){var s=!0,c=!1,l=void 0;try{for(var f,d=u[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;a.includes(h)||t.variables.add(h)}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}(e,t);case"MemberExpression":return function(e,t){oe(e.object,t);var n=I({},t);n.isLocalExpression=!0,oe(e.property,n)}(e,t);case"ArrayExpression":return function(e,t){var n;null===(n=e.elements)||void 0===n||n.map(N(t))}(e,t);case"SequenceExpression":return function(e,t){var n;null===(n=e.expressions)||void 0===n||n.map(N(t))}(e,t);case"NewExpression":return function(e,t){var n;null===(n=e.arguments)||void 0===n||n.map(N(t))}(e,t);case"Literal":case"TemplateElement":return;case"Identifier":return function(e,t){if(!(e.name in t.globals)){if(t.isLocalExpression)return e.name;t.variables.add(e.name)}}(e,t);case"TemplateLiteral":return function(e,t){var n,r;null===(n=e.expressions)||void 0===n||n.map(N(t)),null===(r=e.quasis)||void 0===r||r.map(N(t))}(e,t);default:throw"Expression evaluator does not support expression of type '".concat(e.type,"'")}}return U.plugins.register(K),U.plugins.register({name:"new",init:function(e){e.addUnaryOp("new"),e.hooks.add("after-token",(function(t){var n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;for(var r=t.node;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}}))}}),U.plugins.register(q),U.plugins.register($),U.plugins.register({name:"ternary",init:function(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){for(var i=n;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=n}}else this.throwError("Expected :")}}))}}),U.plugins.register(W),U.addBinaryOp("in",7),U.addBinaryOp("??",1),L}())}}}))},570:function(){System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;h.setState((function(u){var s;return{flags:i(n({},u.flags),t({},e,{enabled:null!==(a=null===(s=u.flags[e])||void 0===s?void 0:s.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},u=function(){var e=h.getState().flags;Object.keys(localStorage).filter((function(e){return e.startsWith("openmrs:feature-flag:")})).forEach((function(t){var n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem("openmrs:feature-flag-meta:".concat(n)))}))},s=function(e){return h.getState().flags[e].enabled},c=function(e,t){h.subscribe((function(n){t(n.flags[e].enabled)}))},l=function(e,r){h.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{cleanupObsoleteFeatureFlags:function(){return u},featureFlagsStore:function(){return h},getFeatureFlag:function(){return s},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return l},subscribeToFeatureFlag:function(){return c}});var f=r(685),d={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;if(u.startsWith("openmrs:feature-flag:")){var s=u.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=n({enabled:"true"===localStorage.getItem(u)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},h=(0,f.getGlobalStore)("feature-flags",d);h.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=function(e){if(Array.isArray(e))return e}(n=a.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],l=s[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}))}(),o}())}}}))},103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))},t=function(e){if(!window.offlineEnabled)return function(){};var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},n=function(e){return e({online:!window.offlineEnabled||navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(v,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},i=function(e){window.dispatchEvent(new CustomEvent(m,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))},u=function(e){window.dispatchEvent(new CustomEvent(w,{detail:e}))},s=function(e){window.dispatchEvent(new CustomEvent(b,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(m,t),function(){return window.removeEventListener(m,t)}},l=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(g,t),function(){return window.removeEventListener(g,t)}},f=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(b,t),function(){return window.removeEventListener(b,t)}},d=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(w,t),function(){return window.removeEventListener(w,t)}},h={d:function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},p={};h.r(p),h.d(p,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},dispatchSnackbarShown:function(){return u},dispatchToastShown:function(){return s},subscribeActionableNotificationShown:function(){return l},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return o},subscribeSnackbarShown:function(){return d},subscribeToastShown:function(){return f}});var y="openmrs:connectivity-changed",v="openmrs:precache-static-dependencies",m="openmrs:notification-shown",g="openmrs:actionable-notification-shown",b="openmrs:toast-shown",w="openmrs:snack-bar-shown";return p}())}}}))},593:function(e,t,n){var r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},i=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)}},a=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e},u=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},s=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e},f=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||v(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.")}()},h=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},v=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}};System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){"use strict";var e={766:function(e){e.exports=r},685:function(e){e.exports=i}},t={};function l(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,l),o.exports}l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return function(){var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},v=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},m=function(){},g=function(e,t){if(!t)return e&&e.then?e.then(m):Promise.resolve()},b=function(e,t){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Cn(e,t);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},w=function(){return null!=In?In:Promise.resolve(void 0)},S=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},E=function(e){return Ln.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},x=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},k=function(){return Fn.apply(this,arguments)},T=function(){return Bn.apply(this,arguments)},j=function(){return Un.apply(this,arguments)},P=function(){return Gn.apply(this,arguments)},D=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},C=function(e){"unavailable"!==Hn&&"unavailable"!==e&&(localStorage.setItem(zn,"on"===e?"active":"disabled"),Hn=e)},I=function(){return Vn.apply(this,arguments)},M=function(e,t){return"object"!=typeof t||qn(t).forEach((function(n){e[n]=t[n]})),e},N=function(e,t){return Yn.call(e,t)},R=function(e,t){"function"==typeof t&&(t=t(Wn(e))),("undefined"==typeof Reflect?qn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Jn(e,t,M(n&&N(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},F=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:R.bind(null,e.prototype)}}}},B=function(e,t,n){return Xn.call(e,t,n)},U=function(e,t){return t(e)},G=function(e){if(!e)throw new Error("Assertion Failed")},z=function(e){Kn.setImmediate?setImmediate(e):setTimeout(e,0)},H=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},V=function(e){var t={};for(var n in e)N(e,n)&&(t[n]=e[n]);return t},K=function(e){return nr.apply([],e)},q=function(e){ir="undefined"!=typeof WeakMap&&new WeakMap;var t=ar(e);return ir=null,t},$=function(e){return ur.call(e).slice(8,-1)},W=function(e){var t,n,r,o;if(1===arguments.length){if($n(e))return e.slice();if(this===lr&&"string"==typeof e)return[e];if(o=cr(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},Y=function(e,t){dr=e,hr=t},J=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(hr).map((function(e){return"\n"+e})).join("")):""},Z=function(e,t){this._e=yr(),this.name=e,this.message=t},Q=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},X=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Q(e,t)},ee=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Q(e,t)},te=function(){},ne=function(e){return e},re=function(e,t){return null==e||e===ne?t:function(n){return t(e(n))}},oe=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},ie=function(e,t){return e===te?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?oe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?oe(o,this.onerror):o),void 0!==i?i:n}},ae=function(e,t){return e===te?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?oe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?oe(r,this.onerror):r)}},ue=function(e,t){return e===te?t:function(n){var r=e.apply(this,arguments);M(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?oe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?oe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:M(r,a)}},se=function(e,t){return e===te?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(e,t){return e===te?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)}},le=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=te,this._lib=!1;var t=this._PSD=zr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Or)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&de(this,this._value))}this._state=null,this._value=null,++t.ref,$r(this,e)},fe=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},de=function(e,t){if(Fr.push(t),null===e._state){var n=e._lib&&ge();t=Ur(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=Qn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Cr?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){Lr.some((function(t){return t._value===e._value}))||Lr.push(e)}(e),he(e),n&&be()}},he=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Vr&&(++Vr,Mr((function(){0==--Vr&&we()}),[]))},pe=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Vr,Mr(ye,[n,e,t])}else e._listeners.push(t)},ye=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Fr.length&&(Fr=[]),r=e(o),-1===Fr.indexOf(o)&&function(e){for(var t=Lr.length;t;)if(Lr[--t]._value===e._value)return void Lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--Vr&&we(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},me=function(){ge()&&be()},ge=function(){var e=Nr;return Nr=!1,Rr=!1,e},be=function(){var e,t,n;do{for(;Hr.length>0;)for(e=Hr,Hr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Hr.length>0);Nr=!0,Rr=!0},we=function(){var e=Lr;Lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Kr.slice(0),n=t.length;n;)t[--n]()},_e=function(e){return new le(Or,!1,e)},Se=function(e,t){var n=zr;return function(){var r=ge(),o=zr;try{return je(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{je(o,!1),r&&be()}}},Ee=function(e,t,n,r){var o=zr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var a=Gr.env;i.env=Dr?{Promise:le,PromiseProp:{value:le,configurable:!0,writable:!0},all:le.all,race:le.race,allSettled:le.allSettled,any:le.any,resolve:le.resolve,reject:le.reject,nthen:Me(a.nthen,i),gthen:Me(a.gthen,i)}:{},t&&M(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=De(i,e,n,r);return 0===i.ref&&i.finalize(),u},Oe=function(){return Yr.id||(Yr.id=++Jr),++Yr.awaits,Yr.echoes+=100,Yr.id},xe=function(){return!!Yr.awaits&&(0==--Yr.awaits&&(Yr.id=0),Yr.echoes=100*Yr.awaits,!0)},Ae=function(e){return Yr.echoes&&e&&e.constructor===Pr?(Oe(),e.then((function(e){return xe(),e}),(function(e){return xe(),to(e)}))):e},ke=function(e){++Xr,Yr.echoes&&0!=--Yr.echoes||(Yr.echoes=Yr.id=0),Zr.push(zr),je(e,!0)},Te=function(){var e=Zr[Zr.length-1];Zr.pop(),je(e,!1)},je=function(e,t){var n=zr;if((t?!Yr.echoes||Qr++&&e===zr:!Qr||--Qr&&e===zr)||Ce(t?ke.bind(null,e):Te),e!==zr&&(zr=e,n===Gr&&(Gr.env=Pe()),Dr)){var r=Gr.env.Promise,o=e.env;kr.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Kn,"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))}},Pe=function(){var e=Kn.Promise;return Dr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Kn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:kr.then,gthen:e.prototype.then}:{}},De=function(e,t,n,r,o){var i=zr;try{return je(e,!0),t(n,r,o)}finally{je(i,!1)}},Ce=function(e){jr.call(Ar,e)},Ie=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=zr;n&&Oe(),je(t,!0);try{return e.apply(this,arguments)}finally{je(o,!1),r&&Ce(xe)}}},Me=function(e,t){return function(n,r){return e.call(this,Ie(n,t),Ie(r,t))}},Ne=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Kn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),M(r,o)):Kn.CustomEvent&&M(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Kn.dispatchEvent&&(dispatchEvent(r),!Kn.PromiseRejectionEvent&&Kn.onunhandledrejection))try{Kn.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Re=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=q(t))[e],t}},Fe=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){qn(e).forEach((function(t){var n=e[t];if($n(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new _r.InvalidArgument("Invalid event config");var r=i(t,ne,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){z((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=se),o||(o=te);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}},Be=function(e,t){return F(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Ge=function(e,t){e.filter=Re(e.filter,t)},ze=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Re(r(),t())}:t,e.justLimit=n&&!r},He=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new _r.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ve=function(e,t,n){var r=He(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},Ke=function(e,t,n,r){var o=e.replayFilter?Re(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),N(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),qe(Ve(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return qe(Ve(e,r,n),Re(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},qe=function(e,t,n,r){var o=Se(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=te}),(function(t){e.fail(t),n=te}))||o(e.value,e,(function(e){return n=e})),n()}))}))},$e=function(e){var t=void 0===e?"undefined":p(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=$(e);return"ArrayBuffer"===n?"binary":n},We=function(e){return s(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ye=function(e,t){return e<t?-1:e===t?0:1},Je=function(e,t){return e>t?-1:e===t?0:1},Ze=function(e,t,n){var r=s(e,vo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Qe=function(e){return new e.Collection(e,(function(){return nt("")})).limit(0)},Xe=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},et=function(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Ze(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Ye:Je;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(function(){return tt(u[0],s[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,s,p))return!0;for(var h=null,y=p;y<f;++y){var v=Xe(o,d,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},tt=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},nt=function(e){return{type:1,lower:e,upper:e}},rt=function(e){return Se((function(t){return ot(t),e(t.target.error),!1}))},ot=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},it=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+at(t)}},at=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ut=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:H(n,(function(e){return[e.name,e]}))}},st=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return er(t,e)}}(e):function(t){return er(t,e)}},ct=function(e){return[].slice.call(e)},lt=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},ft=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return c({},e,(0,t.create)(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");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=ct(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=$n(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:st(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:$n(o),keyPath:o,unique:n,multiEntry:r,extractKey:st(o)};return i[lt(o)]=a,a})),getIndexByKeyPath:function(e){return i[lt(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[lt(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),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=Se(e);var c=n.objectStore(t),l=null==c.keyPath,f="put"===o||"add"===o;if(!f&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var h,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ot(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(h=c.clear()):y.push(h=c.delete(r(u)))}else{var b=d(f?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(f)for(var S=0;S<p;++S)y.push(h=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),h.onerror=g;else for(var E=0;E<p;++E)y.push(h=c[o](w[E])),h.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};h.onerror=function(e){g(e),O(e)},h.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=Se(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=rt(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=Se(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=rt(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=Se(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=rt(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=rt(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=Se(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=rt(s),p.onsuccess=Se((function(t){var r=p.result;if(r){r.___id=++wo,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Se(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Se(e),p.onerror=rt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=Se((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=Se((function(t){return e(t.target.result)})),l.onerror=rt(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:bo(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),s(n[t],n.Table)&&(n[t].core=e.core))}))},dt=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Qn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||s(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Jn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},ht=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)s(e[t],n.Table)&&delete e[t]}))},pt=function(e,t){return e._cfg.version-t._cfg.version},yt=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return mt(o,e)})),o},mt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},gt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=it(at(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=it(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=ut(e,i,a)})),r},bt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var l=u.indexNames[c],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Kn.WorkerGlobalScope&&s(Kn,Kn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},wt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Do("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},_t=function(e){return e&&"function"==typeof e.databases},St=function(e){return Ee((function(){return zr.letThrough=!0,e()}))},Et=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},Ot=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):$n(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},xt=function(e,t,n){var r=arguments.length;if(r<2)throw new _r.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,K(o),n]},At=function(e,t,n){for(var r=$n(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},kt=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Tt=function(e){return!("from"in e)},jt=function(e,t){Tt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;To(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Pt=function(e){var t=Tt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||ho(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Dt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=c({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Ct(a)}e.d=Ct(e)},Ct=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},It=function(e,t){return qn(t).forEach((function(n){jt(e[n]||(e[n]=new ko),t[n])})),e},Mt=function(e){var t=No;try{No=!0,mo.storagemutated.fire(e)}finally{No=t}},Nt=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Rt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Lt=function(){return new zo},Ft=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Bt=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},Ut=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bt(i,r,o,a,u,"next",e)}function u(e){Bt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Gt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},zt=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){Gt(e,t,n[t])}))}return e},Ht=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Vt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Kt=function(){return Ko},qt=function(){return qo.apply(this,arguments)},$t=function(){return Wo.apply(this,arguments)},Wt=function(e,t,n,r){return Yo.apply(this,arguments)},Yt=function(e,t,n){return Jo.apply(this,arguments)},Jt=function(e,t){return Zo.apply(this,arguments)},Zt=function(e,t){return Qo.apply(this,arguments)},Qt=function(e){return Xo.apply(this,arguments)},Xt=function(e){return ei.apply(this,arguments)},en=function(e){return ti.apply(this,arguments)},tn=function(e){var t;return!!(null===(t=Vo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},nn=function(e){return ni.apply(this,arguments)},rn=function(e){return ri.apply(this,arguments)},on=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Vo[e]={type:e,dependsOn:t,process:n,options:r}},an=function(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(ai)},un=function(){return li+ci()},sn=function(e){return e.startsWith(li)},cn=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ln=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},fn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ln(i,r,o,a,u,"next",e)}function u(e){ln(i,r,o,a,u,"throw",e)}a(void 0)}))}},dn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},hn=function(){return Object.values(fi)},pn=function(e){fi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),fi[e.id]=e},yn=function(e){return di.apply(this,arguments)},vn=function(e,t){return hi.apply(this,arguments)},mn=function(e,t){return pi.apply(this,arguments)},gn=function(e,t,n){return yi.apply(this,arguments)},bn=function(e,t){return vi.apply(this,arguments)},wn=function(e,t,n){return mi.apply(this,arguments)},_n=function(e,t){return gi.apply(this,arguments)},Sn=function(e,t,n){return bi.apply(this,arguments)},En=function(){return wi.apply(this,arguments)},On=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},xn=function(){return Tn(),_i},An=function(e,t){Tn(),pn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},kn=function(e){return Si.apply(this,arguments)},Tn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};l.r(y),l.d(y,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return nn},canBeginEditSynchronizationItemsOfType:function(){return tn},deleteSynchronizationItem:function(){return rn},generateOfflineUuid:function(){return un},getCurrentOfflineMode:function(){return D},getDynamicOfflineDataEntries:function(){return yn},getDynamicOfflineDataEntriesFor:function(){return vn},getDynamicOfflineDataHandlers:function(){return hn},getFullSynchronizationItems:function(){return Xt},getFullSynchronizationItemsFor:function(){return Zt},getOfflineDb:function(){return Lt},getOfflinePatientDataStore:function(){return xn},getOfflineSynchronizationStore:function(){return Kt},getOmrsServiceWorker:function(){return w},getSynchronizationItem:function(){return en},getSynchronizationItems:function(){return Qt},getSynchronizationItemsFor:function(){return Jt},isOfflineUuid:function(){return sn},messageOmrsServiceWorker:function(){return E},offlineUuidPrefix:function(){return li},omrsOfflineCachingStrategyHttpHeaderName:function(){return Rn},omrsOfflineResponseBodyHttpHeaderName:function(){return Mn},omrsOfflineResponseStatusHttpHeaderName:function(){return Nn},putDynamicOfflineData:function(){return mn},putDynamicOfflineDataFor:function(){return gn},queueSynchronizationItem:function(){return Yt},queueSynchronizationItemFor:function(){return Wt},registerOfflinePatientHandler:function(){return An},registerOmrsServiceWorker:function(){return b},removeDynamicOfflineData:function(){return bn},removeDynamicOfflineDataFor:function(){return wn},runSynchronization:function(){return qt},setCurrentOfflineMode:function(){return C},setupDynamicOfflineDataHandler:function(){return pn},setupOfflineSync:function(){return on},syncAllDynamicOfflineData:function(){return _n},syncDynamicOfflineData:function(){return Sn},syncOfflinePatientData:function(){return kn}});try{self["workbox:window:6.5.4"]&&_()}catch(e){}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var jn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Pn=function(e,t){this.type=e,Object.assign(this,t)},Dn={type:"SKIP_WAITING"},Cn=function(t){var n,r,o=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new jn,r.en=new jn,r.on=new jn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Pn(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Pn("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 Pn("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 v(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Pn("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t=(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 g(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),v(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&&i(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Pn("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)}},u.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return v(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Dn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=v(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return v(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)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){var e=function(){this.Pn=new Map},t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),In=void 0,Mn="x-omrs-offline-response-body",Nn="x-omrs-offline-response-status",Rn="x-omrs-offline-caching-strategy";function Ln(){return Ln=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){S(i,r,o,a,u,"next",e)}function u(e){S(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){var t,n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(r){switch(r.label){case 0:return[4,w()];case 1:return(t=r.sent())?[4,t.messageSW(e)]:[3,3];case 2:return n=r.sent(),[3,4];case 3:n={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."},r.label=4;case 4:return[2,n]}}))})),Ln.apply(this,arguments)}function Fn(){return Fn=x((function(){var e;return A(this,(function(t){e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return[2,!0]}return[2,!1]}))})),Fn.apply(this,arguments)}function Bn(){return(Bn=x((function(){return A(this,(function(e){return[2,!window.indexedDB]}))}))).apply(this,arguments)}function Un(){return Un=x((function(){return A(this,(function(e){return[2,new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}}))]}))})),Un.apply(this,arguments)}function Gn(){return(Gn=x((function(){var e,t;return A(this,(function(n){switch(n.label){case 0:return[4,j()];case 1:return(t=n.sent())?[3,3]:[4,T()];case 2:t=n.sent(),n.label=3;case 3:return(e=t)?[3,5]:[4,k()];case 4:e=n.sent(),n.label=5;case 5:return[2,e]}}))}))).apply(this,arguments)}var zn="openmrs3:offline-mode",Hn="unavailable";function Vn(){return(Vn=x((function(){return A(this,(function(e){switch(e.label){case 0:return[4,P()];case 1:return e.sent()||(Hn="active"===localStorage.getItem(zn)?"on":"off"),navigator.onLine,[2]}}))}))).apply(this,arguments)}var Kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,qn=Object.keys,$n=Array.isArray;"undefined"==typeof Promise||Kn.Promise||(Kn.Promise=Promise);var Wn=Object.getPrototypeOf,Yn={}.hasOwnProperty,Jn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor;function Qn(e,t){var n;return Zn(e,t)||(n=Wn(e))&&Qn(n,t)}var Xn=[].slice;function er(e,t){if(N(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=er(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:er(u,t.substr(a+1))}}function tr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){G("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)tr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?$n(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&N(e,a)||(s=e[a]={}),tr(s,u,n)}}else void 0===n?$n(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var nr=[].concat,rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(K([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return Kn[e]})),or=rr.map((function(e){return Kn[e]}));H(rr,(function(e){return[e,!0]}));var ir=null;function ar(e){if(!e||"object"!=typeof e)return e;var t=ir&&ir.get(e);if(t)return t;if($n(e)){t=[],ir&&ir.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ar(e[n]))}else if(or.indexOf(e.constructor)>=0)t=e;else{var o=Wn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ir&&ir.set(e,t),e)N(e,i)&&(t[i]=ar(e[i]))}return t}var ur={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",cr="symbol"==(void 0===sr?"undefined":p(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},lr={},fr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},pr=!new Error("").stack;function yr(){if(pr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var vr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vr),gr={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"};F(Z).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+J(this._e,2))}},toString:function(){return this.name+": "+this.message}}),F(X).from(Z),F(ee).from(Z);var br=mr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),wr=Z,_r=mr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=gr[t]||r,this.inner=null)},r=t+"Error";return F(n).from(wr),e[t]=n,e}),{});_r.Syntax=SyntaxError,_r.Type=TypeError,_r.Range=RangeError;var Sr=vr.reduce((function(e,t){return e[t+"Error"]=_r[t],e}),{}),Er=mr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=_r[t]),e}),{});Er.ModifyError=X,Er.DexieError=Z,Er.BulkError=ee;var Or={},xr=d("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Wn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Wn(t),e]}(),3),Ar=xr[0],kr=xr[1],Tr=xr[2],jr=kr&&kr.then,Pr=Ar&&Ar.constructor,Dr=!!Tr,Cr=!1,Ir=Tr?function(){Tr.then(me)}:Kn.setImmediate?setImmediate.bind(null,me):Kn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){me(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(me,0)},Mr=function(e,t){Hr.push([e,t]),Rr&&(Ir(),Rr=!1)},Nr=!0,Rr=!0,Lr=[],Fr=[],Br=null,Ur=ne,Gr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ne,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Ne(e[0],e[1])}catch(e){}}))}},zr=Gr,Hr=[],Vr=0,Kr=[],qr={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==zr||n!==Xr),a=i&&!xe(),u=new le((function(n,u){pe(o,new fe(Ie(e,t,i,a),Ie(r,t,i,a),n,u,t))}));return dr&&ve(u,this),u},t=zr,n=Xr;return e.prototype=Or,e},set:function(e){L(this,"then",e&&e.prototype===Or?qr:{get:function(){return e},set:qr.set})}};function $r(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ge();t&&"function"==typeof t.then?$r(e,(function(e,n){s(t,le)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,he(e)),n&&be()}}),de.bind(null,e))}catch(t){de(e,t)}}function Wr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=J(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=J(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Wr(e._prev,t,n)),t}R(le.prototype,{then:qr,_then:function(e,t){pe(this,new fe(null,null,e,t,zr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return s(e,t)?n(e):_e(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):_e(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),_e(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Cr=!0;var e=Wr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Cr=!1}}},timeout:function(e,t){var n=this;return e<1/0?new le((function(r,o){var i=setTimeout((function(){return o(new _r.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(le.prototype,Symbol.toStringTag,"Dexie.Promise"),Gr.env=Pe(),R(le,{all:function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return le.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(s(e,le))return e;if(e&&"function"==typeof e.then)return new le((function(t,n){e.then(t,n)}));var t=new le(Or,!0,e);return ve(t,Br),t},reject:_e,race:function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){e.map((function(e){return le.resolve(e).then(t,n)}))}))},PSD:{get:function(){return zr},set:function(e){return zr=e}},totalEchoes:{get:function(){return Xr}},newPSD:Ee,usePSD:De,scheduler:{get:function(){return Mr},set:function(e){Mr=e}},rejectionMapper:{get:function(){return Ur},set:function(e){Ur=e}},follow:function(e,t){return new le((function(n,r){return Ee((function(t,n){var r=zr;r.unhandleds=[],r.onunhandled=n,r.finalize=oe((function(){var e=this;!function(e){Kr.push((function t(){e(),Kr.splice(Kr.indexOf(t),1)})),++Vr,Mr((function(){0==--Vr&&we()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Pr&&(Pr.allSettled&&L(le,"allSettled",(function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return le.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Pr.any&&"undefined"!=typeof AggregateError&&L(le,"any",(function(){var e=W.apply(null,arguments).map(Ae);return new le((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return le.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var Yr={awaits:0,echoes:0,id:0},Jr=0,Zr=[],Qr=0,Xr=0,eo=0;-1===(""+jr).indexOf("[native code]")&&(Oe=xe=te);var to=le.reject;function no(e,t,n,r){if(e.idbdb&&(e._state.openComplete||zr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return no(e,t,n,r)}))):to(o)}return o._promise(t,(function(e,t){return Ee((function(){return zr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return to(new _r.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return to(new _r.DatabaseClosed);e.open().catch(te)}return e._state.dbReadyPromise.then((function(){return no(e,t,n,r)}))}var ro=String.fromCharCode(65535),oo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",io=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),uo=ao,so=ao,co=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},lo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},fo=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new _r.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||zr.trans,i=this.name,a=ge();try{return o&&o.db===this.db?o===zr.trans?o._promise(e,r,n):Ee((function(){return o._promise(e,r,n)}),{trans:o,transless:zr.transless||zr}):no(this.db,e,[this.name],r)}finally{a&&be()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if($n(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=qn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==ro)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=d(n.reduce((function(n,r){var i=d(n,2),a=i[0],u=i[1],s=o[r],c=e[r];return[a||s,a||!s?Re(u,s&&s.multi?function(e){var n=er(e,r);return $n(n)&&n.some((function(e){return t(c,e)}))}:function(e){return t(c,er(e,r))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):r?this.filter(s):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,$n(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(N(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){M(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||$n(e))return this.where(":id").equals(e).modify(t);var n=er(e,this.schema.primKey.keyPath);if(void 0===n)return to(new _r.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?qn(t).forEach((function(n){tr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{tr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:lo})})).then((function(e){return e.numFailures?le.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new _r.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Le(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new ee("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new ee("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=$e(e),r=$e(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(We(e),We(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var po=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,to.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,to.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Re(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return Ke(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&M(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return Ke(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:He(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return Ke(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=He(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return Ke(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?ze(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):ze(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),ze(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Ge(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Ge(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Re(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=He(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Ge(this._ctx,(function(e){var t=e.primaryKey.toString(),r=N(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=qn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];er(t,o)!==u&&(tr(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=qn(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:q(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===ho(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new X("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new X("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},vo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Qe(this):new this.Collection(this,(function(){return tt(e,t,!n,!r)}))}catch(e){return Ze(this,oo)}}},{key:"equals",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return nt(e)}))}},{key:"above",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Ze(this,oo):new this.Collection(this,(function(){return tt(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Ze(this,"String expected."):this.between(e,e+ro,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):et(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],ro)}},{key:"equalsIgnoreCase",value:function(e){return et(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=W.apply(lr,arguments);return 0===e.length?Qe(this):et(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=W.apply(lr,arguments);return 0===e.length?Qe(this):et(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,ro)}},{key:"anyOf",value:function(){var e=this,t=W.apply(lr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Ze(this,oo)}if(0===t.length)return Qe(this);var r=new this.Collection(this,(function(){return tt(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=W.apply(lr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Ze(this,oo)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return d(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,s=this._max;if(0===e.length)return Qe(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Ze(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",_r.InvalidArgument);var c,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,d=i;try{c=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=s(i[1],t[1]);break}}return n===r&&e.push(t),e}),[]),c.sort(r)}catch(e){return Ze(this,oo)}var h=0,p=f?function(e){return i(e,c[h][1])>0}:function(e){return i(e,c[h][1])>=0},y=l?function(e){return a(e,c[h][0])>0}:function(e){return a(e,c[h][0])>=0},v=p,m=new this.Collection(this,(function(){return tt(c[0][0],c[c.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(v=p,d=i):(v=y,d=a),c.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;v(o);)if(++h===c.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(o)||(0===n._cmp(o,c[h][1])||0===n._cmp(o,c[h][0])||t((function(){d===i?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=W.apply(lr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Qe(this):this.inAnyRange(e.map((function(e){return[e,e+ro]}))):Ze(this,"startsWithAnyOf() only works with strings")}}]),e}(),mo=Fe(null,"storagemutated"),go=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return G(!zr.global),++this._reculock,1!==this._reculock||zr.global||(zr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(G(!zr.global),0==--this._reculock)for(zr.global||(zr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{De(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&zr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(G(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new _r.DatabaseClosed(r);case"MissingAPIError":throw new _r.MissingAPI(r.message,r);default:throw new _r.OpenFailed(r)}if(!this.active)throw new _r.TransactionInactive;return G(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Se((function(n){ot(n),t._reject(e.error)})),e.onabort=Se((function(n){ot(n),t.active&&t._reject(new _r.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Se((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&mo.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return to(new _r.ReadOnly("Transaction is readonly"));if(!this.active)return to(new _r.TransactionInactive);if(this._locked())return new le((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},zr])}));if(n)return Ee((function(){var e=new le((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new le((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=le.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new le((function(e,r){n.then((function(n){return t._waitingQueue.push(Se(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Se(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new _r.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(N(t,e))return t[e];var n=this.schema[e];if(!n)throw new _r.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),bo=function(e){try{return e.only([[]]),bo=function(){return[[]]},[[]]}catch(e){return bo=function(){return ro},ro}},wo=0,_o=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){qn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return it(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),$n(r),0===t)})),o=r.shift();if(o.multi)throw new _r.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new _r.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new _r.Schema("Index must have a name and cannot be an empty string")})),t[n]=ut(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?M(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){M(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,ht(t,[t._allTables,t,t.Transaction.prototype]),dt(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],qn(o),o),t._storeNames=qn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||te,e),this}}]),e}();function So(e,t,n,r,o){return le.resolve().then((function(){var i=zr.transless||zr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===br.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return So(e,t,n,null,o)}))):to(r)}var s,c=fr(o);c&&Oe();var l=le.follow((function(){if(s=o.call(a,a))if(c){var e=xe.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=Ot(s))}),u);return(s&&"function"==typeof s.then?le.resolve(s).then((function(e){return a.active?e:to(new _r.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),to(e)}))}))}var Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return f(c({},e),{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?f(c({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:At(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:At(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=lt(e),o=i[r]=i[r]||[],s=null==e?0:"string"==typeof e?1:e.length,l=t>0,d=f(c({},n),{isVirtual:l,keyTail:t,keyLength:s,extractKey:st(e),unique:!l&&n.unique});return o.push(d),d.isPrimaryKey||a.push(d),s>1&&u(2===s?e[0]:e.slice(0,s-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),d}var s=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[s];var l=!0,d=!1,h=void 0;try{for(var p,y=o.indexes[Symbol.iterator]();!(l=(p=y.next()).done);l=!0){var v=p.value;u(v.keyPath,0,v)}}catch(e){d=!0,h=e}finally{try{l||null==y.return||y.return()}finally{if(d)throw h}}var m=f(c({},r),{schema:f(c({},o),{primaryKey:s,indexes:a,getIndexByKeyPath:function(e){var t=i[lt(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(At(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(At(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return n.value}}});return r}(n)})):r.openCursor(t)}});return m}})}};function Oo(e,t,n,r){return n=n||{},r=r||"",qn(e).forEach((function(o){if(N(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=$(i);u!==$(a)?n[r+o]=t[o]:"Object"===u?Oo(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})),qn(t).forEach((function(o){N(e,o)||(n[r+o]=t[o])})),n}var xo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return f(c({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=f(c({},n),{mutate:function(e){var o=function(e){var t=zr.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?f(c({},e),{keys:o}):c({},e)).type&&(e.values=h(e.values)),e.keys&&(e.keys=h(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((function(i){var a=o.map((function(n,o){var a=i[o],c={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(c,n,a,t);else if("add"===e.type||void 0===a){var f=s.fire.call(c,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||tr(e.values[o],r.keyPath,n))}else{var d=Oo(a,e.values[o]),h=l.fire.call(c,d,n,a,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){N(p,e)?p[e]=h[e]:tr(p,e,h[e])}))}}return c}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,u=t.numFailures,s=t.lastResult,c=0;c<o.length;++c){var l=r?r[c]:o[c],f=a[c];null==l?f.onerror&&f.onerror(n[c]):f.onsuccess&&f.onsuccess("put"===e.type&&i[c]?e.values[c]:l)}return{failures:n,results:r,numFailures:u,lastResult:s}})).catch((function(e){return a.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=zr.trans,a=i.table(t).hook,u=a.deleting,s=a.creating,l=a.updating;switch(e.type){case"add":if(s.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(s.fire===te&&l.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===te)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===te)break;return i._promise("readwrite",(function(){return function(e){return d(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function d(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:d(e,f(c({},t),{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Ao={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return f(c({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=kt(e.keys,e.trans._cache,"clone"===e.cache);return t?le.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?q(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},ko=function(e,t){if(!this){var n=new ko;return e&&"d"in e&&M(n,e),n}M(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function To(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Tt(e))return M(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?To(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Dt(e);if(ho(t,e.to)>0)return i?To(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Dt(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&jt(e,o),i&&a&&jt(e,i)}}R(ko.prototype,u({add:function(e){return jt(this,e),this},addKey:function(e){return To(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return To(t,e,e)})),this}},sr,(function(){return Pt(this)})));var jo,Po={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new ko(e.MIN_KEY,e.MAX_KEY);return f(c({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,l=f(c({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new ko)},c=s(""),l=s(":dels"),f=e.type,h=d("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=h[0],y=h[1],v=e.trans._cache;return o.mutate(e).then((function(e){if($n(p)){"delete"!==f&&(p=e.results),c.addKeys(p);var t=kt(p,v);t||"add"===f||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=function(e){return null!=e?t.extractKey(e):null},i=e(t.name||""),a=function(e){return t.multiEntry&&$n(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(n||r).forEach((function(e,t){var i=n&&o(n[t]),u=r&&o(r[t]);0!==ho(i,u)&&(null!=i&&a(i),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),h=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new ko(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new ko(e.key)]},getMany:function(e){return[a,(new ko).addKeys(e.keys)]},count:h,query:h,openCursor:h};return qn(p).forEach((function(e){l[e]=function(i){var a=zr.subscr;if(a){var l=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new ko)},h=l(""),y=l(":dels"),v=d(p[e](i),2),m=v[0],g=v[1];if(l(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(f(c({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return h.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?h.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),l}})}},Do=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=c({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:te,dbReadyPromise:null,cancelOpen:te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new le((function(e){s.dbReadyResolve=e})),s.openCanceller=new le((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Fe(this,"populate","blocked","versionchange","close",{ready:[ce,te]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||le.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(po.prototype,(function(e,t){this.db=u;var n=lo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==ne?a:null}}))),this.Table=function(e){return Be(fo.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:Fe(null,{creating:[ie,te],reading:[re,ne],updating:[ue,te],deleting:[ae,te]})}))}(this),this.Transaction=function(e){return Be(go.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Fe(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 le((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),to(e)}))}))}(this),this.Version=function(e){return Be(_o.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Be(vo.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new _r.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=bo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),io.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Eo),this.use(xo),this.use(Po),this.use(Ao),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new _r.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new _r.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(pt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||zr.letThrough||this._vip)?e():new le((function(e,n){if(t._state.openComplete)return n(new _r.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new _r.DatabaseClosed);t.open().catch(te)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new _r.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?to(n.dbOpenError):e}));dr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return le.race([o,("undefined"==typeof navigator?le.resolve():Et()).then((function(){return new le((function(o,i){if(t(),!r)throw new _r.MissingAPI;var s=e.name,c=n.autoSchema?r.open(s):r.open(s,Math.round(10*e.verno));if(!c)throw new _r.MissingAPI;c.onerror=rt(i),c.onblocked=Se(e._fireOnBlocked),c.onupgradeneeded=Se((function(t){if(a=c.transaction,n.autoSchema&&!e._options.allowEmptyDB){c.onerror=ot,a.abort(),c.result.close();var o=r.deleteDatabase(s);o.onsuccess=o.onerror=Se((function(){i(new _r.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=rt(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=zr.transless||zr;Ee((function(){zr.trans=i,zr.transless=u,0===t?(qn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),ft(e,n),le.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=gt(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;bt(o,i,r),bt(o,a,r),u=o._dbSchema=a;var c=yt(i,a);c.add.forEach((function(e){vt(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new _r.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return mt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),mt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){ft(o,r),n._memoizedTables={},s=!0;var f=V(a);c.del.forEach((function(e){f[e]=i[e]})),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],qn(f),f),n.schema=f;var d,h=fr(l);h&&Oe();var p=le.follow((function(){if((d=l(n))&&h){var e=xe.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?le.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&uo||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),ht(o,[o.Transaction.prototype]),dt(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?le.resolve(i.shift()(n.idbtrans)).then(e):le.resolve()}().then((function(){var e,t;t=r,qn(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=Se((function(){a=null;var t,r=e._novip.idbdb=c.result,i=B(r.objectStoreNames);if(i.length>0)try{var l=r.transaction(1===(t=i).length?t[0]:t,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=gt(0,t,n);r._storeNames=B(t.objectStoreNames,0),dt(r,[r._allTables],qn(o),o)}(e,r,l):(bt(e,e._dbSchema,l),function(e,t){var n=yt(gt(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ft(e,l)}catch(e){}io.push(e),r.onversionchange=Se((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),r.onclose=Se((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).put({name:t}).catch(te)}(e._deps,s),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],le.resolve(St((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ce,te);return n.onReadyBeingFired=[],le.resolve(St((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),to(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=io.indexOf(this);if(t>=0&&io.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new le((function(t){e.dbReadyResolve=t})),e.openCanceller=new le((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new _r.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new le((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=Se((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!_t(n)&&"__dbnames"!==t&&wt(n,r).delete(t).catch(te)}(e._deps,e.name),r()})),t.onerror=rt(o),t.onblocked=e._fireOnBlocked};if(t)throw new _r.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return qn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=xt.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=zr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=s(e,r.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new _r.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new _r.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new _r.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):to(e)}var c=So.bind(null,this,i,a,o,n);return o?o._promise(i,c,"lock"):zr.trans?De(zr.transless,(function(){return r._whenReady(c)})):this._whenReady(c)}},{key:"table",value:function(e){if(!N(this._allTables,e))throw new _r.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Co="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Io=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Co,value:function(){return this}}]),e}();try{jo={indexedDB:Kn.indexedDB||Kn.mozIndexedDB||Kn.webkitIndexedDB||Kn.msIndexedDB,IDBKeyRange:Kn.IDBKeyRange||Kn.webkitIDBKeyRange}}catch(r){jo={indexedDB:null,IDBKeyRange:null}}var Mo=Do;R(Mo,f(c({},Er),{delete:function(e){return new Mo(e,{addons:[]}).delete()},exists:function(e){return new Mo(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return _t(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):wt(t,n).toCollection().primaryKeys()}(Mo.dependencies).then(e)}catch(e){return to(new _r.MissingAPI)}},defineClass:function(){return function(e){M(this,e)}},ignoreTransaction:function(e){return zr.trans?De(zr.transless,e):e()},vip:St,async:function(e){return function(){try{var t=Ot(e.apply(this,arguments));return t&&"function"==typeof t.then?t:le.resolve(t)}catch(e){return to(e)}}},spawn:function(e,t,n){try{var r=Ot(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:le.resolve(r)}catch(e){return to(e)}},currentTransaction:{get:function(){return zr.trans||null}},waitFor:function(e,t){var n=le.resolve("function"==typeof e?Mo.ignoreTransaction(e):e).timeout(t||6e4);return zr.trans?zr.trans.waitFor(n):n},Promise:le,debug:{get:function(){return dr},set:function(e){Y(e,"dexie"===e?function(){return!0}:co)}},derive:F,extend:M,props:R,override:U,Events:Fe,on:mo,liveQuery:function(e){return new Io((function(t){var n=function(){return qn(a).some((function(e){return i[e]&&function(e,t){var n=Pt(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Pt(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=fr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){It(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&Oe();var n=function(){return Ee(e,{subscr:t,trans:null})},o=zr.trans?De(zr.transless,n):n();return r&&o.then(xe,xe),o}(d);c||(mo("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:It,getByKeyPath:er,setByKeyPath:tr,delByKeyPath:function(e,t){"string"==typeof t?tr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){tr(e,t,void 0)}))},shallowClone:V,deepClone:q,getObjectDiff:Oo,cmp:ho,asap:z,minKey:-1/0,addons:[],connections:io,errnames:br,dependencies:jo,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Mo.maxKey=bo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(e){var t;No||(ao?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),No=!0,dispatchEvent(t),No=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;No||Mt(t)})));var No=!1;if("undefined"!=typeof BroadcastChannel){var Ro=new BroadcastChannel("x-storagemutated-1");"function"==typeof Ro.unref&&Ro.unref(),mo("storagemutated",(function(e){No||Ro.postMessage(e)})),Ro.onmessage=function(e){e.data&&Mt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(e){try{No||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&h(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Mt(t.changedParts)}}));var Lo=self.document&&navigator.serviceWorker;Lo&&Lo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Mt(t.changedParts)}))}le.rejectionMapper=function(e,t){if(!e||s(e,Z)||s(e,TypeError)||s(e,SyntaxError)||!e.name||!Sr[e.name])return e;var n=new Sr[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},Y(dr,co);var Fo=l(766),Bo=l(685);function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}var zo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uo(e);if(t){var o=Uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":p(n))&&"function"!=typeof t?Nt(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!s(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Rt(Nt(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Rt(Nt(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(Do),Ho=new zo,Vo={},Ko=(0,Bo.createGlobalStore)("offline-synchronization",{});function qo(){return qo=Ut((function(){var e,t,n,r,o,i,a,u,s,c,l,f,d;return Vt(this,(function(h){switch(h.label){case 0:return Ko.getState().synchronization?[2]:[4,Ho.syncQueue.count()];case 1:e=h.sent(),t={},n=Object.entries(Vo),r=n.length,o={},i=new AbortController,a=function(){var e,t,n=Ko.getState().synchronization;Ko.setState({synchronization:(e=zt({},n),t={pendingCount:n.pendingCount-1},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)})},h.label=2;case 2:h.trys.push([2,,10,11]),Ko.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}}),u=0,h.label=3;case 3:if(!(u<r&&n.length>0))return[3,8];s=n.length,h.label=4;case 4:return s--?(c=Ht(n[s],2),l=c[0],f=c[1],(d=f.dependsOn.map((function(e){return t[e]}))).every(Boolean)?(o[l]={},[4,Promise.all(d)]):[3,6]):[3,7];case 5:h.sent(),t[l]=function(e,t,n,r){return $o.apply(this,arguments)}(f,o,i,a),n.splice(s,1),h.label=6;case 6:return[3,4];case 7:return u++,[3,3];case 8:return[4,Promise.allSettled(Object.values(t))];case 9:return h.sent(),[3,11];case 10:return Ko.setState({synchronization:void 0}),[7];case 11:return[2]}}))})),qo.apply(this,arguments)}function $o(){return $o=Ut((function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h,p,y,v,m,g,b,w;return Vt(this,(function(_){switch(_.label){case 0:return o=e.type,i=e.dependsOn,a=e.process,u=[],s=[],[4,$t()];case 1:return c=_.sent(),[4,Ho.syncQueue.where({type:o,userId:c}).each((function(e,t){u.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}))];case 2:_.sent(),l=0,_.label=3;case 3:if(!(l<u.length))return[3,11];f=Ht(u[l],3),d=f[0],h=f[1],p=f[2],y=p.id,v=p.dependencies,m=void 0===v?[]:v,_.label=4;case 4:return _.trys.push([4,7,9,10]),[4,a(h,{abort:n,index:l,items:s,userId:c,dependencies:m.map((function(e){var n=e.id,r=e.type;return i.includes(r)?t[r][n]:void 0}))})];case 5:return g=_.sent(),void 0!==y&&(t[o][y]=g),[4,Ho.syncQueue.delete(d)];case 6:return _.sent(),[3,10];case 7:return b=_.sent(),[4,Ho.syncQueue.update(d,{lastError:{name:null==b?void 0:b.name,message:null!==(w=null==b?void 0:b.message)&&void 0!==w?w:null==b?void 0:b.toString()}})];case 8:return _.sent(),[3,10];case 9:return r(),[7];case 10:return l++,[3,3];case 11:return[2]}}))})),$o.apply(this,arguments)}function Wo(){return(Wo=Ut((function(){var e;return Vt(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:return[2,(null==(e=t.sent())?void 0:e.uuid)||"*"]}}))}))).apply(this,arguments)}function Yo(){return(Yo=Ut((function(e,t,n,r){var o;return Vt(this,(function(i){switch(i.label){case 0:return void 0===(o=r&&r.id)?[3,2]:[4,Ho.syncQueue.where({type:t,userId:e}).filter((function(e){return(null==e?void 0:e.descriptor.id)===o})).delete().catch(Do.errnames.DatabaseClosed)];case 1:i.sent(),i.label=2;case 2:return[4,Ho.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(Do.errnames.DatabaseClosed,(function(){return-1}))];case 3:return[2,i.sent()]}}))}))).apply(this,arguments)}function Jo(){return(Jo=Ut((function(e,t,n){return Vt(this,(function(r){switch(r.label){case 0:return[4,$t()];case 1:return[4,Wt(r.sent(),e,t,n)];case 2:return[2,r.sent()]}}))}))).apply(this,arguments)}function Zo(){return(Zo=Ut((function(e,t){return Vt(this,(function(n){switch(n.label){case 0:return[4,Zt(e,t)];case 1:return[2,n.sent().map((function(e){return e.content}))]}}))}))).apply(this,arguments)}function Qo(){return(Qo=Ut((function(e,t){var n;return Vt(this,(function(r){switch(r.label){case 0:return n=t?{type:t,userId:e}:{userId:e},[4,Ho.syncQueue.where(n).toArray().catch(Do.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function Xo(){return(Xo=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,$t()];case 1:return[4,Jt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ei(){return(ei=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,$t()];case 1:return[4,Zt(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function ti(){return(ti=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,Ho.syncQueue.get(e).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function ni(){return(ni=Ut((function(e){var t,n,r;return Vt(this,(function(o){switch(o.label){case 0:return[4,en(e)];case 1:if(!(n=o.sent()))throw new Error("No sync item with the ID ".concat(e," exists."));if(!(r=null===(t=Vo[n.type])||void 0===t?void 0:t.options.onBeginEditSyncItem))throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(n.type,'" supports editing items.'));return r(n),[2]}}))}))).apply(this,arguments)}function ri(){return(ri=Ut((function(e){return Vt(this,(function(t){switch(t.label){case 0:return[4,Ho.syncQueue.delete(e).catch(Do.errnames.DatabaseClosed)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}for(var oi,ii={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ai=new Uint8Array(16),ui=[],si=0;si<256;++si)ui.push((si+256).toString(16).slice(1));var ci=function(e,t,n){if(ii.randomUUID&&!t&&!e)return ii.randomUUID();var r=(e=e||{}).random||(e.rng||an)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ui[e[t+0]]+ui[e[t+1]]+ui[e[t+2]]+ui[e[t+3]]+"-"+ui[e[t+4]]+ui[e[t+5]]+"-"+ui[e[t+6]]+ui[e[t+7]]+"-"+ui[e[t+8]]+ui[e[t+9]]+"-"+ui[e[t+10]]+ui[e[t+11]]+ui[e[t+12]]+ui[e[t+13]]+ui[e[t+14]]+ui[e[t+15]]}(r)},li="OFFLINE+",fi={};function di(){return(di=fn((function(e){return dn(this,(function(t){switch(t.label){case 0:return[4,En()];case 1:return[4,vn(t.sent(),e)];case 2:return[2,t.sent()]}}))}))).apply(this,arguments)}function hi(){return(hi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return n=t?{type:t,users:e}:{users:e},[4,(new zo).dynamicOfflineData.where(n).toArray().catch(Do.errnames.DatabaseClosed,(function(){return[]}))];case 1:return[2,r.sent()]}}))}))).apply(this,arguments)}function pi(){return(pi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,gn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function yi(){return yi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new zo).dynamicOfflineData.get({type:t,identifier:n}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?[3,3]:[4,r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(Do.errnames.DatabaseClosed)];case 2:return i.sent(),[3,5];case 3:return o.users.includes(e)?[3,5]:[4,r.dynamicOfflineData.update(o.id,{users:(a=o.users,function(e){if(Array.isArray(e))return cn(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(a)||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.")}()).concat([e])}).catch(Do.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}var a}))})),yi.apply(this,arguments)}function vi(){return(vi=fn((function(e,t){return dn(this,(function(n){switch(n.label){case 0:return[4,En()];case 1:return[4,wn(n.sent(),e,t)];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function mi(){return mi=fn((function(e,t,n){var r,o;return dn(this,(function(i){switch(i.label){case 0:return[4,(r=new zo).dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 1:return(o=i.sent())?o.users.length>1?[4,r.dynamicOfflineData.update(o.id,{users:o.users.filter((function(t){return t!==e}))}).catch(Do.errnames.DatabaseClosed)]:[3,3]:[3,5];case 2:return i.sent(),[3,5];case 3:return[4,r.dynamicOfflineData.delete(o.id).catch(Do.errnames.DatabaseClosed)];case 4:i.sent(),i.label=5;case 5:return[2]}}))})),mi.apply(this,arguments)}function gi(){return gi=fn((function(e,t){var n;return dn(this,(function(r){switch(r.label){case 0:return[4,yn(e)];case 1:return n=r.sent(),[4,Promise.all(n.map((o=fn((function(e){return dn(this,(function(n){return[2,Sn(e.type,e.identifier,t)]}))})),function(e){return o.apply(this,arguments)})))];case 2:return r.sent(),[2]}var o}))})),gi.apply(this,arguments)}function bi(){return bi=fn((function(e,t,n){var r,o,i,a,u,s,c,l,f;return dn(this,(function(d){switch(d.label){case 0:return[4,mn(e,t)];case 1:return d.sent(),r=new zo,[4,En()];case 2:return o=d.sent(),[4,r.dynamicOfflineData.get({type:e,identifier:t}).catch(Do.errnames.DatabaseClosed,(function(){}))];case 3:return i=d.sent(),a=hn().filter((function(t){return t.type===e})),i?[4,Promise.all(a.map((h=fn((function(e){var r,o,i;return dn(this,(function(a){try{return e.sync(t,n),[2,{id:e.id,error:void 0}]}catch(t){return i=null!==(o=null===(r=t.message)||void 0===r?void 0:r.toString())&&void 0!==o?o:t.toString(),[2,{id:e.id,error:i}]}return[2]}))})),function(e){return h.apply(this,arguments)})))]:[2];case 4:return u=d.sent(),s=u.filter((function(e){return!e.error})).map((function(e){return e.id})),c=u.filter((function(e){return e.error})).map((function(e){return e.id})),l=u.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:s,erroredHandlers:c,errors:l},i.id?[4,r.dynamicOfflineData.update(i.id,{syncState:f}).catch(Do.errnames.DatabaseClosed)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2]}var h}))})),bi.apply(this,arguments)}function wi(){return(wi=fn((function(){var e;return dn(this,(function(t){switch(t.label){case 0:return[4,(0,Fo.getLoggedInUser)()];case 1:if(!(e=t.sent().uuid))throw new Error("Using the dynamic offline data API requires a logged in user.");return[2,e]}}))}))).apply(this,arguments)}var _i=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Si(){return Si=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){On(i,r,o,a,u,"next",e)}function u(e){On(i,r,o,a,u,"throw",e)}a(void 0)}))}}((function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return Tn(),[4,Sn("patient",e)];case 1:return t.sent(),[2]}}))})),Si.apply(this,arguments)}}(),y}())}}}))},925:function(e,t,n){var r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},i=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},a=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)}},u=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)},f=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},h=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},p=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?o(e):t},v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},m=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},g=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},b=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},_=function(e){var t=w();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}};function S(e,t,n){return S=w()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&x(o,n.prototype),o},S.apply(null,arguments)}function E(e,t,n){return E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},E(e,t,n||e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function A(e){var t="function"==typeof Map?new Map:void 0;return A=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return S(e,arguments,O(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),x(r,e)},A(e)}e=n.nmd(e),System.register(["dayjs"],(function(r,a){var l={};return{setters:[function(e){l.default=e.default}],execute:function(){r(function(){var r={6893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2712).__exportStar(n(715),t)},7542:function(e,t,n){"use strict";var r=function(e){return Intl.getCanonicalLocales(e)},o=function(e,t){var n=t.zoneNames,r=t.uppercaseLinks,o=e.toUpperCase(),i=n.reduce((function(e,t){return e[t.toUpperCase()]=t,e}),{}),a=r[o]||i[o];return"Etc/UTC"===a||"Etc/GMT"===a?"UTC":a},i=function(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",(n=un-r.length)&&(i+=v(n)),i+=r;a=e[t],(n=un-(r=a+"").length)&&(i+=v(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a},a=function(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yt+e)},u=function(e,t,n,r){var o,i,a,u;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=un,o=0):(o=Math.ceil((t+1)/un),t%=un),i=en(10,un-t),u=e[o]%i|0,null==r?t<3?(0==t?u=u/100|0:1==t&&(u=u/10|0),a=n<4&&99999==u||n>3&&49999==u||5e4==u||0==u):a=(n<4&&u+1==i||n>3&&u+1==i/2)&&(e[o+1]/i/100|0)==en(10,t-2)-1||(u==i/2||0==u)&&0==(e[o+1]/i/100|0):t<4?(0==t?u=u/1e3|0:1==t?u=u/100|0:2==t&&(u=u/10|0),a=(r||n<4)&&9999==u||!r&&n>3&&4999==u):a=((r||n<4)&&u+1==i||!r&&n>3&&u+1==i/2)&&(e[o+1]/i/1e3|0)==en(10,t-3)-1,a},s=function(e,t,n){for(var r,o,i=[0],a=0,u=e.length;a<u;){for(o=i.length;o--;)i[o]*=t;for(i[0]+=Ht.indexOf(e.charAt(a++)),r=0;r<i.length;r++)i[r]>n-1&&(void 0===i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()},c=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(o=1,u=f[0];u>=10;u/=10)o++;if((i=t-o)<0)i+=un,a=t,s=(l=f[d=0])/en(10,o-a-1)%10|0;else if((d=Math.ceil((i+1)/un))>=(u=f.length)){if(!r)break e;for(;u++<=d;)f.push(0);l=s=0,o=1,a=(i%=un)-un+1}else{for(l=u=f[d],o=1;u>=10;u/=10)o++;s=(a=(i%=un)-un+o)<0?0:l/en(10,o-a-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(a<0?l:l%en(10,o-a-1)),c=n<4?(s||r)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||r||6==n&&(i>0?a>0?l/en(10,o-a):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=en(10,(un-t%un)%un),e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=d,u=1,d--):(f.length=d+1,u=en(10,un-i),f[d]=a>0?(l/en(10,o-a)%en(10,a)|0)*u:0),c)for(;;){if(0==d){for(i=1,a=f[0];a>=10;a/=10)i++;for(a=f[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(e.e++,f[0]==an&&(f[0]=1));break}if(f[d]+=u,f[d]!=an)break;f[d--]=0,u=1}for(i=f.length;0===f[--i];)f.pop()}return $t&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e},l=function(e,t,n){if(!e.isFinite())return S(e);var r,o=e.e,a=i(e.d),u=a.length;return t?(n&&(r=n-u)>0?a=a.charAt(0)+"."+a.slice(1)+v(r):u>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):o<0?(a="0."+v(-o-1)+a,n&&(r=n-u)>0&&(a+=v(r))):o>=u?(a+=v(o+1-u),n&&(r=n-o-1)>0&&(a=a+"."+v(r))):((r=o+1)<u&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-u)>0&&(o+1===u&&(a+="."),a+=v(r))),a},d=function(e,t){var n=e[0];for(t*=un;n>=10;n/=10)t++;return t},h=function(e,t,n){if(t>sn)throw $t=!0,n&&(e.precision=n),Error(Jt);return c(new e(Vt),t,1,!0)},p=function(e,t,n){if(t>cn)throw Error(Jt);return c(new e(Kt),t,n,!0)},y=function(e){var t=e.length-1,n=t*un+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n},v=function(e){for(var t="";e--;)t+="0";return t},m=function(e,t,n,r){var o,i=new e(1),a=Math.ceil(r/un+4);for($t=!1;;){if(n%2&&T((i=i.times(t)).d,a)&&(o=!0),0===(n=Xt(n/2))){n=i.d.length-1,o&&0===i.d[n]&&++i.d[n];break}T((t=t.times(t)).d,a)}return $t=!0,i},b=function(e){return 1&e.d[e.d.length-1]},w=function(e,t,n){for(var r,o,i=new e(t[0]),a=0;++a<t.length;){if(!(o=new e(t[a])).s){i=o;break}((r=i.cmp(o))===n||0===r&&i.s===n)&&(i=o)}return i},_=function(e,t){var n,r,o,a,s,l,f,d=0,h=0,p=0,y=e.constructor,v=y.rounding,m=y.precision;if(!e.d||!e.d[0]||e.e>17)return new y(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?($t=!1,f=m):f=t,l=new y(.03125);e.e>-2;)e=e.times(l),p+=5;for(f+=r=Math.log(en(2,p))/Math.LN10*2+5|0,n=a=s=new y(1),y.precision=f;;){if(a=c(a.times(e),f,1),n=n.times(++h),i((l=s.plus(fn(a,n,f,1))).d).slice(0,f)===i(s.d).slice(0,f)){for(o=p;o--;)s=c(s.times(s),f,1);if(null!=t)return y.precision=m,s;if(!(d<3&&u(s.d,f-r,v,d)))return c(s,y.precision=m,v,$t=!0);y.precision=f+=10,n=a=l=new y(1),h=0,d++}s=l}},S=function(e){return String(e.s*e.s/0)},E=function(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(o=t.length;48===t.charCodeAt(o-1);--o);if(t=t.slice(r,o)){if(o-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%un,n<0&&(r+=un),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=un;r<o;)e.d.push(+t.slice(r,r+=un));t=t.slice(r),r=un-t.length}else r-=o;for(;r--;)t+="0";e.d.push(+t),$t&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e},O=function(e,t,n,r,o){var i,a,u,s,c=e.precision,l=Math.ceil(c/un);for($t=!1,s=n.times(n),u=new e(r);;){if(a=fn(u.times(s),new e(t++*t++),c,1),u=o?r.plus(a):r.minus(a),r=fn(a.times(s),new e(t++*t++),c,1),void 0!==(a=u.plus(r)).d[l]){for(i=l;a.d[i]===u.d[i]&&i--;);if(-1==i)break}i=u,u=r,r=a,a=i}return $t=!0,a.d.length=l+1,a},x=function(e,t){for(var n=e;--t;)n*=e;return n},A=function(e,t){var n,r=t.s<0,o=p(e,e.precision,1),i=o.times(.5);if((t=t.abs()).lte(i))return Ut=r?4:1,t;if((n=t.divToInt(o)).isZero())Ut=r?3:2;else{if((t=t.minus(n.times(o))).lte(i))return Ut=b(n)?r?2:3:r?4:1,t;Ut=b(n)?r?1:4:r?3:2}return t.minus(o).abs()},k=function(e,t,n,r){var o,i,u,c,f,d,h,p,y,v=e.constructor,m=void 0!==n;if(m?(a(n,1,zt),void 0===r?r=v.rounding:a(r,0,8)):(n=v.precision,r=v.rounding),e.isFinite()){for(m?(o=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):o=t,(u=(h=l(e)).indexOf("."))>=0&&(h=h.replace(".",""),(y=new v(1)).e=h.length-u,y.d=s(l(y),10,o),y.e=y.d.length),i=f=(p=s(h,10,o)).length;0==p[--f];)p.pop();if(p[0]){if(u<0?i--:((e=new v(e)).d=p,e.e=i,p=(e=fn(e,y,n,r,0,o)).d,i=e.e,d=Bt),u=p[n],c=o/2,d=d||void 0!==p[n+1],d=r<4?(void 0!==u||d)&&(0===r||r===(e.s<0?3:2)):u>c||u===c&&(4===r||d||6===r&&1&p[n-1]||r===(e.s<0?8:7)),p.length=n,d)for(;++p[--n]>o-1;)p[n]=0,n||(++i,p.unshift(1));for(f=p.length;!p[f-1];--f);for(u=0,h="";u<f;u++)h+=Ht.charAt(p[u]);if(m){if(f>1)if(16==t||8==t){for(u=16==t?4:3,--f;f%u;f++)h+="0";for(f=(p=s(h,o,t)).length;!p[f-1];--f);for(u=1,h="1.";u<f;u++)h+=Ht.charAt(p[u])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>f)for(i-=f;i--;)h+="0";else i<f&&(h=h.slice(0,i)+"."+h.slice(i))}else h=m?"0p+0":"0";h=(16==t?"0x":2==t?"0b":8==t?"0o":"")+h}else h=S(e);return e.s<0?"-"+h:h},T=function(e,t){if(e.length>t)return e.length=t,!0},j=function(e){return new this(e).abs()},P=function(e){return new this(e).acos()},D=function(e){return new this(e).acosh()},C=function(e,t){return new this(e).plus(t)},I=function(e){return new this(e).asin()},M=function(e){return new this(e).asinh()},N=function(e){return new this(e).atan()},R=function(e){return new this(e).atanh()},L=function(e,t){e=new this(e),t=new this(t);var n,r=this.precision,o=this.rounding,i=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?p(this,r,o):new this(0)).s=e.s:!e.d||t.isZero()?(n=p(this,i,1).times(.5)).s=e.s:t.s<0?(this.precision=i,this.rounding=1,n=this.atan(fn(e,t,i,1)),t=p(this,i,1),this.precision=r,this.rounding=o,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(fn(e,t,i,1)):(n=p(this,i,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n},F=function(e){return new this(e).cbrt()},B=function(e){return c(e=new this(e),e.e+1,2)},U=function(e,t,n){return new this(e).clamp(t,n)},G=function(e){if(!e||"object"!=typeof e)throw Error(Wt+"Object expected");var t,n,r,o=!0===e.defaults,i=["precision",1,zt,"rounding",0,8,"toExpNeg",-Gt,0,"toExpPos",0,Gt,"maxE",0,Gt,"minE",-Gt,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],o&&(this[n]=qt[n]),void 0!==(r=e[n])){if(!(Xt(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(Yt+n+": "+r);this[n]=r}if(n="crypto",o&&(this[n]=qt[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Yt+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Zt);this[n]=!0}else this[n]=!1}return this},z=function(e){return new this(e).cos()},H=function(e){return new this(e).cosh()},V=function(e,t){return new this(e).div(t)},K=function(e){return new this(e).exp()},q=function(e){return c(e=new this(e),e.e+1,3)},$=function(){var e,t,n=new this(0);for($t=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return $t=!0,new this(1/0);n=t}return $t=!0,n.sqrt()},W=function(e){return f(e,hn)||e&&e.toStringTag===Qt||!1},Y=function(e){return new this(e).ln()},J=function(e,t){return new this(e).log(t)},Z=function(e){return new this(e).log(2)},Q=function(e){return new this(e).log(10)},X=function(){return w(this,arguments,-1)},ee=function(){return w(this,arguments,1)},te=function(e,t){return new this(e).mod(t)},ne=function(e,t){return new this(e).mul(t)},re=function(e,t){return new this(e).pow(t)},oe=function(e){var t,n,r,o,i=0,u=new this(1),s=[];if(void 0===e?e=this.precision:a(e,1,zt),r=Math.ceil(e/un),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)(o=t[i])>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=o%1e7;else{if(!crypto.randomBytes)throw Error(Zt);for(t=crypto.randomBytes(r*=4);i<r;)(o=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((127&t[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(o%1e7),i+=4);i=r/4}else for(;i<r;)s[i++]=1e7*Math.random()|0;for(r=s[--i],e%=un,r&&e&&(o=en(10,un-e),s[i]=(r/o|0)*o);0===s[i];i--)s.pop();if(i<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=un)s.shift();for(r=1,o=s[0];o>=10;o/=10)r++;r<un&&(n-=un-r)}return u.e=n,u.d=s,u},ie=function(e){return c(e=new this(e),e.e+1,this.rounding)},ae=function(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN},ue=function(e){return new this(e).sin()},se=function(e){return new this(e).sinh()},ce=function(e){return new this(e).sqrt()},le=function(e,t){return new this(e).sub(t)},fe=function(){var e=0,t=arguments,n=new this(t[e]);for($t=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return $t=!0,c(n,this.precision,this.rounding)},de=function(e){return new this(e).tan()},he=function(e){return new this(e).tanh()},pe=function(e){return c(e=new this(e),e.e+1,1)},ye=function(e,t){var n=t&&t.cache?t.cache:wn,r=t&&t.serializer?t.serializer:gn;return(t&&t.strategy?t.strategy:be)(e,{cache:n,serializer:r})},ve=function(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),a=t.get(i);return void 0===a&&(a=e.call(this,r),t.set(i,a)),a},me=function(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i},ge=function(e,t,n,r,o){return n.bind(t,e,r,o)},be=function(e,t){return ge(e,this,1===e.length?ve:me,t.cache.create(),t.serializer)},we=function(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")},_e=function(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r},Se=function(e,t,n){for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];_e(e,t,i,n[i])}},Ee=function(e,t,n){return Oe(e,t,n)[n]},Oe=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.get(t);if(!o)throw new TypeError("".concat(t," InternalSlot has not been initialized"));return n.reduce((function(e,t){return e[t]=o[t],e}),Object.create(null))},xe=function(e){return"literal"===e.type},Ae=function(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},ke=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n})},Te=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},je=function(e){if("symbol"==(void 0===e?"undefined":g(e)))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Pe=function(e){return e.isFinite()?e.abs().greaterThan(8640000000000001)?new hn(NaN):function(e){var t=kn(e);if(t.isNaN()||t.isZero())return yn;if(t.isFinite())return t;var n=t.abs().floor();return t.isNegative()&&(n=n.negated()),n}(e):new hn(NaN)},De=function(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)},Ce=function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},Ie=function(e){return new Array(e)},Me=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ne=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==(void 0===e?"undefined":g(e))?"Symbol":"bigint"==(void 0===e?"undefined":g(e))?"BigInt":void 0},Re=function(e,t){return e-Math.floor(e/t)*t},Le=function(e){return Math.floor(e/Tn)},Fe=function(e){return Re(Le(e)+4,7)},Be=function(e){return Date.UTC(e,0)/Tn},Ue=function(e){return Date.UTC(e,0)},Ge=function(e){return new Date(e).getUTCFullYear()},ze=function(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366},He=function(e){return Le(e)-Be(Ge(e))},Ve=function(e){return 365===ze(Ge(e))?0:1},Ke=function(e){var t=He(e),n=Ve(e);if(t>=0&&t<31)return 0;if(t<59+n)return 1;if(t<90+n)return 2;if(t<120+n)return 3;if(t<151+n)return 4;if(t<181+n)return 5;if(t<212+n)return 6;if(t<243+n)return 7;if(t<273+n)return 8;if(t<304+n)return 9;if(t<334+n)return 10;if(t<365+n)return 11;throw new Error("Invalid time")},qe=function(e){var t=He(e),n=Ke(e),r=Ve(e);if(0===n)return t+1;if(1===n)return t-30;if(2===n)return t-58-r;if(3===n)return t-89-r;if(4===n)return t-119-r;if(5===n)return t-150-r;if(6===n)return t-180-r;if(7===n)return t-211-r;if(8===n)return t-242-r;if(9===n)return t-272-r;if(10===n)return t-303-r;if(11===n)return t-333-r;throw new Error("Invalid time")},$e=function(e){return Re(Math.floor(e/Mn),jn)},We=function(e){return Re(Math.floor(e/In),Pn)},Ye=function(e){return Re(Math.floor(e/Cn),Dn)},Je=function(e){return"function"==typeof e},Ze=function(e,t,n){if(!Je(e))return!1;if(null==n?void 0:n.boundTargetFunction)return f(t,null==n?void 0:n.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},Qe=function(e){return Re(e,Cn)},Xe=function(e,t){if("object"==typeof e&&null!=e){var n=Symbol.toPrimitive in e?e[Symbol.toPrimitive]:void 0,r=void 0;if(void 0!==n){void 0===t?r="default":"string"===t?r="string":(Te("number"===t,'preferredType must be "string" or "number"'),r="number");var o=n.call(e,r);if("object"!=typeof o)return o;throw new TypeError("Cannot convert exotic object to primitive.")}return void 0===t&&(t="number"),function(e,t){for(var n=0,r="string"===t?["toString","valueOf"]:["valueOf","toString"];n<r.length;n++){var o=e[r[n]];if(Je(o)){var i=o.call(e);if("object"!=typeof i)return i}}throw new TypeError("Cannot convert object to primitive value")}(e,t)}return e},et=function(e){return void 0===e?Object.create(null):De(e)},tt=function(e,t,n,r){if(void 0===e)return r;var o=Number(e);if(isNaN(o)||o<t||o>n)throw new RangeError("".concat(o," is outside of range [").concat(t,", ").concat(n,"]"));return Math.floor(o)},nt=function(e,t,n,r,o){return tt(e[t],n,r,o)},rt=function(e,t,n,r,o){if("object"!=typeof e)throw new TypeError("Options must be an object");var i=e[t];if(void 0!==i){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(i=Boolean(i)),"string"===n&&(i=je(i)),void 0!==r&&!r.filter((function(e){return e==i})).length)throw new RangeError("".concat(i," is not within ").concat(r.join(", ")));return i}return o},ot=function(e){if(void 0===e)return Object.create(null);if("object"==typeof e)return e;throw new TypeError("Options must be an object")},it=function(e,t,n,r,o,i){var a=e[t];if(void 0===a)return i;if(!0===a)return r;if(!1===Boolean(a))return o;if("true"===(a=je(a))||"false"===a)return i;if(-1===(n||[]).indexOf(a))throw new RangeError("Invalid value ".concat(a));return a},at=function(e){return e.slice(e.indexOf("-")+1)},ut=function(e){return Rn.indexOf(e)>-1},st=function(e,t){var n=t.zoneNamesFromData,r=t.uppercaseLinks,o=e.toUpperCase(),i=new Set,a=new Set;return n.map((function(e){return e.toUpperCase()})).forEach((function(e){return i.add(e)})),Object.keys(r).forEach((function(e){a.add(e.toUpperCase()),i.add(r[e].toUpperCase())})),i.has(o)||a.has(o)},ct=function(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!Ln.test(e)},lt=function(e){if(ut(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var n=t[0],r=t[1];return!(!ut(n)||!ut(r))},ft=function(e,t,n,r){if(e.eq(t))return t;if(Te(t.lessThan(e)&&e.lessThan(n),"x should be between r1 and r2 but x=".concat(e,", r1=").concat(t,", r2=").concat(n)),"zero"===r)return t;if("infinity"===r)return n;var o=e.minus(t),i=n.minus(e);return o.lessThan(i)?t:i.lessThan(o)?n:(Te(o.eq(i),"d1 should be equal to d2"),"half-zero"===r?t:"half-infinity"===r?n:(Te("half-even"===r,"unsignedRoundingMode should be half-even"),t.div(n.minus(t)).mod(2).isZero()?t:n))},dt=function(e,t,n){for(var r=(0,n.getInternalSlots)(e),o=r.dataLocaleData.numbers.symbols[r.numberingSystem],i=new RegExp("s?[".concat(o.rangeSign,"]s?")),a=t.findIndex((function(e){return"literal"===e.type&&i.test(e.value)})),u=[],s=a-1;s>=0&&Fn.has(t[s].type);s--)u.unshift(t[s]);if(Array.from(u.map((function(e){return e.value})).join("")).length>1)return(c=Array.from(t)).splice(a-u.length,u.length),c;var c,l=[];for(s=a+1;s<t.length&&Fn.has(t[s].type);s++)l.push(t[s]);return Array.from(l.map((function(e){return e.value})).join("")).length>1?((c=Array.from(t)).splice(a+1,l.length),c):t},ht=function(e,t){var n=e.notation,r=e.dataLocaleData,o=e.numberingSystem;switch(n){case"standard":return 0;case"scientific":return t.toNumber();case"engineering":return t.div(3).floor().times(3).toNumber();default:Te("compact"===n,"Invalid notation");var i=e.compactDisplay,a=e.style,u=e.currencyDisplay,s=void 0;if("currency"===a&&"name"!==u)s=(r.numbers.currency[o]||r.numbers.currency[r.numbers.nu[0]]).short;else{var c=r.numbers.decimal[o]||r.numbers.decimal[r.numbers.nu[0]];s="long"===i?c.long:c.short}if(!s)return 0;var l=pn.pow(10,t).toString(),f=Object.keys(s);if(l<f[0])return 0;if(l>f[f.length-1])return f[f.length-1].length-1;var d=f.indexOf(l);if(-1===d)return 0;var h=f[d];return"0"===s[h].other?0:h.length-s[h].other.match(/0+/)[0].length}},pt=function(e,t){return t?Bn[e]:Un[e]},yt=function(e,t){return e.times(pn.pow(10,-t))},vt=function(e,t,n,r,o){var i,a,u,s,c=n,l=function(e,t,n){var r=e.times(pn.pow(10,t)).floor().div(n).floor().times(n);return{n1:r,r1:yt(r,t)}}(e,c,r),f=l.n1,d=l.r1,h=function(e,t,n){var r=e.times(pn.pow(10,t)).ceil().div(n).ceil().times(n);return{n2:r,r2:yt(r,t)}}(e,c,r),p=h.n2,y=h.r2;if(ft(e,d,y,o).eq(d)?(i=f,a=d):(i=p,a=y),u=i.isZero()?"0":i.toString(),0!==c){var v=u.length;v<=c&&(u=we("0",c-v+1)+u,v=c+1);var m=u.slice(0,v-c),g=u.slice(u.length-c);u=m+"."+g,s=m.length}else s=u.length;for(var b=n-t;b>0&&"0"===u[u.length-1];)u=u.slice(0,u.length-1),b--;return"."===u[u.length-1]&&(u=u.slice(0,u.length-1)),{formattedString:u,roundedNumber:a,integerDigitsCount:s,roundingMagnitude:-c}},mt=function(e,t,n,r){var o,i,a,u,s=n;if(e.isZero())o=we("0",s),i=0,a=yn;else{var c=function(e,t){for(var n=pn.pow(10,t),r=pn.pow(10,t-1),o=e.div(r).log(10).plus(t).minus(1).ceil();;){var i=e.div(pn.pow(10,o.minus(t).plus(1))).floor();if(i.lessThan(n)&&i.greaterThanOrEqualTo(r)){var a=i.times(pn.pow(10,o.minus(t).plus(1)));if(a.lessThanOrEqualTo(e))return{n1:i,e1:o,r1:a}}o=o.minus(1)}}(e,s),l=c.n1,f=c.e1,d=c.r1,h=function(e,t){for(var n=pn.pow(10,t),r=pn.pow(10,t-1),o=e.div(n).log(10).plus(t).minus(1).floor();;){var i=e.div(pn.pow(10,o.minus(t).plus(1))).ceil();if(i.lessThan(n)&&i.greaterThanOrEqualTo(r)){var a=i.times(pn.pow(10,o.minus(t).plus(1)));if(a.greaterThanOrEqualTo(e))return{n2:i,e2:o,r2:a}}o=o.plus(1)}}(e,s),p=h.n2,y=h.e2,v=h.r2,m=void 0;ft(e,d,v,r).eq(d)?(m=l,i=f.toNumber(),a=d):(m=p,i=y.toNumber(),a=v),o=m.toString()}if(i>=s-1?(o+=we("0",i-s+1),u=i+1):i>=0?(o=o.slice(0,i+1)+"."+o.slice(o.length-(s-(i+1))),u=i+1):(Te(i<0,"e should be less than 0"),o="0."+we("0",-i-1)+o,u=1),o.includes(".")&&n>t){for(var g=n-t;g>0&&"0"===o[o.length-1];)o=o.slice(0,o.length-1),g--;"."===o[o.length-1]&&(o=o.slice(0,o.length-1))}return{formattedString:o,roundedNumber:a,integerDigitsCount:u,roundingMagnitude:i}},gt=function(e,t){var n,r,o=t;o.isZero()&&o.isNegative()?(n="negative",o=yn):(Te(o.isFinite(),"NumberFormatDigitInternalSlots value is not finite"),"negative"==(n=o.lessThan(0)?"negative":"positive")&&(o=o.negated()));var i=e.roundingType,a=pt(e.roundingMode,"negative"===n);switch(i){case"significantDigits":r=mt(o,e.minimumSignificantDigits,e.maximumSignificantDigits,a);break;case"fractionDigits":r=vt(o,e.minimumFractionDigits,e.maximumFractionDigits,e.roundingIncrement,a);break;default:var u=mt(o,e.minimumSignificantDigits,e.maximumSignificantDigits,a),s=vt(o,e.minimumFractionDigits,e.maximumFractionDigits,e.roundingIncrement,a);"morePrecision"===e.roundingType?r=u.roundingMagnitude<=s.roundingMagnitude?u:s:(Te("lessPrecision"===e.roundingType,"Invalid roundingType"),r=u.roundingMagnitude<=s.roundingMagnitude?s:u)}o=r.roundedNumber;var c=r.formattedString;if("stripIfInteger"===e.trailingZeroDisplay&&o.isInteger()){var l=c.indexOf(".");l>-1&&(c=c.slice(0,l))}var f=r.integerDigitsCount,d=e.minimumIntegerDigits;return f<d&&(c=we("0",d-f)+c),"negative"===n&&(o=o.isZero()?vn:o.negated()),{roundedNumber:o,formattedString:c}},bt=function(e,t){if(t.isZero())return[0,0];t.isNegative()&&(t=t.negated());var n=t.log(10).floor(),r=ht(e,n),o=gt(e,t=t.times(pn.pow(10,-r)));return o.roundedNumber.isZero()||o.roundedNumber.log(10).floor().eq(n.minus(r))?[r,n.toNumber()]:[ht(e,n.plus(1)),n.plus(1).toNumber()]},wt=function(e,t){var n=t.currencyDigitsData;return Me(n,e)?n[e]:2},_t=function(e,t,n,r){var o,i,a,u=e.sign,s=e.exponent,c=e.magnitude,l=r.notation,f=r.style,d=r.numberingSystem,h=t.numbers.nu[0],p=null;if("compact"===l&&c&&(p=function(e,t,n,r,o,i,a){var u,s,c=e.roundedNumber,l=e.sign,f=e.magnitude,d=String(Math.pow(10,f)),h=n.numbers.nu[0];if("currency"===r&&"name"!==i){var p=null===(u=((y=n.numbers.currency)[a]||y[h]).short)||void 0===u?void 0:u[d];if(!p)return null;s=Ot(t,c.toNumber(),p)}else{var y,v=((y=n.numbers.decimal)[a]||y[h])[o][d];if(!v)return null;s=Ot(t,c.toNumber(),v)}return"0"===s?null:s=Et(s,l).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,n,t,f,r.compactDisplay,r.currencyDisplay,d)),"currency"===f&&"name"!==r.currencyDisplay){var y=t.currencies[r.currency];if(y)switch(r.currencyDisplay){case"code":i=r.currency;break;case"symbol":i=y.symbol;break;default:i=y.narrow}else i=r.currency}a=p||("decimal"===f||"unit"===f||"currency"===f&&"name"===r.currencyDisplay?Et((t.numbers.decimal[d]||t.numbers.decimal[h]).standard,u):Et("currency"===f?(m=t.numbers.currency[d]||t.numbers.currency[h])[r.currencySign]:t.numbers.percent[d]||t.numbers.percent[h],u));var v=$n.exec(a)[0];if(a=a.replace($n,"{0}").replace(/'(.)'/g,"$1"),"currency"===f&&"name"!==r.currencyDisplay){var m,g=(m=t.numbers.currency[d]||t.numbers.currency[h]).currencySpacing.afterInsertBetween;g&&!qn.test(i)&&(a=a.replace("¤{0}","¤".concat(g,"{0}")));var b=m.currencySpacing.beforeInsertBetween;b&&!Kn.test(i)&&(a=a.replace("{0}¤","{0}".concat(b,"¤")))}for(var w=a.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),_=[],S=t.numbers.symbols[d]||t.numbers.symbols[h],E=0,O=w;E<O.length;E++)if(H=O[E])switch(H){case"{0}":_.push.apply(_,St(S,e,l,s,d,!p&&(null===(o=r.useGrouping)||void 0===o||o),v,f,r.roundingIncrement,pt(r.roundingMode,-1===u)));break;case"-":_.push({type:"minusSign",value:S.minusSign});break;case"+":_.push({type:"plusSign",value:S.plusSign});break;case"%":_.push({type:"percentSign",value:S.percentSign});break;case"¤":_.push({type:"currency",value:i});break;default:/^\{c:/.test(H)?_.push({type:"compact",value:H.substring(3,H.length-1)}):_.push({type:"literal",value:H})}switch(f){case"currency":if("name"===r.currencyDisplay){var x,A=(t.numbers.currency[d]||t.numbers.currency[h]).unitPattern,k=t.currencies[r.currency];x=k?Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),k.displayName):r.currency;for(var T=[],j=0,P=A.split(/(\{[01]\})/g);j<P.length;j++)switch(H=P[j]){case"{0}":T.push.apply(T,_);break;case"{1}":T.push({type:"currency",value:x});break;default:H&&T.push({type:"literal",value:H})}return T}return _;case"unit":var D=r.unit,C=r.unitDisplay,I=t.units.simple[D];if(A=void 0,I)A=Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),t.units.simple[D][C]);else{var M=D.split("-per-"),N=M[0],R=M[1];I=t.units.simple[N];var L=Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),t.units.simple[N][C]),F=t.units.simple[R].perUnit[C];if(F)A=F.replace("{0}",L);else{var B=t.units.compound.per[C],U=Ot(n,1,t.units.simple[R][C]);A=A=B.replace("{0}",L).replace("{1}",U.replace("{0}",""))}}T=[];for(var G=0,z=A.split(/(\s*\{0\}\s*)/);G<z.length;G++){var H=z[G],V=/^(\s*)\{0\}(\s*)$/.exec(H);V?(V[1]&&T.push({type:"literal",value:V[1]}),T.push.apply(T,_),V[2]&&T.push({type:"literal",value:V[2]})):H&&T.push({type:"unit",value:H})}return T;default:return _}},St=function(e,t,n,r,o,i,a,u,s,c){var l=[],f=t.formattedString,d=t.roundedNumber;if(d.isNaN())return[{type:"nan",value:f}];if(!d.isFinite())return[{type:"infinity",value:f}];var h=Vn[o];h&&(f=f.replace(/\d/g,(function(e){return h[+e]||e})));var p,y,v=f.indexOf(".");v>0?(p=f.slice(0,v),y=f.slice(v+1)):p=f;var m=!1;if("always"===i?m=!0:"min2"===i?m=d.greaterThanOrEqualTo(1e4):("auto"===i||i)&&(m="compact"!==n||d.greaterThanOrEqualTo(1e4)),m){var g="currency"===u&&null!=e.currencyGroup?e.currencyGroup:e.group,b=[],w=a.split(".")[0].split(","),_=3,S=3;w.length>1&&(_=w[w.length-1].length),w.length>2&&(S=w[w.length-2].length);var E=p.length-_;if(E>0){for(b.push(p.slice(E,E+_)),E-=S;E>0;E-=S)b.push(p.slice(E,E+S));b.push(p.slice(0,E+S))}else b.push(p);for(;b.length>0;){var O=b.pop();l.push({type:"integer",value:O}),b.length>0&&l.push({type:"group",value:g})}}else l.push({type:"integer",value:p});if(void 0!==y){var x="currency"===u&&null!=e.currencyDecimal?e.currencyDecimal:e.decimal;l.push({type:"decimal",value:x},{type:"fraction",value:y})}if(("scientific"===n||"engineering"===n)&&d.isFinite()){l.push({type:"exponentSeparator",value:e.exponential}),r<0&&(l.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var A=vt(new pn(r),0,0,s,c);l.push({type:"exponentInteger",value:A.formattedString})}return l},Et=function(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var n=e.split(";"),r=n[0],o=n[1];switch(t){case 0:return r;case-1:return o;default:return o.indexOf("-")>=0?o.replace(/-/g,"+"):"+".concat(r)}},Ot=function(e,t,n){return n[e.select(t)]||n.other},xt=function(e,t){var n=e.dataLocaleData.numbers.symbols[e.numberingSystem].approximatelySign;return t.push({type:"approximatelySign",value:n}),t},At=function(e,t){var n,r,o,i=t,a=0,u=e.pl,s=e.dataLocaleData,c=e.numberingSystem,l=s.numbers.symbols[c]||s.numbers.symbols[s.numbers.nu[0]],f=0;if(i.isNaN())r=l.nan;else if(i.isFinite()){i.isZero()||(Te(i.isFinite(),"Input must be a mathematical value"),"percent"==e.style&&(i=i.times(100)),f=(n=bt(e,i))[0],a=n[1],i=i.times(pn.pow(10,-f)));var d=gt(e,i);r=d.formattedString,i=d.roundedNumber}else r=l.infinity;var h=e.signDisplay;switch(h){case"never":o=0;break;case"auto":o=i.isPositive()||i.isNaN()?0:-1;break;case"always":o=i.isPositive()||i.isNaN()?1:-1;break;case"exceptZero":o=i.isZero()?0:i.isNegative()?-1:1;break;default:Te("negative"===h,'signDisplay must be "negative"'),o=i.isNegative()&&!i.isZero()?-1:0}return _t({roundedNumber:i,formattedString:r,exponent:f,magnitude:a,sign:o},e.dataLocaleData,u,e)},kt=function(e,t){return At(e,t).map((function(e){return e.value})).join("")},Tt=function(e,t,n,r){var o=r.getInternalSlots;Te(!t.isNaN()&&!n.isNaN(),"Input must be a number",RangeError);var i=o(e),a=At(i,t),u=At(i,n);if(kt(i,t)===kt(i,n)){var s=xt(i,a);return s.forEach((function(e){e.source="shared"})),s}var c=[];a.forEach((function(e){e.source="startRange",c.push(e)}));var l=i.dataLocaleData.numbers.symbols[i.numberingSystem].rangeSign;return c.push({type:"literal",value:l,source:"shared"}),u.forEach((function(e){e.source="endRange",c.push(e)})),dt(e,c,{getInternalSlots:o})},jt=function(e,t,n,r){return Tt(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e){return e.value})).join("")},Pt=function(e,t,n,r){return Tt(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e,t){return{type:e.type,value:e.value,source:e.source,result:t.toString()}}))},Dt=function(e,t,n){for(var r=At(n.getInternalSlots(e),t),o=Ie(0),i=0,a=r;i<a.length;i++){var u=a[i];o.push({type:u.type,value:u.value})}return o},Ct=function(e,t,n,r,o){var i=nt(t,"minimumIntegerDigits",1,21,1),a=t.minimumFractionDigits,u=t.maximumFractionDigits,s=t.minimumSignificantDigits,c=t.maximumSignificantDigits;e.minimumIntegerDigits=i;var l=nt(t,"roundingIncrement",1,5e3,1);Te(Yn.has(l),"Invalid rounding increment value: ".concat(l,".\nValid values are ").concat(Array.from(Yn).join(", "),"."));var f=rt(t,"roundingMode","string",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],"halfExpand"),d=rt(t,"roundingPriority","string",["auto","morePrecision","lessPrecision"],"auto"),h=rt(t,"trailingZeroDisplay","string",["auto","stripIfInteger"],"auto");1!==l&&(r=n),e.roundingIncrement=l,e.roundingMode=f,e.trailingZeroDisplay=h;var p=void 0!==s||void 0!==c,y=void 0!==a||void 0!==u,v=!0,m=!0;if("auto"===d&&(v=p,(p||!y&&"compact"===o)&&(m=!1)),v&&(p?(e.minimumSignificantDigits=tt(s,1,21,1),e.maximumSignificantDigits=tt(c,e.minimumSignificantDigits,21,21)):(e.minimumSignificantDigits=1,e.maximumSignificantDigits=21)),m)if(y){if(a=tt(a,0,100,void 0),u=tt(u,0,100,void 0),void 0===a)Te(void 0!==u,"maximumFractionDigits must be defined"),a=Math.min(n,u);else if(void 0===u)u=Math.max(r,a);else if(a>u)throw new RangeError("Invalid range, ".concat(a," > ").concat(u));e.minimumFractionDigits=a,e.maximumFractionDigits=u}else e.minimumFractionDigits=n,e.maximumFractionDigits=r;v||m?"morePrecision"===d?(e.roundingType="morePrecision",e.roundingPriority="morePrecision"):"lessPrecision"===d?(e.roundingType="lessPrecision",e.roundingPriority="lessPrecision"):p?(e.roundingType="significantDigits",e.roundingPriority="auto"):(e.roundingType="fractionDigits",e.roundingPriority="auto"):(e.minimumFractionDigits=0,e.maximumFractionDigits=0,e.minimumSignificantDigits=1,e.maximumSignificantDigits=2,e.roundingType="morePrecision",e.roundingPriority="morePrecision"),1!==l&&(Te("fractionDigits"===e.roundingType,"Invalid roundingType",TypeError),Te(e.maximumFractionDigits===e.minimumFractionDigits,"With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.",RangeError))},It=function(e,t){void 0===t&&(t=Object.create(null));var n=rt(t,"style","string",["decimal","percent","currency","unit"],"decimal");e.style=n;var r=rt(t,"currency","string",void 0,void 0);Te(void 0===r||ct(r),"Malformed currency code",RangeError),Te("currency"!==n||void 0!==r,"currency cannot be undefined",TypeError);var o=rt(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),i=rt(t,"currencySign","string",["standard","accounting"],"standard"),a=rt(t,"unit","string",void 0,void 0);Te(void 0===a||lt(a),"Invalid unit argument for Intl.NumberFormat()",RangeError),Te("unit"!==n||void 0!==a,"unit cannot be undefined",TypeError);var u=rt(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===n&&(e.currency=r.toUpperCase(),e.currencyDisplay=o,e.currencySign=i),"unit"===n&&(e.unit=a,e.unitDisplay=u)},Mt=function(e,t,n,o){var i=o.getInternalSlots,a=o.localeData,u=o.availableLocales,s=o.numberingSystemNames,c=o.getDefaultLocale,l=o.currencyDigitsData,f=r(t),d=et(n),h=Object.create(null),p=rt(d,"localeMatcher","string",["lookup","best fit"],"best fit");h.localeMatcher=p;var y=rt(d,"numberingSystem","string",void 0,void 0);if(void 0!==y&&s.indexOf(y)<0)throw RangeError("Invalid numberingSystems: ".concat(y));h.nu=y;var v=(0,Wn.ResolveLocale)(Array.from(u),f,h,["nu"],a,c),m=a[v.dataLocale];Te(!!m,"Missing locale data for ".concat(v.dataLocale));var g=i(e);g.locale=v.locale,g.dataLocale=v.dataLocale,g.numberingSystem=v.nu,g.dataLocaleData=m,It(g,d);var b,w,_=g.style,S=rt(d,"notation","string",["standard","scientific","engineering","compact"],"standard");if(g.notation=S,"currency"===_&&"standard"===S){var E=wt(g.currency,{currencyDigitsData:l});b=E,w=E}else b=0,w="percent"===_?0:3;Ct(g,d,b,w,S);var O=rt(d,"compactDisplay","string",["short","long"],"short"),x="auto";"compact"===S&&(g.compactDisplay=O,x="min2");var A=it(d,"useGrouping",["min2","auto","always"],"always",!1,x);g.useGrouping=A;var k=rt(d,"signDisplay","string",["auto","never","always","exceptZero","negative"],"auto");return g.signDisplay=k,e},Nt=function(e){for(var t=[],n=e.indexOf("{"),r=0,o=0,i=e.length;n<e.length&&n>-1;)Te((r=e.indexOf("}",n))>n,"Invalid pattern ".concat(e)),n>o&&t.push({type:"literal",value:e.substring(o,n)}),t.push({type:e.substring(n+1,r),value:void 0}),o=r+1,n=e.indexOf("{",o);return o<i&&t.push({type:"literal",value:e.substring(o,i)}),t},Rt=function(e,t,n){return void 0!==n&&rt(n=De(n),"localeMatcher","string",["lookup","best fit"],"best fit"),(0,Wn.LookupSupportedLocales)(Array.from(e),t)},Lt=function(e){return"MISSING_LOCALE_DATA"===e.type},Ft=function(e){var t=Xe(e,"number");if("bigint"==(void 0===t?"undefined":g(t)))return new pn(t);if(void 0===t)return new pn(NaN);if(!0===t)return new pn(1);if(!1===t)return new pn(0);if(null===t)return new pn(0);try{return new pn(t)}catch(e){return new pn(NaN)}};n.r(t),n.d(t,{ApplyUnsignedRoundingMode:function(){return ft},ArrayCreate:function(){return Ie},CanonicalizeLocaleList:function(){return r},CanonicalizeTimeZoneName:function(){return o},CoerceOptionsToObject:function(){return et},CollapseNumberRange:function(){return dt},ComputeExponent:function(){return bt},ComputeExponentForMagnitude:function(){return ht},CurrencyDigits:function(){return wt},DateFromTime:function(){return qe},Day:function(){return Le},DayFromYear:function(){return Be},DayWithinYear:function(){return He},DaysInYear:function(){return ze},FormatApproximately:function(){return xt},FormatNumeric:function(){return kt},FormatNumericRange:function(){return jt},FormatNumericRangeToParts:function(){return Pt},FormatNumericToParts:function(){return Dt},FormatNumericToString:function(){return gt},GetNumberOption:function(){return nt},GetOption:function(){return rt},GetOptionsObject:function(){return ot},GetStringOrBooleanOption:function(){return it},GetUnsignedRoundingMode:function(){return pt},HasOwnProperty:function(){return Me},HourFromTime:function(){return $e},InLeapYear:function(){return Ve},InitializeNumberFormat:function(){return Mt},IsSanctionedSimpleUnitIdentifier:function(){return ut},IsValidTimeZoneName:function(){return st},IsWellFormedCurrencyCode:function(){return ct},IsWellFormedUnitIdentifier:function(){return lt},MinFromTime:function(){return We},MonthFromTime:function(){return Ke},OrdinaryHasInstance:function(){return Ze},PartitionNumberPattern:function(){return At},PartitionNumberRangePattern:function(){return Tt},PartitionPattern:function(){return Nt},RangePatternType:function(){return Gn},SANCTIONED_UNITS:function(){return Nn},SIMPLE_UNITS:function(){return Rn},SameValue:function(){return Ce},SecFromTime:function(){return Ye},SetNumberFormatDigitOptions:function(){return Ct},SetNumberFormatUnitOptions:function(){return It},SupportedLocales:function(){return Rt},TimeClip:function(){return Pe},TimeFromYear:function(){return Ue},ToIntlMathematicalValue:function(){return Ft},ToNumber:function(){return kn},ToObject:function(){return De},ToPrimitive:function(){return Xe},ToRawFixed:function(){return vt},ToRawPrecision:function(){return mt},ToString:function(){return je},Type:function(){return Ne},WeekDay:function(){return Fe},YearFromTime:function(){return Ge},ZERO:function(){return yn},_formatToParts:function(){return _t},createDataProperty:function(){return ke},createMemoizedDateTimeFormat:function(){return En},createMemoizedListFormat:function(){return An},createMemoizedLocale:function(){return xn},createMemoizedNumberFormat:function(){return Sn},createMemoizedPluralRules:function(){return On},defineProperty:function(){return Ae},getInternalSlot:function(){return Ee},getMultiInternalSlots:function(){return Oe},invariant:function(){return Te},isLiteralPart:function(){return xe},isMissingLocaleDataError:function(){return Lt},msFromTime:function(){return Qe},removeUnitNamespace:function(){return at},setInternalSlot:function(){return _e},setMultiInternalSlots:function(){return Se}});var Bt,Ut,Gt=9e15,zt=1e9,Ht="0123456789abcdef",Vt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Kt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qt={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Gt,maxE:Gt,crypto:!1},$t=!0,Wt="[DecimalError] ",Yt=Wt+"Invalid argument: ",Jt=Wt+"Precision limit exceeded",Zt=Wt+"crypto unavailable",Qt="[object Decimal]",Xt=Math.floor,en=Math.pow,tn=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nn=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,on=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,an=1e7,un=7,sn=Vt.length-1,cn=Kt.length-1,ln={toStringTag:Qt};ln.absoluteValue=ln.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),c(e)},ln.ceil=function(){return c(new this.constructor(this),this.e+1,2)},ln.clampedTo=ln.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Yt+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},ln.comparedTo=ln.cmp=function(e){var t,n,r,o,i=this,a=i.d,u=(e=new i.constructor(e)).d,s=i.s,c=e.s;if(!a||!u)return s&&c?s!==c?s:a===u?0:!a^s<0?1:-1:NaN;if(!a[0]||!u[0])return a[0]?s:u[0]?-c:0;if(s!==c)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(t=0,n=(r=a.length)<(o=u.length)?r:o;t<n;++t)if(a[t]!==u[t])return a[t]>u[t]^s<0?1:-1;return r===o?0:r>o^s<0?1:-1},ln.cosine=ln.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+un,r.rounding=1,n=function(e,t){var n,r,o;if(t.isZero())return t;(r=t.d.length)<32?o=(1/x(4,n=Math.ceil(r/3))).toString():(n=16,o="2.3283064365386962890625e-10"),e.precision+=n,t=O(e,1,t.times(o),new e(1));for(var i=n;i--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,A(r,n)),r.precision=e,r.rounding=t,c(2==Ut||3==Ut?n.neg():n,e,t,!0)):new r(1):new r(NaN)},ln.cubeRoot=ln.cbrt=function(){var e,t,n,r,o,a,u,s,l,f,d=this,h=d.constructor;if(!d.isFinite()||d.isZero())return new h(d);for($t=!1,(a=d.s*en(d.s*d,1/3))&&Math.abs(a)!=1/0?r=new h(a.toString()):(n=i(d.d),(a=((e=d.e)-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=en(n,1/3),e=Xt((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(n=a==1/0?"5e"+e:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=d.s),u=(e=h.precision)+3;;)if(f=(l=(s=r).times(s).times(s)).plus(d),r=fn(f.plus(d).times(s),f.plus(l),u+2,1),i(s.d).slice(0,u)===(n=i(r.d)).slice(0,u)){if("9999"!=(n=n.slice(u-3,u+1))&&(o||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(c(r,e+1,1),t=!r.times(r).times(r).eq(d));break}if(!o&&(c(s,e+1,0),s.times(s).times(s).eq(d))){r=s;break}u+=4,o=1}return $t=!0,c(r,e,h.rounding,t)},ln.decimalPlaces=ln.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-Xt(this.e/un))*un,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},ln.dividedBy=ln.div=function(e){return fn(this,new this.constructor(e))},ln.dividedToIntegerBy=ln.divToInt=function(e){var t=this.constructor;return c(fn(this,new t(e),0,1,1),t.precision,t.rounding)},ln.equals=ln.eq=function(e){return 0===this.cmp(e)},ln.floor=function(){return c(new this.constructor(this),this.e+1,3)},ln.greaterThan=ln.gt=function(e){return this.cmp(e)>0},ln.greaterThanOrEqualTo=ln.gte=function(e){var t=this.cmp(e);return 1==t||0===t},ln.hyperbolicCosine=ln.cosh=function(){var e,t,n,r,o,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;n=a.precision,r=a.rounding,a.precision=n+Math.max(i.e,i.sd())+4,a.rounding=1,(o=i.d.length)<32?t=(1/x(4,e=Math.ceil(o/3))).toString():(e=16,t="2.3283064365386962890625e-10"),i=O(a,1,i.times(t),new a(1),!0);for(var s,l=e,f=new a(8);l--;)s=i.times(i),i=u.minus(s.times(f.minus(s.times(f))));return c(i,a.precision=n,a.rounding=r,!0)},ln.hyperbolicSine=ln.sinh=function(){var e,t,n,r,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,(r=o.d.length)<3)o=O(i,2,o,o,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,o=O(i,2,o=o.times(1/x(5,e)),o,!0);for(var a,u=new i(5),s=new i(16),l=new i(20);e--;)a=o.times(o),o=o.times(u.plus(a.times(s.times(a).plus(l))))}return i.precision=t,i.rounding=n,c(o,t,n,!0)},ln.hyperbolicTangent=ln.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,fn(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},ln.inverseCosine=ln.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,o=t.rounding;return-1!==n?0===n?e.isNeg()?p(t,r,o):new t(0):new t(NaN):e.isZero()?p(t,r+4,o).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=o,e.times(2))},ln.inverseHyperbolicCosine=ln.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,$t=!1,n=n.times(n).minus(1).sqrt().plus(n),$t=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},ln.inverseHyperbolicSine=ln.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,$t=!1,n=n.times(n).plus(1).sqrt().plus(n),$t=!0,r.precision=e,r.rounding=t,n.ln())},ln.inverseHyperbolicTangent=ln.atanh=function(){var e,t,n,r,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,r=o.sd(),Math.max(r,e)<2*-o.e-1?c(new i(o),e,t,!0):(i.precision=n=r-o.e,o=fn(o.plus(1),new i(1).minus(o),n+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)},ln.inverseSine=ln.asin=function(){var e,t,n,r,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),n=i.precision,r=i.rounding,-1!==t?0===t?((e=p(i,n+4,r).times(.5)).s=o.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,o.times(2)))},ln.inverseTangent=ln.atan=function(){var e,t,n,r,o,i,a,u,s,l=this,f=l.constructor,d=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&d+4<=cn)return(a=p(f,d+4,h).times(.25)).s=l.s,a}else{if(!l.s)return new f(NaN);if(d+4<=cn)return(a=p(f,d+4,h).times(.5)).s=l.s,a}for(f.precision=u=d+10,f.rounding=1,e=n=Math.min(28,u/un+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for($t=!1,t=Math.ceil(u/un),r=1,s=l.times(l),a=new f(l),o=l;-1!==e;)if(o=o.times(s),i=a.minus(o.div(r+=2)),o=o.times(s),void 0!==(a=i.plus(o.div(r+=2))).d[t])for(e=t;a.d[e]===i.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),$t=!0,c(a,f.precision=d,f.rounding=h,!0)},ln.isFinite=function(){return!!this.d},ln.isInteger=ln.isInt=function(){return!!this.d&&Xt(this.e/un)>this.d.length-2},ln.isNaN=function(){return!this.s},ln.isNegative=ln.isNeg=function(){return this.s<0},ln.isPositive=ln.isPos=function(){return this.s>0},ln.isZero=function(){return!!this.d&&0===this.d[0]},ln.lessThan=ln.lt=function(e){return this.cmp(e)<0},ln.lessThanOrEqualTo=ln.lte=function(e){return this.cmp(e)<1},ln.logarithm=ln.log=function(e){var t,n,r,o,a,s,l,f,d=this,p=d.constructor,y=p.precision,v=p.rounding;if(null==e)e=new p(10),t=!0;else{if(n=(e=new p(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new p(NaN);t=e.eq(10)}if(n=d.d,d.s<0||!n||!n[0]||d.eq(1))return new p(n&&!n[0]?-1/0:1!=d.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(o=n[0];o%10==0;)o/=10;a=1!==o}if($t=!1,s=dn(d,l=y+5),r=t?h(p,l+10):dn(e,l),u((f=fn(s,r,l,1)).d,o=y,v))do{if(s=dn(d,l+=10),r=t?h(p,l+10):dn(e,l),f=fn(s,r,l,1),!a){+i(f.d).slice(o+1,o+15)+1==1e14&&(f=c(f,y+1,0));break}}while(u(f.d,o+=10,v));return $t=!0,c(f,y,v)},ln.minus=ln.sub=function(e){var t,n,r,o,i,a,u,s,l,f,h,p,y=this,v=y.constructor;if(e=new v(e),!y.d||!e.d)return y.s&&e.s?y.d?e.s=-e.s:e=new v(e.d||y.s!==e.s?y:NaN):e=new v(NaN),e;if(y.s!=e.s)return e.s=-e.s,y.plus(e);if(l=y.d,p=e.d,u=v.precision,s=v.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!l[0])return new v(3===s?-0:0);e=new v(y)}return $t?c(e,u,s):e}if(n=Xt(e.e/un),f=Xt(y.e/un),l=l.slice(),i=f-n){for((h=i<0)?(t=l,i=-i,a=p.length):(t=p,n=f,a=l.length),i>(r=Math.max(Math.ceil(u/un),a)+2)&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for((h=(r=l.length)<(a=p.length))&&(a=r),r=0;r<a;r++)if(l[r]!=p[r]){h=l[r]<p[r];break}i=0}for(h&&(t=l,l=p,p=t,e.s=-e.s),a=l.length,r=p.length-a;r>0;--r)l[a++]=0;for(r=p.length;r>i;){if(l[--r]<p[r]){for(o=r;o&&0===l[--o];)l[o]=an-1;--l[o],l[r]+=an}l[r]-=p[r]}for(;0===l[--a];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(e.d=l,e.e=d(l,n),$t?c(e,u,s):e):new v(3===s?-0:0)},ln.modulo=ln.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?c(new r(n),r.precision,r.rounding):($t=!1,9==r.modulo?(t=fn(n,e.abs(),0,3,1)).s*=e.s:t=fn(n,e,0,r.modulo,1),t=t.times(e),$t=!0,n.minus(t))},ln.naturalExponential=ln.exp=function(){return _(this)},ln.naturalLogarithm=ln.ln=function(){return dn(this)},ln.negated=ln.neg=function(){var e=new this.constructor(this);return e.s=-e.s,c(e)},ln.plus=ln.add=function(e){var t,n,r,o,i,a,u,s,l,f,h=this,p=h.constructor;if(e=new p(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new p(e.d||h.s===e.s?h:NaN)):e=new p(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(l=h.d,f=e.d,u=p.precision,s=p.rounding,!l[0]||!f[0])return f[0]||(e=new p(h)),$t?c(e,u,s):e;if(i=Xt(h.e/un),r=Xt(e.e/un),l=l.slice(),o=i-r){for(o<0?(n=l,o=-o,a=f.length):(n=f,r=i,a=l.length),o>(a=(i=Math.ceil(u/un))>a?i+1:a+1)&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((a=l.length)-(o=f.length)<0&&(o=a,n=f,f=l,l=n),t=0;o;)t=(l[--o]=l[o]+f[o]+t)/an|0,l[o]%=an;for(t&&(l.unshift(t),++r),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=d(l,r),$t?c(e,u,s):e},ln.precision=ln.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Yt+e);return n.d?(t=y(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},ln.round=function(){var e=this,t=e.constructor;return c(new t(e),e.e+1,t.rounding)},ln.sine=ln.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+un,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:O(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=O(e,2,t=t.times(1/x(5,n)),t);for(var o,i=new e(5),a=new e(16),u=new e(20);n--;)o=t.times(t),t=t.times(i.plus(o.times(a.times(o).minus(u))));return t}(r,A(r,n)),r.precision=e,r.rounding=t,c(Ut>2?n.neg():n,e,t,!0)):new r(NaN)},ln.squareRoot=ln.sqrt=function(){var e,t,n,r,o,a,u=this,s=u.d,l=u.e,f=u.s,d=u.constructor;if(1!==f||!s||!s[0])return new d(!f||f<0&&(!s||s[0])?NaN:s?u:1/0);for($t=!1,0==(f=Math.sqrt(+u))||f==1/0?(((t=i(s)).length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=Xt((l+1)/2)-(l<0||l%2),r=new d(t=f==1/0?"5e"+l:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new d(f.toString()),n=(l=d.precision)+3;;)if(r=(a=r).plus(fn(u,a,n+2,1)).times(.5),i(a.d).slice(0,n)===(t=i(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(c(r,l+1,1),e=!r.times(r).eq(u));break}if(!o&&(c(a,l+1,0),a.times(a).eq(u))){r=a;break}n+=4,o=1}return $t=!0,c(r,l,d.rounding,e)},ln.tangent=ln.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=fn(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,c(2==Ut||4==Ut?n.neg():n,e,t,!0)):new r(NaN)},ln.times=ln.mul=function(e){var t,n,r,o,i,a,u,s,l,f=this,h=f.constructor,p=f.d,y=(e=new h(e)).d;if(e.s*=f.s,!(p&&p[0]&&y&&y[0]))return new h(!e.s||p&&!p[0]&&!y||y&&!y[0]&&!p?NaN:p&&y?0*e.s:e.s/0);for(n=Xt(f.e/un)+Xt(e.e/un),(s=p.length)<(l=y.length)&&(i=p,p=y,y=i,a=s,s=l,l=a),i=[],r=a=s+l;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,o=s+r;o>r;)u=i[o]+y[r]*p[o-r-1]+t,i[o--]=u%an|0,t=u/an|0;i[o]=(i[o]+t)%an|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=d(i,n),$t?c(e,h.precision,h.rounding):e},ln.toBinary=function(e,t){return k(this,2,e,t)},ln.toDecimalPlaces=ln.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(a(e,0,zt),void 0===t?t=r.rounding:a(t,0,8),c(n,e+n.e+1,t))},ln.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=l(r,!0):(a(e,0,zt),void 0===t?t=o.rounding:a(t,0,8),n=l(r=c(new o(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},ln.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?n=l(o):(a(e,0,zt),void 0===t?t=i.rounding:a(t,0,8),n=l(r=c(new i(o),e+o.e+1,t),!1,e+r.e+1)),o.isNeg()&&!o.isZero()?"-"+n:n},ln.toFraction=function(e){var t,n,r,o,a,u,s,c,l,f,d,h,p=this,v=p.d,m=p.constructor;if(!v)return new m(p);if(l=n=new m(1),r=c=new m(0),u=(a=(t=new m(r)).e=y(v)-p.e-1)%un,t.d[0]=en(10,u<0?un+u:u),null==e)e=a>0?t:l;else{if(!(s=new m(e)).isInt()||s.lt(l))throw Error(Yt+s);e=s.gt(t)?a>0?t:l:s}for($t=!1,s=new m(i(v)),f=m.precision,m.precision=a=v.length*un*2;d=fn(s,t,0,1,1),1!=(o=n.plus(d.times(r))).cmp(e);)n=r,r=o,o=l,l=c.plus(d.times(o)),c=o,o=t,t=s.minus(d.times(o)),s=o;return o=fn(e.minus(n),r,0,1,1),c=c.plus(o.times(l)),n=n.plus(o.times(r)),c.s=l.s=p.s,h=fn(l,r,a,1).minus(p).abs().cmp(fn(c,n,a,1).minus(p).abs())<1?[l,r]:[c,n],m.precision=f,$t=!0,h},ln.toHexadecimal=ln.toHex=function(e,t){return k(this,16,e,t)},ln.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:a(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?($t=!1,n=fn(n,e,0,t,1).times(e),$t=!0,c(n)):(e.s=n.s,n=e),n},ln.toNumber=function(){return+this},ln.toOctal=function(e,t){return k(this,8,e,t)},ln.toPower=ln.pow=function(e){var t,n,r,o,a,s,l=this,f=l.constructor,d=+(e=new f(e));if(!(l.d&&e.d&&l.d[0]&&e.d[0]))return new f(en(+l,d));if((l=new f(l)).eq(1))return l;if(r=f.precision,a=f.rounding,e.eq(1))return c(l,r,a);if((t=Xt(e.e/un))>=e.d.length-1&&(n=d<0?-d:d)<=9007199254740991)return o=m(f,l,n,r),e.s<0?new f(1).div(o):c(o,r,a);if((s=l.s)<0){if(t<e.d.length-1)return new f(NaN);if(0==(1&e.d[t])&&(s=1),0==l.e&&1==l.d[0]&&1==l.d.length)return l.s=s,l}return(t=0!=(n=en(+l,d))&&isFinite(n)?new f(n+"").e:Xt(d*(Math.log("0."+i(l.d))/Math.LN10+l.e+1)))>f.maxE+1||t<f.minE-1?new f(t>0?s/0:0):($t=!1,f.rounding=l.s=1,n=Math.min(12,(t+"").length),(o=_(e.times(dn(l,r+n)),r)).d&&u((o=c(o,r+5,1)).d,r,a)&&(t=r+10,+i((o=c(_(e.times(dn(l,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(o=c(o,r+1,0))),o.s=s,$t=!0,f.rounding=a,c(o,r,a))},ln.toPrecision=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=l(r,r.e<=o.toExpNeg||r.e>=o.toExpPos):(a(e,1,zt),void 0===t?t=o.rounding:a(t,0,8),n=l(r=c(new o(r),e,t),e<=r.e||r.e<=o.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},ln.toSignificantDigits=ln.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(a(e,1,zt),void 0===t?t=n.rounding:a(t,0,8)),c(new n(this),e,t)},ln.toString=function(){var e=this,t=e.constructor,n=l(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},ln.truncated=ln.trunc=function(){return c(new this.constructor(this),this.e+1,1)},ln.valueOf=ln.toJSON=function(){var e=this,t=e.constructor,n=l(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var fn=function(){var e=function(e,t,n){var r,o=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+o,e[i]=r%n|0,o=r/n|0;return o&&e.unshift(o),e},t=function(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i},n=function(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()};return function(r,o,i,a,u,s){var l,f,d,h,p,y,v,m,g,b,w,_,S,E,O,x,A,k,T,j,P=r.constructor,D=r.s==o.s?1:-1,C=r.d,I=o.d;if(!(C&&C[0]&&I&&I[0]))return new P(r.s&&o.s&&(C?!I||C[0]!=I[0]:I)?C&&0==C[0]||!I?0*D:D/0:NaN);for(s?(p=1,f=r.e-o.e):(s=an,p=un,f=Xt(r.e/p)-Xt(o.e/p)),T=I.length,A=C.length,b=(g=new P(D)).d=[],d=0;I[d]==(C[d]||0);d++);if(I[d]>(C[d]||0)&&f--,null==i?(E=i=P.precision,a=P.rounding):E=u?i+(r.e-o.e)+1:i,E<0)b.push(1),y=!0;else{if(E=E/p+2|0,d=0,1==T){for(h=0,I=I[0],E++;(d<A||h)&&E--;d++)O=h*s+(C[d]||0),b[d]=O/I|0,h=O%I|0;y=h||d<A}else{for((h=s/(I[0]+1)|0)>1&&(I=e(I,h,s),C=e(C,h,s),T=I.length,A=C.length),x=T,_=(w=C.slice(0,T)).length;_<T;)w[_++]=0;(j=I.slice()).unshift(0),k=I[0],I[1]>=s/2&&++k;do{h=0,(l=t(I,w,T,_))<0?(S=w[0],T!=_&&(S=S*s+(w[1]||0)),(h=S/k|0)>1?(h>=s&&(h=s-1),1==(l=t(v=e(I,h,s),w,m=v.length,_=w.length))&&(h--,n(v,T<m?j:I,m,s))):(0==h&&(l=h=1),v=I.slice()),(m=v.length)<_&&v.unshift(0),n(w,v,_,s),-1==l&&(l=t(I,w,T,_=w.length))<1&&(h++,n(w,T<_?j:I,_,s)),_=w.length):0===l&&(h++,w=[0]),b[d++]=h,l&&w[0]?w[_++]=C[x]||0:(w=[C[x]],_=1)}while((x++<A||void 0!==w[0])&&E--);y=void 0!==w[0]}b[0]||b.shift()}if(1==p)g.e=f,Bt=y;else{for(d=1,h=b[0];h>=10;h/=10)d++;g.e=d+f*p-1,c(g,u?i+g.e+1:i,a,y)}return g}}();function dn(e,t){var n,r,o,a,s,l,f,d,p,y,v,m=1,g=e,b=g.d,w=g.constructor,_=w.rounding,S=w.precision;if(g.s<0||!b||!b[0]||!g.e&&1==b[0]&&1==b.length)return new w(b&&!b[0]?-1/0:1!=g.s?NaN:b?0:g);if(null==t?($t=!1,p=S):p=t,w.precision=p+=10,r=(n=i(b)).charAt(0),!(Math.abs(a=g.e)<15e14))return d=h(w,p+2,S).times(a+""),g=dn(new w(r+"."+n.slice(1)),p-10).plus(d),w.precision=S,null==t?c(g,S,_,$t=!0):g;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=i((g=g.times(e)).d)).charAt(0),m++;for(a=g.e,r>1?(g=new w("0."+n),a++):g=new w(r+"."+n.slice(1)),y=g,f=s=g=fn(g.minus(1),g.plus(1),p,1),v=c(g.times(g),p,1),o=3;;){if(s=c(s.times(v),p,1),i((d=f.plus(fn(s,new w(o),p,1))).d).slice(0,p)===i(f.d).slice(0,p)){if(f=f.times(2),0!==a&&(f=f.plus(h(w,p+2,S).times(a+""))),f=fn(f,new w(m),p,1),null!=t)return w.precision=S,f;if(!u(f.d,p-10,_,l))return c(f,w.precision=S,_,$t=!0);w.precision=p+=10,d=s=g=fn(y.minus(1),y.plus(1),p,1),v=c(g.times(g),p,1),o=l=1}f=d,o+=2}}ln[Symbol.for("nodejs.util.inspect.custom")]=ln.toString,ln[Symbol.toStringTag]="Decimal";var hn=ln.constructor=function e(t){var n,r,o;function i(e){var t,n,r,o=this;if(!f(o,i))return new i(e);if(o.constructor=i,W(e))return o.s=e.s,void($t?!e.d||e.e>i.maxE?(o.e=NaN,o.d=null):e.e<i.minE?(o.e=0,o.d=[0]):(o.e=e.e,o.d=e.d.slice()):(o.e=e.e,o.d=e.d?e.d.slice():e.d));if("number"==(r=void 0===e?"undefined":g(e))){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void($t?t>i.maxE?(o.e=NaN,o.d=null):t<i.minE?(o.e=0,o.d=[0]):(o.e=t,o.d=[e]):(o.e=t,o.d=[e]))}return 0*e!=0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):E(o,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),o.s=-1):(43===n&&(e=e.slice(1)),o.s=1),on.test(e)?E(o,e):function(e,t){var n,r,o,i,a,u,c,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),on.test(t))return E(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nn.test(t))n=16,t=t.toLowerCase();else if(tn.test(t))n=2;else{if(!rn.test(t))throw Error(Yt+t);n=8}for((i=t.search(/p/i))>0?(c=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),a=(i=t.indexOf("."))>=0,r=e.constructor,a&&(i=(u=(t=t.replace(".","")).length)-i,o=m(r,new r(n),i,2*i)),i=f=(l=s(t,n,an)).length-1;0===l[i];--i)l.pop();return i<0?new r(0*e.s):(e.e=d(l,f),e.d=l,$t=!1,a&&(e=fn(e,o,4*u)),c&&(e=e.times(Math.abs(c)<54?en(2,c):hn.pow(2,c))),$t=!0,e)}(o,e);if("bigint"===r)return e<0?(e=-e,o.s=-1):o.s=1,E(o,e.toString());throw Error(Yt+e)}if(i.prototype=ln,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=G,i.clone=e,i.isDecimal=W,i.abs=j,i.acos=P,i.acosh=D,i.add=C,i.asin=I,i.asinh=M,i.atan=N,i.atanh=R,i.atan2=L,i.cbrt=F,i.ceil=B,i.clamp=U,i.cos=z,i.cosh=H,i.div=V,i.exp=K,i.floor=q,i.hypot=$,i.ln=Y,i.log=J,i.log10=Q,i.log2=Z,i.max=X,i.min=ee,i.mod=te,i.mul=ne,i.pow=re,i.random=oe,i.round=ie,i.sign=ae,i.sin=ue,i.sinh=se,i.sqrt=ce,i.sub=le,i.sum=fe,i.tan=de,i.tanh=he,i.trunc=pe,void 0===t&&(t={}),t&&!0!==t.defaults)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}(qt);Vt=new hn(Vt),Kt=new hn(Kt);var pn=hn;new pn(10);var yn=new pn(0),vn=new pn(-0),mn=n(2712),gn=function(){return JSON.stringify(arguments)},bn=function(){var e=function(){this.cache=Object.create(null)};return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),wn={create:function(){return new bn}},_n={variadic:function(e,t){return ge(e,this,me,t.cache.create(),t.serializer)},monadic:function(e,t){return ge(e,this,ve,t.cache.create(),t.serializer)}},Sn=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),En=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),On=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),xn=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.Locale).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),An=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.ListFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic});function kn(e){if("number"==typeof e)return new hn(e);if(Te("bigint"!=(void 0===e?"undefined":g(e))&&"symbol"!=(void 0===e?"undefined":g(e)),"BigInt and Symbol are not supported",TypeError),void 0===e)return new hn(NaN);if(null===e||0===e)return yn;if(!0===e)return new hn(1);if("string"==typeof e)try{return new hn(e)}catch(e){return new hn(NaN)}Te("object"==typeof e,"object expected",TypeError);var t=Xe(e,"number");return Te("object"!=typeof t,"object expected",TypeError),kn(t)}var Tn=864e5,jn=24,Pn=60,Dn=60,Cn=1e3,In=Cn*Dn,Mn=In*Pn,Nn=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"],Rn=Nn.map(at),Ln=/[^A-Z]/,Fn=new Set(["unit","exponentMinusSign","minusSign","plusSign","percentSign","exponentSeparator","percent","percentSign","currency","literal"]);pn.set({toExpPos:100});var Bn={ceil:"zero",floor:"infinity",expand:"infinity",trunc:"zero",halfCeil:"half-zero",halfFloor:"half-infinity",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Un={ceil:"infinity",floor:"zero",expand:"infinity",trunc:"zero",halfCeil:"half-infinity",halfFloor:"half-zero",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"};pn.set({toExpPos:100});var Gn,zn,Hn=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,Vn={adlm:["𞥐","𞥑","𞥒","𞥓","𞥔","𞥕","𞥖","𞥗","𞥘","𞥙"],ahom:["𑜰","𑜱","𑜲","𑜳","𑜴","𑜵","𑜶","𑜷","𑜸","𑜹"],arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],bhks:["𑱐","𑱑","𑱒","𑱓","𑱔","𑱕","𑱖","𑱗","𑱘","𑱙"],brah:["𑁦","𑁧","𑁨","𑁩","𑁪","𑁫","𑁬","𑁭","𑁮","𑁯"],cakm:["𑄶","𑄷","𑄸","𑄹","𑄺","𑄻","𑄼","𑄽","𑄾","𑄿"],cham:["꩐","꩑","꩒","꩓","꩔","꩕","꩖","꩗","꩘","꩙"],deva:["०","१","२","३","४","५","६","७","८","९"],diak:["𑥐","𑥑","𑥒","𑥓","𑥔","𑥕","𑥖","𑥗","𑥘","𑥙"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gong:["𑶠","𑶡","𑶢","𑶣","𑶤","𑶥","𑶦","𑶧","𑶨","𑶩"],gonm:["𑵐","𑵑","𑵒","𑵓","𑵔","𑵕","𑵖","𑵗","𑵘","𑵙"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],hmng:["𖭐","𖭑","𖭒","𖭓","𖭔","𖭕","𖭖","𖭗","𖭘","𖭙"],hmnp:["𞅀","𞅁","𞅂","𞅃","𞅄","𞅅","𞅆","𞅇","𞅈","𞅉"],java:["꧐","꧑","꧒","꧓","꧔","꧕","꧖","꧗","꧘","꧙"],kali:["꤀","꤁","꤂","꤃","꤄","꤅","꤆","꤇","꤈","꤉"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],lana:["᪀","᪁","᪂","᪃","᪄","᪅","᪆","᪇","᪈","᪉"],lanatham:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],lepc:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mathbold:["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗"],mathdbl:["𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"],mathmono:["𝟶","𝟷","𝟸","𝟹","𝟺","𝟻","𝟼","𝟽","𝟾","𝟿"],mathsanb:["𝟬","𝟭","𝟮","𝟯","𝟰","𝟱","𝟲","𝟳","𝟴","𝟵"],mathsans:["𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],modi:["𑙐","𑙑","𑙒","𑙓","𑙔","𑙕","𑙖","𑙗","𑙘","𑙙"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mroo:["𖩠","𖩡","𖩢","𖩣","𖩤","𖩥","𖩦","𖩧","𖩨","𖩩"],mtei:["꯰","꯱","꯲","꯳","꯴","꯵","꯶","꯷","꯸","꯹"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],mymrshan:["႐","႑","႒","႓","႔","႕","႖","႗","႘","႙"],mymrtlng:["꧰","꧱","꧲","꧳","꧴","꧵","꧶","꧷","꧸","꧹"],newa:["𑑐","𑑑","𑑒","𑑓","𑑔","𑑕","𑑖","𑑗","𑑘","𑑙"],nkoo:["߀","߁","߂","߃","߄","߅","߆","߇","߈","߉"],olck:["᱐","᱑","᱒","᱓","᱔","᱕","᱖","᱗","᱘","᱙"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],osma:["𐒠","𐒡","𐒢","𐒣","𐒤","𐒥","𐒦","𐒧","𐒨","𐒩"],rohg:["𐴰","𐴱","𐴲","𐴳","𐴴","𐴵","𐴶","𐴷","𐴸","𐴹"],saur:["꣐","꣑","꣒","꣓","꣔","꣕","꣖","꣗","꣘","꣙"],segment:["🯰","🯱","🯲","🯳","🯴","🯵","🯶","🯷","🯸","🯹"],shrd:["𑇐","𑇑","𑇒","𑇓","𑇔","𑇕","𑇖","𑇗","𑇘","𑇙"],sind:["𑋰","𑋱","𑋲","𑋳","𑋴","𑋵","𑋶","𑋷","𑋸","𑋹"],sinh:["෦","෧","෨","෩","෪","෫","෬","෭","෮","෯"],sora:["𑃰","𑃱","𑃲","𑃳","𑃴","𑃵","𑃶","𑃷","𑃸","𑃹"],sund:["᮰","᮱","᮲","᮳","᮴","᮵","᮶","᮷","᮸","᮹"],takr:["𑛀","𑛁","𑛂","𑛃","𑛄","𑛅","𑛆","𑛇","𑛈","𑛉"],talu:["᧐","᧑","᧒","᧓","᧔","᧕","᧖","᧗","᧘","᧙"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],tirh:["𑓐","𑓑","𑓒","𑓓","𑓔","𑓕","𑓖","𑓗","𑓘","𑓙"],vaii:["ᘠ","ᘡ","ᘢ","ᘣ","ᘤ","ᘥ","ᘦ","ᘧ","ᘨ","ᘩ"],wara:["𑣠","𑣡","𑣢","𑣣","𑣤","𑣥","𑣦","𑣧","𑣨","𑣩"],wcho:["𞋰","𞋱","𞋲","𞋳","𞋴","𞋵","𞋶","𞋷","𞋸","𞋹"]},Kn=new RegExp("^".concat(Hn.source)),qn=new RegExp("".concat(Hn.source,"$")),$n=/[#0](?:[\.,][#0]+)*/g,Wn=n(1077),Yn=new Set([1,2,5,10,20,25,50,100,200,250,500,1e3,2e3,2500,5e3]);zn=Error,(0,mn.__extends)((function(){var e=null!==zn&&zn.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}),zn),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(Gn||(Gn={}))},6979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationRecordSign=function(e){for(var t=0,n=r.TABLE_1;t<n.length;t++){var o=n[t];if(e[o]<0)return-1;if(e[o]>0)return 1}return 0};var r=n(2552)},7332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetDurationUnitOptions=function(e,t,n,o,i,a){var u=(0,r.GetOption)(t,e,"string",o,void 0),s="always";void 0===u&&("digital"===n?("hours"!==e&&"minutes"!==e&&"seconds"!==e&&(s="auto"),u=i):(s="auto",u="numeric"===a||"2-digit"===a?"numeric":n));var c="".concat(e,"Display"),l=(0,r.GetOption)(t,c,"string",["always","auto"],s);if("numeric"===a||"2-digit"===a){if("numeric"!==u&&"2-digit"!==u)throw new RangeError("Can't mix numeric and non-numeric styles");if("minutes"!==e&&"seconds"!==e||(u="2-digit"),"numeric"===u&&"always"===l&&("milliseconds"===e||"microseconds"===e||"nanoseconds"===e))throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format")}return{style:u,display:l}};var r=n(7542)},1076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsValidDurationRecord=function(e){for(var t=(0,i.DurationRecordSign)(e),n=0,a=o.TABLE_1;n<a.length;n++){var u=a[n],s=e[u];if((0,r.invariant)(isFinite(Number(s)),"".concat(u," is not finite")),s<0&&t>0)return!1;if(s>0&&t<0)return!1}return!0};var r=n(7542),o=n(2552),i=n(6979)},984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartitionDurationFormatPattern=function(e,t){var n=[],u=!1,s=!1,c=(0,a.getInternalSlots)(e),l=c.dataLocale,f=i.DurationFormat.localeData[l];if(!f)throw new TypeError("Invalid locale");for(var d=c.numberingSystem,h=f.digitalFormat[d],p=function(e){var i=o.TABLE_2[e],a=t[i.valueField],l=c[i.styleSlot],f=c[i.displaySlot],d=i.unit,p=i.numberFormatUnit,y=Object.create(null);if("seconds"!==d&&"milliseconds"!==d&&"microseconds"!==d||"numeric"===("seconds"===d?c.milliseconds:"milliseconds"===d?c.microseconds:c.nanoseconds)&&(a+="seconds"===d?t.milliseconds/1e3+t.microseconds/1e6+t.nanoseconds/1e9:"milliseconds"===d?t.microseconds/1e3+t.nanoseconds/1e6:t.nanoseconds/1e3,void 0===c.fractionalDigits?(y.maximumFractionDigits=9,y.minimumFractionDigits=0):(y.maximumFractionDigits=c.fractionalDigits,y.minimumFractionDigits=c.fractionalDigits),y.roundingMode="trunc",u=!0),0!==a||"auto"!==f){y.numberingSystem=c.numberingSystem,"2-digit"===l&&(y.minimumIntegerDigits=2),"2-digit"!==l&&"numeric"!==l&&(y.style="unit",y.unit=p,y.unitDisplay=l);var v,m=(0,r.createMemoizedNumberFormat)(c.locale,y);s?(v=n[n.length-1]).push({type:"literal",value:h}):v=[],m.formatToParts(a).forEach((function(e){var t=e.type,n=e.value;v.push({type:t,value:n,unit:p})})),s||("2-digit"!==l&&"numeric"!==l||(s=!0),n.push(v))}else s=!1},y=0;y<o.TABLE_2.length&&!u;y++)p(y);var v=Object.create(null);v.type="unit";var m=c.style;"digital"===m&&(m="short"),v.style=m;for(var g=(0,r.createMemoizedListFormat)(c.locale,v),b=[],w=0,_=n;w<_.length;w++){for(var S="",E=0,O=_[w];E<O.length;E++)S+=I=O[E].value;b.push(S)}for(var x=g.formatToParts(b),A=0,k=n.length,T=[],j=0,P=x;j<P.length;j++){var D=P[j],C=D.type,I=D.value;if("element"===C){(0,r.invariant)(A<k,"Index out of bounds");for(var M=0,N=n[A];M<N.length;M++){var R=N[M];T.push(R)}A++}else(0,r.invariant)("literal"===C,"Type must be literal"),T.push({type:"literal",value:I})}return T};var r=n(7542),o=n(2552),i=n(715),a=n(6732)},8905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToDurationRecord=function(e){if("object"!=typeof e){if("string"==typeof e)throw new RangeError("Invalid duration format");throw new TypeError("Invalid duration")}var t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};if(void 0!==e.days&&(t.days=(0,o.ToIntegerIfIntegral)(e.days)),void 0!==e.hours&&(t.hours=(0,o.ToIntegerIfIntegral)(e.hours)),void 0!==e.microseconds&&(t.microseconds=(0,o.ToIntegerIfIntegral)(e.microseconds)),void 0!==e.milliseconds&&(t.milliseconds=(0,o.ToIntegerIfIntegral)(e.milliseconds)),void 0!==e.minutes&&(t.minutes=(0,o.ToIntegerIfIntegral)(e.minutes)),void 0!==e.months&&(t.months=(0,o.ToIntegerIfIntegral)(e.months)),void 0!==e.nanoseconds&&(t.nanoseconds=(0,o.ToIntegerIfIntegral)(e.nanoseconds)),void 0!==e.seconds&&(t.seconds=(0,o.ToIntegerIfIntegral)(e.seconds)),void 0!==e.weeks&&(t.weeks=(0,o.ToIntegerIfIntegral)(e.weeks)),void 0!==e.years&&(t.years=(0,o.ToIntegerIfIntegral)(e.years)),void 0===e.years&&void 0===e.months&&void 0===e.weeks&&void 0===e.days&&void 0===e.hours&&void 0===e.minutes&&void 0===e.seconds&&void 0===e.milliseconds&&void 0===e.microseconds&&void 0===e.nanoseconds)throw new TypeError("Invalid duration format");if(!(0,r.IsValidDurationRecord)(t))throw new RangeError("Invalid duration format");return t};var r=n(1076),o=n(1370)},1370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToIntegerIfIntegral=function(e){var t=(0,r.ToNumber)(e);return(0,r.invariant)(t.isInteger(),"".concat(e," is not an integer")),t.toNumber()};var r=n(7542)},2552:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_2=t.TABLE_1=void 0,t.TABLE_1=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"],t.TABLE_2=[{valueField:"years",styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",numberFormatUnit:"year"},{valueField:"months",styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",numberFormatUnit:"month"},{valueField:"weeks",styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",numberFormatUnit:"week"},{valueField:"days",styleSlot:"days",displaySlot:"daysDisplay",unit:"days",numberFormatUnit:"day"},{valueField:"hours",styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",numberFormatUnit:"hour"},{valueField:"minutes",styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",numberFormatUnit:"minute"},{valueField:"seconds",styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",numberFormatUnit:"second"},{valueField:"milliseconds",styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",numberFormatUnit:"millisecond"},{valueField:"microseconds",styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",numberFormatUnit:"microsecond"},{valueField:"nanoseconds",styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",numberFormatUnit:"nanosecond"}]},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationFormat=void 0;var r=n(7542),o=n(1077),i=n(7332),a=n(984),u=n(8905),s=n(6732),c=n(743),l=n(2052),d=["locale","style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay","microseconds","microsecondsDisplay","nanoseconds","nanosecondsDisplay","numberingSystem","fractionalDigits"],h=[{styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"days",displaySlot:"daysDisplay",unit:"days",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"}],p=function(){function e(t,n){if(!(this&&f(this,e)?this.constructor:void 0))throw new TypeError("Intl.DurationFormat must be called with 'new'");var a=(0,r.CanonicalizeLocaleList)(t),u=Object.create(null),l=void 0===n?Object.create(null):(0,r.ToObject)(n),d=(0,r.GetOption)(l,"localeMatcher","string",["best fit","lookup"],"best fit"),p=(0,r.GetOption)(l,"numberingSystem","string",void 0,void 0);if(void 0!==p&&c.numberingSystemNames.indexOf(p)<0)throw RangeError("Invalid numberingSystems: ".concat(p));u.nu=p,u.localeMatcher=d;var y=e.localeData,v=e.availableLocales,m=(0,o.ResolveLocale)(v,a,u,["nu"],y,e.getDefaultLocale),g=m.locale,b=(0,s.getInternalSlots)(this);b.initializedDurationFormat=!0,b.locale=g,b.numberingSystem=m.nu;var w=(0,r.GetOption)(l,"style","string",["long","short","narrow","digital"],"short");b.style=w,b.dataLocale=m.dataLocale;var _="";h.forEach((function(e){var t=e.styleSlot,n=e.displaySlot,r=e.unit,o=e.values,a=e.digitalDefault,u=(0,i.GetDurationUnitOptions)(r,l,w,o,a,_);b[t]=u.style,b[n]=u.display,"hours"!==r&&"minutes"!==r&&"seconds"!==r&&"milliseconds"!==r&&"microseconds"!==r||(_=u.style)})),b.fractionalDigits=(0,r.GetNumberOption)(l,"fractionalDigits",0,9,void 0)}return e.prototype.resolvedOptions=function(){if("object"!=typeof this||!(0,r.OrdinaryHasInstance)(e,this))throw TypeError("Method Intl.DurationFormat.prototype.resolvedOptions called on incompatible receiver");for(var t=(0,s.getInternalSlots)(this),n={},o=0,i=d;o<i.length;o++){var a=i[o],u=t[a];"fractionalDigits"===a?void 0!==u&&(u=Number(u)):(0,r.invariant)(void 0!==u,"Missing internal slot ".concat(a)),n[a]=u}return n},e.prototype.formatToParts=function(e){if(void 0===(0,s.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,u.ToDurationRecord)(e),n=[],r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++){var i=o[r],c=i.type,l=i.unit,f={type:c,value:i.value};l&&(f.unit=l),n.push(f)}return n},e.prototype.format=function(e){if(void 0===(0,s.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,u.ToDurationRecord)(e),n="",r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++)n+=o[r].value;return n},e.supportedLocalesOf=function(t,n){return(0,r.SupportedLocales)(e.availableLocales,(0,r.CanonicalizeLocaleList)(t),n)},e.__defaultLocale="en",e.availableLocales=new Set,e.localeData=Object.keys(l.TIME_SEPARATORS.localeData).reduce((function(t,n){e.availableLocales.add(n);var r=l.TIME_SEPARATORS.localeData[n].nu;return t[n]={nu:r,digitalFormat:l.TIME_SEPARATORS.localeData[n].separator||r.reduce((function(e,t){return e[t]=l.TIME_SEPARATORS.default,e}),{})},t}),{}),e.getDefaultLocale=function(){return e.__defaultLocale},e.polyfilled=!0,e}();t.DurationFormat=p},6732:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalSlots=function(e){var t=n.get(e);return t||(t=Object.create(null),n.set(e,t)),t};var n=new WeakMap},743:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberingSystemNames=void 0,t.numberingSystemNames=["adlm","ahom","arab","arabext","armn","armnlow","bali","beng","bhks","brah","cakm","cham","cyrl","deva","diak","ethi","fullwide","gara","geor","gong","gonm","grek","greklow","gujr","gukh","guru","hanidays","hanidec","hans","hansfin","hant","hantfin","hebr","hmng","hmnp","java","jpan","jpanfin","jpanyear","kali","kawi","khmr","knda","krai","lana","lanatham","laoo","latn","lepc","limb","mathbold","mathdbl","mathmono","mathsanb","mathsans","mlym","modi","mong","mroo","mtei","mymr","mymrepka","mymrpao","mymrshan","mymrtlng","nagm","newa","nkoo","olck","onao","orya","osma","outlined","rohg","roman","romanlow","saur","segment","shrd","sind","sinh","sora","sund","sunu","takr","talu","taml","tamldec","telu","thai","tibt","tirh","tnsa","vaii","wara","wcho"]},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TIME_SEPARATORS=void 0,t.TIME_SEPARATORS={default:":",localeData:{aa:{nu:["latn"]},"aa-DJ":{nu:["latn"]},"aa-ER":{nu:["latn"]},ab:{nu:["latn"]},af:{nu:["latn"]},"af-NA":{nu:["latn"]},agq:{nu:["latn"]},ak:{nu:["latn"]},am:{nu:["latn"]},an:{nu:["latn"]},ann:{nu:["latn"]},apc:{nu:["latn"]},ar:{nu:["latn","latn"]},"ar-AE":{nu:["latn","latn"]},"ar-BH":{nu:["arab","latn"]},"ar-DJ":{nu:["arab","latn"]},"ar-DZ":{nu:["latn","latn"]},"ar-EG":{nu:["arab","latn"]},"ar-EH":{nu:["latn","latn"]},"ar-ER":{nu:["arab","latn"]},"ar-IL":{nu:["arab","latn"]},"ar-IQ":{nu:["arab","latn"]},"ar-JO":{nu:["arab","latn"]},"ar-KM":{nu:["arab","latn"]},"ar-KW":{nu:["arab","latn"]},"ar-LB":{nu:["arab","latn"]},"ar-LY":{nu:["latn","latn"]},"ar-MA":{nu:["latn","latn"]},"ar-MR":{nu:["arab","latn"]},"ar-OM":{nu:["arab","latn"]},"ar-PS":{nu:["arab","latn"]},"ar-QA":{nu:["arab","latn"]},"ar-SA":{nu:["arab","latn"]},"ar-SD":{nu:["arab","latn"]},"ar-SO":{nu:["arab","latn"]},"ar-SS":{nu:["arab","latn"]},"ar-SY":{nu:["arab","latn"]},"ar-TD":{nu:["arab","latn"]},"ar-TN":{nu:["latn","latn"]},"ar-YE":{nu:["arab","latn"]},arn:{nu:["latn"]},as:{nu:["beng"]},asa:{nu:["latn"]},ast:{nu:["latn"]},az:{nu:["latn"]},"az-Arab":{nu:["arabext"]},"az-Arab-IQ":{nu:["arabext"]},"az-Arab-TR":{nu:["arabext"]},"az-Cyrl":{nu:["latn"]},"az-Latn":{nu:["latn"]},ba:{nu:["latn"]},bal:{nu:["latn"]},"bal-Arab":{nu:["latn"]},"bal-Latn":{nu:["latn"]},bas:{nu:["latn"]},be:{nu:["latn"]},"be-tarask":{nu:["latn"]},bem:{nu:["latn"]},bew:{nu:["latn"]},bez:{nu:["latn"]},bg:{nu:["latn"]},bgc:{nu:["deva"]},bgn:{nu:["arabext"]},"bgn-AE":{nu:["arabext"]},"bgn-AF":{nu:["arabext"]},"bgn-IR":{nu:["arabext"]},"bgn-OM":{nu:["arabext"]},bho:{nu:["deva"]},blo:{nu:["latn"]},blt:{nu:["latn"]},bm:{nu:["latn"]},"bm-Nkoo":{nu:["latn"]},bn:{nu:["beng"]},"bn-IN":{nu:["beng"]},bo:{nu:["latn"]},"bo-IN":{nu:["latn"]},br:{nu:["latn"]},brx:{nu:["latn"]},bs:{nu:["latn"]},"bs-Cyrl":{nu:["latn"]},"bs-Latn":{nu:["latn"]},bss:{nu:["latn"]},byn:{nu:["latn"]},ca:{nu:["latn"]},"ca-AD":{nu:["latn"]},"ca-ES-valencia":{nu:["latn"]},"ca-FR":{nu:["latn"]},"ca-IT":{nu:["latn"]},cad:{nu:["latn"]},cch:{nu:["latn"]},ccp:{nu:["cakm"]},"ccp-IN":{nu:["cakm"]},ce:{nu:["latn"]},ceb:{nu:["latn"]},cgg:{nu:["latn"]},cho:{nu:["latn"]},chr:{nu:["latn"]},cic:{nu:["latn"]},ckb:{nu:["arab"]},"ckb-IR":{nu:["arab"]},co:{nu:["latn"]},cs:{nu:["latn"]},csw:{nu:["latn"]},cu:{nu:["latn"]},cv:{nu:["latn"]},cy:{nu:["latn"]},da:{nu:["latn"],separator:{latn:"."}},"da-GL":{nu:["latn"],separator:{latn:"."}},dav:{nu:["latn"]},de:{nu:["latn"]},"de-AT":{nu:["latn"]},"de-BE":{nu:["latn"]},"de-CH":{nu:["latn"]},"de-IT":{nu:["latn"]},"de-LI":{nu:["latn"]},"de-LU":{nu:["latn"]},dje:{nu:["latn"]},doi:{nu:["latn"]},dsb:{nu:["latn"]},dua:{nu:["latn"]},dv:{nu:["latn"]},dyo:{nu:["latn"]},dz:{nu:["tibt"]},ebu:{nu:["latn"]},ee:{nu:["latn"]},"ee-TG":{nu:["latn"]},el:{nu:["latn"]},"el-CY":{nu:["latn"]},"el-polyton":{nu:["latn"]},en:{nu:["latn"]},"en-001":{nu:["latn"]},"en-150":{nu:["latn"]},"en-AE":{nu:["latn"]},"en-AG":{nu:["latn"]},"en-AI":{nu:["latn"]},"en-AS":{nu:["latn"]},"en-AT":{nu:["latn"]},"en-AU":{nu:["latn"]},"en-BB":{nu:["latn"]},"en-BE":{nu:["latn"]},"en-BI":{nu:["latn"]},"en-BM":{nu:["latn"]},"en-BS":{nu:["latn"]},"en-BW":{nu:["latn"]},"en-BZ":{nu:["latn"]},"en-CA":{nu:["latn"]},"en-CC":{nu:["latn"]},"en-CH":{nu:["latn"]},"en-CK":{nu:["latn"]},"en-CM":{nu:["latn"]},"en-CX":{nu:["latn"]},"en-CY":{nu:["latn"]},"en-DE":{nu:["latn"]},"en-DG":{nu:["latn"]},"en-DK":{nu:["latn"],separator:{latn:"."}},"en-DM":{nu:["latn"]},"en-Dsrt":{nu:["latn"]},"en-ER":{nu:["latn"]},"en-FI":{nu:["latn"],separator:{latn:"."}},"en-FJ":{nu:["latn"]},"en-FK":{nu:["latn"]},"en-FM":{nu:["latn"]},"en-GB":{nu:["latn"]},"en-GD":{nu:["latn"]},"en-GG":{nu:["latn"]},"en-GH":{nu:["latn"]},"en-GI":{nu:["latn"]},"en-GM":{nu:["latn"]},"en-GU":{nu:["latn"]},"en-GY":{nu:["latn"]},"en-HK":{nu:["latn"]},"en-ID":{nu:["latn"]},"en-IE":{nu:["latn"]},"en-IL":{nu:["latn"]},"en-IM":{nu:["latn"]},"en-IN":{nu:["latn"]},"en-IO":{nu:["latn"]},"en-JE":{nu:["latn"]},"en-JM":{nu:["latn"]},"en-KE":{nu:["latn"]},"en-KI":{nu:["latn"]},"en-KN":{nu:["latn"]},"en-KY":{nu:["latn"]},"en-LC":{nu:["latn"]},"en-LR":{nu:["latn"]},"en-LS":{nu:["latn"]},"en-MG":{nu:["latn"]},"en-MH":{nu:["latn"]},"en-MO":{nu:["latn"]},"en-MP":{nu:["latn"]},"en-MS":{nu:["latn"]},"en-MT":{nu:["latn"]},"en-MU":{nu:["latn"]},"en-MV":{nu:["latn"]},"en-MW":{nu:["latn"]},"en-MY":{nu:["latn"]},"en-NA":{nu:["latn"]},"en-NF":{nu:["latn"]},"en-NG":{nu:["latn"]},"en-NL":{nu:["latn"]},"en-NR":{nu:["latn"]},"en-NU":{nu:["latn"]},"en-NZ":{nu:["latn"]},"en-PG":{nu:["latn"]},"en-PH":{nu:["latn"]},"en-PK":{nu:["latn"]},"en-PN":{nu:["latn"]},"en-PR":{nu:["latn"]},"en-PW":{nu:["latn"]},"en-RW":{nu:["latn"]},"en-SB":{nu:["latn"]},"en-SC":{nu:["latn"]},"en-SD":{nu:["latn"]},"en-SE":{nu:["latn"]},"en-SG":{nu:["latn"]},"en-SH":{nu:["latn"]},"en-SI":{nu:["latn"]},"en-SL":{nu:["latn"]},"en-SS":{nu:["latn"]},"en-SX":{nu:["latn"]},"en-SZ":{nu:["latn"]},"en-Shaw":{nu:["latn"]},"en-TC":{nu:["latn"]},"en-TK":{nu:["latn"]},"en-TO":{nu:["latn"]},"en-TT":{nu:["latn"]},"en-TV":{nu:["latn"]},"en-TZ":{nu:["latn"]},"en-UG":{nu:["latn"]},"en-UM":{nu:["latn"]},"en-VC":{nu:["latn"]},"en-VG":{nu:["latn"]},"en-VI":{nu:["latn"]},"en-VU":{nu:["latn"]},"en-WS":{nu:["latn"]},"en-ZA":{nu:["latn"]},"en-ZM":{nu:["latn"]},"en-ZW":{nu:["latn"]},eo:{nu:["latn"]},es:{nu:["latn"]},"es-419":{nu:["latn"]},"es-AR":{nu:["latn"]},"es-BO":{nu:["latn"]},"es-BR":{nu:["latn"]},"es-BZ":{nu:["latn"]},"es-CL":{nu:["latn"]},"es-CO":{nu:["latn"]},"es-CR":{nu:["latn"]},"es-CU":{nu:["latn"]},"es-DO":{nu:["latn"]},"es-EA":{nu:["latn"]},"es-EC":{nu:["latn"]},"es-GQ":{nu:["latn"]},"es-GT":{nu:["latn"]},"es-HN":{nu:["latn"]},"es-IC":{nu:["latn"]},"es-MX":{nu:["latn"]},"es-NI":{nu:["latn"]},"es-PA":{nu:["latn"]},"es-PE":{nu:["latn"]},"es-PH":{nu:["latn"]},"es-PR":{nu:["latn"]},"es-PY":{nu:["latn"]},"es-SV":{nu:["latn"]},"es-US":{nu:["latn"]},"es-UY":{nu:["latn"]},"es-VE":{nu:["latn"]},et:{nu:["latn"]},eu:{nu:["latn"]},ewo:{nu:["latn"]},fa:{nu:["arabext"]},"fa-AF":{nu:["arabext"]},ff:{nu:["latn"]},"ff-Adlm":{nu:["adlm"]},"ff-Adlm-BF":{nu:["adlm"]},"ff-Adlm-CM":{nu:["adlm"]},"ff-Adlm-GH":{nu:["adlm"]},"ff-Adlm-GM":{nu:["adlm"]},"ff-Adlm-GW":{nu:["adlm"]},"ff-Adlm-LR":{nu:["adlm"]},"ff-Adlm-MR":{nu:["adlm"]},"ff-Adlm-NE":{nu:["adlm"]},"ff-Adlm-NG":{nu:["adlm"]},"ff-Adlm-SL":{nu:["adlm"]},"ff-Adlm-SN":{nu:["adlm"]},"ff-Latn":{nu:["latn"]},"ff-Latn-BF":{nu:["latn"]},"ff-Latn-CM":{nu:["latn"]},"ff-Latn-GH":{nu:["latn"]},"ff-Latn-GM":{nu:["latn"]},"ff-Latn-GN":{nu:["latn"]},"ff-Latn-GW":{nu:["latn"]},"ff-Latn-LR":{nu:["latn"]},"ff-Latn-MR":{nu:["latn"]},"ff-Latn-NE":{nu:["latn"]},"ff-Latn-NG":{nu:["latn"]},"ff-Latn-SL":{nu:["latn"]},fi:{nu:["latn"],separator:{latn:"."}},fil:{nu:["latn"]},fo:{nu:["latn"]},"fo-DK":{nu:["latn"]},fr:{nu:["latn"]},"fr-BE":{nu:["latn"]},"fr-BF":{nu:["latn"]},"fr-BI":{nu:["latn"]},"fr-BJ":{nu:["latn"]},"fr-BL":{nu:["latn"]},"fr-CA":{nu:["latn"]},"fr-CD":{nu:["latn"]},"fr-CF":{nu:["latn"]},"fr-CG":{nu:["latn"]},"fr-CH":{nu:["latn"]},"fr-CI":{nu:["latn"]},"fr-CM":{nu:["latn"]},"fr-DJ":{nu:["latn"]},"fr-DZ":{nu:["latn"]},"fr-GA":{nu:["latn"]},"fr-GF":{nu:["latn"]},"fr-GN":{nu:["latn"]},"fr-GP":{nu:["latn"]},"fr-GQ":{nu:["latn"]},"fr-HT":{nu:["latn"]},"fr-KM":{nu:["latn"]},"fr-LU":{nu:["latn"]},"fr-MA":{nu:["latn"]},"fr-MC":{nu:["latn"]},"fr-MF":{nu:["latn"]},"fr-MG":{nu:["latn"]},"fr-ML":{nu:["latn"]},"fr-MQ":{nu:["latn"]},"fr-MR":{nu:["latn"]},"fr-MU":{nu:["latn"]},"fr-NC":{nu:["latn"]},"fr-NE":{nu:["latn"]},"fr-PF":{nu:["latn"]},"fr-PM":{nu:["latn"]},"fr-RE":{nu:["latn"]},"fr-RW":{nu:["latn"]},"fr-SC":{nu:["latn"]},"fr-SN":{nu:["latn"]},"fr-SY":{nu:["latn"]},"fr-TD":{nu:["latn"]},"fr-TG":{nu:["latn"]},"fr-TN":{nu:["latn"]},"fr-VU":{nu:["latn"]},"fr-WF":{nu:["latn"]},"fr-YT":{nu:["latn"]},frr:{nu:["latn"]},fur:{nu:["latn"]},fy:{nu:["latn"]},ga:{nu:["latn"]},"ga-GB":{nu:["latn"]},gaa:{nu:["latn"]},gd:{nu:["latn"]},gez:{nu:["latn"]},"gez-ER":{nu:["latn"]},gl:{nu:["latn"]},gn:{nu:["latn"]},gsw:{nu:["latn"]},"gsw-FR":{nu:["latn"]},"gsw-LI":{nu:["latn"]},gu:{nu:["latn"]},guz:{nu:["latn"]},gv:{nu:["latn"]},ha:{nu:["latn"]},"ha-Arab":{nu:["latn"]},"ha-Arab-SD":{nu:["latn"]},"ha-GH":{nu:["latn"]},"ha-NE":{nu:["latn"]},haw:{nu:["latn"]},he:{nu:["latn"]},hi:{nu:["latn"]},"hi-Latn":{nu:["latn"]},hnj:{nu:["hmnp","latn"]},"hnj-Hmnp":{nu:["hmnp","latn"]},hr:{nu:["latn"]},"hr-BA":{nu:["latn"]},hsb:{nu:["latn"]},hu:{nu:["latn"]},hy:{nu:["latn"]},ia:{nu:["latn"]},id:{nu:["latn"],separator:{latn:"."}},ie:{nu:["latn"]},ig:{nu:["latn"]},ii:{nu:["latn"]},io:{nu:["latn"]},is:{nu:["latn"]},it:{nu:["latn"]},"it-CH":{nu:["latn"]},"it-SM":{nu:["latn"]},"it-VA":{nu:["latn"]},iu:{nu:["latn"]},"iu-Latn":{nu:["latn"]},ja:{nu:["latn"]},jbo:{nu:["latn"]},jgo:{nu:["latn"]},jmc:{nu:["latn"]},jv:{nu:["latn"]},ka:{nu:["latn"]},kaa:{nu:["latn"]},"kaa-Cyrl":{nu:["latn"]},"kaa-Latn":{nu:["latn"]},kab:{nu:["latn"]},kaj:{nu:["latn"]},kam:{nu:["latn"]},kcg:{nu:["latn"]},kde:{nu:["latn"]},kea:{nu:["latn"]},ken:{nu:["latn"]},kgp:{nu:["latn"]},khq:{nu:["latn"]},ki:{nu:["latn"]},kk:{nu:["latn"]},"kk-Arab":{nu:["latn"]},"kk-Cyrl":{nu:["latn"]},"kk-KZ":{nu:["latn"]},kkj:{nu:["latn"]},kl:{nu:["latn"]},kln:{nu:["latn"]},km:{nu:["latn"]},kn:{nu:["latn"]},ko:{nu:["latn"]},"ko-CN":{nu:["latn"]},"ko-KP":{nu:["latn"]},kok:{nu:["latn"]},"kok-Deva":{nu:["latn"]},"kok-Latn":{nu:["latn"]},kpe:{nu:["latn"]},"kpe-GN":{nu:["latn"]},ks:{nu:["arabext"]},"ks-Arab":{nu:["arabext"]},"ks-Deva":{nu:["latn"]},ksb:{nu:["latn"]},ksf:{nu:["latn"]},ksh:{nu:["latn"]},ku:{nu:["latn"]},kw:{nu:["latn"]},kxv:{nu:["latn"]},"kxv-Deva":{nu:["latn"]},"kxv-Latn":{nu:["latn"]},"kxv-Orya":{nu:["latn"]},"kxv-Telu":{nu:["latn"]},ky:{nu:["latn"]},la:{nu:["latn"]},lag:{nu:["latn"]},lb:{nu:["latn"]},lg:{nu:["latn"]},lij:{nu:["latn"]},lkt:{nu:["latn"]},lld:{nu:["latn"]},lmo:{nu:["latn"]},ln:{nu:["latn"]},"ln-AO":{nu:["latn"]},"ln-CF":{nu:["latn"]},"ln-CG":{nu:["latn"]},lo:{nu:["latn"]},lrc:{nu:["arabext"]},"lrc-IQ":{nu:["arabext"]},lt:{nu:["latn"]},ltg:{nu:["latn"]},lu:{nu:["latn"]},luo:{nu:["latn"]},luy:{nu:["latn"]},lv:{nu:["latn"]},mai:{nu:["latn"]},mas:{nu:["latn"]},"mas-TZ":{nu:["latn"]},mdf:{nu:["latn"]},mer:{nu:["latn"]},mfe:{nu:["latn"]},mg:{nu:["latn"]},mgh:{nu:["latn"]},mgo:{nu:["latn"]},mhn:{nu:["latn"]},mi:{nu:["latn"]},mic:{nu:["latn"]},mk:{nu:["latn"]},ml:{nu:["latn"]},mn:{nu:["latn"]},"mn-Mong":{nu:["latn"]},"mn-Mong-MN":{nu:["latn"]},mni:{nu:["beng"]},"mni-Beng":{nu:["beng"]},"mni-Mtei":{nu:["mtei"]},moh:{nu:["latn"]},mr:{nu:["deva"]},ms:{nu:["latn"]},"ms-Arab":{nu:["latn"]},"ms-Arab-BN":{nu:["latn"]},"ms-BN":{nu:["latn"]},"ms-ID":{nu:["latn"],separator:{latn:"."}},"ms-SG":{nu:["latn"]},mt:{nu:["latn"]},mua:{nu:["latn"]},mus:{nu:["latn"]},my:{nu:["mymr"]},myv:{nu:["latn"]},mzn:{nu:["arabext"]},naq:{nu:["latn"]},nb:{nu:["latn"]},"nb-SJ":{nu:["latn"]},nd:{nu:["latn"]},nds:{nu:["latn"]},"nds-NL":{nu:["latn"]},ne:{nu:["deva"]},"ne-IN":{nu:["deva"]},nl:{nu:["latn"]},"nl-AW":{nu:["latn"]},"nl-BE":{nu:["latn"]},"nl-BQ":{nu:["latn"]},"nl-CW":{nu:["latn"]},"nl-SR":{nu:["latn"]},"nl-SX":{nu:["latn"]},nmg:{nu:["latn"]},nn:{nu:["latn"]},nnh:{nu:["latn"]},no:{nu:["latn"]},nqo:{nu:["nkoo"]},nr:{nu:["latn"]},nso:{nu:["latn"]},nus:{nu:["latn"]},nv:{nu:["latn"]},ny:{nu:["latn"]},nyn:{nu:["latn"]},oc:{nu:["latn"]},"oc-ES":{nu:["latn"]},om:{nu:["latn"]},"om-KE":{nu:["latn"]},or:{nu:["latn"]},os:{nu:["latn"]},"os-RU":{nu:["latn"]},osa:{nu:["latn"]},pa:{nu:["latn"]},"pa-Arab":{nu:["arabext"]},"pa-Guru":{nu:["latn"]},pap:{nu:["latn"]},"pap-AW":{nu:["latn"]},pcm:{nu:["latn"]},pis:{nu:["latn"]},pl:{nu:["latn"]},prg:{nu:["latn"]},ps:{nu:["arabext"]},"ps-PK":{nu:["arabext"]},pt:{nu:["latn"]},"pt-AO":{nu:["latn"]},"pt-CH":{nu:["latn"]},"pt-CV":{nu:["latn"]},"pt-GQ":{nu:["latn"]},"pt-GW":{nu:["latn"]},"pt-LU":{nu:["latn"]},"pt-MO":{nu:["latn"]},"pt-MZ":{nu:["latn"]},"pt-PT":{nu:["latn"]},"pt-ST":{nu:["latn"]},"pt-TL":{nu:["latn"]},qu:{nu:["latn"]},"qu-BO":{nu:["latn"]},"qu-EC":{nu:["latn"]},quc:{nu:["latn"]},raj:{nu:["deva"]},rhg:{nu:["latn"]},"rhg-Rohg":{nu:["latn"]},"rhg-Rohg-BD":{nu:["latn"]},rif:{nu:["latn"]},rm:{nu:["latn"]},rn:{nu:["latn"]},ro:{nu:["latn"]},"ro-MD":{nu:["latn"]},rof:{nu:["latn"]},ru:{nu:["latn"]},"ru-BY":{nu:["latn"]},"ru-KG":{nu:["latn"]},"ru-KZ":{nu:["latn"]},"ru-MD":{nu:["latn"]},"ru-UA":{nu:["latn"]},rw:{nu:["latn"]},rwk:{nu:["latn"]},sa:{nu:["deva"]},sah:{nu:["latn"]},saq:{nu:["latn"]},sat:{nu:["olck"]},"sat-Deva":{nu:["deva"]},"sat-Olck":{nu:["olck"]},sbp:{nu:["latn"]},sc:{nu:["latn"]},scn:{nu:["latn"]},sd:{nu:["arab"]},"sd-Arab":{nu:["arab"]},"sd-Deva":{nu:["latn"]},sdh:{nu:["arab"]},"sdh-IQ":{nu:["arab"]},se:{nu:["latn"]},"se-FI":{nu:["latn"]},"se-SE":{nu:["latn"]},seh:{nu:["latn"]},ses:{nu:["latn"]},sg:{nu:["latn"]},shi:{nu:["latn"]},"shi-Latn":{nu:["latn"]},"shi-Tfng":{nu:["latn"]},shn:{nu:["latn"]},"shn-TH":{nu:["latn"]},si:{nu:["latn"],separator:{latn:"."}},sid:{nu:["latn"]},sk:{nu:["latn"]},skr:{nu:["latn"]},sl:{nu:["latn"]},sma:{nu:["latn"]},"sma-NO":{nu:["latn"]},smj:{nu:["latn"]},"smj-NO":{nu:["latn"]},smn:{nu:["latn"],separator:{latn:"."}},sms:{nu:["latn"]},sn:{nu:["latn"]},so:{nu:["latn"]},"so-DJ":{nu:["latn"]},"so-ET":{nu:["latn"]},"so-KE":{nu:["latn"]},sq:{nu:["latn"]},"sq-MK":{nu:["latn"]},"sq-XK":{nu:["latn"]},sr:{nu:["latn"]},"sr-Cyrl":{nu:["latn"]},"sr-Cyrl-BA":{nu:["latn"]},"sr-Cyrl-ME":{nu:["latn"]},"sr-Cyrl-XK":{nu:["latn"]},"sr-Latn":{nu:["latn"]},"sr-Latn-BA":{nu:["latn"]},"sr-Latn-ME":{nu:["latn"]},"sr-Latn-XK":{nu:["latn"]},ss:{nu:["latn"]},"ss-SZ":{nu:["latn"]},ssy:{nu:["latn"]},st:{nu:["latn"]},"st-LS":{nu:["latn"]},su:{nu:["latn"],separator:{latn:"."}},"su-Latn":{nu:["latn"],separator:{latn:"."}},sv:{nu:["latn"]},"sv-AX":{nu:["latn"]},"sv-FI":{nu:["latn"],separator:{latn:"."}},sw:{nu:["latn"]},"sw-CD":{nu:["latn"]},"sw-KE":{nu:["latn"]},"sw-UG":{nu:["latn"]},syr:{nu:["latn"]},"syr-SY":{nu:["latn"]},szl:{nu:["latn"]},ta:{nu:["latn"]},"ta-LK":{nu:["latn"]},"ta-MY":{nu:["latn"]},"ta-SG":{nu:["latn"]},te:{nu:["latn"]},teo:{nu:["latn"]},"teo-KE":{nu:["latn"]},tg:{nu:["latn"]},th:{nu:["latn"]},ti:{nu:["latn"]},"ti-ER":{nu:["latn"]},tig:{nu:["latn"]},tk:{nu:["latn"]},tn:{nu:["latn"]},"tn-BW":{nu:["latn"]},to:{nu:["latn"]},tok:{nu:["latn"]},tpi:{nu:["latn"]},tr:{nu:["latn"]},"tr-CY":{nu:["latn"]},trv:{nu:["latn"]},trw:{nu:["latn"]},ts:{nu:["latn"]},tt:{nu:["latn"]},twq:{nu:["latn"]},tyv:{nu:["latn"]},tzm:{nu:["latn"]},ug:{nu:["latn"]},uk:{nu:["latn"]},und:{nu:["latn"]},ur:{nu:["latn"]},"ur-IN":{nu:["arabext"],separator:{arabext:"٫"}},uz:{nu:["latn"]},"uz-Arab":{nu:["arabext"]},"uz-Cyrl":{nu:["latn"]},"uz-Latn":{nu:["latn"]},vai:{nu:["latn"]},"vai-Latn":{nu:["latn"]},"vai-Vaii":{nu:["latn"]},ve:{nu:["latn"]},vec:{nu:["latn"]},vi:{nu:["latn"]},vmw:{nu:["latn"]},vo:{nu:["latn"]},vun:{nu:["latn"]},wa:{nu:["latn"]},wae:{nu:["latn"]},wal:{nu:["latn"]},wbp:{nu:["latn"]},wo:{nu:["latn"]},xh:{nu:["latn"]},xnr:{nu:["latn"]},xog:{nu:["latn"]},yav:{nu:["latn"]},yi:{nu:["latn"]},yo:{nu:["latn"]},"yo-BJ":{nu:["latn"]},yrl:{nu:["latn"]},"yrl-CO":{nu:["latn"]},"yrl-VE":{nu:["latn"]},yue:{nu:["latn"]},"yue-Hans":{nu:["latn"]},"yue-Hant":{nu:["latn"]},"yue-Hant-CN":{nu:["latn"]},za:{nu:["latn"]},zgh:{nu:["latn"]},zh:{nu:["latn"]},"zh-Hans":{nu:["latn"]},"zh-Hans-HK":{nu:["latn"]},"zh-Hans-MO":{nu:["latn"]},"zh-Hans-MY":{nu:["latn"]},"zh-Hans-SG":{nu:["latn"]},"zh-Hant":{nu:["latn"]},"zh-Hant-HK":{nu:["latn"]},"zh-Hant-MO":{nu:["latn"]},"zh-Hant-MY":{nu:["latn"]},"zh-Latn":{nu:["latn"]},zu:{nu:["latn"]}}}},1077:function(e,t,n){"use strict";var r=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},o=function(e,t,n){var r=t.split("-"),o=r[0],i=r[1],a=r[2],u=!0;if(a&&"$"===a[0]){var s="!"!==a[1],c=(s?n[a.slice(1)]:n[a.slice(2)]).map((function(e){return v[e]||[e]})).reduce((function(e,t){return(0,p.__spreadArray)((0,p.__spreadArray)([],e,!0),t,!0)}),[]);u&&(u=!(c.indexOf(e.region||"")>-1!=s))}else u&&(u=!e.region||"*"===a||a===e.region);return u&&(u=!e.script||"*"===i||i===e.script),u&&(u=!e.language||"*"===o||o===e.language),u},i=function(e){return[e.language,e.script,e.region].filter(Boolean).join("-")},a=function(e,t,n){for(var r=0,a=n.matches;r<a.length;r++){var u=a[r],s=o(e,u.desired,n.matchVariables)&&o(t,u.supported,n.matchVariables);if(u.oneway||s||(s=o(e,u.supported,n.matchVariables)&&o(t,u.desired,n.matchVariables)),s){var c=10*u.distance;return n.paradigmLocales.indexOf(i(e))>-1!=n.paradigmLocales.indexOf(i(t))>-1?c-1:c}}throw new Error("No matching distance found")},u=function(e,t,n){var r,o,i=[],u=t.reduce((function(e,t){var n=t.replace(m,"");return i.push(n),e[n]=t,e}),{}),s=function(e,t,n){void 0===n&&(n=g);var r=1/0,o={matchedDesiredLocale:"",distances:{}};return e.forEach((function(e,n){o.distances[e]||(o.distances[e]={}),t.forEach((function(t){var i=function(e,t){var n=new Intl.Locale(e).maximize(),r=new Intl.Locale(t).maximize(),o={language:n.language,script:n.script||"",region:n.region||""},i={language:r.language,script:r.script||"",region:r.region||""},u=0,s=function(){var e,t;if(!h){var n=null===(t=null===(e=y.supplemental.languageMatching["written-new"][0])||void 0===e?void 0:e.paradigmLocales)||void 0===t?void 0:t._locales.split(" "),r=y.supplemental.languageMatching["written-new"].slice(1,5),o=y.supplemental.languageMatching["written-new"].slice(5).map((function(e){var t=Object.keys(e)[0],n=e[t];return{supported:t,desired:n._desired,distance:+n._distance,oneway:"true"===n.oneway}}),{});h={matches:o,matchVariables:r.reduce((function(e,t){var n=Object.keys(t)[0],r=t[n];return e[n.slice(1)]=r._value.split("+"),e}),{}),paradigmLocales:(0,p.__spreadArray)((0,p.__spreadArray)([],n,!0),n.map((function(e){return new Intl.Locale(e.replace(/_/g,"-")).maximize().toString()})),!0)}}return h}();return o.language!==i.language&&(u+=a({language:n.language,script:"",region:""},{language:r.language,script:"",region:""},s)),o.script!==i.script&&(u+=a({language:n.language,script:o.script,region:""},{language:r.language,script:i.script,region:""},s)),o.region!==i.region&&(u+=a(o,i,s)),u}(e,t)+0+40*n;o.distances[e][t]=i,i<r&&(r=i,o.matchedDesiredLocale=e,o.matchedSupportedLocale=t)}))})),r>=n&&(o.matchedDesiredLocale=void 0,o.matchedSupportedLocale=void 0),o}(i,e);return s.matchedSupportedLocale&&s.matchedDesiredLocale&&(r=s.matchedSupportedLocale,o=u[s.matchedDesiredLocale].slice(s.matchedDesiredLocale.length)||void 0),r?{locale:r,extension:o}:{locale:n()}},s=function(e){return Intl.getCanonicalLocales(e)[0]},c=function(e,t){for(var n=t;;){if(e.indexOf(n)>-1)return n;var r=n.lastIndexOf("-");if(!~r)return;r>=2&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}},l=function(e,t,n,o,i,a){var l,f;f="lookup"===n.localeMatcher?function(e,t,n){for(var r={locale:""},o=0,i=t;o<i.length;o++){var a=i[o],u=a.replace(m,""),s=c(e,u);if(s)return r.locale=s,a!==u&&(r.extension=a.slice(u.length,a.length)),r}return r.locale=n(),r}(Array.from(e),t,a):u(Array.from(e),t,a),null==f&&(f={locale:a(),extension:""});var d,h,p=f.locale,y=i[p],v={locale:"en",dataLocale:p};f.extension?(d=function(e){r(e===e.toLowerCase(),"Expected extension to be lowercase"),r("-u-"===e.slice(0,3),"Expected extension to be a Unicode locale extension");for(var t,n=[],o=[],i=e.length,a=3;a<i;){var u,s=e.indexOf("-",a);u=-1===s?i-a:s-a;var c=e.slice(a,a+u);r(u>=2,"Expected a subtag to have at least 2 characters"),void 0===t&&2!=u?-1===n.indexOf(c)&&n.push(c):2===u?(t={key:c,value:""},void 0===o.find((function(e){return e.key===(null==t?void 0:t.key)}))&&o.push(t)):""===(null==t?void 0:t.value)?t.value=c:(r(void 0!==t,"Expected keyword to be defined"),t.value+="-"+c),a+=u+1}return{attributes:n,keywords:o}}(f.extension),h=d.keywords):h=[];for(var g=[],b=function(e){var t=null!==(l=null==y?void 0:y[e])&&void 0!==l?l:[];r(Array.isArray(t),"keyLocaleData for ".concat(e," must be an array"));var o=t[0];r(void 0===o||"string"==typeof o,"value must be a string or undefined");var i=void 0,a=h.find((function(t){return t.key===e}));if(a){var u=a.value;""!==u?t.indexOf(u)>-1&&(i={key:e,value:o=u}):t.indexOf("true")>-1&&(i={key:e,value:o="true"})}var s,c,f=n[e];r(null==f||"string"==typeof f,"optionsValue must be a string or undefined"),"string"==typeof f&&(s=e.toLowerCase(),c=f.toLowerCase(),r(void 0!==s,"ukey must be defined"),""===(f=c)&&(f="true")),f!==o&&t.indexOf(f)>-1&&(o=f,i=void 0),i&&g.push(i),v[e]=o},w=0,_=o;w<_.length;w++)b(_[w]);return g.length>0&&(p=function(e,t,n){r(-1===e.indexOf("-u-"),"Expected locale to not have a Unicode locale extension");for(var o="-u",i=0,a=[];i<a.length;i++)o+="-".concat(a[i]);for(var u=0,c=n;u<c.length;u++){var l=c[u],f=l.key,d=l.value;o+="-".concat(f),""!==d&&(o+="-".concat(d))}if("-u"===o)return s(e);var h=e.indexOf("-x-");return s(-1===h?e+o:e.slice(0,h)+o+e.slice(h))}(p,0,g)),v.locale=p,v},f=function(e,t){for(var n=[],r=0,o=t;r<o.length;r++){var i=c(e,o[r].replace(m,""));i&&n.push(i)}return n},d=function(e,t,n,r){return l(t,(o=e,Intl.getCanonicalLocales(o)),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return n})).locale;var o};n.r(t),n.d(t,{LookupSupportedLocales:function(){return f},ResolveLocale:function(){return l},match:function(){return d}});var h,p=n(2712),y={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},v={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},m=/-u(?:-[0-9a-z]{2,8})+/gi,g=838},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},7067:function(e){e.exports=function(){"use strict";return function(e,t,n){var r=t.prototype,o=function(e){var t,o=e.date,i=e.utc,a={};if(!f(t=o,Date)&&!f(t,Array)&&f(t,Object)){if(!Object.keys(o).length)return new Date;var u=i?n.utc():n();Object.keys(o).forEach((function(e){var t,n;a[(t=e,n=r.$utils().p(t),"date"===n?"day":n)]=o[e]}));var s=a.day||(a.year||a.month>=0?1:u.date()),c=a.year||u.year(),l=a.month>=0?a.month:a.year||a.day?0:u.month(),d=a.hour||0,h=a.minute||0,p=a.second||0,y=a.millisecond||0;return i?new Date(Date.UTC(c,l,s,d,h,p,y)):new Date(c,l,s,d,h,p,y)}return o},i=r.parse;r.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=r.set,u=r.add,s=function(e,t,n,r){if(void 0===r&&(r=1),f(t,Object)){var o=Object.keys(t),i=this;return o.forEach((function(n){i=e.bind(i)(t[n]*r,n)})),i}return e.bind(this)(t*r,n)};r.set=function(e,t){return t=void 0===t?e:t,s.bind(this)((function(e,t){return a.bind(this)(t,e)}),t,e)},r.add=function(e,t){return s.bind(this)(u,e,t)},r.subtract=function(e,t){return s.bind(this)(u,e,t,-1)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,e)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()},2257:function(e,t,n){var r=Symbol("SemVer ANY"),o=function(){"use strict";function e(t,n){if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),f(t,e)){if(t.loose===!!n.loose)return t;t=t.value}d("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===r?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}return u(e,[{key:"parse",value:function(e){var t=this.options.loose?s[c.COMPARATORLOOSE]:s[c.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new h(n[2],this.options.loose):this.semver=r}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(d("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new h(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!f(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new p(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new p(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),u=l(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),s=l(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||o||i&&a||u||s}}],[{key:"ANY",get:function(){return r}}]),e}();e.exports=o;var a=n(5765),s=a.re,c=a.t,l=n(7539),d=n(4225),h=n(6376),p=n(6902)},6902:function(e,t,n){var r=function(){"use strict";function e(t,n){var r=this;if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),f(t,e))return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(f(t,o))return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return u(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(r,k(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[d.COMPARATORTRIM],h),a("comparator trim",e,l[d.COMPARATORTRIM]),e=(e=(e=e.replace(l[d.TILDETRIM],p)).replace(l[d.CARETTRIM],y)).split(/\s+/).join(" ");var i=n?l[d.COMPARATORLOOSE]:l[d.COMPARATOR];return e.split(" ").map((function(e){return m(e,t.options)})).join(" ").split(/\s+/).map((function(e){return A(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(i)}:function(){return!0}).map((function(e){return new o(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!f(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return v(e,n)&&t.set.some((function(t){return v(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=r;var o=n(2257),a=n(4225),s=n(6376),c=n(5765),l=c.re,d=c.t,h=c.comparatorTrimReplace,p=c.tildeTrimReplace,y=c.caretTrimReplace,v=function(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n},m=function(e,t){return a("comp",e,t),e=_(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=E(e,t),a("xrange",e),e=x(e,t),a("stars",e),e},g=function(e){return!e||"x"===e.toLowerCase()||"*"===e},b=function(e,t){return e.trim().split(/\s+/).map((function(e){return w(e,t)})).join(" ")},w=function(e,t){var n=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(n,(function(t,n,r,o,i){var u;return a("tilde",e,t,n,r,o,i),g(n)?u="":g(r)?u=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):g(o)?u=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):i?(a("replaceTilde pr",i),u=">=".concat(n,".").concat(r,".").concat(o,"-").concat(i," <").concat(n,".").concat(+r+1,".0-0")):u=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),a("tilde return",u),u}))},_=function(e,t){return e.trim().split(/\s+/).map((function(e){return S(e,t)})).join(" ")},S=function(e,t){a("caret",e,t);var n=t.loose?l[d.CARETLOOSE]:l[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,o,i,u){var s;return a("caret",e,t,n,o,i,u),g(n)?s="":g(o)?s=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):g(i)?s="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):u?(a("replaceCaret pr",u),s="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(+n+1,".0.0-0")):(a("no pr"),s="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i," <").concat(+n+1,".0.0-0")),a("caret return",s),s}))},E=function(e,t){return a("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return O(e,t)})).join(" ")},O=function(e,t){e=e.trim();var n=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(n,(function(n,r,o,i,u,s){a("xRange",e,n,r,o,i,u,s);var c=g(o),l=c||g(i),f=l||g(u),d=f;return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(i=0),u=0,">"===r?(r=">=",l?(o=+o+1,i=0,u=0):(i=+i+1,u=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(s="-0"),n="".concat(r+o,".").concat(i,".").concat(u).concat(s)):l?n=">=".concat(o,".0.0").concat(s," <").concat(+o+1,".0.0-0"):f&&(n=">=".concat(o,".").concat(i,".0").concat(s," <").concat(o,".").concat(+i+1,".0-0")),a("xRange return",n),n}))},x=function(e,t){return a("replaceStars",e,t),e.trim().replace(l[d.STAR],"")},A=function(e,t){return a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],"")},k=function(e){return function(t,n,r,o,i,a,u,s,c,l,f,d,h){return"".concat(n=g(r)?"":g(o)?">=".concat(r,".0.0").concat(e?"-0":""):g(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":"")," ").concat(s=g(c)?"":g(l)?"<".concat(+c+1,".0.0-0"):g(f)?"<".concat(c,".").concat(+l+1,".0-0"):d?"<=".concat(c,".").concat(l,".").concat(f,"-").concat(d):e?"<".concat(c,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(s)).trim()}},T=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(a(e[i].semver),e[i].semver!==o.ANY&&e[i].semver.prerelease.length>0){var u=e[i].semver;if(u.major===t.major&&u.minor===t.minor&&u.patch===t.patch)return!0}return!1}return!0}},6376:function(e,t,n){var r=n(4225),o=n(3295),a=o.MAX_LENGTH,s=o.MAX_SAFE_INTEGER,c=n(5765),l=c.re,d=c.t,h=n(6742).compareIdentifiers,p=function(){"use strict";function e(t,n){if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),f(t,e)){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>a)throw new TypeError("version is longer than ".concat(a," characters"));r("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var o=t.trim().match(n.loose?l[d.LOOSE]:l[d.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}return u(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(r("SemVer.compare",this.version,this.options,t),!f(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return f(t,e)||(t=new e(t,this.options)),h(this.major,t.major)||h(this.minor,t.minor)||h(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(f(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var o=this.prerelease[n],i=t.prerelease[n];if(r("prerelease compare",n,o,i),void 0===o&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===o)return-1;if(o!==i)return h(o,i)}while(++n)}},{key:"compareBuild",value:function(t){f(t,e)||(t=new e(t,this.options));var n=0;do{var o=this.build[n],i=t.build[n];if(r("prerelease compare",n,o,i),void 0===o&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===o)return-1;if(o!==i)return h(o,i)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=p},3507:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:function(e,t,n){var r=n(8718),o=n(1194),i=n(1312),a=n(5903),u=n(1544),s=n(2056);e.exports=function(e,t,n,c){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return u(e,n,c);case"<=":return s(e,n,c);default:throw new TypeError("Invalid operator: ".concat(t))}}},9038:function(e,t,n){var r=n(6376),o=n(3959),i=n(5765),a=i.re,u=i.t;e.exports=function(e,t){if(f(e,r))return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var i;(i=a[u.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),a[u.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;a[u.COERCERTL].lastIndex=-1}else n=e.match(a[u.COERCE]);return null===n?null:o("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},8880:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){var o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:function(e,t,n){var r=n(6269);e.exports=function(e,t){return r(e,t,!0)}},6269:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},2378:function(e,t,n){var r=n(3959),o=n(8718);e.exports=function(e,t){if(o(e,t))return null;var n=r(e),i=r(t),a=n.prerelease.length||i.prerelease.length,u=a?"pre":"",s=a?"prerelease":"";for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==i[c])return u+c;return s}},8718:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0===r(e,t,n)}},1312:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>0}},5903:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>=0}},253:function(e,t,n){var r=n(6376);e.exports=function(e,t,n,o){"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<0}},2056:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<=0}},8679:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).major}},7789:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).minor}},1194:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0!==r(e,t,n)}},3959:function(e,t,n){var r=n(3295).MAX_LENGTH,o=n(5765),i=o.re,a=o.t,u=n(6376);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),f(e,u))return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new u(e,t)}catch(e){return null}}},2358:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).patch}},7559:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(t,e,n)}},3657:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},5712:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},6397:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},1249:function(e,t,n){var r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:function(e){var t,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).error.apply(t,["SEMVER"].concat(m(n)))}:function(){};e.exports=n},6742:function(e){var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},5765:function(e,t,n){var r=n(3295).MAX_SAFE_COMPONENT_LENGTH,o=n(4225),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={},s=0,c=function(e,t,n){var r=s++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(a[u.NUMERICIDENTIFIER],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(a[u.NUMERICIDENTIFIERLOOSE],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(a[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(a[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(a[u.BUILDIDENTIFIER],"(?:\\.").concat(a[u.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(a[u.MAINVERSION]).concat(a[u.PRERELEASE],"?").concat(a[u.BUILD],"?")),c("FULL","^".concat(a[u.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(a[u.MAINVERSIONLOOSE]).concat(a[u.PRERELEASELOOSE],"?").concat(a[u.BUILD],"?")),c("LOOSE","^".concat(a[u.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(a[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(a[u.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:").concat(a[u.PRERELEASE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[u.PRERELEASELOOSE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAINLOOSE],"$")),c("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(a[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(a[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(a[u.GTLT],"\\s*(").concat(a[u.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],"|").concat(a[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(a[u.XRANGEPLAIN],")\\s+-\\s+(").concat(a[u.XRANGEPLAIN],")\\s*$")),c("HYPHENRANGELOOSE","^\\s*(".concat(a[u.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[u.XRANGEPLAINLOOSE],")\\s*$")),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,">",n)}},2937:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},32:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,"<",n)}},5775:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&-1!==a.compare(e)||(a=new r(i=e,n)))})),i}},1657:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&1!==a.compare(e)||(a=new r(i=e,n)))})),i}},5316:function(e,t,n){var r=n(6376),o=n(6902),i=n(1312);e.exports=function(e,t){e=new o(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var a=0;a<e.set.length;++a)e.set[a].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null}},6826:function(e,t,n){var r=n(6376),o=n(2257),i=o.ANY,a=n(6902),u=n(5712),s=n(1312),c=n(1544),l=n(2056),f=n(5903);e.exports=function(e,t,n,d){var h,p,y,v,m,b=function(n){var r=t.set[n],a=null,u=null;return r.forEach((function(e){e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,h(e.semver,a.semver,d)?a=e:y(e.semver,u.semver,d)&&(u=e)})),a.operator===v||a.operator===m?{v:!1}:u.operator&&u.operator!==v||!p(e,u.semver)?u.operator===m&&y(e,u.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,d),t=new a(t,d),n){case">":h=s,p=l,y=c,v=">",m=">=";break;case"<":h=c,p=f,y=s,v="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,d))return!1;for(var w=0;w<t.set.length;++w){var _=b(w);if("object"===g(_))return _.v}return!0}},7908:function(e,t,n){var r=n(5712),o=n(6269);e.exports=function(e,t,n){var i=[],a=null,u=null,s=e.sort((function(e,t){return o(e,t,n)})),c=!0,l=!1,f=void 0;try{for(var d,h=s[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;r(p,t,n)?(u=p,a||(a=p)):(u&&i.push([a,u]),u=null,a=null)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}a&&i.push([a,null]);var y=[],m=!0,g=!1,b=void 0;try{for(var w,_=i[Symbol.iterator]();!(m=(w=_.next()).done);m=!0){var S=v(w.value,2),E=S[0],O=S[1];E===O?y.push(E):O||E!==s[0]?O?E===s[0]?y.push("<=".concat(O)):y.push("".concat(E," - ").concat(O)):y.push(">=".concat(E)):y.push("*")}}catch(e){g=!0,b=e}finally{try{m||null==_.return||_.return()}finally{if(g)throw b}}var x=y.join(" || "),A="string"==typeof t.raw?t.raw:String(t);return x.length<A.length?x:t}},799:function(e,t,n){var r=n(6902),o=n(2257).ANY,i=n(5712),a=n(6269),u=function(e,t,n){if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;var r,u,l,f,d,h=new Set,p=!0,y=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var b=m.value;">"===b.operator||">="===b.operator?r=s(r,b,n):"<"===b.operator||"<="===b.operator?u=c(u,b,n):h.add(b.semver)}}catch(e){y=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(y)throw v}}if(h.size>1)return null;if(r&&u){if((l=a(r.semver,u.semver,n))>0)return null;if(0===l&&(">="!==r.operator||"<="!==u.operator))return null}var w=!0,_=!1,S=void 0;try{for(var E,O=h[Symbol.iterator]();!(w=(E=O.next()).done);w=!0){var x=E.value;if(r&&!i(x,String(r),n))return null;if(u&&!i(x,String(u),n))return null;var A=!0,k=!1,T=void 0;try{for(var j,P=t[Symbol.iterator]();!(A=(j=P.next()).done);A=!0){var D=j.value;if(!i(x,String(D),n))return!1}}catch(e){k=!0,T=e}finally{try{A||null==P.return||P.return()}finally{if(k)throw T}}return!0}}catch(e){_=!0,S=e}finally{try{w||null==O.return||O.return()}finally{if(_)throw S}}var C=!0,I=!1,M=void 0;try{for(var N,R=t[Symbol.iterator]();!(C=(N=R.next()).done);C=!0){var L=N.value;if(d=d||">"===L.operator||">="===L.operator,f=f||"<"===L.operator||"<="===L.operator,r)if(">"===L.operator||">="===L.operator){if(s(r,L,n)===L)return!1}else if(">="===r.operator&&!i(r.semver,String(L),n))return!1;if(u)if("<"===L.operator||"<="===L.operator){if(c(u,L,n)===L)return!1}else if("<="===u.operator&&!i(u.semver,String(L),n))return!1;if(!L.operator&&(u||r)&&0!==l)return!1}}catch(e){I=!0,M=e}finally{try{C||null==R.return||R.return()}finally{if(I)throw M}}return!(r&&f&&!u&&0!==l||u&&d&&!r&&0!==l)},s=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new r(e,n),t=new r(t,n);var o=!1,i=!0,a=!1,s=void 0;try{e:for(var c,l=e.set[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var f=c.value,d=!0,h=!1,p=void 0;try{for(var y,v=t.set[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var m=y.value,g=u(f,m,n);if(o=o||null!==g,g)continue e}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}if(o)return!1}}catch(e){a=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return!0}},1042:function(e,t,n){var r=n(6902);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},9042:function(e,t,n){var r=n(6902);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},9688:function(e){"use strict";e.exports=l},2712:function(e,t,n){"use strict";var r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(e,t){return function(n,r){t(n,r,e)}},u=function(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[h])("accessor"===s?{get:f.get,set:f.set}:f[c],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(u=a(v.get))&&(f.get=u),(u=a(v.set))&&(f.set=u),(u=a(v.init))&&o.unshift(u)}else(u=a(v))&&("field"===s?o.unshift(u):f[c]=u)}l&&Object.defineProperty(l,r.name,f),d=!0},s=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0},c=function(e){return"symbol"==(void 0===e?"undefined":g(e))?e:"".concat(e)},l=function(e,t,n){return"symbol"==(void 0===t?"undefined":g(t))&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},d=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},h=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,f(t,n)?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},y=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||R(t,e,n)},v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},b=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e},w=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},S=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))},t&&(r[e]=t(r[e])))}function u(e,t){try{f((n=o[e](t)).value,L)?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}},E=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:L(e[r](t)),done:!1}:o?o(t):t}:o}},O=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}},x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},A=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=B(e),r=0;r<n.length;r++)"default"!==n[r]&&R(t,e,n[r]);return F(t,e),t},k=function(e){return e&&e.__esModule?e:{default:e}},T=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},j=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},P=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},D=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t},C=function(e){function t(t){e.error=e.hasError?new U(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,(function(e){return t(e),o()}))}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()},I=function(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e})):e};n.r(t),n.d(t,{__addDisposableResource:function(){return D},__assign:function(){return N},__asyncDelegator:function(){return E},__asyncGenerator:function(){return S},__asyncValues:function(){return O},__await:function(){return L},__awaiter:function(){return h},__classPrivateFieldGet:function(){return T},__classPrivateFieldIn:function(){return P},__classPrivateFieldSet:function(){return j},__createBinding:function(){return R},__decorate:function(){return i},__disposeResources:function(){return C},__esDecorate:function(){return u},__exportStar:function(){return y},__extends:function(){return r},__generator:function(){return p},__importDefault:function(){return k},__importStar:function(){return A},__makeTemplateObject:function(){return x},__metadata:function(){return d},__param:function(){return a},__propKey:function(){return c},__read:function(){return m},__rest:function(){return o},__rewriteRelativeImportExtension:function(){return I},__runInitializers:function(){return s},__setFunctionName:function(){return l},__spread:function(){return b},__spreadArray:function(){return _},__spreadArrays:function(){return w},__values:function(){return v},default:function(){return G}});var M=function(e,t){return M=Object.setPrototypeOf||f({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},M(e,t)},N=function(){return N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},N.apply(this,arguments)},R=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function L(e){return f(this,L)?(this.v=e,this):new L(e)}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},B=function(e){return B=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},B(e)},U="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},G={__extends:r,__assign:N,__rest:o,__decorate:i,__param:a,__esDecorate:u,__runInitializers:s,__propKey:c,__setFunctionName:l,__metadata:d,__awaiter:h,__generator:p,__createBinding:R,__exportStar:y,__values:v,__read:m,__spread:b,__spreadArrays:w,__spreadArray:_,__await:L,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:O,__makeTemplateObject:x,__importStar:A,__importDefault:k,__classPrivateFieldGet:T,__classPrivateFieldSet:j,__classPrivateFieldIn:P,__addDisposableResource:D,__disposeResources:C,__rewriteRelativeImportExtension:I}}},a={};function y(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,y),n.exports}y.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return y.d(t,{a:t}),t},y.d=function(e,t){for(var n in t)y.o(t,n)&&!y.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},y.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},y.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var b={};return function(){"use strict";var r=function(e){return function(t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];i&&(n[i]=t[r])}return n}},a=function(e){var t=[{name:"timestampWithOffset",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:r(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:r(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:r(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:e.compile("^(".concat(wt,"{2,4})\\s*年\\s*(").concat(wt,"{1,2})\\s*月\\s*(").concat(wt,"{1,2})\\s*日$")),handler:r(["","year","month","day"])},{name:"korean",regex:e.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:r(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:r(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){var t=Dt.now(),n=864e5,r=e[0].toLowerCase(),o={now:0,today:0,tomorrow:n,yesterday:-1*n}[r];0!==o&&t.setTime(t.getTime()+o);var i={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?h(d({},i),{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}):i}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function(e){var t=v(e,5),n=t[1],r=t[2],o=t[3],i=t[4];r=parseFloat(r),"week"===(o=o.length<=2?Pt[o]:(o=o.replace(/s$/,"")).toLowerCase())&&(o="day",r*=7),("-"===n||i)&&(r*=-1);var a=Dt.now();return"millisecond"===o?a.setUTCMilliseconds(a.getUTCMilliseconds()+r):"second"===o?a.setUTCSeconds(a.getUTCSeconds()+r):"minute"===o?a.setUTCMinutes(a.getUTCMinutes()+r):"hour"===o?a.setUTCHours(a.getUTCHours()+r):"day"===o?a.setUTCDate(a.getUTCDate()+r):"month"===o?a.setUTCMonth(a.getUTCMonth()+r):"year"===o&&a.setUTCFullYear(a.getUTCFullYear()+r),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){var t=parseInt(e[1],10),n=new Date(1e3*t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){var t=parseInt(e[1],10),n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:e.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:r(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:r(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:r(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:r(["","hour","minute","second","meridiem"])},{name:"hms24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:r(["","hour","minute","second","millisecond"])},{name:"hm12",regex:e.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:r(["","hour","minute","meridiem"])},{name:"hm24",regex:e.compile("(_H24_):(_MIN_)"),handler:r(["","hour","minute"])},{name:"h12",regex:e.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:r(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:r(["","year","month","day"])},{name:"yearMonthnameDay",regex:e.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:r(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:e.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:r(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:e.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:r(["","monthname","day","","year"])},{name:"dayMonthname",regex:e.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:r(["","day","","monthname"])},{name:"monthnameDay",regex:e.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:r(["","monthname","day"])},{name:"hmsNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:r(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:r(["","hour","minute"])},{name:"ymd",regex:e.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:r(["","year","","month","day"])},{name:"mdy",regex:e.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:r(["","month","","day","year"])},{name:"dmy",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:r(["","day","month","year"])},{name:"yearLoose",regex:e.compile("_YEAR4_"),handler:r(["year"])},{name:"dayMonthnameLoose",regex:e.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:r(["","day","monthname"])},{name:"monthnameDayLoose",regex:e.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:r(["","monthname","day"])},{name:"monthname",regex:e.compile("_MONTHNAME_"),handler:r(["monthname"])},{name:"year4",regex:e.compile("_YEAR4_"),handler:r(["year"])},{name:"md",regex:e.compile("(_MONTH_)[/-](_DAY_)"),handler:r(["","month","day"])},{name:"dm",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:r(["","day","month"])},{name:"day",regex:e.compile("_DAY_"),handler:r(["day"])},{name:"year2",regex:e.compile("_YEAR2_"),handler:r(["year"])},{name:"onlyZone",regex:e.compile("_ZONE_"),handler:r(["zone"])},{name:"onlyOffset",regex:e.compile("_OFFSET_"),handler:r(["offset"])}],n=e.baseName.slice(0,5);return jt.includes(n)?t:t.filter((function(e){return!["mdy","md"].includes(e.name)}))},l=function(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)},w=function(e){return function(t){var n=String(t).slice(0,50);return""===n&&(n="(empty string)"),{invalid:'Unable to parse "'.concat(n,'" with locale "').concat(e,'"')}}},S=function(e){return function(t){var n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=v(a.value,2),c=s[0],l=s[1];if("monthname"===c){if(l){var f=e.monthNameToInt(l);void 0!==f&&(n.month=f)}}else if("hour"===c&&t.meridiem){var d=e.h12ToInt(l,t.meridiem);void 0!==d&&(n.hour=d)}else if("zone"===c){if(l){var h=e.zoneToOffset(l);void 0!==h&&(n.offset=h)}}else if("offset"===c){var p=e.offsetToMinutes(l);void 0!==p&&(n.offset=p)}else if("millisecond"===c){var y=e.millisecondToInt(l);"number"==typeof y&&(n.millisecond=y)}else if(It.includes(c)){var m=e.toInt(l);"number"==typeof m&&(n[c]=m)}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n.year<100&&(n.year=gt[n.year]),n.year&&"buddhist"===e.dateOptions.calendar&&(n.year-=543),n}},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt,n=function(e){if(!Mt[e]){var t=Tt.factory(e);Mt[e]=new Ct({doneChecker:l,fallback:w(e),patterns:a(t),formatter:S(t)})}return Mt[e]}(t),r=function(e,t){var n=t.slice(0,2).toLowerCase(),r=Rt[n];if(!r)return e;var o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=v(u.value,2),l=c[0],f=c[1];e=e.replace(l,f)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return e}(e,t);return n.attempt(r)},k=function(e){e.month&&e.day&&void 0===e.year&&(e.year=(new Date).getFullYear()),60===e.second&&(e.second=59);var t=new yt(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new yt(t.valueOf()-60*e.offset*1e3):t},T=function(e){var t=x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt),n=t.invalid?new yt(NaN):k(t);return n.isValid()||(n.invalid='Unable to parse date "'.concat(e,'"')),n},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt;return f(e,Date)?new yt(e.valueOf()):"number"==typeof e?new yt(e):T(e,t)},P=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])}},D=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},C=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},I=function(e){var t=this.__data__=new qt(e);this.size=t.size},M=function(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,Ft.default)();if(null==e)return null;var n,r=M(),o=(0,Ft.default)(t);if("string"==typeof e){var i=x(e,r);if(i.invalid)return console.warn("Could not interpret '".concat(e,"' as a date")),null;i.day&&!i.month&&(i=Object.assign({},Fo(i,"day"),{month:i.day})),i.month&&(i.month-=1),i.day&&(i=Object.assign({},Fo(i,"day"),{date:i.day})),n=(0,Ft.default)(o).set(i)}else n=(0,Ft.default)(e);var a=o.diff(n,"hours"),u=o.diff(n,"days"),s=o.diff(n,"weeks"),c=o.diff(n,"months"),l=o.diff(n,"years"),f={},d={style:"short",localeMatcher:"lookup"};if(a<2){var h=o.diff(n,"minutes");f.minutes=h,0===h&&(d.minutesDisplay="always")}else if(u<2)f.hours=a;else if(s<4)f.days=u;else if(l<1){var p=o.subtract(s,"weeks").diff(n,"days");f.weeks=s,f.days=p}else if(l<2){var y=o.subtract(c,"months").diff(n,"days");f.months=c,f.days=y}else if(l<18){var v=o.subtract(l,"year").diff(n,"months");f.years=l,f.months=v}else f.years=l;return new ft.DurationFormat(r,d).format(f)},R=function(e,t){var n=e.copy(),r="hour"in n?function(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,function(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=H(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=H(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=H(e.minute,60);var t=Math.floor(e.hour/24);return e.hour=H(e.hour,24),t}(e)}(n,t):0;L(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,F(n),B(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,F(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,F(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);var o=n.calendar.getYearsInEra(n);if(n.year>o){var i,a,u=null===(i=(a=n.calendar).isInverseEra)||void 0===i?void 0:i.call(a,n);n.year=o,n.month=u?1:n.calendar.getMonthsInYear(n),n.day=u?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);var s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n},L=function(e,t){var n,r;(null===(n=(r=e.calendar).isInverseEra)||void 0===n?void 0:n.call(r,e))&&(t=-t),e.year+=t},F=function(e){for(;e.month<1;)L(e,-1),e.month+=e.calendar.getMonthsInYear(e);for(var t=0;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,L(e,1)},B=function(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))},U=function(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),B(e)},G=function(e,t){return R(e,function(e){var t={};for(var n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}(t))},z=function(e,t){var n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),U(n),n},H=function(e,t){var n=e%t;return n<0&&(n+=t),n},V=function(e,t,n,r){var o=e.copy();switch(t){case"era":var i=e.calendar.getEras(),a=i.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=K(a,n,0,i.length-1,null==r?void 0:r.round),o.era=i[a],U(o);break;case"year":var u,s;(null===(u=(s=o.calendar).isInverseEra)||void 0===u?void 0:u.call(s,o))&&(n=-n),o.year=K(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=K(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=K(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),U(o),o},K=function(e,t,n,r){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4]){(e+=Math.sign(t))<n&&(e=r);var o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e},q=function(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)},$=function(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond},W=function(){return null==Bo&&(Bo=(new Intl.DateTimeFormat).resolvedOptions().timeZone),Bo},Y=function(e,t){return e-t*Math.floor(e/t)},J=function(e,t,n,r){var o=(t=Q(e,t))-1,i=-2;return n<=2?i=0:Z(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)},Z=function(e){return e%4==0&&(e%100!=0||e%400==0)},Q=function(e,t){return"BC"===e?1-t:t},X=function(e){var t="AD";return e<=0&&(t="BC",e=1-e),[t,e]},ee=function(e){var t,n=ce(e,new Ho);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),"".concat(t,"-").concat(String(n.month).padStart(2,"0"),"-").concat(String(n.day).padStart(2,"0"))},te=function(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)},ne=function(e){var t,n="object"==typeof e[0]?e.shift():new Ho;if("string"==typeof e[0])t=e.shift();else{var r=n.getEras();t=r[r.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]},re=function(e){return oe(Q((e=ce(e,new Ho)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)},oe=function(e,t,n,r,o,i,a){var u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n),u.getTime()},ie=function(e,t){if("UTC"===t)return 0;if(e>0&&t===W())return-6e4*new Date(e).getTimezoneOffset();var n=ae(e,t),r=n.year,o=n.month,i=n.day,a=n.hour,u=n.minute,s=n.second;return oe(r,o,i,a,u,s,0)-1e3*Math.floor(e/1e3)},ae=function(e,t){var n=Wo.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Wo.set(t,n));var r=n.formatToParts(new Date(e)),o={},i=!0,a=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;"literal"!==l.type&&(o[l.type]=l.value)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}return{year:"BC"===o.era||"B"===o.era?1-o.year:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}},ue=function(e,t){return new Date(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible",r=se(e);if("UTC"===t)return re(r);if(t===W()&&"compatible"===n){r=ce(r,new Ho);var o=new Date,i=Q(r.era,r.year);return o.setFullYear(i,r.month-1,r.day),o.setHours(r.hour,r.minute,r.second,r.millisecond),o.getTime()}var a=re(r),u=ie(a-Yo,t),s=ie(a+Yo,t),c=function(e,t,n,r){return(n===r?[n]:[n,r]).filter((function(n){return function(e,t,n){var r=ae(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}(e,t,n)}))}(r,t,a-u,a-s);if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(a-u,a-s);case"compatible":case"later":return Math.max(a-u,a-s);case"reject":throw new RangeError("No such absolute time found")}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible"))},se=function(e,t){var n,r,o=0,i=0,a=0,u=0;if("timeZone"in e)o=(n=e).hour,i=n.minute,a=n.second,u=n.millisecond;else if("hour"in e&&!t)return e;return t&&(o=(r=t).hour,i=r.minute,a=r.second,u=r.millisecond),new $o(e.calendar,e.era,e.year,e.month,e.day,o,i,a,u)},ce=function(e,t){if(r=t,null!==(u=null!==(a=null===(o=(n=e.calendar).isEqual)||void 0===o?void 0:o.call(n,r))&&void 0!==a?a:null===(i=r.isEqual)||void 0===i?void 0:i.call(r,n))&&void 0!==u?u:n.identifier===r.identifier)return e;var n,r,o,i,a,u,s=t.fromJulianDay(e.calendar.toJulianDay(e)),c=e.copy();return c.calendar=t,c.era=s.era,c.year=s.year,c.month=s.month,c.day=s.day,U(c),c},le=function(e){var t=v(X(e.year+-543),2),n=t[0],r=t[1];return new Ko(n,r,e.month,e.day)},fe=function(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1},de=function(e,t){var n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-fe(e,n,1,1))/30);return[n,r,t+1-fe(e,n,r,1)]},he=function(e){return Math.floor(e%4/3)},pe=function(e,t){return t%13!=0?30:he(e)+5},ye=function(e){return Y(7*e+1,19)<7},ve=function(e){var t=Math.floor((235*e-234)/19),n=12084+13753*t,r=29*t+Math.floor(n/25920);return Y(3*(r+1),7)<3&&(r+=1),r},me=function(e){return ve(e)+function(e){var t=ve(e-1),n=ve(e);return ve(e+1)-n==356?2:n-t==382?1:0}(e)},ge=function(e){return me(e+1)-me(e)},be=function(e,t){if(t>=6&&!ye(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;var n=function(e){var t=ge(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?ye(e)?30:0:30},we=function(e,t,n,r){return r+Math.ceil(29.5*(n-1))+354*(t-1)+Math.floor((3+11*t)/30)+e-1},_e=function(e,t,n){var r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+we(t,r,1,1)))/29.5)+1),i=n-we(t,r,o,1)+1;return new Ko(e,r,o,i)},Se=function(e){return(14+11*e)%30<11},Ee=function(e){return li+Go[e-si]},Oe=function(e,t){var n=1<<11-(t-1);return 0==(Uo[e-si]&n)?29:30},xe=function(e,t){for(var n=Ee(e),r=1;r<t;r++)n+=Oe(e,r);return n},Ae=function(e){return Go[e+1-si]-Go[e-si]},ke=function(e){var t=pi.findIndex((function(t){var n=v(t,3),r=n[0],o=n[1],i=n[2];return e.year<r||e.year===r&&e.month<o||e.year===r&&e.month===o&&e.day<i}));return-1===t?pi.length-1:0===t?0:t-1},Te=function(e){var t=vi[mi.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Ko(e.year+t,e.month,e.day)},je=function(e){if(1===e.year){var t=mi.indexOf(e.era);return pi[t]}},Pe=function(e){return"minguo"===e.era?e.year+_i:1-e.year+_i},De=function(e){var t=e-_i;return t>0?["minguo",t]:["before_minguo",1-t]},Ce=function(e){var t=v(X(Pe(e)),2),n=t[0],r=t[1];return new Ko(n,r,e.month,e.day)},Ie=function(e,t){var n=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,n)},Me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ne=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){Me(e,t,n[t])}))}return e},Re=function(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&(0,Ft.default)(e,Ti).isValid()},Le=function(e){return(0,Ft.default)(e).isToday()},Fe=function(e){return Re(e)?(0,Ft.default)(e,Ti).toDate():null},Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,Ft.default)(e);return t&&(n=n.utc()),n.format(Ti)},Ue=function(e){return(0,Ft.default)(e).toDate()},Ge=function(e,t){Pi.register(e,t)},ze=function(e){var t,n,r=null!=e?e:M();return Pi.getCalendar((t=r,(null!=(n=Intl.Locale)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):f(t,n))?r:new Intl.Locale(r)))},He=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=x(e,M());if(n.invalid)return console.warn("Could not parse invalid date '".concat(e,"'")),null;!ki(n.day)&&ki(n.month)&&(n=Object.assign({},Fo(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},Fo(n,"day"),{date:n.day}));var r=(0,Ft.default)().set(n).toDate();return ki(n.year)&&(t.year=!1),ki(n.month)&&(t.month=!1),ki(n.date)&&(t.day=!1),Ve(r,t)},Ve=function(e,t){var n,r,o=null!==(n=null==t?void 0:t.locale)&&void 0!==n?n:M(),i=new Intl.Locale(o),a=Ne({},Di,{noToday:"am"===i.language},t),u=a.calendar,s=a.mode,c=a.time,l=a.day,f=a.month,d=a.year,h=a.noToday,p=a.numberingSystem,y={calendar:null!=u?u:ze(i),year:d?"numeric":void 0,month:f?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},v=(0,Ft.default)(e).isToday();if(v&&!h)r=(r=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(o)+r.slice(1);else{"en"===i.language&&(o="en-GB");var m=new Intl.DateTimeFormat(o,y).formatToParts(e);("en"===i.language||"am"===i.language)&&"standard"==s&&d&&l&&(m=m.map(Ci("-"))),"wide"==s&&(m=m.map(Ci(" — "))),"ethiopic"===y.calendar&&(m=m.filter((function(e,t,n){return!("era"===e.type||"literal"===e.type&&t<n.length-1&&"era"===n[t+1].type)}))),r=m.map((function(e){return e.value})).join("")}return(!0===c||v&&"for today"===c)&&(r+=", ".concat(Ke(e))),r},Ke=function(e){return e.toLocaleTimeString(M(),{hour:"2-digit",minute:"2-digit"})},qe=function(e,t){return Ve(e,(n=Ne({},t),r=null!=(r={time:!0})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},$e=function(e,t){var n=ze("string"==typeof t?new Intl.Locale(t):t);return n?ce(e,function(e){switch(e){case"buddhist":return new Jo;case"ethiopic":return new ei;case"ethioaa":return new ti;case"coptic":return new ni;case"hebrew":return new oi;case"indian":return new ii;case"islamic-civil":return new fi;case"islamic-tbla":return new di;case"islamic-umalqura":return new hi;case"japanese":return new gi;case"persian":return new wi;case"roc":return new Si;default:return new Ho}}(n)):e},We=function(e){return!window.offlineEnabled||(null!=e?e:navigator.onLine)},Ye=function(e){return Ze(Xe(e,"usual","official"))},Je=function(e){return Ye(e)},Ze=function(e){var t;return e?null!==(t=e.text)&&void 0!==t?t:function(e){var t,n=null!==(t=e.given)&&void 0!==t?t:[];return(e.family?n.concat(e.family):n).join(" ")}(e):""},Qe=function(e){return Ze(e)},Xe=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];0==n.length&&(n=["usual"]);var o,i=!0,a=!1,u=void 0;try{for(var s,c=function(){var t,n=s.value,r=null===(t=e.name)||void 0===t?void 0:t.find((function(e){return function(e,t){return e.use?e.use===t:"usual"===t}(e,n)}));if(r)return{v:r}},l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var f=c();if("object"==((o=f)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":void 0===o?"undefined":g(o)))return f.v}}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}},et=function(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);return r.length===o.length&&r.every((function(n){return e[n]===t[n]}))},tt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;try{return e.getItem("test"),!0}catch(e){return!1}},nt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},rt=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return nt(e,3);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,3):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)},ot=function(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=rt(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return rt(e)}(t);return Mi.satisfies(n,e,{includePrerelease:!0})},it=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},at=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){it(i,r,o,a,u,"next",e)}function u(e){it(i,r,o,a,u,"throw",e)}a(void 0)}))}},ut=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},st=function(e){return Ni.apply(this,arguments)},ct=function(e){return Ri.apply(this,arguments)};y.r(b),y.d(b,{age:function(){return N},canAccessStorage:function(){return tt},convertToLocaleCalendar:function(){return $e},displayName:function(){return Je},formatDate:function(){return Ve},formatDatetime:function(){return qe},formatPartialDate:function(){return He},formatPatientName:function(){return Ze},formatTime:function(){return Ke},formattedName:function(){return Qe},getDefaultCalendar:function(){return ze},getDefaultsFromConfigSchema:function(){return Ii},getLocale:function(){return M},getPatientName:function(){return Ye},isOmrsDateStrict:function(){return Re},isOmrsDateToday:function(){return Le},isOnline:function(){return We},isVersionSatisfied:function(){return ot},parseDate:function(){return Ue},registerDefaultCalendar:function(){return Ge},retry:function(){return st},selectPreferredName:function(){return Xe},shallowEqual:function(){return et},toDateObjectStrict:function(){return Fe},toOmrsIsoString:function(){return Be}});var lt,ft=y(6893);if("undefined"!=typeof navigator){var dt=navigator;lt=Array.isArray(dt.languages)?dt.languages[0]:dt.language}else if("undefined"!=typeof process){var ht=process.env;lt=ht.LC_ALL||ht.LC_MESSAGES||ht.LANG||ht.LANGUAGE}for(var pt=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(lt||"en-US"),yt=function(e){c(n,e);var t=_(n);function n(){var e;return i(this,n),s(o(e=t.apply(this,arguments)),"invalid",null),e}return u(n,[{key:"isValid",value:function(){return!Number.isNaN(this.valueOf())}}]),n}(A(Date)),vt={},mt=1;mt<100;mt++)vt[(mt<=9?"0":"")+mt]=mt+(mt>51?1900:2e3);var gt=vt,bt={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},wt="[1234567890一二三四五六七八九〇\\d]",_t={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},St={},Et={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Ot={zone:Et,year:gt,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},xt={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(Et).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[±−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},At=h(d({},xt),{YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[±−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"}),kt={},Tt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt;i(this,e),s(this,"locale",void 0),s(this,"lookups",void 0),s(this,"vars",void 0),s(this,"numberingSystem",void 0),s(this,"baseName",void 0),s(this,"dateOptions",void 0),this.locale=t,this.lookups=d({},Ot),this.vars=d({},xt);var n=new Intl.NumberFormat(this.locale);this.numberingSystem=n.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}return u(e,[{key:"toInt",value:function(e){if("number"==typeof e)return e;if("string"==typeof e){if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){var t=parseInt(e,10);if(!isNaN(t))return t}for(var n="",r=0;r<e.length;r++)n+=String(this.lookups.digit[e[r]]);return parseInt(n,10)}}},{key:"millisecondToInt",value:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}}},{key:"monthNameToInt",value:function(e){if("string"==typeof e){var t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}}},{key:"h12ToInt",value:function(e,t){if("string"==typeof e){var n=this.lookups.meridiem[null==t?void 0:t.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}}},{key:"zoneToOffset",value:function(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}},{key:"offsetToMinutes",value:function(e){if("string"==typeof e){var t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){var n=v(t,4),r=n[1],o=n[2],i=n[3];return("-"===r||"−"===r?-1:1)*(60*this.toInt(o)+this.toInt(i||0))}return 0}}},{key:"build",value:function(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=_t:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}},{key:"buildNumbers",value:function(){var e=function(e){if(St[e])return St[e];if("fullwide"===e||"hanidec"===e)return{group:wt,lookup:d({},_t)};var t=bt[e];if(!t)return{group:"\\d",lookup:d({},_t)};for(var n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={},i=0;i<10;i++)o[String.fromCharCode(t+i)]=i;return St[e]={group:"[".concat(n,"-").concat(r,"]"),lookup:o},St[e]}(this.numberingSystem),t=e.group,n=e.lookup;for(var r in this.lookups.digit=n,At)At.hasOwnProperty(r)&&(this.vars[r]=At[r].replace(/\*/g,t))}},{key:"buildMonthNames",value:function(){var e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu".split("|").forEach((function(n,r){["","k","kuu","kuuta"].forEach((function(o,i){e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1}))}));else{for(var n=[],r=function(e){return"month"===e.type},o=0;o<12;o++)n.push(new Date(2017,o,1));var i=!0,a=!1,u=void 0;try{for(var s,c=["full","long","medium"][Symbol.iterator]();!(i=(s=c.next()).done);i=!0)for(var l=s.value,f=Intl.DateTimeFormat(this.locale,{dateStyle:l}),d=0;d<12;d++){var h=f.formatToParts(n[d]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(h)||(/^ko/i.test(this.locale)&&(h+="월"),"medium"===l?(h=h.replace(/\.$/,""),e["".concat(h,"\\.?")]=!0):e[h]=!0,t[h]=d+1)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}for(var p=Intl.DateTimeFormat(this.locale,{month:"short"}),y=0;y<12;y++){var v=p.formatToParts(n[y]).find(r).value.toLocaleLowerCase(this.locale);v=v.replace(/\.$/,""),e["".concat(v,"\\.?")]=!0,t[v]=y+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}},{key:"buildDaynames",value:function(){for(var e=[],t=function(e){return"weekday"===e.type},n=0;n<7;n++)e.push(new Date(2017,0,n+1));var r=[],o={},i=!0,a=!1,u=void 0;try{for(var s,c=["long","short"][Symbol.iterator]();!(i=(s=c.next()).done);i=!0)for(var l=s.value,f=Intl.DateTimeFormat(this.locale,{weekday:l}),d=0;d<7;d++){var h=f.formatToParts(e[d]).find(t).value.toLocaleLowerCase(this.locale);"short"===l?(h=h.replace(/\.$/,""),r.push("".concat(h,"\\.?"))):r.push(h),o[h]=d}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=o}},{key:"buildMeridiems",value:function(){for(var e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=function(e){return"dayPeriod"===e.type},n=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"}),i=0;i<2;i++){var a=o.formatToParts(e[i]).find(t);if(!a)return;var u=a.value.toLocaleLowerCase(this.locale);n.push(u),r[u]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}},{key:"compile",value:function(e){var t=this,n=e.replace(/_([A-Z0-9]+)_/g,(function(e,n){if(!t.vars[n])throw new Error("Template string contains invalid variable _".concat(n,"_"));return t.vars[n]}));return new RegExp(n,"i")}}],[{key:"factory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt;return kt[t.toLowerCase()]||(kt[t.toLowerCase()]=new e(t)),kt[t.toLowerCase()]}}]),e}(),jt=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],Pt={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Dt={now:function(){return new Date}},Ct=function(){function e(t){var n=t.doneChecker,r=t.fallback,o=t.patterns,a=t.formatter;i(this,e),s(this,"doneChecker",void 0),s(this,"fallback",void 0),s(this,"patterns",void 0),s(this,"formatter",void 0),this.doneChecker=n,this.fallback=r,this.patterns=o,this.formatter=a}return u(e,[{key:"attempt",value:function(e){if("string"!=typeof e)return this.fallback(e);var t=e.trim(),n={},r=!1,o=!0,i=!1,a=void 0;try{for(var u,s=this.patterns[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=t.match(c.regex);if(l){r=!0;var f=c.handler(l);if(f){var d=!0,h=!1,p=void 0;try{for(var y,m=Object.entries(f)[Symbol.iterator]();!(d=(y=m.next()).done);d=!0){var g=v(y.value,2),b=g[0],w=g[1];b in n||void 0===w||(n[b]=w)}}catch(e){h=!0,p=e}finally{try{d||null==m.return||m.return()}finally{if(h)throw p}}if(t=(t=t.slice(0,l.index)+t.slice(l.index+l[0].length+1)).trim(),this.doneChecker(n,t))break}}}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r?this.formatter(n):this.fallback(e)}}]),e}(),It=["year","month","day","hour","minute","second","millisecond","offset"],Mt={},Nt=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],Rt={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "]].concat(m(Nt)),ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:Nt,id:Nt,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};Date.fromString=yt.fromString=T,Date.fromAny=yt.fromAny=j;var Lt={fromString:T,fromAny:j,fromObject:k,attempt:x};"undefined"!=typeof window&&(window.anyDateParser=Lt);var Ft=y(9688),Bt=y(7067),Ut=y.n(Bt),Gt=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},zt=function(e,t){return e===t||e!=e&&t!=t},Ht=function(e,t){for(var n=e.length;n--;)if(zt(e[n][0],t))return n;return-1},Vt=Array.prototype.splice;P.prototype.clear=function(){this.__data__=[],this.size=0},P.prototype.delete=function(e){var t=this.__data__,n=Ht(t,e);return!(n<0||(n==t.length-1?t.pop():Vt.call(t,n,1),--this.size,0))},P.prototype.get=function(e){var t=this.__data__,n=Ht(t,e);return n<0?void 0:t[n][1]},P.prototype.has=function(e){return Ht(this.__data__,e)>-1},P.prototype.set=function(e,t){var n=this.__data__,r=Ht(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Kt,qt=P,$t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Wt="object"==typeof self&&self&&self.Object===Object&&self,Yt=$t||Wt||Function("return this")(),Jt=Yt.Symbol,Zt=Object.prototype,Qt=Zt.hasOwnProperty,Xt=Zt.toString,en=Jt?Jt.toStringTag:void 0,tn=Object.prototype.toString,nn=Jt?Jt.toStringTag:void 0,rn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":nn&&nn in Object(e)?function(e){var t=Qt.call(e,en),n=e[en];try{e[en]=void 0;var r=!0}catch(e){}var o=Xt.call(e);return r&&(t?e[en]=n:delete e[en]),o}(e):function(e){return tn.call(e)}(e)},on=function(e){var t=void 0===e?"undefined":g(e);return null!=e&&("object"==t||"function"==t)},an=function(e){if(!on(e))return!1;var t=rn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},un=Yt["__core-js_shared__"],sn=(Kt=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"",cn=Function.prototype.toString,ln=function(e){if(null!=e){try{return cn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},fn=/^\[object .+?Constructor\]$/,dn=Function.prototype,hn=Object.prototype,pn=dn.toString,yn=hn.hasOwnProperty,vn=RegExp("^"+pn.call(yn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mn=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!on(e)||(t=e,sn&&sn in t))&&(an(e)?vn:fn).test(ln(e));var t}(n)?n:void 0},gn=mn(Yt,"Map"),bn=mn(Object,"create"),wn=Object.prototype.hasOwnProperty,_n=Object.prototype.hasOwnProperty;D.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},D.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},D.prototype.get=function(e){var t=this.__data__;if(bn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return wn.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return bn?void 0!==t[e]:_n.call(t,e)},D.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bn&&void 0===t?"__lodash_hash_undefined__":t,this};var Sn=D,En=function(e,t){var n,r,o=e.__data__;return("string"==(r=g(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};C.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(gn||qt),string:new Sn}},C.prototype.delete=function(e){var t=En(this,e).delete(e);return this.size-=t?1:0,t},C.prototype.get=function(e){return En(this,e).get(e)},C.prototype.has=function(e){return En(this,e).has(e)},C.prototype.set=function(e,t){var n=En(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var On=C;I.prototype.clear=function(){this.__data__=new qt,this.size=0},I.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},I.prototype.get=function(e){return this.__data__.get(e)},I.prototype.has=function(e){return this.__data__.has(e)},I.prototype.set=function(e,t){var n=this.__data__;if(f(n,qt)){var r=n.__data__;if(!gn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new On(r)}return n.set(e,t),this.size=n.size,this};var xn=I,An=function(){try{var e=mn(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),kn=function(e,t,n){"__proto__"==t&&An?An(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Tn=Object.prototype.hasOwnProperty,jn=function(e,t,n){var r=e[t];Tn.call(e,t)&&zt(r,n)&&(void 0!==n||t in e)||kn(e,t,n)},Pn=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],s=r?r(n[u],e[u],u,n,e):void 0;void 0===s&&(s=e[u]),o?kn(n,u,s):jn(n,u,s)}return n},Dn=function(e){return null!=e&&"object"==typeof e},Cn=function(e){return Dn(e)&&"[object Arguments]"==rn(e)},In=Object.prototype,Mn=In.hasOwnProperty,Nn=In.propertyIsEnumerable,Rn=Cn(function(){return arguments}())?Cn:function(e){return Dn(e)&&Mn.call(e,"callee")&&!Nn.call(e,"callee")},Ln=Rn,Fn=Array.isArray,Bn=t&&!t.nodeType&&t,Un=Bn&&e&&!e.nodeType&&e,Gn=Un&&Un.exports===Bn?Yt.Buffer:void 0,zn=(Gn?Gn.isBuffer:void 0)||function(){return!1},Hn=/^(?:0|[1-9]\d*)$/,Vn=function(e,t){var n=void 0===e?"undefined":g(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Hn.test(e))&&e>-1&&e%1==0&&e<t},Kn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},qn={};qn["[object Float32Array]"]=qn["[object Float64Array]"]=qn["[object Int8Array]"]=qn["[object Int16Array]"]=qn["[object Int32Array]"]=qn["[object Uint8Array]"]=qn["[object Uint8ClampedArray]"]=qn["[object Uint16Array]"]=qn["[object Uint32Array]"]=!0,qn["[object Arguments]"]=qn["[object Array]"]=qn["[object ArrayBuffer]"]=qn["[object Boolean]"]=qn["[object DataView]"]=qn["[object Date]"]=qn["[object Error]"]=qn["[object Function]"]=qn["[object Map]"]=qn["[object Number]"]=qn["[object Object]"]=qn["[object RegExp]"]=qn["[object Set]"]=qn["[object String]"]=qn["[object WeakMap]"]=!1;var $n=function(e){return function(t){return e(t)}},Wn=t&&!t.nodeType&&t,Yn=Wn&&e&&!e.nodeType&&e,Jn=Yn&&Yn.exports===Wn&&$t.process,Zn=function(){try{return Yn&&Yn.require&&Yn.require("util").types||Jn&&Jn.binding&&Jn.binding("util")}catch(e){}}(),Qn=Zn&&Zn.isTypedArray,Xn=Qn?$n(Qn):function(e){return Dn(e)&&Kn(e.length)&&!!qn[rn(e)]},er=Object.prototype.hasOwnProperty,tr=function(e,t){var n=Fn(e),r=!n&&Ln(e),o=!n&&!r&&zn(e),i=!n&&!r&&!o&&Xn(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!t&&!er.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vn(c,s))||u.push(c);return u},nr=Object.prototype,rr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||nr)},or=function(e,t){return function(n){return e(t(n))}},ir=or(Object.keys,Object),ar=Object.prototype.hasOwnProperty,ur=function(e){return null!=e&&Kn(e.length)&&!an(e)},sr=function(e){return ur(e)?tr(e):function(e){if(!rr(e))return ir(e);var t=[];for(var n in Object(e))ar.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},cr=Object.prototype.hasOwnProperty,lr=function(e){return ur(e)?tr(e,!0):function(e){if(!on(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=rr(e),n=[];for(var r in e)("constructor"!=r||!t&&cr.call(e,r))&&n.push(r);return n}(e)},fr=t&&!t.nodeType&&t,dr=fr&&e&&!e.nodeType&&e,hr=dr&&dr.exports===fr?Yt.Buffer:void 0,pr=hr?hr.allocUnsafe:void 0,yr=function(){return[]},vr=Object.prototype.propertyIsEnumerable,mr=Object.getOwnPropertySymbols,gr=mr?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}(mr(e),(function(t){return vr.call(e,t)})))}:yr,br=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},wr=or(Object.getPrototypeOf,Object),_r=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)br(t,gr(e)),e=wr(e);return t}:yr,Sr=function(e,t,n){var r=t(e);return Fn(e)?r:br(r,n(e))},Er=function(e){return Sr(e,sr,gr)},Or=function(e){return Sr(e,lr,_r)},xr=mn(Yt,"DataView"),Ar=mn(Yt,"Promise"),kr=mn(Yt,"Set"),Tr=mn(Yt,"WeakMap"),jr="[object Map]",Pr="[object Promise]",Dr="[object Set]",Cr="[object WeakMap]",Ir="[object DataView]",Mr=ln(xr),Nr=ln(gn),Rr=ln(Ar),Lr=ln(kr),Fr=ln(Tr),Br=rn;(xr&&Br(new xr(new ArrayBuffer(1)))!=Ir||gn&&Br(new gn)!=jr||Ar&&Br(Ar.resolve())!=Pr||kr&&Br(new kr)!=Dr||Tr&&Br(new Tr)!=Cr)&&(Br=function(e){var t=rn(e),n="[object Object]"==t?e.constructor:void 0,r=n?ln(n):"";if(r)switch(r){case Mr:return Ir;case Nr:return jr;case Rr:return Pr;case Lr:return Dr;case Fr:return Cr}return t});var Ur=Br,Gr=Object.prototype.hasOwnProperty,zr=Yt.Uint8Array,Hr=function(e){var t=new e.constructor(e.byteLength);return new zr(t).set(new zr(e)),t},Vr=/\w*$/,Kr=Jt?Jt.prototype:void 0,qr=Kr?Kr.valueOf:void 0,$r=Object.create,Wr=function(){var e=function(){};return function(t){if(!on(t))return{};if($r)return $r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Yr=Zn&&Zn.isMap,Jr=Yr?$n(Yr):function(e){return Dn(e)&&"[object Map]"==Ur(e)},Zr=Zn&&Zn.isSet,Qr=Zr?$n(Zr):function(e){return Dn(e)&&"[object Set]"==Ur(e)},Xr="[object Arguments]",eo="[object Function]",to="[object Object]",no={};no[Xr]=no["[object Array]"]=no["[object ArrayBuffer]"]=no["[object DataView]"]=no["[object Boolean]"]=no["[object Date]"]=no["[object Float32Array]"]=no["[object Float64Array]"]=no["[object Int8Array]"]=no["[object Int16Array]"]=no["[object Int32Array]"]=no["[object Map]"]=no["[object Number]"]=no[to]=no["[object RegExp]"]=no["[object Set]"]=no["[object String]"]=no["[object Symbol]"]=no["[object Uint8Array]"]=no["[object Uint8ClampedArray]"]=no["[object Uint16Array]"]=no["[object Uint32Array]"]=!0,no["[object Error]"]=no[eo]=no["[object WeakMap]"]=!1;var ro=function e(t,n,r,o,i,a){var u,s=1&n,c=2&n,l=4&n;if(r&&(u=i?r(t,o,i,a):r(t)),void 0!==u)return u;if(!on(t))return t;var f=Fn(t);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Gr.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,u)}else{var d=Ur(t),h=d==eo||"[object GeneratorFunction]"==d;if(zn(t))return function(e,t){if(t)return e.slice();var n=e.length,r=pr?pr(n):new e.constructor(n);return e.copy(r),r}(t,s);if(d==to||d==Xr||h&&!i){if(u=c||h?{}:function(e){return"function"!=typeof e.constructor||rr(e)?{}:Wr(wr(e))}(t),!s)return c?function(e,t){return Pn(e,_r(e),t)}(t,function(e,t){return e&&Pn(t,lr(t),e)}(u,t)):function(e,t){return Pn(e,gr(e),t)}(t,function(e,t){return e&&Pn(t,sr(t),e)}(u,t))}else{if(!no[d])return i?t:{};u=function(e,t,n){var r,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return Hr(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?Hr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?Hr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,Vr.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=e,qr?Object(qr.call(r)):{}}}(t,d,s)}}a||(a=new xn);var p=a.get(t);if(p)return p;a.set(t,u),Qr(t)?t.forEach((function(o){u.add(e(o,n,r,o,t,a))})):Jr(t)&&t.forEach((function(o,i){u.set(i,e(o,n,r,i,t,a))}));var y=f?void 0:(l?c?Or:Er:c?lr:sr)(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(y||t,(function(o,i){y&&(o=t[i=o]),jn(u,i,e(o,n,r,i,t,a))})),u},oo=function(e){return"symbol"==(void 0===e?"undefined":g(e))||Dn(e)&&"[object Symbol]"==rn(e)},io=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ao=/^\w*$/;function uo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(uo.Cache||On),n}uo.Cache=On;var so,co,lo,fo,ho,po=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yo=/\\(\\)?/g,vo=(fo=uo((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(po,(function(e,n,r,o){t.push(r?o.replace(yo,"$1"):n||e)})),t}),(function(e){return 500===ho.size&&ho.clear(),e})),ho=fo.cache,fo),mo=Jt?Jt.prototype:void 0,go=mo?mo.toString:void 0,bo=function e(t){if("string"==typeof t)return t;if(Fn(t))return Gt(t,e)+"";if(oo(t))return go?go.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},wo=function(e){return null==e?"":bo(e)},_o=function(e,t){return Fn(e)?e:function(e,t){if(Fn(e))return!1;var n=void 0===e?"undefined":g(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!oo(e))||ao.test(e)||!io.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:vo(wo(e))},So=function(e){if("string"==typeof e||oo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Eo=function(e,t){return null==(e=function(e,t){return t.length<2?e:function(e,t){for(var n=0,r=(t=_o(t,e)).length;null!=e&&n<r;)e=e[So(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(t,0,-1))}(e,t=_o(t,e)))||delete e[So((n=t,r=null==n?0:n.length,r?n[r-1]:void 0))];var n,r},Oo=Function.prototype,xo=Object.prototype,Ao=Oo.toString,ko=xo.hasOwnProperty,To=Ao.call(Object),jo=function(e){return function(e){if(!Dn(e)||"[object Object]"!=rn(e))return!1;var t=wr(e);if(null===t)return!0;var n=ko.call(t,"constructor")&&t.constructor;return"function"==typeof n&&f(n,n)&&Ao.call(n)==To}(e)?void 0:e},Po=Jt?Jt.isConcatSpreadable:void 0,Do=function(e){return Fn(e)||Ln(e)||!!(Po&&e&&e[Po])},Co=function e(t,n,r,o,i){var a=-1,u=t.length;for(r||(r=Do),i||(i=[]);++a<u;){var s=t[a];n>0&&r(s)?n>1?e(s,n-1,r,o,i):br(i,s):o||(i[i.length]=s)}return i},Io=function(e){return null!=e&&e.length?Co(e,1):[]},Mo=Math.max,No=An?function(e,t){return An(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:function(e){return e},Ro=Date.now,Lo=(so=No,co=0,lo=0,function(){var e=Ro(),t=16-(e-lo);if(lo=e,t>0){if(++co>=800)return arguments[0]}else co=0;return so.apply(void 0,arguments)}),Fo=function(e){return Lo(function(e,t,n){return t=Mo(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Mo(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,u)}}(e,void 0,Io),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=Gt(t,(function(t){return t=_o(t,e),r||(r=t.length>1),t})),Pn(e,Or(e),n),r&&(n=ro(n,7,jo));for(var o=t.length;o--;)Eo(n,t[o]);return n}));Ft.default.extend(Ut());var Bo=null;new Map;var Uo,Go,zo={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Ho=function(){function e(){i(this,e),this.identifier="gregory"}return u(e,[{key:"fromJulianDay",value:function(e){var t=e,n=t-1721426,r=Math.floor(n/146097),o=Y(n,146097),i=Math.floor(o/36524),a=Y(o,36524),u=Math.floor(a/1461),s=Y(a,1461),c=Math.floor(s/365),l=v(X(400*r+100*i+4*u+c+(4!==i&&4!==c?1:0)),2),f=l[0],d=l[1],h=t-J(f,d,1,1),p=2;t<J(f,d,3,1)?p=0:Z(d)&&(p=1);var y=Math.floor((12*(h+p)+373)/367),m=t-J(f,d,y,1)+1;return new Ko(f,d,y,m)}},{key:"toJulianDay",value:function(e){return J(e.era,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return zo[Z(e.year)?"leapyear":"standard"][e.month-1]}},{key:"getMonthsInYear",value:function(e){return 12}},{key:"getDaysInYear",value:function(e){return Z(e.year)?366:365}},{key:"getYearsInEra",value:function(e){return 9999}},{key:"getEras",value:function(){return["BC","AD"]}},{key:"isInverseEra",value:function(e){return"BC"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}}]),e}(),Vo=new WeakMap,Ko=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i(this,e),te(this,Vo,{writable:!0,value:void 0});var o=v(ne(n),5),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=l,U(this)}return u(e,[{key:"copy",value:function(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}},{key:"add",value:function(e){return R(this,e)}},{key:"subtract",value:function(e){return G(this,e)}},{key:"set",value:function(e){return z(this,e)}},{key:"cycle",value:function(e,t,n){return V(this,e,t,n)}},{key:"toDate",value:function(e){return ue(this,e)}},{key:"toString",value:function(){return ee(this)}},{key:"compare",value:function(e){return q(this,e)}}]),e}(),qo=new WeakMap,$o=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i(this,e),te(this,qo,{writable:!0,value:void 0});var o=v(ne(n),5),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=l,this.hour=n.shift()||0,this.minute=n.shift()||0,this.second=n.shift()||0,this.millisecond=n.shift()||0,U(this)}return u(e,[{key:"copy",value:function(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}},{key:"add",value:function(e){return R(this,e)}},{key:"subtract",value:function(e){return G(this,e)}},{key:"set",value:function(e){return z(function(e,t){var n,r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),(n=r).millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23)),r}(this,e),e)}},{key:"cycle",value:function(e,t,n){switch(e){case"era":case"year":case"month":case"day":return V(this,e,t,n);default:return function(e,t,n,r){var o=e.copy();switch(t){case"hour":var i=e.hour,a=0,u=23;if(12===(null==r?void 0:r.hourCycle)){var s=i>=12;a=s?12:0,u=s?23:11}o.hour=K(i,n,a,u,null==r?void 0:r.round);break;case"minute":o.minute=K(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=K(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=K(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return o}(this,e,t,n)}}},{key:"toDate",value:function(e,t){return ue(this,e,t)}},{key:"toString",value:function(){return"".concat(ee(this),"T").concat((e=this,"".concat(String(e.hour).padStart(2,"0"),":").concat(String(e.minute).padStart(2,"0"),":").concat(String(e.second).padStart(2,"0")).concat(e.millisecond?String(e.millisecond/1e3).slice(1):"")));var e}},{key:"compare",value:function(e){var t=q(this,e);return 0===t?function(e,t){return $(e)-$(t)}(this,se(e)):t}}]),e}(),Wo=new Map,Yo=864e5,Jo=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="buddhist",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t=E(O(n.prototype),"fromJulianDay",this).call(this,e),r=Q(t.era,t.year);return new Ko(this,r- -543,t.month,t.day)}},{key:"toJulianDay",value:function(e){return E(O(n.prototype),"toJulianDay",this).call(this,le(e))}},{key:"getEras",value:function(){return["BE"]}},{key:"getDaysInMonth",value:function(e){return E(O(n.prototype),"getDaysInMonth",this).call(this,le(e))}},{key:"balanceDate",value:function(){}}]),n}(Ho),Zo=1723856,Qo=1824665,Xo=5500,ei=function(){function e(){i(this,e),this.identifier="ethiopic"}return u(e,[{key:"fromJulianDay",value:function(e){var t=v(de(Zo,e),3),n=t[0],r=t[1],o=t[2],i="AM";return n<=0&&(i="AA",n+=Xo),new Ko(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"AA"===e.era&&(t-=Xo),fe(Zo,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return pe(e.year,e.month)}},{key:"getMonthsInYear",value:function(){return 13}},{key:"getDaysInYear",value:function(e){return 365+he(e.year)}},{key:"getYearsInEra",value:function(e){return"AA"===e.era?9999:9991}},{key:"getEras",value:function(){return["AA","AM"]}}]),e}(),ti=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="ethioaa",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t=v(de(Zo,e),3),n=t[0],r=t[1],o=t[2];return new Ko(this,"AA",n+=Xo,r,o)}},{key:"getEras",value:function(){return["AA"]}},{key:"getYearsInEra",value:function(){return 9999}}]),n}(ei),ni=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="coptic",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t=v(de(Qo,e),3),n=t[0],r=t[1],o=t[2],i="CE";return n<=0&&(i="BCE",n=1-n),new Ko(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),fe(Qo,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),pe(t,e.month)}},{key:"isInverseEra",value:function(e){return"BCE"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}},{key:"getEras",value:function(){return["BCE","CE"]}},{key:"getYearsInEra",value:function(e){return"BCE"===e.era?9999:9715}}]),n}(ei),ri=347997,oi=function(){function e(){i(this,e),this.identifier="hebrew"}return u(e,[{key:"fromJulianDay",value:function(e){for(var t=e-ri,n=25920*t/765433,r=Math.floor((19*n+234)/235)+1,o=me(r),i=Math.floor(t-o);i<1;)r--,o=me(r),i=Math.floor(t-o);for(var a=1,u=0;u<i;)u+=be(r,a),a++;return a--,u-=be(r,a),new Ko(this,r,a,i-u)}},{key:"toJulianDay",value:function(e){for(var t=me(e.year),n=1;n<e.month;n++)t+=be(e.year,n);return t+e.day+ri}},{key:"getDaysInMonth",value:function(e){return be(e.year,e.month)}},{key:"getMonthsInYear",value:function(e){return ye(e.year)?13:12}},{key:"getDaysInYear",value:function(e){return ge(e.year)}},{key:"getYearsInEra",value:function(){return 9999}},{key:"getEras",value:function(){return["AM"]}},{key:"balanceYearMonth",value:function(e,t){t.year!==e.year&&(ye(t.year)&&!ye(e.year)&&t.month>6?e.month--:!ye(t.year)&&ye(e.year)&&t.month>6&&e.month++)}}]),e}(),ii=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="indian",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t,r,o,i=E(O(n.prototype),"fromJulianDay",this).call(this,e),a=i.year-78,u=e-J(i.era,i.year,1,1);if(u<80?(a--,u+=155+(t=Z(i.year-1)?31:30)+90+10):(t=Z(i.year)?31:30,u-=80),u<t)r=1,o=u+1;else{var s=u-t;s<155?(r=Math.floor(s/31)+2,o=s%31+1):(s-=155,r=Math.floor(s/30)+7,o=s%30+1)}return new Ko(this,a,r,o)}},{key:"toJulianDay",value:function(e){var t,n,r=e.year+78,o=v(X(r),2),i=o[0],a=o[1];return Z(a)?(t=31,n=J(i,a,3,21)):(t=30,n=J(i,a,3,22)),1===e.month?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=30*(e.month-7)),n+=e.day-1)}},{key:"getDaysInMonth",value:function(e){return 1===e.month&&Z(e.year+78)||e.month>=2&&e.month<=6?31:30}},{key:"getYearsInEra",value:function(){return 9919}},{key:"getEras",value:function(){return["saka"]}},{key:"balanceDate",value:function(){}}]),n}(Ho),ai=1948440,ui=1948439,si=1300,ci=1600,li=460322,fi=function(){function e(){i(this,e),this.identifier="islamic-civil"}return u(e,[{key:"fromJulianDay",value:function(e){return _e(this,ai,e)}},{key:"toJulianDay",value:function(e){return we(ai,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=29+e.month%2;return 12===e.month&&Se(e.year)&&t++,t}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInYear",value:function(e){return Se(e.year)?355:354}},{key:"getYearsInEra",value:function(){return 9665}},{key:"getEras",value:function(){return["AH"]}}]),e}(),di=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="islamic-tbla",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){return _e(this,ui,e)}},{key:"toJulianDay",value:function(e){return we(ui,e.year,e.month,e.day)}}]),n}(fi),hi=function(e){c(n,e);var t=_(n);function n(){var e;if(i(this,n),(e=t.call(this)).identifier="islamic-umalqura",Uo||(Uo=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),(function(e){return e.charCodeAt(0)})).buffer)),!Go){Go=new Uint32Array(ci-si+1);for(var r=0,o=si;o<=ci;o++){Go[o-si]=r;for(var a=1;a<=12;a++)r+=Oe(o,a)}}return p(e)}return u(n,[{key:"fromJulianDay",value:function(e){var t=e-ai,r=Ee(si),o=Ee(ci);if(t<r||t>o)return E(O(n.prototype),"fromJulianDay",this).call(this,e);for(var i=si-1,a=1,u=1;u>0;){i++,u=t-Ee(i)+1;var s=Ae(i);if(u===s){a=12;break}if(u<s){var c=Oe(i,a);for(a=1;u>c;)u-=c,a++,c=Oe(i,a);break}}return new Ko(this,i,a,t-xe(i,a)+1)}},{key:"toJulianDay",value:function(e){return e.year<si||e.year>ci?E(O(n.prototype),"toJulianDay",this).call(this,e):ai+xe(e.year,e.month)+(e.day-1)}},{key:"getDaysInMonth",value:function(e){return e.year<si||e.year>ci?E(O(n.prototype),"getDaysInMonth",this).call(this,e):Oe(e.year,e.month)}},{key:"getDaysInYear",value:function(e){return e.year<si||e.year>ci?E(O(n.prototype),"getDaysInYear",this).call(this,e):Ae(e.year)}}]),n}(fi),pi=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],yi=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vi=[1867,1911,1925,1988,2018],mi=["meiji","taisho","showa","heisei","reiwa"],gi=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="japanese",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t=E(O(n.prototype),"fromJulianDay",this).call(this,e),r=ke(t);return new Ko(this,mi[r],t.year-vi[r],t.month,t.day)}},{key:"toJulianDay",value:function(e){return E(O(n.prototype),"toJulianDay",this).call(this,Te(e))}},{key:"balanceDate",value:function(e){var t=Te(e),n=ke(t);mi[n]!==e.era&&(e.era=mi[n],e.year=t.year-vi[n]),this.constrainDate(e)}},{key:"constrainDate",value:function(e){var t=mi.indexOf(e.era),n=yi[t];if(null!=n){var r=v(n,3),o=r[0],i=r[1],a=r[2],u=o-vi[t];e.year=Math.max(1,Math.min(u,e.year)),e.year===u&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){var s=v(pi[t],3),c=s[1],l=s[2];e.month=Math.max(c,e.month),e.month===c&&(e.day=Math.max(l,e.day))}}},{key:"getEras",value:function(){return mi}},{key:"getYearsInEra",value:function(e){var t=mi.indexOf(e.era),n=pi[t],r=pi[t+1];if(null==r)return 9999-n[0]+1;var o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}},{key:"getDaysInMonth",value:function(e){return E(O(n.prototype),"getDaysInMonth",this).call(this,Te(e))}},{key:"getMinimumMonthInYear",value:function(e){var t=je(e);return t?t[1]:1}},{key:"getMinimumDayInMonth",value:function(e){var t=je(e);return t&&e.month===t[1]?t[2]:1}}]),n}(Ho),bi=[0,31,62,93,124,155,186,216,246,276,306,336],wi=function(){function e(){i(this,e),this.identifier="persian"}return u(e,[{key:"fromJulianDay",value:function(e){var t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30);return new Ko(this,n,o+1,r-bi[o]+1)}},{key:"toJulianDay",value:function(e){var t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return(t+=bi[e.month-1])+e.day}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInMonth",value:function(e){return e.month<=6?31:e.month<=11||Y(25*e.year+11,33)<8?30:29}},{key:"getEras",value:function(){return["AP"]}},{key:"getYearsInEra",value:function(){return 9377}}]),e}(),_i=1911,Si=function(e){c(n,e);var t=_(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(m(r)))).identifier="roc",p(a)}return u(n,[{key:"fromJulianDay",value:function(e){var t=E(O(n.prototype),"fromJulianDay",this).call(this,e),r=Q(t.era,t.year),o=v(De(r),2),i=o[0],a=o[1];return new Ko(this,i,a,t.month,t.day)}},{key:"toJulianDay",value:function(e){return E(O(n.prototype),"toJulianDay",this).call(this,Ce(e))}},{key:"getEras",value:function(){return["before_minguo","minguo"]}},{key:"balanceDate",value:function(e){var t=v(De(Pe(e)),2),n=t[0],r=t[1];e.era=n,e.year=r}},{key:"isInverseEra",value:function(e){return"before_minguo"===e.era}},{key:"getDaysInMonth",value:function(e){return E(O(n.prototype),"getDaysInMonth",this).call(this,Ce(e))}},{key:"getYearsInEra",value:function(e){return"before_minguo"===e.era?9999:9999-_i}}]),n}(Ho),Ei=y(4332),Oi=y.n(Ei),xi=y(9014),Ai=y.n(xi),ki=function(e){return null==e};Ft.default.extend(Oi()),Ft.default.extend(Ai()),Ft.default.extend(Ut());var Ti="YYYY-MM-DDTHH:mm:ss.SSSZZ",ji=new WeakMap,Pi=new(function(){function e(){var t,n;!function(e,t){if(!f(e,t))throw new TypeError("Cannot call a class as a function")}(this,e),t=ji,n={writable:!0,value:new Map},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,t),t.set(this,n)}var t;return(t=[{key:"register",value:function(e,t){Ie(this,ji).set(e,t)}},{key:"getCalendar",value:function(e){if(Boolean(e)){if(e.calendar)return e.calendar;if(e.region){var t="".concat(e.language,"-").concat(e.region);if(Ie(this,ji).has(t))return Ie(this,ji).get(t)}if(e.language&&Ie(this,ji).has(e.language))return Ie(this,ji).get(e.language);var n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Ie(this,ji).set("".concat(e.language).concat(e.region?"-".concat(e.region):""),n),n}}}])&&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)}}(e.prototype,t),e}()),Di={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1},Ci=function(e){return function(t,n,r){return"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e}}};function Ii(e){var t,n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(e[s].hasOwnProperty("_default"))n[s]=e[s]._default;else{if(s.startsWith("_"))continue;(t=e[s])&&t.constructor===Object?n[s]=Ii(e[s]):n[s]=e[s]}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}var Mi=y(1249);function Ni(){return Ni=at((function(e){var t,n,r,o,i,a,u,s=arguments;return ut(this,(function(c){switch(c.label){case 0:n=(t=s.length>1&&void 0!==s[1]?s[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,ct(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return u=c.sent(),null==o||o(u,i),a=u,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),Ni.apply(this,arguments)}function Ri(){return(Ri=at((function(e){return ut(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}}(),b}())}}}))},254:function(e){"use strict";e.exports=u},45:function(e){"use strict";e.exports=v},513:function(e){"use strict";e.exports=b},740:function(e){"use strict";e.exports=w},685:function(e){"use strict";e.exports=S},901:function(e){"use strict";e.exports=E},688:function(e){"use strict";e.exports=O},64:function(e){"use strict";e.exports=x},954:function(e){"use strict";e.exports=A},493:function(e){"use strict";e.exports=k},281:function(e){"use strict";e.exports=T},792:function(e){"use strict";e.exports=j},396:function(e,t){var n;!function(){"use strict";var r=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e},o=function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)a.call(e,n)&&e[n]&&(t=i(t,n));return t},i=function(e,t){return t?e?e+" "+t:e+t:e},a={}.hasOwnProperty;e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},o={};function P(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,P),n.loaded=!0,n.exports}P.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return P.d(t,{a:t}),t},P.d=function(e,t){for(var n in t)P.o(t,n)&&!P.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),P.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},P.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},P.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var D={};return function(){"use strict";var r=function(e,t){var n=(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg");n&&(n.id=e,ro.appendChild(n))},o=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},v=function(e){var t,n=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(void 0===n?"undefined":(t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":y(t))?n:n+""},b=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(e,t):void 0}},w=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},O=function(e,t,n){var r=T(e,t,n);So.length?So.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},x=function(e){if("function"!=typeof e)throw Error(k(28,!1));So.push(e)},A=function(e){if("function"!=typeof e)throw Error(k(29,!1));var t=!1;return So=So.filter((function(n){var r=n===e;return t=t||r,!r})),t},k=function(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=")):"")},T=function(e,t,n){var r,o,i,a="".concat(M(t)," '").concat(C(t),"' died in status ").concat(t.status,": ");if(o=e,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):l(o,i)){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(k(30,!1,t.status,C(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=C(t),t.status=n,r},j=function(e){return e.status===jo},D=function(e){try{return e.activeWhen(window.location)}catch(t){return O(t,e,Mo),!1}},C=function(e){return e.name},I=function(e){return Boolean(e.unmountThisParcel)},M=function(e){return I(e)?"parcel":"application"},N=function(){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]},R=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},L=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!R(t,(function(e){return"function"!=typeof e}))));var t},F=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=M(e),o=C(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return B(n)?n:Promise.reject(k(15,!1,r,o,t,a))}))}),Promise.resolve())}},B=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},U=function(e,t){var n=function(){return e.status=ko,e};return Promise.resolve().then((function(){return e.status!==xo?e:(e.status=Ao,e.bootstrap?Z(e,"bootstrap").then(n).catch((function(n){if(t)throw T(n,e,Mo);return O(n,e,Mo),e})):Promise.resolve().then(n))}))},G=function(e,t){return Promise.resolve().then((function(){var n=function(){return Z(e,"unmount").then((function(){e.status=ko}),(function(n){if(t)throw T(n,e,Mo);O(n,e,Mo)}))};if(e.status!==jo)return e;e.status=Do;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw T(n,e,Mo);O(n,e,Mo)}))})).then((function(){return e}))}))},z=function(e,t){return Promise.resolve().then((function(){return e.status!==ko?e:(Ro||(window.dispatchEvent(new _o("single-spa:before-first-mount")),Ro=!0),e.status=To,Z(e,"mount").then((function(){return e.status=jo,Lo||(window.dispatchEvent(new _o("single-spa:first-mount")),Lo=!0),e})).catch((function(n){var r=function(){if(t)throw T(n,e,Mo);return O(n,e,Mo),e};return e.status=jo,G(e,!0).then(r,r)})))}))},H=function(){return V.apply(Bo,arguments)},V=function(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(k(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(k(3,!1,E(e.name)));var r=Fo++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(k(4,!1,o,void 0===t?"undefined":E(t)));if(!t.domElement)throw Error(k(5,!1,o));var i,a="function"==typeof e,u=a?e:function(){return Promise.resolve(e)},s={id:r,parcels:{},status:a?Oo:xo,customProps:t,parentName:C(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==jo)throw Error(k(6,!1,o,s.status));return G(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=Mo,f(e),e}))}};n.parcels[r]=s;var c=u();if(!c||"function"!=typeof c.then)throw Error(k(7,!1));c=c.then((function(e){if(!e)throw Error(k(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!L(e.bootstrap))throw Error(k(9,!1,o));if(!L(e.mount))throw Error(k(10,!1,o));if(!L(e.unmount))throw Error(k(11,!1,o));if(e.update&&!L(e.update))throw Error(k(12,!1,o));var t=F(e,"bootstrap"),n=F(e,"mount"),a=F(e,"unmount");s.status=xo,s.name=o,s.bootstrap=t,s.mount=n,s.unmount=a,s.timeouts=Q(e.timeouts),e.update&&(s.update=F(e,"update"),i.update=function(e){return s.customProps=e,K((t=s,Promise.resolve().then((function(){if(t.status!==jo)throw Error(k(32,!1,C(t)));return t.status=Po,Z(t,"update").then((function(){return t.status=jo,t})).catch((function(e){throw T(e,t,Mo)}))}))));var t})}));var l,f,d=c.then((function(){return U(s,!0)})),h=d.then((function(){return z(s,!0)})),p=new Promise((function(e,t){l=e,f=t}));return i={mount:function(){return K(Promise.resolve().then((function(){if(s.status!==ko)throw Error(k(13,!1,o,s.status));return n.parcels[r]=s,z(s)})))},unmount:function(){return K(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:K(c),bootstrapPromise:K(d),mountPromise:K(h),unmountPromise:K(p)}},K=function(e){return e.then((function(){return null}))},q=function(e){var t=C(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(k(40,!1),t,n));var r=N({},n,{name:t,mountParcel:V.bind(e),singleSpa:bo});return I(e)&&(r.unmountSelf=e.unmountThisParcel),r},$=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(16,!1));Uo.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},W=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(17,!1));Uo.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},Y=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(18,!1));Uo.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},J=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(k(19,!1));Uo.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},Z=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=M(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](q(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=k(31,!1,t,o,C(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))},Q=function(e){var t={};for(var n in Uo)t[n]=N({},Uo[n],e&&e[n]||{});return t},X=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Eo&&e.status!==Io?e:(e.status=Oo,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(q(e));if(!B(r))throw n=!0,Error(k(33,!1,C(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!L(t.bootstrap)&&(r=35),L(t.mount)||(r=36),L(t.unmount)||(r=37);var o=M(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(k(r,!1,o,C(e),i),t),O(void 0,e,Mo),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=N({},e.devtools.overlays,t.devtools.overlays)),e.status=xo,e.bootstrap=F(t,"bootstrap"),e.mount=F(t,"mount"),e.unmount=F(t,"unmount"),e.unload=F(t,"unload"),e.timeouts=Q(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Mo:(r=Io,e.loadErrorTime=(new Date).getTime()),O(t,e,r),e})));var t,n}))},ee=function(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(k(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=ie(window.location.href),r=ie(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)},te=function(e){var t=this;if(e){var n=e[0].type;Ho.indexOf(n)>=0&&zo[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},ne=function(){Xo([],arguments)},re=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return go&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}},oe=function(e){if(Ko)throw Error(k(43,!1));go=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,Ko=!0,Vo=window.history.replaceState,window.addEventListener("hashchange",ne),window.addEventListener("popstate",ne);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&Ho.indexOf(e)>=0)||R(zo[e],(function(e){return e===n})))return t.apply(this,arguments);zo[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&Ho.indexOf(e)>=0&&(zo[e]=zo[e].filter((function(e){return e!==t}))),n.apply(this,arguments)},window.history.pushState=re(window.history.pushState,"pushState"),window.history.replaceState=re(Vo,"replaceState")},ie=function(e){var t=document.createElement("a");return t.href=e,t},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!qo){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return ue.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return ue.call(this,n,window.removeEventListener,e,t,arguments)},qo=!0}},ue=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Ho.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},se=function(e){return Promise.resolve().then((function(){var t=$o[C(e)];if(!t)return e;if(e.status===Eo)return ce(e,t),e;if(e.status===Co)return t.promise.then((function(){return e}));if(e.status!==ko&&e.status!==Io)return e;var n=e.status===Io?Promise.resolve():Z(e,"unload");return e.status=Co,n.then((function(){return ce(e,t),e})).catch((function(n){return function(e,t,n){delete $o[C(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,O(n,e,Mo),t.reject(n)}(e,t,n),e}))}))},ce=function(e,t){delete $o[C(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Eo,t.resolve()},le=function(e,t,n,r){$o[C(e)]={app:e,resolve:n,reject:r},Object.defineProperty($o[C(e)],"promise",{get:t})},fe=function(e){return $o[e]},de=function(){return Wo.filter(j).map(C)},he=function(){return Wo.map(C)},pe=function(e){var t=R(Wo,(function(t){return C(t)===e}));return t?t.status:null},ye=function(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(k(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(k(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(k(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(k(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(k(24,!1));if(!we(e.customProps))throw Error(k(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(k(20,!1));if(!t)throw Error(k(23,!1));if("function"!=typeof n)throw Error(k(24,!1));if(!we(r))throw Error(k(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:_e(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(xe()||Yo||(Yo=!0,setTimeout((function(){xe()||console.warn(k(1,!1))}),5e3)),-1!==he().indexOf(o.name))throw Error(k(21,!1,o.name));Wo.push(N({loadErrorTime:null,status:Eo,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Go&&(ae(),Xo())},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Wo.filter((function(t){return t.activeWhen(e)})).map(C)},me=function(e){if(0===Wo.filter((function(t){return C(t)===e})).length)throw Error(k(25,!1,e));return(Go?ge(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=Wo.map(C).indexOf(e);Wo.splice(t,1)}))},ge=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(k(26,!1));var n=R(Wo,(function(t){return C(t)===e}));if(!n)throw Error(k(27,!1,e));var r,o=fe(C(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){le(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,be(n,o.resolve,o.reject)):r=new Promise((function(e,t){le(n,(function(){return r}),e,t),be(n,e,t)})),r},be=function(e,t,n){Promise.resolve().then((function(){if(R(ve(),(function(t){return t===C(e)})))return Se()})).then((function(){return G(e).then(se).then((function(){t(),setTimeout((function(){Xo()}))}))})).catch(n)},we=function(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},_e=function(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var u=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(u,"$"):"".concat(i,"(/").concat(u,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var u=e[a];(!o&&":"===u||o&&"/"===u)&&n(a)}return n(e.length),new RegExp(i,"i")}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},Se=function(){return Xo()},Ee=function(e,t){return D(e)?U(e).then((function(e){return t.then((function(){return D(e)?z(e):e}))})):t.then((function(){return e}))},Oe=function(e){ei=!0,Go&&(oe(e),Xo())},xe=function(){return ei},Ae=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},ke=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},Te=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},je=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Pe=function(){return Ui.apply(this,arguments)},De=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},Ce=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},Ie=function(e){return function t(n){return 0===arguments.length||Ce(n)?t:e.apply(this,arguments)}},Me=function(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ce(n)?t:Ie((function(t){return e(n,t)}));default:return Ce(n)&&Ce(r)?t:Ce(n)?Ie((function(t){return e(t,r)})):Ce(r)?Ie((function(t){return e(n,t)})):e(n,r)}}},Ne=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},Re=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},Le=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},Fe=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":y(e)},Be=function(e,t,n,r){var o=function(e,t){return Ta(e,t,n.slice(),r.slice())},i=Ne(e);return!Re((function(e,t){return!Re(o,t,e)}),Ne(t),i)},Ue=function(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return Ce(n)?t:Me((function(t,r){return e(n,t,r)}));case 2:return Ce(n)&&Ce(r)?t:Ce(n)?Me((function(t,n){return e(t,r,n)})):Ce(r)?Me((function(t,r){return e(n,t,r)})):Ie((function(t){return e(n,r,t)}));default:return Ce(n)&&Ce(r)&&Ce(o)?t:Ce(n)&&Ce(r)?Me((function(t,n){return e(t,n,o)})):Ce(n)&&Ce(o)?Me((function(t,n){return e(t,r,n)})):Ce(r)&&Ce(o)?Me((function(t,r){return e(n,t,r)})):Ce(n)?Ie((function(t){return e(t,r,o)})):Ce(r)?Ie((function(t){return e(n,t,o)})):Ce(o)?Ie((function(t){return e(n,r,t)})):e(n,r,o)}}},Ge=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},ze=function(e,t,n,r){return e["@@transducer/result"](n[r](Fa(e["@@transducer/step"],e),t))},He=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Ve=function(e){return(0,mo.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1,translationOverridesLoaded:!1})},Ke=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},qe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},$e=function(e){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){qe(e,t,n[t])}))}return e},We=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},Ye=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||Ze(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Je=function(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ze(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.")}()},Ze=function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}},Qe=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=Ve(u);if(e.moduleLoaded[u]){var c=it(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!0,config:c})}else{var l=at(u,e,t);s.setState({translationOverridesLoaded:!0,loaded:!1,config:l})}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},Xe=function(e,t){var n,r,o=(n=st(ot(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=Ye(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(s)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=Ye(d.value,2),y=p[0];rt(p[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return $e({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=Ye(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=(0,mo.getGlobalStore)("config-extension-slots",{slots:{}}),u=a.getState(),s={slots:$e({},u.slots,i)};Pa(u,s)||a.setState(s)},et=function(e,t){var n=function(e,t){var n=ru(Ca(e.schemas)),r=Je(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=Ye(u.value,2);n=st([n,ou(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);tu.setState({config:n})},tt=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=nt(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=We($e({},r[c.slotName]),qe({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}(0,mo.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})},nt=function(e,t,n,r,o,i){var a,u,s,c,l=function(e){return Ye(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=ot(o,i),p=ut(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=st([ut(d,h),y]),m=null!=f?f:o.schemas[t];ct(m,v,d);var g=uu(m,v);return au(m,g,d),delete g.extensionSlots,g},rt=function(e,t,n){var r="".concat(t,".extensionSlots.").concat(n),o="Extension slot config '".concat(r,"'"),i=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));i.length&&pt(r,o+"' contains invalid keys '".concat(i.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||pt(r,o+".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}))||pt(r,o+".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}))||pt(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(ht(e.configure)||pt(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))},ot=function(e,t){return Je(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},it=function(e,t,n){var r=t.schemas[e],o=ut(e,ot(t,n));ct(r,o,e);var i=uu(r,o);return au(r,i,e),delete i.extensionSlots,i},at=function(e,t,n){var r=ut(e,ot(t,n)),o=uu(cu,r);return au(cu,o,e),delete o.extensionSlots,o},ut=function(e,t){var n=t.map((function(t){return t[e]})).filter((function(e){return!!e}));return st(n)},st=function(e){return Ua(Ka)({},e)},ct=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?iu(f,c,l):"extensionSlots"===s&&""!==n||pt(l,"Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},lt=function(e,t,n){return!t||ft(e,[{Array:qa,Boolean:$a,ConceptUuid:Za,Number:Wa,Object:Ja,String:Ya,UUID:Za,PersonAttributeTypeUuid:Za,PatientIdentifierTypeUuid:Za}[t]],n)},ft=function(e,t,n){var r=!0;if(t)try{var o=!0,i=!1,a=void 0;try{for(var u,s=t[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=(0,u.value)(n);"string"==typeof c&&(pt(e,"object"==typeof n?"Invalid configuration for ".concat(e,": ").concat(c):"Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)),r=!1)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}return r},dt=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},ht=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},pt=function(e,t){var n="".concat(e,":::").concat(t);nu||(nu=new Set),nu.has(n)||(console.error(t),nu.add(n))},yt=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])}},vt=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])}},mt=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])}},gt=function(e){var t=this.__data__=new gu(e);this.size=t.size},bt=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yu;++t<n;)this.add(e[t])},wt=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},_t=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;t.push({slotModuleName:h.slotModuleName,extensionModuleName:u.moduleName,slotName:h.slotName,extensionId:h.id})}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}ac(Xr.configExtensionStore.getState().mountedExtensions,t)||Xr.configExtensionStore.setState({mountedExtensions:t})},St=function(e){return Boolean(e?!(arguments.length>1&&void 0!==arguments[1])||arguments[1]:arguments.length>2&&void 0!==arguments[2]&&arguments[2])},Et=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ot=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||At(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.")}()},xt=function(e){return function(e){if(Array.isArray(e))return Et(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||At(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.")}()},At=function(e,t){if(e){if("string"==typeof e)return Et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Et(e,t):void 0}},kt=function(e,t,n,r,o){var i={},a=(0,hu.isOnline)(),u=Object.entries(r.flags).filter((function(e){return Ot(e,2)[1].enabled})).map((function(e){return Ot(e,1)[0]})),s=!0,c=!1,l=void 0;try{for(var f,d=Object.entries(e.slots)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=Ot(f.value,2),p=h[0],y=h[1],v=Dt(p,e,(0,Xr.getExtensionSlotConfigFromStore)(t,y.name).config,n,u,a,o.session);i[p]={moduleName:y.moduleName,assignedExtensions:v}}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}ac(lc.getState().slots,i)||lc.setState({slots:i})},Tt=function(){kt(cc.getState(),fc.getState(),dc.getState(),fu.featureFlagsStore.getState(),aa.sessionStore.getState())},jt=function(e){return Ot(e.split("#"),1)[0]},Pt=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},Dt=function(e,t,n,r,o,i,a){var u=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=cc.getState().extensions;return xt(t).concat(xt(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=Pt(e,o,null===(r=i[jt(e)])||void 0===r?void 0:r.order,t),s=Pt(n,o,null===(a=i[jt(n)])||void 0===a?void 0:a.order,t);return-1===s?-1:-1===u?1:u-s}))}(n,t.slots[e].attachedIds),s=[],c=!0,l=!1,f=void 0;try{for(var d,h=u[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value,y=(0,Xr.getExtensionConfigFromStore)(r,e,p).config,v=jt(p),m=t.extensions[v];if(m){var g,b,w,_,S,E,O,x=null!==(E=null!==(S=null==y||null===(g=y["Display conditions"])||void 0===g?void 0:g.privileges)&&void 0!==S?S:m.privileges)&&void 0!==E?E:[];if(x&&("string"==typeof x||Array.isArray(x)&&x.length>0)){if(!(null==a?void 0:a.user))continue;if(!(0,aa.userHasAccess)(x,a.user))continue}var A,k,T,j,P=null!==(O=null==y||null===(b=y["Display conditions"])||void 0===b?void 0:b.expression)&&void 0!==O?O:null;if(null!==P)try{if(!(0,lu.evaluateAsBoolean)(P,{session:a}))continue}catch(e){console.error("Error while evaluating expression ".concat(P),e);continue}if(m.featureFlag&&!o.includes(m.featureFlag))continue;if(window.offlineEnabled&&!St(i,m.online,m.offline))continue;s.push({id:p,name:v,moduleName:m.moduleName,config:y,featureFlag:m.featureFlag,meta:m.meta,online:null===(k=null!==(A=null==y||null===(w=y["Display conditions"])||void 0===w?void 0:w.online)&&void 0!==A?A:m.online)||void 0===k||k,offline:null!==(j=null!==(T=null==y||null===(_=y["Display conditions"])||void 0===_?void 0:_.offline)&&void 0!==T?T:m.offline)&&void 0!==j&&j})}}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}return s},Ct=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},It=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Mt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){It(e,t,n[t])}))}return e},Nt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Rt=function(e,t){return"object"!=typeof t||yc(t).forEach((function(n){e[n]=t[n]})),e},Lt=function(e,t){return gc.call(e,t)},Ft=function(e,t){"function"==typeof t&&(t=t(mc(e))),("undefined"==typeof Reflect?yc:Reflect.ownKeys)(t).forEach((function(n){Bt(e,n,t[n])}))},Bt=function(e,t,n,r){bc(e,t,Rt(n&&Lt(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},Ut=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Bt(e.prototype,"constructor",e),{extend:Ft.bind(null,e.prototype)}}}},Gt=function(e,t,n){return Sc.call(e,t,n)},zt=function(e,t){return t(e)},Ht=function(e){if(!e)throw new Error("Assertion Failed")},Vt=function(e){pc.setImmediate?setImmediate(e):setTimeout(e,0)},Kt=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},qt=function(e){var t={};for(var n in e)Lt(e,n)&&(t[n]=e[n]);return t},$t=function(e){return xc.apply([],e)},Wt=function(e){Tc="undefined"!=typeof WeakMap&&new WeakMap;var t=jc(e);return Tc=null,t},Yt=function(e){return Pc.call(e).slice(8,-1)},Jt=function(e){var t,n,r,o;if(1===arguments.length){if(vc(e))return e.slice();if(this===Ic&&"string"==typeof e)return[e];if(o=Cc(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},Zt=function(e,t){Nc=e,Rc=t},Qt=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Rc).map((function(e){return"\n"+e})).join("")):""},Xt=function(e,t){this._e=Fc(),this.name=e,this.message=t},en=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},tn=function(e,t,n,r){this._e=Fc(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=en(e,t)},nn=function(e,t){this._e=Fc(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=en(e,t)},rn=function(){},on=function(e){return e},an=function(e,t){return null==e||e===on?t:function(n){return t(e(n))}},un=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},sn=function(e,t){return e===rn?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?un(r,this.onsuccess):r),o&&(this.onerror=this.onerror?un(o,this.onerror):o),void 0!==i?i:n}},cn=function(e,t){return e===rn?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?un(n,this.onsuccess):n),r&&(this.onerror=this.onerror?un(r,this.onerror):r)}},ln=function(e,t){return e===rn?t:function(n){var r=e.apply(this,arguments);Rt(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?un(o,this.onsuccess):o),i&&(this.onerror=this.onerror?un(i,this.onerror):i),void 0===r?void 0===a?void 0:a:Rt(r,a)}},fn=function(e,t){return e===rn?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},dn=function(e,t){return e===rn?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)}},hn=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=rn,this._lib=!1;var t=this._PSD=fl;if(Nc&&(this._stackHolder=Fc(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==$c)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&yn(this,this._value))}this._state=null,this._value=null,++t.ref,vl(this,e)},pn=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},yn=function(e,t){if(ul.push(t),null===e._state){var n=e._lib&&_n();t=cl(t),e._state=!1,e._value=t,Nc&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((function(){var n=_c(t,"stack");t._promise=e,Bt(t,"stack",{get:function(){return tl?n&&(n.get?n.get.apply(t):n.value):e.stack}})})),function(e){al.some((function(t){return t._value===e._value}))||al.push(e)}(e),vn(e),n&&Sn()}},vn=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)mn(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===hl&&(++hl,rl((function(){0==--hl&&En()}),[]))},mn=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++hl,rl(gn,[n,e,t])}else e._listeners.push(t)},gn=function(e,t,n){try{sl=t;var r,o=t._value;t._state?r=e(o):(ul.length&&(ul=[]),r=e(o),-1===ul.indexOf(o)&&function(e){for(var t=al.length;t;)if(al[--t]._value===e._value)return void al.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{sl=null,0==--hl&&En(),--n.psd.ref||n.psd.finalize()}},bn=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},wn=function(){_n()&&Sn()},_n=function(){var e=ol;return ol=!1,il=!1,e},Sn=function(){var e,t,n;do{for(;dl.length>0;)for(e=dl,dl=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(dl.length>0);ol=!0,il=!0},En=function(){var e=al;al=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=pl.slice(0),n=t.length;n;)t[--n]()},On=function(e){return new hn($c,!1,e)},xn=function(e,t){var n=fl;return function(){var r=_n(),o=fl;try{return Cn(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Cn(o,!1),r&&Sn()}}},An=function(e,t,n,r){var o=fl,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++El;var a=ll.env;i.env=el?{Promise:hn,PromiseProp:{value:hn,configurable:!0,writable:!0},all:hn.all,race:hn.race,allSettled:hn.allSettled,any:hn.any,resolve:hn.resolve,reject:hn.reject,nthen:Ln(a.nthen,i),gthen:Ln(a.gthen,i)}:{},t&&Rt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Mn(i,e,n,r);return 0===i.ref&&i.finalize(),u},kn=function(){return gl.id||(gl.id=++bl),++gl.awaits,gl.echoes+=100,gl.id},Tn=function(){return!!gl.awaits&&(0==--gl.awaits&&(gl.id=0),gl.echoes=100*gl.awaits,!0)},jn=function(e){return gl.echoes&&e&&e.constructor===Xc?(kn(),e.then((function(e){return Tn(),e}),(function(e){return Tn(),Ol(e)}))):e},Pn=function(e){++Sl,gl.echoes&&0!=--gl.echoes||(gl.echoes=gl.id=0),wl.push(fl),Cn(e,!0)},Dn=function(){var e=wl[wl.length-1];wl.pop(),Cn(e,!1)},Cn=function(e,t){var n=fl;if((t?!gl.echoes||_l++&&e===fl:!_l||--_l&&e===fl)||Nn(t?Pn.bind(null,e):Dn),e!==fl&&(fl=e,n===ll&&(ll.env=In()),el)){var r=ll.env.Promise,o=e.env;Jc.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(pc,"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))}},In=function(){var e=pc.Promise;return el?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(pc,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Jc.then,gthen:e.prototype.then}:{}},Mn=function(e,t,n,r,o){var i=fl;try{return Cn(e,!0),t(n,r,o)}finally{Cn(i,!1)}},Nn=function(e){Qc.call(Yc,e)},Rn=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=fl;n&&kn(),Cn(t,!0);try{return e.apply(this,arguments)}finally{Cn(o,!1),r&&Nn(Tn)}}},Ln=function(e,t){return function(n,r){return e.call(this,Rn(n,t),Rn(r,t))}},Fn=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(pc.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),Rt(r,o)):pc.CustomEvent&&Rt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&pc.dispatchEvent&&(dispatchEvent(r),!pc.PromiseRejectionEvent&&pc.onunhandledrejection))try{pc.onunhandledrejection(r)}catch(e){}Nc&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},Bn=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Un=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=Wt(t))[e],t}},Gn=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){yc(e).forEach((function(t){var n=e[t];if(vc(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Vc.InvalidArgument("Invalid event config");var r=i(t,on,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Vt((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=fn),o||(o=rn);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}},zn=function(e,t){return Ut(t).from({prototype:e}),t},Hn=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Vn=function(e,t){e.filter=Bn(e.filter,t)},Kn=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return Bn(r(),t())}:t,e.justLimit=n&&!r},qn=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Vc.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},$n=function(e,t,n){var r=qn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},Wn=function(e,t,n,r){var o=e.replayFilter?Bn(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),Lt(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Yn($n(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Yn($n(e,r,n),Bn(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},Yn=function(e,t,n,r){var o=xn(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=rn}),(function(t){e.fail(t),n=rn}))||o(e.value,e,(function(e){return n=e})),n()}))}))},Jn=function(e){var t=void 0===e?"undefined":y(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=Yt(e);return"ArrayBuffer"===n?"binary":n},Zn=function(e){return l(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Qn=function(e,t){return e<t?-1:e===t?0:1},Xn=function(e,t){return e>t?-1:e===t?0:1},er=function(e,t,n){var r=l(e,Fl)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},tr=function(e){return new e.Collection(e,(function(){return ir("")})).limit(0)},nr=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},rr=function(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return er(e,"String expected.");function d(e){o=function(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}(e),i=function(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}(e),a="next"===e?Qn:Xn;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(function(){return or(u[0],s[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,s,p))return!0;for(var h=null,y=p;y<f;++y){var v=nr(o,d,u[y],s[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h},or=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},ir=function(e){return{type:1,lower:e,upper:e}},ar=function(e){return xn((function(t){return ur(t),e(t.target.error),!1}))},ur=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},sr=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+cr(t)}},cr=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},lr=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Kt(n,(function(e){return[e.name,e]}))}},fr=function(e){return null==e?function(){}:"string"==typeof e?function(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return Ec(t,e)}}(e):function(t){return Ec(t,e)}},dr=function(e){return[].slice.call(e)},hr=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},pr=function(e,t){var n=e._novip,r=t.db,o=function(e,t,n,r){var o=n.IDBKeyRange,i=(n.indexedDB,function(e,t){return t.reduce((function(e,t){return f({},e,(0,t.create)(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");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o=function(e,t){var n=dr(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=vc(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:fr(t)},indexes:dr(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:vc(o),keyPath:o,unique:n,multiEntry:r,extractKey:fr(o)};return i[hr(o)]=a,a})),getIndexByKeyPath:function(e){return i[hr(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[hr(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),i=o.schema,a=o.hasGetAll,u=i.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,o=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,s){e=xn(e);var c=n.objectStore(t),l=null==c.keyPath,f="put"===o||"add"===o;if(!f&&"delete"!==o&&"deleteRange"!==o)throw new Error("Invalid operation type: "+o);var d,p=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===p)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var y=[],v=[],m=0,g=function(e){++m,ur(e)};if("deleteRange"===o){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(d=c.clear()):y.push(d=c.delete(r(u)))}else{var b=h(f?l?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(f)for(var S=0;S<p;++S)y.push(d=_&&void 0!==_[S]?c[o](w[S],_[S]):c[o](w[S])),d.onerror=g;else for(var E=0;E<p;++E)y.push(d=c[o](w[E])),d.onerror=g}var O=function(t){var n=t.target.result;y.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===o?i:y.map((function(e){return e.result})),lastResult:n})};d.onerror=function(e){g(e),O(e)},d.onsuccess=O}))},getMany:function(e){var n=e.trans,r=e.keys;return new Promise((function(e,o){e=xn(e);for(var i,a=n.objectStore(t),u=r.length,s=new Array(u),c=0,l=0,f=function(t){var n=t.target;s[n._pos]=n.result,++l===c&&e(s)},d=ar(o),h=0;h<u;++h)null!=r[h]&&((i=a.get(r[h]))._pos=h,i.onsuccess=f,i.onerror=d,++c);0===c&&e(s)}))},get:function(e){var n=e.trans,r=e.key;return new Promise((function(e,o){e=xn(e);var i=n.objectStore(t).get(r);i.onsuccess=function(t){return e(t.target.result)},i.onerror=ar(o)}))},query:function(e){return function(n){return new Promise((function(o,i){o=xn(o);var a=n.trans,u=n.values,s=n.limit,c=n.query,l=s===1/0?void 0:s,f=c.index,d=c.range,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===s)return o({result:[]});if(e){var v=u?p.getAll(y,l):p.getAllKeys(y,l);v.onsuccess=function(e){return o({result:e.target.result})},v.onerror=ar(i)}else{var m=0,g=u||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),b=[];g.onsuccess=function(e){var t=g.result;return t?(b.push(u?t.value:t.primaryKey),++m===s?o({result:b}):void t.continue()):o({result:b})},g.onerror=ar(i)}}))}}(a),openCursor:function(e){var n=e.trans,o=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,s){e=xn(e);var c=i.index,l=i.range,f=n.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=a?u?"prevunique":"prev":u?"nextunique":"next",p=o||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=ar(s),p.onsuccess=xn((function(t){var r=p.result;if(r){r.___id=++zl,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=n,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=xn(s),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=xn(e),p.onerror=ar(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(p.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return p.onsuccess=xn((function(e){p.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),s)}))},count:function(e){var n=e.query,o=e.trans,i=n.index,a=n.range;return new Promise((function(e,n){var u=o.objectStore(t),s=i.isPrimaryKey?u:u.index(i.name),c=r(a),l=c?s.count(c):s.count();l.onsuccess=xn((function(t){return e(t.target.result)})),l.onerror=ar(n)}))}}}(e)})),s={};return u.forEach((function(e){return s[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!s[e])throw new Error("Table '".concat(e,"' not found"));return s[e]},MIN_KEY:-1/0,MAX_KEY:Gl(t),schema:i}}(t,o,r),e.dbcore));return{dbcore:i}}(n._middlewares,r,n._deps,t);n.core=o.dbcore,n.tables.forEach((function(e){var t=e.name;n.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=n.core.table(t),l(n[t],n.Table)&&(n[t].core=e.core))}))},yr=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=_c(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||l(t,o.Transaction)?Bt(t,e,{get:function(){return this.table(e)},set:function(t){bc(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},vr=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)l(e[t],n.Table)&&delete e[t]}))},mr=function(e,t){return e._cfg.version-t._cfg.version},gr=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!jl)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,s=i.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},br=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return wr(o,e)})),o},wr=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},_r=function(e,t,n){var r={};return Gt(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=sr(cr(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var s=t.index(t.indexNames[u]);o=s.keyPath;var c=sr(s.name,o,!!s.unique,!!s.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(c)}r[e]=lr(e,i,a)})),r},Sr=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var c=u.indexNames[s],f=u.index(c).keyPath,d="string"==typeof f?f:"["+Gt(f).join("+")+"]";if(t[a]){var h=t[a].idxByName[d];h&&(h.name=c,delete t[a].idxByName[d],t[a].idxByName[c]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&pc.WorkerGlobalScope&&l(pc,pc.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},Er=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Xl("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},Or=function(e){return e&&"function"==typeof e.databases},xr=function(e){return An((function(){return fl.letThrough=!0,e()}))},Ar=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},kr=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):vc(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},Tr=function(e,t,n){var r=arguments.length;if(r<2)throw new Vc.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,$t(o),n]},jr=function(e,t,n){for(var r=vc(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},Pr=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Nl(t.keys[o],e[i])&&(r.push(n?Wt(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Dr=function(e){return!("from"in e)},Cr=function(e,t){Dr(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;Jl(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},Ir=function(e){var t=Dr(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Nl(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||Nl(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}}}},Mr=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=f({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=Nr(a)}e.d=Nr(e)},Nr=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},Rr=function(e,t){return yc(t).forEach((function(n){Cr(e[n]||(e[n]=new Yl),t[n])})),e},Lr=function(e){var t=rf;try{rf=!0,Bl.storagemutated.fire(e)}finally{rf=t}},Fr=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},Br=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ur=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},Gr=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},zr=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},Hr=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},Vr=function(){},Kr=function(e,t){if(!t)return e&&e.then?e.then(Vr):Promise.resolve()},qr=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},$r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Wr=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||Yr(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.")}()},Yr=function(e,t){if(e){if("string"==typeof e)return qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qr(e,t):void 0}},Jr=function(e){return function(t){var n=Wr((0,so.useState)(e.getState()),2),r=n[0],o=n[1];return(0,so.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$r(e,t,n[t])}))}return e}({},r,(0,so.useMemo)((function(){return t?function(e,t){"function"==typeof t&&(t=t(e));var n={},r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=Wr(a.value,2),r=t[0],o=t[1];n[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.setState((function(e){return o.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return qr(e)}(t=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Yr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var t}))}},s=Object.entries(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t):{}}),[t]))}},Zr=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Qr=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Xr=P(714),eo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.646 8.116l.021-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-black)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037l10.784 17.492h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45zM185.885 90.998h1.424l2.734 6.326h.023l2.758-6.326h1.391v8.07h-.957v-6.77h-.024l-2.894 6.77h-.582l-2.894-6.77h-.022v6.77h-.957zM198.386 90.998h5.071v.889h-4.114v2.53h3.841v.89h-3.841v2.871h4.32v.89h-5.277zM207.891 98.178h1.822c1.848 0 3.25-.935 3.25-3.146s-1.402-3.145-3.25-3.145h-1.822zm-.957-7.18h3.1c1.583 0 3.953 1.06 3.953 4.034 0 2.976-2.37 4.036-3.953 4.036h-3.1zM217.007 99.068h.958v-8.07h-.958zM227.105 92.663c-.478-.651-1.242-.981-2.017-.981-1.8 0-3.077 1.584-3.077 3.35 0 1.87 1.266 3.352 3.077 3.352.98 0 1.767-.4 2.337-1.129l.718.603c-.718.97-1.766 1.414-3.055 1.414-2.314 0-4.102-1.79-4.102-4.24 0-2.37 1.709-4.239 4.102-4.239 1.095 0 2.166.377 2.849 1.266zM233.557 92.23h-.024l-1.675 3.965h3.294zm-.434-1.232h.9l3.43 8.07h-1.117l-.82-1.984h-4.034l-.832 1.984h-1.082zM240.006 90.998h.958v7.18h3.692v.89h-4.65zM252.793 94.554h.855c1.06 0 2.439 0 2.439-1.334 0-1.161-1.014-1.333-1.948-1.333h-1.346zm-.957-3.556h2.063c1.561 0 3.214.228 3.214 2.222 0 1.174-.764 1.938-2.018 2.132l2.291 3.716h-1.173l-2.19-3.625h-1.23v3.625h-.957zM260.51 90.998h5.07v.889h-4.112v2.53h3.84v.89h-3.84v2.871h4.318v.89h-5.276zM274.402 92.663c-.479-.651-1.242-.981-2.018-.981-1.8 0-3.077 1.584-3.077 3.35 0 1.87 1.266 3.352 3.077 3.352.98 0 1.767-.4 2.336-1.129l.718.603c-.718.97-1.766 1.414-3.054 1.414-2.313 0-4.102-1.79-4.102-4.24 0-2.37 1.709-4.239 4.102-4.239 1.094 0 2.166.377 2.85 1.266zM284.739 95.032c0-1.857-1.3-3.35-3.191-3.35-1.892 0-3.191 1.493-3.191 3.35 0 1.858 1.299 3.352 3.191 3.352s3.191-1.494 3.191-3.352m-7.409 0c0-2.439 1.767-4.239 4.218-4.239s4.217 1.8 4.217 4.239-1.767 4.24-4.217 4.24c-2.451 0-4.218-1.8-4.218-4.24M289.514 94.554h.855c1.059 0 2.438 0 2.438-1.334 0-1.161-1.014-1.333-1.948-1.333h-1.345zm-.958-3.556h2.062c1.563 0 3.215.228 3.215 2.222 0 1.174-.763 1.938-2.016 2.132l2.289 3.716h-1.173l-2.189-3.625h-1.23v3.625h-.958zM297.81 98.178h1.825c1.845 0 3.246-.935 3.246-3.146s-1.401-3.145-3.246-3.145h-1.825zm-.957-7.18h3.1c1.585 0 3.956 1.06 3.956 4.034 0 2.976-2.371 4.036-3.956 4.036h-3.1zM315.407 92.422c-.318-.513-.89-.74-1.47-.74-.844 0-1.721.4-1.721 1.356 0 .74.41 1.072 1.698 1.482 1.254.399 2.417.81 2.417 2.393 0 1.607-1.38 2.36-2.838 2.36-.935 0-1.938-.309-2.486-1.118l.821-.672c.342.593 1.026.9 1.721.9.821 0 1.754-.478 1.754-1.402 0-.991-.67-1.163-2.107-1.64-1.139-.377-2.006-.878-2.006-2.222 0-1.551 1.333-2.326 2.747-2.326.9 0 1.664.25 2.256.946zM320.844 95.591l-3.009-4.593h1.219l2.269 3.647 2.335-3.647h1.152l-3.01 4.593v3.477h-.956zM330.565 92.422c-.32-.513-.89-.74-1.471-.74-.843 0-1.72.4-1.72 1.356 0 .74.41 1.072 1.698 1.482 1.254.399 2.415.81 2.415 2.393 0 1.607-1.378 2.36-2.837 2.36-.934 0-1.937-.309-2.485-1.118l.821-.672c.342.593 1.026.9 1.721.9.821 0 1.754-.478 1.754-1.402 0-.991-.671-1.163-2.107-1.64-1.139-.377-2.006-.878-2.006-2.222 0-1.551 1.333-2.326 2.746-2.326.901 0 1.665.25 2.257.946zM339.283 91.887h-2.666v7.18h-.958v-7.18h-2.667v-.889h6.291zM341.665 90.998h5.071v.889h-4.113v2.53h3.84v.89h-3.84v2.871h4.319v.89h-5.277zM349.905 90.998h1.424l2.735 6.326h.023l2.758-6.326h1.391v8.07h-.958v-6.77h-.023l-2.894 6.77h-.582l-2.895-6.77h-.021v6.77h-.958z" clip-rule="evenodd"/></svg>',to='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-black)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45z" clip-rule="evenodd"/></svg>',no='<svg xmlns="http://www.w3.org/2000/svg" width="121" height="118"><path fill="var(--logo-red)" fill-rule="evenodd" d="M40.436 39.474a27.93 27.93 0 0 1 19.811-8.205c7.717 0 14.705 3.122 19.77 8.167l.021-18.656A43.1 43.1 0 0 0 60.247 16c-7.133 0-13.899 1.943-19.832 4.999z" clip-rule="evenodd"/><path fill="var(--logo-orange)" fill-rule="evenodd" d="M80.038 79.064a27.92 27.92 0 0 1-19.808 8.205c-7.717 0-14.705-3.121-19.774-8.167l-.02 18.657a43.1 43.1 0 0 0 19.794 4.78 43.1 43.1 0 0 0 19.794-4.781z" clip-rule="evenodd"/><path fill="var(--logo-purple)" fill-rule="evenodd" d="M40.474 79.089c-5.069-5.069-8.205-12.07-8.205-19.808 0-7.717 3.121-14.704 8.167-19.773l-18.657-.02A43.1 43.1 0 0 0 17 59.281a43.1 43.1 0 0 0 4.782 19.795z" clip-rule="evenodd"/><path fill="var(--logo-green)" fill-rule="evenodd" d="M80.027 39.435a27.93 27.93 0 0 1 8.205 19.811 27.92 27.92 0 0 1-8.168 19.769l18.658.021a43.1 43.1 0 0 0 4.779-19.79 43.1 43.1 0 0 0-4.781-19.798z" clip-rule="evenodd"/></svg>',ro=document.createElement("div"),oo=function(){document.body.appendChild(ro)};ro.id="omrs-svgs-container",ro.style.display="none","complete"===document.readyState?oo():window.addEventListener("load",oo);var io=["red","magenta","purple","blue","teal","cyan","gray","orange","green","warm-gray","cool-gray","high-contrast","outline"],ao={primaryColor:{_type:Xr.Type.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[Xr.validators.oneOf(io)]},secondaryColor:{_type:Xr.Type.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[Xr.validators.oneOf(io)]}},uo={"Brand color #1":{_default:"#005d5d",_type:Xr.Type.String},"Brand color #2":{_default:"#004144",_type:Xr.Type.String},"Brand color #3":{_default:"#007d79",_type:Xr.Type.String},excludePatientIdentifierCodeTypes:{uuids:{_type:Xr.Type.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:Xr.Type.UUID}}},implementationName:{_type:Xr.Type.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:Xr.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:Xr.Type.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[Xr.validators.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:Xr.Type.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:Xr.Type.String}},diagnosisTags:ao};Number.MAX_SAFE_INTEGER;var so=P(954);P(396),P(740);var co=P(688),lo={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?lo.enableCssCustomProperties=!0:lo.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?lo.enableCssGrid=!0:lo.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?lo.enableV11Release=!0:lo.enableV11Release=!1:lo.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?lo.enableExperimentalTileContrast=!0:lo.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?lo.enableV12TileDefaultIcons=!0:lo.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?lo.enableV12TileRadioIcons=!0:lo.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?lo.enableV12Overflowmenu=!0:lo.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?lo.enableTreeviewControllable=!0:lo.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?lo.enableV12StructuredListVisibleIcons=!0:lo.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?lo.enableExperimentalFocusWrapWithoutSentinels=!0:lo.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?lo.enableDialogElement=!0:lo.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?lo.enableV12DynamicFloatingStyles=!0:lo.enableV12DynamicFloatingStyles=!1}catch(e){lo.enableCssCustomProperties=!1,lo.enableCssGrid=!1,lo.enableV11Release=!0,lo.enableExperimentalTileContrast=!1,lo.enableV12TileDefaultIcons=!1,lo.enableV12TileRadioIcons=!1,lo.enableV12Overflowmenu=!1,lo.enableTreeviewControllable=!1,lo.enableV12StructuredListVisibleIcons=!1,lo.enableExperimentalFocusWrapWithoutSentinels=!1,lo.enableDialogElement=!1,lo.enableV12DynamicFloatingStyles=!1}for(var fo=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:lo.enableCssCustomProperties},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:lo.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:lo.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:lo.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:lo.enableV12TileDefaultIcons},{name:"enable-v12-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:lo.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:lo.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:lo.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:lo.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:lo.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:lo.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:lo.enableV12DynamicFloatingStyles}],ho=function(e,t,n){return t&&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,v(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}),[{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=b(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,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=u(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)}}]),po=new ho(void 0),yo=0;yo<fo.length;yo++){var vo=fo[yo];po.add(vo.name,vo.enabled)}!function(){po.merge.apply(po,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1}),P(901);var mo=P(685);(0,mo.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});var go,bo=Object.freeze({__proto__:null,get start(){return Oe},get ensureJQuerySupport(){return ae},get setBootstrapMaxTime(){return $},get setMountMaxTime(){return W},get setUnmountMaxTime(){return Y},get setUnloadMaxTime(){return J},get registerApplication(){return ye},get unregisterApplication(){return me},get getMountedApps(){return de},get getAppStatus(){return pe},get unloadApplication(){return ge},get checkActivityFunctions(){return ve},get getAppNames(){return he},get pathToActiveWhen(){return _e},get navigateToUrl(){return ee},get patchHistoryApi(){return oe},get triggerAppChange(){return Se},get addErrorHandler(){return x},get removeErrorHandler(){return A},get mountRootParcel(){return H},get NOT_LOADED(){return Eo},get LOADING_SOURCE_CODE(){return Oo},get NOT_BOOTSTRAPPED(){return xo},get BOOTSTRAPPING(){return Ao},get NOT_MOUNTED(){return ko},get MOUNTING(){return To},get UPDATING(){return Po},get LOAD_ERROR(){return Io},get MOUNTED(){return jo},get UNLOADING(){return Co},get UNMOUNTING(){return Do},get SKIP_BECAUSE_BROKEN(){return Mo}}),wo=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,_o=function(){try{var e=new wo("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?wo:"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},So=[],Eo="NOT_LOADED",Oo="LOADING_SOURCE_CODE",xo="NOT_BOOTSTRAPPED",Ao="BOOTSTRAPPING",ko="NOT_MOUNTED",To="MOUNTING",jo="MOUNTED",Po="UPDATING",Do="UNMOUNTING",Co="UNLOADING",Io="LOAD_ERROR",Mo="SKIP_BECAUSE_BROKEN",No=[],Ro=!1,Lo=!1,Fo=0,Bo={parcels:{}},Uo={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}},Go="undefined"!=typeof window,zo={hashchange:[],popstate:[]},Ho=["hashchange","popstate"],Vo=null,Ko=!1;Go&&(window.singleSpaNavigate?console.warn(k(41,!1)):window.singleSpaNavigate=ee);var qo=!1,$o={},Wo=[],Yo=!1,Jo=!1,Zo=[],Qo=Go&&window.location.href;function Xo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch((function(e){return console.warn(Error(k(42,!1))),console.warn(e),!1})))},o=function(){var t=de();e.forEach((function(e){return e.resolve(t)}));try{u(0===s.length?"no-app-change":"app-change",a()),u("routing-event",a())}catch(e){setTimeout((function(){throw e}))}if(Jo=!1,Zo.length>0){var n=Zo;Zo=[],Xo(n)}return t},i=function(){n||(e.forEach((function(e){te(e.eventArguments)})),te(t))},a=function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0,o={},i=(S(e={},jo,[]),S(e,ko,[]),S(e,Eo,[]),S(e,Mo,[]),e);n?(d.concat(h).forEach((function(e,t){u(e,jo)})),l.forEach((function(e){u(e,Eo)})),f.forEach((function(e){u(e,ko)}))):s.forEach((function(e){u(e)}));var a={detail:{newAppStatuses:o,appsByNewStatus:i,totalAppChanges:s.length,originalEvent:null==t?void 0:t[0],oldUrl:y,newUrl:v}};return r&&N(a.detail,r),a;function u(e,t){var n=C(e);t=t||pe(n),o[n]=t,(i[t]=i[t]||[]).push(n)}},u=function(e,t){n||window.dispatchEvent(new _o("single-spa:".concat(e),t))};if(Jo)return new Promise((function(e,n){Zo.push({resolve:e,reject:n,eventArguments:t})}));var s,c=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Wo.forEach((function(i){var a=i.status!==Mo&&D(i);switch(i.status){case Io:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Eo:case Oo:a&&n.push(i);break;case xo:case ko:!a&&fe(C(i))?e.push(i):a&&r.push(i);break;case jo:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),l=c.appsToUnload,f=c.appsToUnmount,d=c.appsToLoad,h=c.appsToMount,p=[],y=Qo,v=Qo=window.location.href;return xe()?(Jo=!0,s=l.concat(d,f,h),Promise.resolve().then((function(){return u(0===s.length?"before-no-app-change":"before-app-change",a(!0)),u("before-routing-event",a(!0,{cancelNavigation:r})),Promise.all(p).then((function(n){if(n.some((function(e){return e})))return Vo.call(window.history,history.state,"",y.substring(location.origin.length)),Qo=location.href,Jo=!1,Xo(e,t,!0);var r=l.map(se),s=f.map(G).map((function(e){return e.then(se)})).concat(r),c=Promise.all(s);c.then((function(){u("before-mount-routing-event",a(!0))}),(function(e){throw e}));var p=d.map((function(e){return X(e).then((function(e){return Ee(e,c)}))})),v=h.filter((function(e){return d.indexOf(e)<0})).map((function(e){return Ee(e,c)}));return c.catch((function(e){throw i(),e})).then((function(){return i(),Promise.all(p.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(o).then((function(){}),(function(e){throw e}))}))}))}))):(s=d,Promise.resolve().then((function(){var e=d.map(X);return Promise.all(e).then(i).then((function(){return[]})).catch((function(e){throw i(),e})).finally((function(){}))})))}var ei=!1,ti={getRawAppData:function(){return function(e){if(Array.isArray(e))return w(e)}(e=Wo)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e},reroute:Xo,NOT_LOADED:Eo,toLoadPromise:X,toBootstrapPromise:U,unregisterApplication:me,getProfilerData:function(){return No}};Go&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=ti);var ni=P(45);P(254),(0,mo.createGlobalStore)("modalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow;var ri=P(792);P(279),new ri.Subject,new ri.Subject,new ri.Subject,P(513),(0,mo.createGlobalStore)("workspace",{context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0}),P(281);var oi=null;try{oi=n(1672).createContext()}catch(wo){}function ii(e){return(ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ai(e,t){return(ai=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ui=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ai(e,t)}(r,so.Component);var t,n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ii(e);if(t){var o=ii(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return je(e)}(this,n)}}(r);function r(e){var t;if(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)))throw new TypeError("Cannot call a class as a function");var n,r}(this,r),Te(je(t=n.call(this,e)),"handleRef",(function(e){t.el=e})),Te(je(t),"addThingToDo",(function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then((function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)})).catch((function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout((function(){throw n})),n})))})),Te(je(t),"getParcelProps",(function(){var e=ke(ke({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e})),t.state={hasError:!1},!e.config)throw new Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return(t=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",(function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw new Error("\n\t\t\t\t <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n\t\t\t\t If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop\t\n\t\t\t\t");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach((function(n){t.style[n]=e.props.wrapStyle[n]})),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,ke({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise}))}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",(function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())}))}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",(function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()})),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return oi&&oi.Consumer?so.createElement(oi.Consumer,null,(function(t){return e.mountParcel=t?t.mountParcel:null,null})):null;var t=oi&&oi.Consumer?so.createElement(oi.Consumer,null,(function(t){return e.mountParcel=t?t.mountParcel:null,null})):void 0;return so.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}])&&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,t),r}();Te(ui,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}}),new ri.Subject,P(353);var si=P(921),ci=function(){},li=void 0,fi=Object,di=function(e){return e===li},hi=function(e){return"function"==typeof e},pi=function(e,t){return f({},e,t)},yi=new WeakMap,vi=0,mi=function(e){var t,n,r=void 0===e?"undefined":y(e),o=e&&e.constructor,i=o==Date;if(fi(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=yi.get(e))return t;if(t=++vi+"~",yi.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=mi(e[n])+",";yi.set(e,t)}if(o==fi){t="#";for(var a=fi.keys(e).sort();!di(n=a.pop());)di(e[n])||(t+=n+":"+mi(e[n])+",");yi.set(e,t)}}return t},gi=new WeakMap,bi={},wi={},_i="undefined",Si=("undefined"==typeof window?"undefined":y(window))!=_i,Ei=("undefined"==typeof document?"undefined":y(document))!=_i,Oi=function(e,t){var n=gi.get(e);return[function(){return!di(t)&&e.get(t)||bi},function(r){if(!di(t)){var o=e.get(t);t in wi||(wi[t]=o),n[5](t,pi(o,r),o||bi)}},n[6],function(){return!di(t)&&t in wi?wi[t]:!di(t)&&e.get(t)||bi}]},xi=!0,Ai=h(Si&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[ci,ci],2),ki=Ai[0],Ti=Ai[1],ji={isOnline:function(){return xi},isVisible:function(){var e=Ei&&document.visibilityState;return di(e)||"hidden"!==e}},Pi={initFocus:function(e){return Ei&&document.addEventListener("visibilitychange",e),ki("focus",e),function(){Ei&&document.removeEventListener("visibilitychange",e),Ti("focus",e)}},initReconnect:function(e){var t=function(){xi=!0,e()},n=function(){xi=!1};return ki("online",t),ki("offline",n),function(){Ti("online",t),Ti("offline",n)}}},Di=!so.default.useId,Ci=!Si||"Deno"in window,Ii=function(e){return Si&&y(window.requestAnimationFrame)!=_i?window.requestAnimationFrame(e):setTimeout(e,1)},Mi=Ci?so.useEffect:so.useLayoutEffect,Ni="undefined"!=typeof navigator&&navigator.connection,Ri=!Ci&&Ni&&(["slow-2g","2g"].includes(Ni.effectiveType)||Ni.saveData),Li=function(e){if(hi(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?mi(e):"",t]},Fi=0,Bi=function(){return++Fi};function Ui(){return Ui=i((function(){var e,t,n,r,o,a,u,s,c,l,f,d,p,y,v,g,b,w,_,S,E,O,x=arguments;function A(e){return k.apply(this,arguments)}function k(){return k=i((function(e){var n,r,i,a,s,y,v,g,b,w,_,S,E,O,x,A,k,T,j,P;return m(this,(function(m){switch(m.label){case 0:if(n=h(Li(e),1),!(r=n[0]))return[2];if(i=h(Oi(o,r),2),a=i[0],s=i[1],y=h(gi.get(o),4),v=y[0],g=y[1],b=y[2],w=y[3],_=function(){var t=v[r];return(hi(c.revalidate)?c.revalidate(a().data,e):!1!==c.revalidate)&&(delete b[r],delete w[r],t&&t[0])?t[0](2).then((function(){return a().data})):a().data},t.length<3)return[2,_()];if(E=u,O=Bi(),g[r]=[O,0],x=!di(d),A=a(),k=A.data,T=A._c,j=di(T)?k:T,x&&(d=hi(d)?d(j,k):d,s({data:d,_c:j})),hi(E))try{E=E(j)}catch(e){S=e}return E&&function(e){return hi(e.then)}(E)?[4,E.catch((function(e){S=e}))]:[3,2];case 1:if(E=m.sent(),O!==g[r][0]){if(S)throw S;return[2,E]}S&&x&&function(e){return"function"==typeof f?f(e):!1!==f}(S)&&(l=!0,s({data:j,_c:li})),m.label=2;case 2:if(l&&!S&&(hi(l)?(P=l(E,j),s({data:P,error:li,_c:li})):s({data:E,error:li,_c:li})),g[r][1]=Bi(),Promise.resolve(_()).then((function(){s({_c:li})})),!S)return[2,E];if(p)throw S;return[2]}}))})),k.apply(this,arguments)}return m(this,(function(i){for(e=x.length,t=new Array(e),n=0;n<e;n++)t[n]=x[n];if(r=h(t,4),o=r[0],a=r[1],u=r[2],s=r[3],c=pi({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),l=c.populateCache,f=c.rollbackOnError,d=c.optimisticData,p=c.throwOnError,hi(a)){y=a,v=[],g=o.keys(),b=!0,w=!1,_=void 0;try{for(S=g[Symbol.iterator]();!(b=(E=S.next()).done);b=!0)O=E.value,!/^\$(inf|sub)\$/.test(O)&&y(o.get(O)._k)&&v.push(O)}catch(e){w=!0,_=e}finally{try{b||null==S.return||S.return()}finally{if(w)throw _}}return[2,Promise.all(v.map(A))]}return[2,A(a)]}))})),Ui.apply(this,arguments)}var Gi=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},zi=function(e,t){if(!gi.has(e)){var n=pi(Pi,t),r={},o=Pe.bind(li,e),i=ci,a={},u=function(e,t){var n=a[e]||[];return a[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},s=function(t,n,r){e.set(t,n);var o=a[t],i=!0,u=!1,s=void 0;if(o)try{for(var c,l=o[Symbol.iterator]();!(i=(c=l.next()).done);i=!0)(0,c.value)(n,r)}catch(e){u=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(u)throw s}}},c=function(){if(!gi.has(e)&&(gi.set(e,[r,{},{},{},o,s,u]),!Ci)){var t=n.initFocus(setTimeout.bind(li,Gi.bind(li,r,0))),a=n.initReconnect(setTimeout.bind(li,Gi.bind(li,r,1)));i=function(){t&&t(),a&&a(),gi.delete(e)}}};return c(),[e,o,c,i]}return[e,gi.get(e)[4]]},Hi=h(zi(new Map),2),Vi=Hi[0],Ki=Hi[1],qi=pi({onLoadingSlow:ci,onSuccess:ci,onError:ci,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!di(i)&&a>i||setTimeout(r,u,o)},onDiscarded:ci,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ri?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Ri?5e3:3e3,compare:function(e,t){return mi(e)==mi(t)},isPaused:function(){return!1},cache:Vi,mutate:Ki,fallback:{}},ji),$i=function(e,t){var n=pi(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=pi(o,a))}return n},Wi=(0,so.createContext)({}),Yi=function(e){var t=e.value,n=(0,so.useContext)(Wi),r=hi(t),o=(0,so.useMemo)((function(){return r?t(n):t}),[r,n,t]),i=(0,so.useMemo)((function(){return r?o:$i(n,o)}),[r,n,o]),a=o&&o.provider,u=(0,so.useRef)(li);a&&!u.current&&(u.current=zi(a(i.cache||Vi),o));var s=u.current;return s&&(i.cache=s[0],i.mutate=s[1]),Mi((function(){if(s)return s[2]&&s[2](),s[3]}),[]),(0,so.createElement)(Wi.Provider,pi(e,{value:i}))},Ji="$inf$",Zi=Si&&window.__SWR_DEVTOOLS_USE__,Qi=Zi?window.__SWR_DEVTOOLS_USE__:[],Xi=function(e){return hi(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},ea=Qi.concat((function(e){return function(t,n,r){return e(t,n&&function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=h(Li(t),1)[0],a=h(gi.get(Vi),4)[3];if(i.startsWith(Ji))return n.apply(void 0,p(r));var u=a[i];return di(u)?n.apply(void 0,p(r)):(delete a[i],u)},r)}})),ta=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=pi(qi,(0,so.useContext)(Wi)),i=h(Xi(n),3),a=i[0],u=i[1],s=i[2],c=$i(o,s),l=e,f=(c.use||[]).concat(ea),d=f.length;d--;)l=f[d](l);return l(a,u||c.fetcher||null,c)}},na=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},ra=function(e,t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=h(Xi(r),3),a=i[0],u=i[1],s=i[2],c=(s.use||[]).concat(t);return e(a,u,d(f({},s),{use:c}))}};Zi&&(window.__SWR_DEVTOOLS_REACT__=so.default);var oa=so.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},ia={dedupe:!0};fi.defineProperty(Yi,"defaultValue",{value:qi}),ta((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(gi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Li(e),2),O=E[0],x=E[1],A=(0,so.useRef)(!1),k=(0,so.useRef)(!1),T=(0,so.useRef)(O),j=(0,so.useRef)(t),P=(0,so.useRef)(n),D=function(){return P.current},C=function(){return D().isVisible()&&D().isOnline()},I=h(Oi(r,O),4),M=I[0],N=I[1],R=I[2],L=I[3],F=(0,so.useRef)({}).current,B=di(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!di(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,so.useMemo)((function(){var e=!!O&&!!t&&(di(s)?!D().isPaused()&&!a&&(!!di(c)||c):s),n=function(t){var n=pi(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),z=(0,si.useSyncExternalStore)((0,so.useCallback)((function(e){return R(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),H=!A.current,V=b[O]&&b[O].length>0,K=z.data,q=di(K)?B:K,$=z.error,W=(0,so.useRef)(q),Y=v?di(K)?W.current:K:q,J=!(V&&!di($))&&(H&&!di(s)?s:!D().isPaused()&&(a?!di(q)&&c:di(q)||c)),Z=!!(O&&t&&H&&J),Q=di(z.isValidating)?Z:z.isValidating,X=di(z.isLoading)?Z:z.isLoading,ee=(0,so.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,P;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||k.current||D().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return Di?!k.current&&O===T.current&&A.current:O===T.current},l={isValidating:!1,isLoading:!1},f=function(){N(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},di(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(N(p),n.loadingTimeout&&di(M().data)&&setTimeout((function(){a&&c()&&D().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Bi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=li,v=w[O],!di(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&D().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&D().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&D().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=D(),P=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===P||hi(P)&&P(S))&&(D().revalidateOnFocus&&D().revalidateOnReconnect&&!C()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,so.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pe.apply(void 0,[r,T.current].concat(p(t)))}),[]);if(Mi((function(){j.current=t,P.current=n,di(K)||(W.current=K)})),Mi((function(){if(O){var e=ee.bind(li,ia),t=0,n=na(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();D().revalidateOnFocus&&o>t&&C()&&(t=o+D().focusThrottleInterval,e())}else if(1==n)D().revalidateOnReconnect&&C()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return k.current=!1,T.current=O,A.current=!0,N({_k:x}),J&&(di(q)||Ci?e():Ii(e)),function(){k.current=!0,n()}}}),[O]),Mi((function(){var e,t=function(){var t=hi(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!D().isVisible()||!y&&!D().isOnline()?t():ee(ia).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,so.useDebugValue)(Y),a&&di(q)&&O){if(!Di&&Ci)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,P.current=n,k.current=!1;var ne=S[O];if(!di(ne)){var re=te(ne);oa(re)}if(!di($))throw $;var oe=ee(ia);di(Y)||(oe.status="fulfilled",oe.value=!0),oa(oe)}return{mutate:te,get data(){return F.data=!0,Y},get error(){return F.error=!0,$},get isValidating(){return F.isValidating=!0,Q},get isLoading(){return F.isLoading=!0,X}}}));var aa=P(641);function ua(e,t,n){return ua=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ca(o,n.prototype),o},ua.apply(null,arguments)}function sa(e){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sa(e)}function ca(e,t){return ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ca(e,t)}function la(e){var t="function"==typeof Map?new Map:void 0;return la=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ua(e,arguments,sa(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ca(n,e)},la(e)}(0,mo.createGlobalStore)("breadcrumbs",[]);var fa,da,ha="/ws/rest/v1";"".concat(ha,"/session"),la(Error),"".concat(ha,"/attachment"),(0,mo.createGlobalStore)("session",{loaded:!1,session:null}).subscribe((function(e){var t,n,r,o,i;e.loaded&&e.session&&((i=null!==(o=null===(n=(t=e.session).user)||void 0===n||null===(r=n.userProperties)||void 0===r?void 0:r.defaultLocale)&&void 0!==o?o:t.locale)&&i.includes("_")&&(i=i.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(i)&&i!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",i))})),P(593),function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(fa||(fa={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(da||(da={}));var pa,ya,va,ma=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};(0,mo.getGlobalStore)("visit",ma).subscribe((function(e){var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))})),new ri.BehaviorSubject(null),(ya=pa||(pa={})).Array="Array",ya.Boolean="Boolean",ya.ConceptUuid="ConceptUuid",ya.Number="Number",ya.Object="Object",ya.String="String",ya.UUID="UUID",ya.PersonAttributeTypeUuid="PersonAttributeTypeUuid",ya.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",De((function(e){if(!e||"string"!=typeof e)return!1;for(var t=/\${(.*?)}/g,n=t.exec(e);n;){if(!va.includes(n[1]))return!1;n=t.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+(va=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(e){return"${"+e+"}"})).join(", "));var ga="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ba=Object.prototype.toString,wa=function(){return"[object Arguments]"===ba.call(arguments)?function(e){return"[object Arguments]"===ba.call(e)}:function(e){return Le("callee",e)}}(),_a=wa,Sa=!{toString:null}.propertyIsEnumerable("toString"),Ea=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Oa=function(){return arguments.propertyIsEnumerable("length")}(),xa=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},Aa="function"!=typeof Object.keys||Oa?Ie((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=Oa&&_a(e);for(t in e)!Le(t,e)||o&&"length"===t||(r[r.length]=t);if(Sa)for(n=Ea.length-1;n>=0;)Le(t=Ea[n],e)&&!xa(r,t)&&(r[r.length]=t),n-=1;return r})):Ie((function(e){return Object(e)!==e?[]:Object.keys(e)})),ka=Ie((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function Ta(e,t,n,r){if(ga(e,t))return!0;var o=ka(e);if(o!==ka(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":Fe(e))!==(void 0===t?"undefined":Fe(t))||!ga(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ga(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&&Be(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&Be(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=Aa(e);if(a.length!==Aa(t).length)return!1;var u=n.concat([e]),s=r.concat([t]);for(i=a.length-1;i>=0;){var c=a[i];if(!Le(c,t)||!Ta(t[c],e[c],u,s))return!1;i-=1}return!0}var ja=Me((function(e,t){return Ta(e,t,[],[])})),Pa=ja;function Da(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?Da(e[u],t,n,!0):e[u];return o};switch(ka(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 Ca=Ie((function(e){return null!=e&&"function"==typeof e.clone?e.clone():Da(e,[],[],!0)})),Ia=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Ma=Ie((function(e){return!!Ia(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))})),Na=Ma,Ra=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),La=Me((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Fa=La,Ba="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ua=Ue((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ra(e)}(e)),Na(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 ze(e,t,n,"fantasy-land/reduce");if(null!=n[Ba])return Ge(e,t,n[Ba]());if("function"==typeof n.next)return Ge(e,t,n);if("function"==typeof n.reduce)return ze(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),Ga=Ue((function(e,t,n){var r,o={};for(r in t)Le(r,t)&&(o[r]=Le(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)Le(r,n)&&!Le(r,o)&&(o[r]=n[r]);return o})),za=Ga,Ha=Ue((function e(t,n,r){return za((function(n,r,o){return He(r)&&He(o)?e(t,r,o):t(n,r,o)}),n,r)})),Va=Ha,Ka=Me((function(e,t){return Va((function(e,t,n){return n}),e,t)})),qa=De((function(e){return Array.isArray(e)}),"must be an array"),$a=De((function(e){return"boolean"==typeof e}),"must be a boolean"),Wa=De((function(e){return"number"==typeof e}),"must be a number"),Ya=De((function(e){return"string"==typeof e}),"must be a string"),Ja=De((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Za=De((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"),Qa=(0,mo.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),Xa=(0,mo.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Xa.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var eu=(0,mo.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),tu=(0,mo.createGlobalStore)("config-implementer-tools",{config:{}});Qe(Qa.getState(),Xa.getState()),Qa.subscribe((function(e){return Qe(e,Xa.getState())})),Xa.subscribe((function(e){return Qe(Qa.getState(),e)})),et(Qa.getState(),Xa.getState()),Qa.subscribe((function(e){return et(e,Xa.getState())})),Xa.subscribe((function(e){return et(Qa.getState(),e)})),Xe(Qa.getState(),Xa.getState()),Qa.subscribe((function(e){return Xe(e,Xa.getState())})),Xa.subscribe((function(e){return Xe(Qa.getState(),e)})),tt(Qa.getState(),eu.getState(),Xa.getState()),Qa.subscribe((function(e){tt(e,eu.getState(),Xa.getState())})),eu.subscribe((function(e){tt(Qa.getState(),e,Xa.getState())})),Xa.subscribe((function(e){tt(Qa.getState(),eu.getState(),e)}));var nu=new Set;function ru(e){return e.hasOwnProperty("_default")?We($e({},e),{_value:e._default,_source:"default"}):ht(e)?Object.keys(e).reduce((function(t,n){return t[n]=ru(e[n]),t}),{}):{}}function ou(e,t){return ht(e)?Object.keys(e).reduce((function(n,r){return n[r]=ou(e[r],t),n}),{}):{_value:e,_source:t}}function iu(e,t,n){lt(n,e._type,t),ht(t)?e._type===pa.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];iu(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||ct(e,t,n):e._type===pa.Array&&function(e,t,n){if(lt(n,pa.Array,t)){if(dt(e._elements))for(var r=0;r<t.length;r++)iu(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;lt("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}}(e,t,n)}function au(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&ft(n,e._validators,t),ht(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e._type===pa.Object&&e._elements?au(e._elements,c,l):au(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)au(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}var uu=function(e,t){var n=Ca(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,u=function(){var t=a.value,r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&dt(i))if(o._type===pa.Array&&Array.isArray(r)){var u=r.map((function(e){return uu(i,e)}));n[t]=u}else if(o._type===pa.Object){var s=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;r[h]=uu(i,r[h])}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}}else if(ht(o)){var p=null!=r?r:{};ht(p)&&(n[t]=uu(o,p))}},s=Object.keys(e)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)u()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},su={"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:pa.Object,_default:{},_validators:[De((function(e){return Object.keys(e).every((function(e){return/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}))}),(function(e){var t=Object.keys(e).filter((function(e){return!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)}));return"The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ".concat(t.join(", "),".")}))]}},cu=$e({"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:pa.Array,_default:[]}}},su),lu=P(863),fu=P(570),du=P(103),hu=P(925),pu=function(e,t){return e===t||e!=e&&t!=t},yu=function(e,t){for(var n=e.length;n--;)if(pu(e[n][0],t))return n;return-1},vu=Array.prototype.splice;yt.prototype.clear=function(){this.__data__=[],this.size=0},yt.prototype.delete=function(e){var t=this.__data__,n=yu(t,e);return!(n<0||(n==t.length-1?t.pop():vu.call(t,n,1),--this.size,0))},yt.prototype.get=function(e){var t=this.__data__,n=yu(t,e);return n<0?void 0:t[n][1]},yt.prototype.has=function(e){return yu(this.__data__,e)>-1},yt.prototype.set=function(e,t){var n=this.__data__,r=yu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var mu,gu=yt,bu="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,wu="object"==typeof self&&self&&self.Object===Object&&self,_u=bu||wu||Function("return this")(),Su=_u.Symbol,Eu=Object.prototype,Ou=Eu.hasOwnProperty,xu=Eu.toString,Au=Su?Su.toStringTag:void 0,ku=Object.prototype.toString,Tu=Su?Su.toStringTag:void 0,ju=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Tu&&Tu in Object(e)?function(e){var t=Ou.call(e,Au),n=e[Au];try{e[Au]=void 0;var r=!0}catch(e){}var o=xu.call(e);return r&&(t?e[Au]=n:delete e[Au]),o}(e):function(e){return ku.call(e)}(e)},Pu=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":y(t);return null!=e&&("object"==n||"function"==n)},Du=function(e){if(!Pu(e))return!1;var t=ju(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Cu=_u["__core-js_shared__"],Iu=(mu=/[^.]+$/.exec(Cu&&Cu.keys&&Cu.keys.IE_PROTO||""))?"Symbol(src)_1."+mu:"",Mu=Function.prototype.toString,Nu=function(e){if(null!=e){try{return Mu.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ru=/^\[object .+?Constructor\]$/,Lu=Function.prototype,Fu=Object.prototype,Bu=Lu.toString,Uu=Fu.hasOwnProperty,Gu=RegExp("^"+Bu.call(Uu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zu=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Pu(e)||(t=e,Iu&&Iu in t))&&(Du(e)?Gu:Ru).test(Nu(e));var t}(n)?n:void 0},Hu=zu(_u,"Map"),Vu=zu(Object,"create"),Ku=Object.prototype.hasOwnProperty,qu=Object.prototype.hasOwnProperty;vt.prototype.clear=function(){this.__data__=Vu?Vu(null):{},this.size=0},vt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vt.prototype.get=function(e){var t=this.__data__;if(Vu){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ku.call(t,e)?t[e]:void 0},vt.prototype.has=function(e){var t=this.__data__;return Vu?void 0!==t[e]:qu.call(t,e)},vt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Vu&&void 0===t?"__lodash_hash_undefined__":t,this};var $u=vt,Wu=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":void 0===r?"undefined":y(r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};mt.prototype.clear=function(){this.size=0,this.__data__={hash:new $u,map:new(Hu||gu),string:new $u}},mt.prototype.delete=function(e){var t=Wu(this,e).delete(e);return this.size-=t?1:0,t},mt.prototype.get=function(e){return Wu(this,e).get(e)},mt.prototype.has=function(e){return Wu(this,e).has(e)},mt.prototype.set=function(e,t){var n=Wu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Yu=mt;gt.prototype.clear=function(){this.__data__=new gu,this.size=0},gt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},gt.prototype.get=function(e){return this.__data__.get(e)},gt.prototype.has=function(e){return this.__data__.has(e)},gt.prototype.set=function(e,t){var n,r,o=this.__data__;if(n=o,null!=(r=gu)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):l(n,r)){var i=o.__data__;if(!Hu||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new Yu(i)}return o.set(e,t),this.size=o.size,this};var Ju=gt;bt.prototype.add=bt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},bt.prototype.has=function(e){return this.__data__.has(e)};var Zu=bt,Qu=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},Xu=function(e,t){return e.has(t)},es=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new Zu:void 0;for(i.set(e,t),i.set(t,e);++f<u;){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(!Qu(t,(function(e,t){if(!Xu(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},ts=_u.Uint8Array,ns=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},rs=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},os=Su?Su.prototype:void 0,is=os?os.valueOf:void 0,as=Array.isArray,us=Object.prototype.propertyIsEnumerable,ss=Object.getOwnPropertySymbols,cs=ss?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}(ss(e),(function(t){return us.call(e,t)})))}:function(){return[]},ls=function(e){return null!=e&&"object"==typeof e},fs=function(e){return ls(e)&&"[object Arguments]"==ju(e)},ds=Object.prototype,hs=ds.hasOwnProperty,ps=ds.propertyIsEnumerable,ys=fs(function(){return arguments}())?fs:function(e){return ls(e)&&hs.call(e,"callee")&&!ps.call(e,"callee")},vs=ys,ms=t&&!t.nodeType&&t,gs=ms&&e&&!e.nodeType&&e,bs=gs&&gs.exports===ms?_u.Buffer:void 0,ws=(bs?bs.isBuffer:void 0)||function(){return!1},_s=/^(?:0|[1-9]\d*)$/,Ss=function(e,t){var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":y(n);return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&_s.test(e))&&e>-1&&e%1==0&&e<t},Es=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Os={};Os["[object Float32Array]"]=Os["[object Float64Array]"]=Os["[object Int8Array]"]=Os["[object Int16Array]"]=Os["[object Int32Array]"]=Os["[object Uint8Array]"]=Os["[object Uint8ClampedArray]"]=Os["[object Uint16Array]"]=Os["[object Uint32Array]"]=!0,Os["[object Arguments]"]=Os["[object Array]"]=Os["[object ArrayBuffer]"]=Os["[object Boolean]"]=Os["[object DataView]"]=Os["[object Date]"]=Os["[object Error]"]=Os["[object Function]"]=Os["[object Map]"]=Os["[object Number]"]=Os["[object Object]"]=Os["[object RegExp]"]=Os["[object Set]"]=Os["[object String]"]=Os["[object WeakMap]"]=!1;var xs,As=t&&!t.nodeType&&t,ks=As&&e&&!e.nodeType&&e,Ts=ks&&ks.exports===As&&bu.process,js=function(){try{return ks&&ks.require&&ks.require("util").types||Ts&&Ts.binding&&Ts.binding("util")}catch(e){}}(),Ps=js&&js.isTypedArray,Ds=Ps?(xs=Ps,function(e){return xs(e)}):function(e){return ls(e)&&Es(e.length)&&!!Os[ju(e)]},Cs=Object.prototype.hasOwnProperty,Is=Object.prototype,Ms=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Ns=Object.prototype.hasOwnProperty,Rs=function(e){return null!=(t=e)&&Es(t.length)&&!Du(t)?function(e,t){var n=as(e),r=!n&&vs(e),o=!n&&!r&&ws(e),i=!n&&!r&&!o&&Ds(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!Cs.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ss(c,s))||u.push(c);return u}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Is))return Ms(e);var t,n,r=[];for(var o in Object(e))Ns.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ls=function(e){return function(e,t,n){var r=t(e);return as(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,Rs,cs)},Fs=Object.prototype.hasOwnProperty,Bs=zu(_u,"DataView"),Us=zu(_u,"Promise"),Gs=zu(_u,"Set"),zs=zu(_u,"WeakMap"),Hs="[object Map]",Vs="[object Promise]",Ks="[object Set]",qs="[object WeakMap]",$s="[object DataView]",Ws=Nu(Bs),Ys=Nu(Hu),Js=Nu(Us),Zs=Nu(Gs),Qs=Nu(zs),Xs=ju;(Bs&&Xs(new Bs(new ArrayBuffer(1)))!=$s||Hu&&Xs(new Hu)!=Hs||Us&&Xs(Us.resolve())!=Vs||Gs&&Xs(new Gs)!=Ks||zs&&Xs(new zs)!=qs)&&(Xs=function(e){var t=ju(e),n="[object Object]"==t?e.constructor:void 0,r=n?Nu(n):"";if(r)switch(r){case Ws:return $s;case Ys:return Hs;case Js:return Vs;case Zs:return Ks;case Qs:return qs}return t});var ec=Xs,tc="[object Arguments]",nc="[object Array]",rc="[object Object]",oc=Object.prototype.hasOwnProperty,ic=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ls(t)&&!ls(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=as(e),u=as(t),s=a?nc:ec(e),c=u?nc:ec(t),l=(s=s==tc?rc:s)==rc,f=(c=c==tc?rc:c)==rc,d=s==c;if(d&&ws(e)){if(!ws(t))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new Ju),a||Ds(e)?es(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 ts(e),new ts(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pu(+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=ns;case"[object Set]":var s=1&r;if(u||(u=rs),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=es(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(is)return is.call(e)==is.call(t)}return!1}(e,t,s,n,r,o,i);if(!(1&n)){var h=l&&oc.call(e,"__wrapped__"),p=f&&oc.call(t,"__wrapped__");if(h||p){var y=h?e.value():e,v=p?t.value():t;return i||(i=new Ju),o(y,v,n,r,i)}}return!!d&&(i||(i=new Ju),function(e,t,n,r,o,i){var a=1&n,u=Ls(e),s=u.length;if(s!=Ls(t).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in t:Fs.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<s;){var y=e[l=u[c]],v=t[l];if(r)var m=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===m?y===v||o(y,v,n,r,i):m)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&wt(g,g)&&"function"==typeof b&&wt(b,b)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}(t,n,r,o,e,i))},ac=function(e,t){return ic(e,t)},uc=(0,mo.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),sc=function(){return(0,mo.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};_t(uc.getState()),uc.subscribe(_t),(0,mo.createGlobalStore)("modalRegistry",{modals:{}}),(0,mo.createGlobalStore)("workspaceRegistrations",{workspaces:{}}),(0,mo.createGlobalStore)("workspaceGroups",{workspaceGroups:{}}),new Set,sc();var cc=sc(),lc=(0,mo.getGlobalStore)("extensions",{slots:{}}),fc=(0,Xr.getExtensionSlotsConfigStore)(),dc=(0,Xr.getExtensionsConfigStore)();cc.subscribe((function(e){kt(e,fc.getState(),dc.getState(),fu.featureFlagsStore.getState(),aa.sessionStore.getState())})),fc.subscribe((function(e){kt(cc.getState(),e,dc.getState(),fu.featureFlagsStore.getState(),aa.sessionStore.getState())})),dc.subscribe((function(e){kt(cc.getState(),fc.getState(),e,fu.featureFlagsStore.getState(),aa.sessionStore.getState())})),fu.featureFlagsStore.subscribe((function(e){kt(cc.getState(),fc.getState(),dc.getState(),e,aa.sessionStore.getState())})),aa.sessionStore.subscribe((function(e){kt(cc.getState(),fc.getState(),dc.getState(),fu.featureFlagsStore.getState(),e)})),Tt(),(0,du.subscribeConnectivityChanged)(Tt);var hc={flags:function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(localStorage)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.startsWith("openmrs:feature-flag:")){var u=a.replace("openmrs:feature-flag:",""),s=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(u))||"{}");e[u]=Mt({enabled:"true"===localStorage.getItem(a)},s)}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}()};(0,mo.getGlobalStore)("feature-flags",hc).subscribe((function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e.flags)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=Nt(o.value,2),u=a[0],s=a[1];localStorage.setItem("openmrs:feature-flag:".concat(u),s.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(u),JSON.stringify({label:s.label,description:s.description}))}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var pc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,yc=Object.keys,vc=Array.isArray;"undefined"==typeof Promise||pc.Promise||(pc.Promise=Promise);var mc=Object.getPrototypeOf,gc={}.hasOwnProperty,bc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor;function _c(e,t){var n;return wc(e,t)||(n=mc(e))&&_c(n,t)}var Sc=[].slice;function Ec(e,t){if(Lt(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=Ec(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:Ec(u,t.substr(a+1))}}function Oc(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Ht("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Oc(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?vc(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s&&Lt(e,a)||(s=e[a]={}),Oc(s,u,n)}}else void 0===n?vc(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var xc=[].concat,Ac="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat($t([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return pc[e]})),kc=Ac.map((function(e){return pc[e]}));Kt(Ac,(function(e){return[e,!0]}));var Tc=null;function jc(e){if(!e||"object"!=typeof e)return e;var t=Tc&&Tc.get(e);if(t)return t;if(vc(e)){t=[],Tc&&Tc.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(jc(e[n]))}else if(kc.indexOf(e.constructor)>=0)t=e;else{var o=mc(e);for(var i in t=o===Object.prototype?{}:Object.create(o),Tc&&Tc.set(e,t),e)Lt(e,i)&&(t[i]=jc(e[i]))}return t}var Pc={}.toString,Dc="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Cc="symbol"==(void 0===Dc?"undefined":y(Dc))?function(e){var t;return null!=e&&(t=e[Dc])&&t.apply(e)}:function(){return null},Ic={},Mc="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},Nc="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Rc=function(){return!0},Lc=!new Error("").stack;function Fc(){if(Lc)try{throw Fc.arguments,new Error}catch(e){return e}return new Error}var Bc=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Uc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Bc),Gc={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"};Ut(Xt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Qt(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Ut(tn).from(Xt),Ut(nn).from(Xt);var zc=Uc.reduce((function(e,t){return e[t]=t+"Error",e}),{}),Hc=Xt,Vc=Uc.reduce((function(e,t){var n=function(e,n){this._e=Fc(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=Gc[t]||r,this.inner=null)},r=t+"Error";return Ut(n).from(Hc),e[t]=n,e}),{});Vc.Syntax=SyntaxError,Vc.Type=TypeError,Vc.Range=RangeError;var Kc=Bc.reduce((function(e,t){return e[t+"Error"]=Vc[t],e}),{}),qc=Uc.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Vc[t]),e}),{});qc.ModifyError=tn,qc.DexieError=Xt,qc.BulkError=nn;var $c={},Wc=h("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,mc(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,mc(t),e]}(),3),Yc=Wc[0],Jc=Wc[1],Zc=Wc[2],Qc=Jc&&Jc.then,Xc=Yc&&Yc.constructor,el=!!Zc,tl=!1,nl=Zc?function(){Zc.then(wn)}:pc.setImmediate?setImmediate.bind(null,wn):pc.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){wn(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(wn,0)},rl=function(e,t){dl.push([e,t]),il&&(nl(),il=!1)},ol=!0,il=!0,al=[],ul=[],sl=null,cl=on,ll={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Fn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Fn(e[0],e[1])}catch(e){}}))}},fl=ll,dl=[],hl=0,pl=[],yl={get:function(){var e=fl,t=Sl;function n(n,r){var o=this,i=!e.global&&(e!==fl||t!==Sl),a=i&&!Tn(),u=new hn((function(t,u){mn(o,new pn(Rn(n,e,i,a),Rn(r,e,i,a),t,u,e))}));return Nc&&bn(u,this),u}return n.prototype=$c,n},set:function(e){Bt(this,"then",e&&e.prototype===$c?yl:{get:function(){return e},set:yl.set})}};function vl(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&_n();t&&"function"==typeof t.then?vl(e,(function(e,n){l(t,hn)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,vn(e)),n&&Sn()}}),yn.bind(null,e))}catch(t){yn(e,t)}}function ml(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=Qt(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Nc&&((r=Qt(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&ml(e._prev,t,n)),t}Ft(hn.prototype,{then:yl,_then:function(e,t){mn(this,new pn(null,null,e,t,fl))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return l(e,t)?n(e):On(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):On(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),On(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{tl=!0;var e=ml(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{tl=!1}}},timeout:function(e,t){var n=this;return e<1/0?new hn((function(r,o){var i=setTimeout((function(){return o(new Vc.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Bt(hn.prototype,Symbol.toStringTag,"Dexie.Promise"),ll.env=In(),Ft(hn,{all:function(){var e=Jt.apply(null,arguments).map(jn);return new hn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return hn.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(l(e,hn))return e;if(e&&"function"==typeof e.then)return new hn((function(t,n){e.then(t,n)}));var t=new hn($c,!0,e);return bn(t,sl),t},reject:On,race:function(){var e=Jt.apply(null,arguments).map(jn);return new hn((function(t,n){e.map((function(e){return hn.resolve(e).then(t,n)}))}))},PSD:{get:function(){return fl},set:function(e){return fl=e}},totalEchoes:{get:function(){return Sl}},newPSD:An,usePSD:Mn,scheduler:{get:function(){return rl},set:function(e){rl=e}},rejectionMapper:{get:function(){return cl},set:function(e){cl=e}},follow:function(e,t){return new hn((function(n,r){return An((function(t,n){var r=fl;r.unhandleds=[],r.onunhandled=n,r.finalize=un((function(){var e=this;!function(e){pl.push((function t(){e(),pl.splice(pl.indexOf(t),1)})),++hl,rl((function(){0==--hl&&En()}),[])}((function(){0===e.unhandleds.length?t():n(e.unhandleds[0])}))}),r.finalize),e()}),t,n,r)}))}}),Xc&&(Xc.allSettled&&Bt(hn,"allSettled",(function(){var e=Jt.apply(null,arguments).map(jn);return new hn((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return hn.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Xc.any&&"undefined"!=typeof AggregateError&&Bt(hn,"any",(function(){var e=Jt.apply(null,arguments).map(jn);return new hn((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return hn.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var gl={awaits:0,echoes:0,id:0},bl=0,wl=[],_l=0,Sl=0,El=0;-1===(""+Qc).indexOf("[native code]")&&(kn=Tn=rn);var Ol=hn.reject;function xl(e,t,n,r){if(e.idbdb&&(e._state.openComplete||fl.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===zc.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return xl(e,t,n,r)}))):Ol(o)}return o._promise(t,(function(e,t){return An((function(){return fl.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return Ol(new Vc.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Ol(new Vc.DatabaseClosed);e.open().catch(rn)}return e._state.dbReadyPromise.then((function(){return xl(e,t,n,r)}))}var Al=String.fromCharCode(65535),kl="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Tl=[],jl="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Pl=jl,Dl=jl,Cl=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Il={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},Ml=function(){function e(){a(this,e)}return s(e,[{key:"_trans",value:function(e,t,n){var r=this._tx||fl.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Vc.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}var a=_n();try{return r&&r.db===this.db?r===fl.trans?r._promise(e,i,n):An((function(){return r._promise(e,i,n)}),{trans:r,transless:fl.transless||fl}):xl(this.db,e,[this.name],i)}finally{a&&Sn()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(vc(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=yc(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return t.indexOf(e)>=0}))}))[0];if(n&&this.db._maxKey!==Al)return this.where(n.name).equals(n.keyPath.map((function(t){return e[t]})));!n&&Nc&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(t.join("+"),"]"));var r=this.schema.idxByName,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}var a=h(t.reduce((function(t,n){var o=h(t,2),a=o[0],u=o[1],s=r[n],c=e[n];return[a||s,a||!s?Bn(u,s&&s.multi?function(e){var t=Ec(e,n);return vc(t)&&t.some((function(e){return i(c,e)}))}:function(e){return i(c,Ec(e,n))}):u]}),[null,null]),2),u=a[0],s=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,vc(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(Lt(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){Rt(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Un(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?hn.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{Oc(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||vc(e))return this.where(":id").equals(e).modify(t);var n=Ec(e,this.schema.primKey.keyPath);if(void 0===n)return Ol(new Vc.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?yc(t).forEach((function(n){Oc(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Un(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?hn.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{Oc(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?hn.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Il})})).then((function(e){return e.numFailures?hn.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Vc.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Vc.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Un(u)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new nn("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r.schema.primKey,a=n.auto,u=n.keyPath;if(u&&o)throw new Vc.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Vc.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,c=u&&a?e.map(Un(u)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:c,wantResults:i}).then((function(e){var t=e.numFailures,n=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?n:o;throw new nn("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new nn("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function Nl(e,t){try{var n=Jn(e),r=Jn(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(Zn(e),Zn(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=Nl(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var Rl=function(){function e(){a(this,e)}return s(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,Ol.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,Ol.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=Bn(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return Wn(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&Rt(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return Wn(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Hn(n,!0))return r.count({trans:e,query:{index:qn(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return Wn(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var 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 u(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(u)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Hn(n,!0)&&n.limit>0){var r=n.valueMapper,o=qn(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return Wn(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Hn(t)?Kn(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Kn(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Kn(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Vn(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Vn(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Bn(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Hn(t,!0)&&t.limit>0)return this._read((function(e){var n=qn(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Vn(this._ctx,(function(e){var t=e.primaryKey.toString(),r=Lt(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=yc(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];Ec(t,o)!==u&&(Oc(t,o,u),n=!0)}return n}}var u=n.table.core,s=u.schema.primaryKey,c=s.outbound,l=s.extractKey,f=t.db._options.modifyChunkSize||200,d=[],h=0,p=[],y=function(e,t){var n=t.failures,r=t.numFailures;h+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,s=yc(n)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value;d.push(n[c])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var s=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+s),cache:"immutable"}).then((function(d){for(var h=[],p=[],v=c?[]:null,m=[],g=0;g<s;++g){var b=d[g],w={value:Wt(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):c||0===Nl(l(b),l(w.value))?(p.push(w.value),c&&v.push(t[a+g])):(m.push(t[a+g]),h.push(w.value)))}var _=Hn(n)&&n.limit===1/0&&("function"!=typeof e||e===Ll)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&u.mutate({trans:r,type:"add",values:h}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);y(h.length,e)}))).then((function(){return(p.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:v,values:p,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return y(p.length,e)}))})).then((function(){return(m.length>0||_&&e===Ll)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return y(m.length,e)}))})).then((function(){return t.length>a+s&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new tn("Error modifying one or more objects",d,h,p);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Hn(e)&&(e.isPrimKey&&!Dl||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new tn("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(Ll)}}]),e}(),Ll=function(e,t){return t.value=null},Fl=function(){function e(){a(this,e)}return s(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?tr(this):new this.Collection(this,(function(){return or(e,t,!n,!r)}))}catch(e){return er(this,kl)}}},{key:"equals",value:function(e){return null==e?er(this,kl):new this.Collection(this,(function(){return ir(e)}))}},{key:"above",value:function(e){return null==e?er(this,kl):new this.Collection(this,(function(){return or(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?er(this,kl):new this.Collection(this,(function(){return or(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?er(this,kl):new this.Collection(this,(function(){return or(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?er(this,kl):new this.Collection(this,(function(){return or(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?er(this,"String expected."):this.between(e,e+Al,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):rr(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],Al)}},{key:"equalsIgnoreCase",value:function(e){return rr(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=Jt.apply(Ic,arguments);return 0===e.length?tr(this):rr(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=Jt.apply(Ic,arguments);return 0===e.length?tr(this):rr(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,Al)}},{key:"anyOf",value:function(){var e=this,t=Jt.apply(Ic,arguments),n=this._cmp;try{t.sort(n)}catch(e){return er(this,kl)}if(0===t.length)return tr(this);var r=new this.Collection(this,(function(){return or(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=Jt.apply(Ic,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return er(this,kl)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=this._cmp,o=this._ascending,i=this._descending,a=this._min,u=this._max;if(0===e.length)return tr(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&o(e[0],e[1])<=0})))return er(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Vc.InvalidArgument);var s,c=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,f=o;function d(e,t){return f(e[0],t[0])}try{s=e.reduce((function(e,t){for(var n=0,o=e.length;n<o;++n){var i=e[n];if(r(t[0],i[1])<0&&r(t[1],i[0])>0){i[0]=a(i[0],t[0]),i[1]=u(i[1],t[1]);break}}return n===o&&e.push(t),e}),[]),s.sort(d)}catch(e){return er(this,kl)}var h=0,p=l?function(e){return o(e,s[h][1])>0}:function(e){return o(e,s[h][1])>=0},y=c?function(e){return i(e,s[h][0])>0}:function(e){return i(e,s[h][0])>=0},v=p,m=new this.Collection(this,(function(){return or(s[0][0],s[s.length-1][1],!c,!l)}));return m._ondirectionchange=function(e){"next"===e?(v=p,f=o):(v=y,f=i),s.sort(d)},m._addAlgorithm((function(e,t,r){for(var i=e.key;v(i);)if(++h===s.length)return t(r),!1;return!!function(e){return!p(e)&&!y(e)}(i)||(0===n._cmp(i,s[h][1])||0===n._cmp(i,s[h][0])||t((function(){f===o?e.continue(s[h][0]):e.continue(s[h][1])})),!1)})),m}},{key:"startsWithAnyOf",value:function(){var e=Jt.apply(Ic,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?tr(this):this.inAnyRange(e.map((function(e){return[e,e+Al]}))):er(this,"startsWithAnyOf() only works with strings")}}]),e}(),Bl=Gn(null,"storagemutated"),Ul=function(){function e(){a(this,e)}return s(e,[{key:"_lock",value:function(){return Ht(!fl.global),++this._reculock,1!==this._reculock||fl.global||(fl.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(Ht(!fl.global),0==--this._reculock)for(fl.global||(fl.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Mn(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&fl.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(Ht(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Vc.DatabaseClosed(r);case"MissingAPIError":throw new Vc.MissingAPI(r.message,r);default:throw new Vc.OpenFailed(r)}if(!this.active)throw new Vc.TransactionInactive;return Ht(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=xn((function(n){ur(n),t._reject(e.error)})),e.onabort=xn((function(n){ur(n),t.active&&t._reject(new Vc.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=xn((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Bl.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return Ol(new Vc.ReadOnly("Transaction is readonly"));if(!this.active)return Ol(new Vc.TransactionInactive);if(this._locked())return new hn((function(o,i){r._blockedFuncs.push([function(){r._promise(e,t,n).then(o,i)},fl])}));if(n)return An((function(){var e=new hn((function(e,n){r._lock();var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return e.finally((function(){return r._unlock()})),e._lib=!0,e}));var o=new hn((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=hn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new hn((function(e,r){n.then((function(n){return t._waitingQueue.push(xn(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(xn(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Vc.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(Lt(t,e))return t[e];var n=this.schema[e];if(!n)throw new Vc.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),Gl=function(e){try{return e.only([[]]),Gl=function(){return[[]]},[[]]}catch(e){return Gl=function(){return Al},Al}},zl=0,Hl=function(){function e(){a(this,e)}return s(e,[{key:"_parseStoresSpec",value:function(e,t){yc(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return sr(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),vc(r),0===t)})),o=r.shift();if(o.multi)throw new Vc.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new Vc.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Vc.Schema("Index must have a name and cannot be an empty string")})),t[n]=lr(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?Rt(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){Rt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,vr(t,[t._allTables,t,t.Transaction.prototype]),yr(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],yc(o),o),t._storeNames=yc(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=dn(this._cfg.contentUpgrade||rn,e),this}}]),e}();function Vl(e,t,n,r,o){return hn.resolve().then((function(){var i=fl.transless||fl,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===zc.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Vl(e,t,n,null,o)}))):Ol(r)}var s,c=Mc(o);c&&kn();var l=hn.follow((function(){if(s=o.call(a,a))if(c){var e=Tn.bind(null,null);s.then(e,e)}else"function"==typeof s.next&&"function"==typeof s.throw&&(s=kr(s))}),u);return(s&&"function"==typeof s.then?hn.resolve(s).then((function(e){return a.active?e:Ol(new Vc.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return s}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),Ol(e)}))}))}var Kl={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return d(f({},e),{table:function(t){var n=e.table(t),r=n.schema,o={},i=[];function a(e,t,n){var r=hr(e),u=o[r]=o[r]||[],s=null==e?0:"string"==typeof e?1:e.length,c=t>0,l=d(f({},n),{isVirtual:c,keyTail:t,keyLength:s,extractKey:fr(e),unique:!c&&n.unique});return u.push(l),l.isPrimaryKey||i.push(l),s>1&&a(2===s?e[0]:e.slice(0,s-1),t+1,n),u.sort((function(e,t){return e.keyTail-t.keyTail})),l}var u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];var s=!0,c=!1,l=void 0;try{for(var h,p=r.indexes[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var y=h.value;a(y.keyPath,0,y)}}catch(e){c=!0,l=e}finally{try{s||null==p.return||p.return()}finally{if(c)throw l}}function v(t){var n,r,o=t.query.index;return o.isVirtual?d(f({},t),{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:jr(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:jr(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t}var m=d(f({},n),{schema:d(f({},r),{primaryKey:u,indexes:i,getIndexByKeyPath:function(e){var t=o[hr(e)];return t&&t[0]}}),count:function(e){return n.count(v(e))},query:function(e){return n.query(v(e))},openCursor:function(t){var r=t.query.index,o=r.keyTail,i=r.isVirtual,a=r.keyLength;return i?n.openCursor(v(t)).then((function(n){return n&&function(n){var r=Object.create(n,{continue:{value:function(r){null!=r?n.continue(jr(r,t.reverse?e.MAX_KEY:e.MIN_KEY,o)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,o)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(jr(t,e.MAX_KEY,o),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return n.value}}});return r}(n)})):n.openCursor(t)}});return m}})}};function ql(e,t,n,r){return n=n||{},r=r||"",yc(e).forEach((function(o){if(Lt(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=Yt(i);u!==Yt(a)?n[r+o]=t[o]:"Object"===u?ql(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})),yc(t).forEach((function(o){Lt(e,o)||(n[r+o]=t[o])})),n}var $l={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return d(f({},e),{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=d(f({},n),{mutate:function(e){var o=fl.trans,i=o.table(t).hook,a=i.deleting,u=i.creating,s=i.updating;switch(e.type){case"add":if(u.fire===rn)break;return o._promise("readwrite",(function(){return c(e)}),!0);case"put":if(u.fire===rn&&s.fire===rn)break;return o._promise("readwrite",(function(){return c(e)}),!0);case"delete":if(a.fire===rn)break;return o._promise("readwrite",(function(){return c(e)}),!0);case"deleteRange":if(a.fire===rn)break;return o._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return n.mutate(e);function c(e){var t=fl.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?d(f({},e),{keys:o}):f({},e)).type&&(e.values=p(e.values)),e.keys&&(e.keys=p(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((function(i){var c=o.map((function(n,o){var c=i[o],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){var f=u.fire.call(l,n,e.values[o],t);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||Oc(e.values[o],r.keyPath,n))}else{var d=ql(c,e.values[o]),h=s.fire.call(l,d,n,c,t);if(h){var p=e.values[o];Object.keys(h).forEach((function(e){Lt(p,e)?p[e]=h[e]:Oc(p,e,h[e])}))}}return l}));return n.mutate(e).then((function(t){for(var n=t.failures,r=t.results,a=t.numFailures,u=t.lastResult,s=0;s<o.length;++s){var l=r?r[s]:o[s],f=c[s];null==l?f.onerror&&f.onerror(n[s]):f.onsuccess&&f.onsuccess("put"===e.type&&i[s]?e.values[s]:l)}return{failures:n,results:r,numFailures:a,lastResult:u}})).catch((function(e){return c.forEach((function(t){return 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((function(n){var r=n.result;return c({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<o?{failures:[],numFailures:0,lastResult:void 0}:l(e,d(f({},t),{lower:r[r.length-1],lowerOpen:!0}),o)}))}))}}});return o}})}},Wl={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return d(f({},n),{getMany:function(e){if(!e.cache)return n.getMany(e);var t=Pr(e.keys,e.trans._cache,"clone"===e.cache);return t?hn.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?Wt(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Yl=function(e,t){if(!this){var n=new Yl;return e&&"d"in e&&Rt(n,e),n}Rt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Jl(e,t,n){var r=Nl(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Dr(e))return Rt(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(Nl(n,e.from)<0)return o?Jl(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Mr(e);if(Nl(t,e.to)>0)return i?Jl(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Mr(e);Nl(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Nl(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&Cr(e,o),i&&a&&Cr(e,i)}}Ft(Yl.prototype,c({add:function(e){return Cr(this,e),this},addKey:function(e){return Jl(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Jl(t,e,e)})),this}},Dc,(function(){return Ir(this)})));var Zl,Ql={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Yl(e.MIN_KEY,e.MAX_KEY);return d(f({},e),{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,s=a.outbound,c=d(f({},o),{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Yl)},c=s(""),l=s(":dels"),f=e.type,d=h("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),p=d[0],y=d[1],v=e.trans._cache;return o.mutate(e).then((function(e){if(vc(p)){"delete"!==f&&(p=e.results),c.addKeys(p);var t=Pr(p,v);t||"add"===f||l.addKeys(p),(t||y)&&function(e,t,n,r){t.indexes.forEach((function(t){var o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&vc(e)?e.forEach((function(e){return o.addKey(e)})):o.addKey(e)};(n||r).forEach((function(e,t){var o=n&&i(n[t]),u=r&&i(r[t]);0!==Nl(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,t,y)}else if(p){var r={from:p.lower,to:p.upper};l.add(r),c.add(r)}else c.add(n),l.add(n),i.indexes.forEach((function(e){return s(e.name).add(n)}));return e}))}}),l=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Yl(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new Yl(e.key)]},getMany:function(e){return[a,(new Yl).addKeys(e.keys)]},count:l,query:l,openCursor:l};return yc(p).forEach((function(e){c[e]=function(i){var a=fl.subscr;if(a){var c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Yl)},l=c(""),y=c(":dels"),v=h(p[e](i),2),m=v[0],g=v[1];if(c(m.name||"").add(g),!m.isPrimaryKey){if("count"!==e){var b="query"===e&&s&&i.values&&o.query(d(f({},i),{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(s&&i.values)return b.then((function(e){var n=e.result;return l.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?l.addKeys(n):y.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return y.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return y.addKey(e),e}},value:{get:function(){return o&&l.addKey(r.primaryKey),r.value}}})}return t}))}y.add(n)}}return o[e].apply(this,arguments)}})),c}})}},Xl=function(){function e(t,n){var r=this;a(this,e),this._middlewares={},this.verno=0;var o=e.dependencies;this._options=n=f({addons:e.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var i=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:rn,dbReadyPromise:null,cancelOpen:rn,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};s.dbReadyPromise=new hn((function(e){s.dbReadyResolve=e})),s.openCanceller=new hn((function(e,t){s.cancelOpen=t})),this._state=s,this.name=t,this.on=Gn(this,"populate","blocked","versionchange","close",{ready:[dn,rn]}),this.on.ready.subscribe=zt(this.on.ready.subscribe,(function(t){return function(n,o){e.vip((function(){var e=r._state;if(e.openComplete)e.dbOpenError||hn.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var i=r;o||t((function e(){i.on.ready.unsubscribe(n),i.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,zn(Rl.prototype,(function(e,t){this.db=u;var n=Il,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==on?a:null}}))),this.Table=function(e){return zn(Ml.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:Gn(null,{creating:[sn,rn],reading:[an,on],updating:[ln,rn],deleting:[cn,rn]})}))}(this),this.Transaction=function(e){return zn(Ul.prototype,(function(t,n,r,o,i){var a=this;this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Gn(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 hn((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),Ol(e)}))}))}(this),this.Version=function(e){return zn(Hl.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return zn(Fl.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};var o=e._deps.indexedDB;if(!o)throw new Vc.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(e,t){return o.cmp(t,e)},this._max=function(e,t){return o.cmp(e,t)>0?e:t},this._min=function(e,t){return o.cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=Gl(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),Tl.filter((function(e){return e.name===r.name&&e!==r&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Kl),this.use($l),this.use(Ql),this.use(Wl),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach((function(e){return e(r)}))}return s(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new Vc.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Vc.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(mr),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||fl.letThrough||this._vip)?e():new hn((function(e,n){if(t._state.openComplete)return n(new Vc.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new Vc.DatabaseClosed);t.open().catch(rn)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?Ol(t.dbOpenError):e}));Nc&&(t.openCanceller._stackHolder=Fc()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Vc.DatabaseClosed("db.open() was cancelled")}var i=t.dbReadyResolve,a=null,u=!1;return hn.race([r,("undefined"==typeof navigator?hn.resolve():Ar()).then((function(){return new hn((function(r,i){if(o(),!n)throw new Vc.MissingAPI;var s=e.name,c=t.autoSchema?n.open(s):n.open(s,Math.round(10*e.verno));if(!c)throw new Vc.MissingAPI;c.onerror=ar(i),c.onblocked=xn(e._fireOnBlocked),c.onupgradeneeded=xn((function(r){if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=ur,a.abort(),c.result.close();var o=n.deleteDatabase(s);o.onsuccess=o.onerror=xn((function(){i(new Vc.NoSuchDatabase("Database ".concat(s," doesnt exist")))}))}else{a.onerror=ar(i);var l=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=l<1,e._novip.idbdb=c.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=fl.transless||fl;An((function(){fl.trans=i,fl.transless=u,0===t?(yc(o).forEach((function(e){br(n,e,o[e].primKey,o[e].indexes)})),pr(e,n),hn.follow((function(){return e.on.populate.fire(i)})).catch(a)):function(e,t,n,r){var o=e._novip,i=[],a=o._versions,u=o._dbSchema=_r(0,o.idbdb,r),s=!1;return a.filter((function(e){return e._cfg.version>=t})).forEach((function(e){i.push((function(){var i=u,a=e._cfg.dbschema;Sr(o,i,r),Sr(o,a,r),u=o._dbSchema=a;var c=gr(i,a);c.add.forEach((function(e){br(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new Vc.Upgrade("Not yet support for changing primary key");var t=r.objectStore(e.name);e.add.forEach((function(e){return wr(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),wr(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var l=e._cfg.contentUpgrade;if(l&&e._cfg.version>t){pr(o,r),n._memoizedTables={},s=!0;var f=qt(a);c.del.forEach((function(e){f[e]=i[e]})),vr(o,[o.Transaction.prototype]),yr(o,[o.Transaction.prototype],yc(f),f),n.schema=f;var d,h=Mc(l);h&&kn();var p=hn.follow((function(){if((d=l(n))&&h){var e=Tn.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?hn.resolve(d):p.then((function(){return d}))}})),i.push((function(t){s&&Pl||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(n){return null==e[n]&&t.db.deleteObjectStore(n)}))}(e._cfg.dbschema,t),vr(o,[o.Transaction.prototype]),yr(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function e(){return i.length?hn.resolve(i.shift()(n.idbtrans)).then(e):hn.resolve()}().then((function(){var e,t;t=r,yc(e=u).forEach((function(n){t.db.objectStoreNames.contains(n)||br(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,l/10,a,i)}}),i),c.onsuccess=xn((function(){a=null;var n,o=e._novip.idbdb=c.result,i=Gt(o.objectStoreNames);if(i.length>0)try{var l=o.transaction(1===(n=i).length?n[0]:n,"readonly");t.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=_r(0,t,n);r._storeNames=Gt(t.objectStoreNames,0),yr(r,[r._allTables],yc(o),o)}(e,o,l):(Sr(e,e._dbSchema,l),function(e,t){var n=gr(_r(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((function(e){return e.add.length||e.change.length})))}(e,l)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),pr(e,l)}catch(e){}Tl.push(e),o.onversionchange=xn((function(n){t.vcFired=!0,e.on("versionchange").fire(n)})),o.onclose=xn((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!Or(n)&&"__dbnames"!==t&&Er(n,r).put({name:t}).catch(rn)}(e._deps,s),r()}),i)}))}))]).then((function(){return o(),t.onReadyBeingFired=[],hn.resolve(xr((function(){return e.on.ready.fire(e.vip)}))).then((function n(){if(t.onReadyBeingFired.length>0){var r=t.onReadyBeingFired.reduce(dn,rn);return t.onReadyBeingFired=[],hn.resolve(xr((function(){return r(e.vip)}))).then(n)}}))})).finally((function(){t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((function(){return e})).catch((function(n){t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),Ol(n)})).finally((function(){t.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=Tl.indexOf(this);if(t>=0&&Tl.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new hn((function(t){e.dbReadyResolve=t})),e.openCanceller=new hn((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Vc.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new hn((function(r,o){var i=function(){e.close();var t=e._deps.indexedDB.deleteDatabase(e.name);t.onsuccess=xn((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!Or(n)&&"__dbnames"!==t&&Er(n,r).delete(t).catch(rn)}(e._deps,e.name),r()})),t.onerror=ar(o),t.onblocked=e._fireOnBlocked};if(t)throw new Vc.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return yc(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=Tr.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=fl.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=l(e,r.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 Vc.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new Vc.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new Vc.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):Ol(e)}var s=Vl.bind(null,this,i,a,o,n);return o?o._promise(i,s,"lock"):fl.trans?Mn(fl.transless,(function(){return r._whenReady(s)})):this._whenReady(s)}},{key:"table",value:function(e){if(!Lt(this._allTables,e))throw new Vc.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),ef="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",tf=function(){function e(t){a(this,e),this._subscribe=t}return s(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:ef,value:function(){return this}}]),e}();try{Zl={indexedDB:pc.indexedDB||pc.mozIndexedDB||pc.webkitIndexedDB||pc.msIndexedDB,IDBKeyRange:pc.IDBKeyRange||pc.webkitIDBKeyRange}}catch(wo){Zl={indexedDB:null,IDBKeyRange:null}}var nf=Xl;Ft(nf,d(f({},qc),{delete:function(e){return new nf(e,{addons:[]}).delete()},exists:function(e){return new nf(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return Or(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):Er(t,n).toCollection().primaryKeys()}(nf.dependencies).then(e)}catch(e){return Ol(new Vc.MissingAPI)}},defineClass:function(){return function(e){Rt(this,e)}},ignoreTransaction:function(e){return fl.trans?Mn(fl.transless,e):e()},vip:xr,async:function(e){return function(){try{var t=kr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:hn.resolve(t)}catch(e){return Ol(e)}}},spawn:function(e,t,n){try{var r=kr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:hn.resolve(r)}catch(e){return Ol(e)}},currentTransaction:{get:function(){return fl.trans||null}},waitFor:function(e,t){var n=hn.resolve("function"==typeof e?nf.ignoreTransaction(e):e).timeout(t||6e4);return fl.trans?fl.trans.waitFor(n):n},Promise:hn,debug:{get:function(){return Nc},set:function(e){Zt(e,"dexie"===e?function(){return!0}:Cl)}},derive:Ut,extend:Rt,props:Ft,override:zt,Events:Gn,on:Bl,liveQuery:function(e){return new tf((function(t){var n=function(){return yc(a).some((function(e){return i[e]&&function(e,t){var n=Ir(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=Ir(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(Nl(u.from,o.to)<=0&&Nl(u.to,o.from)>=0)return!0;Nl(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=Mc(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,Bl.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var s=!1,c=!1,l=function(e){Rr(i,e),n()&&f()},f=function(){if(!s&&!o){i={};var d={},h=function(t){r&&kn();var n=function(){return An(e,{subscr:t,trans:null})},o=fl.trans?Mn(fl.transless,n):n();return r&&o.then(Tn,Tn),o}(d);c||(Bl("storagemutated",l),c=!0),s=!0,Promise.resolve(h).then((function(e){s=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){s=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:Rr,getByKeyPath:Ec,setByKeyPath:Oc,delByKeyPath:function(e,t){"string"==typeof t?Oc(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Oc(e,t,void 0)}))},shallowClone:qt,deepClone:Wt,getObjectDiff:ql,cmp:Nl,asap:Vt,minKey:-1/0,addons:[],connections:Tl,errnames:zc,dependencies:Zl,semVer:"3.2.3",version:"3.2.3".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),nf.maxKey=Gl(nf.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Bl("storagemutated",(function(e){var t;rf||(jl?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),rf=!0,dispatchEvent(t),rf=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;rf||Lr(t)})));var rf=!1;if("undefined"!=typeof BroadcastChannel){var of=new BroadcastChannel("x-storagemutated-1");"function"==typeof of.unref&&of.unref(),Bl("storagemutated",(function(e){rf||of.postMessage(e)})),of.onmessage=function(e){e.data&&Lr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Bl("storagemutated",(function(e){try{rf||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&p(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Lr(t.changedParts)}}));var af=self.document&&navigator.serviceWorker;af&&af.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Lr(t.changedParts)}))}function uf(e){return uf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},uf(e)}function sf(e,t){return sf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sf(e,t)}hn.rejectionMapper=function(e,t){if(!e||l(e,Xt)||l(e,TypeError)||l(e,SyntaxError)||!e.name||!Kc[e.name])return e;var n=new Kc[e.name](t||e.message,e);return"stack"in e&&Bt(n,"stack",{get:function(){return this.inner.stack}}),n},Zt(Nc,Cl);var cf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sf(e,t)}(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uf(e);if(t){var o=uf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":y(n))&&"function"!=typeof t?Fr(e):t;var n}(this,n)}}(n);function n(){var e;return function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")}(this,n),Br(Fr(e=t.call(this,"EsmOffline")),"syncQueue",void 0),Br(Fr(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(Xl);(0,mo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.4"]&&_()}catch(_o){}try{self["workbox:core:6.5.4"]&&_()}catch(_o){}var lf=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},ff=function(e,t){this.type=e,Object.assign(this,t)},df={type:"SKIP_WAITING"};!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 lf,r.en=new lf,r.on=new lf,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!zr(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 ff(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new ff("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 ff("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 Hr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new ff("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 Kr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Hr(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&&zr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new ff("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?Kr(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 Hr(this.getSW(),(function(t){return Ur(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Ur(this.fn.waiting,df)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&zr(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(t,n){try{var r=Hr(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}((function(){return Hr(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 Gr(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)?Gr(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}()),new cf,(0,mo.createGlobalStore)("offline-synchronization",{}),so.default.createContext({moduleName:"",featureName:""}),aa.openmrsFetch;var hf=so.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},pf={dedupe:!0};fi.defineProperty(Yi,"defaultValue",{value:qi});var yf=ta((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(gi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Li(e),2),O=E[0],x=E[1],A=(0,so.useRef)(!1),k=(0,so.useRef)(!1),T=(0,so.useRef)(O),j=(0,so.useRef)(t),P=(0,so.useRef)(n),D=function(){return P.current},C=function(){return D().isVisible()&&D().isOnline()},I=h(Oi(r,O),4),M=I[0],N=I[1],R=I[2],L=I[3],F=(0,so.useRef)({}).current,B=di(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!di(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,so.useMemo)((function(){var e=!!O&&!!t&&(di(s)?!D().isPaused()&&!a&&(!!di(c)||c):s),n=function(t){var n=pi(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),z=(0,si.useSyncExternalStore)((0,so.useCallback)((function(e){return R(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),H=!A.current,V=b[O]&&b[O].length>0,K=z.data,q=di(K)?B:K,$=z.error,W=(0,so.useRef)(q),Y=v?di(K)?W.current:K:q,J=!(V&&!di($))&&(H&&!di(s)?s:!D().isPaused()&&(a?!di(q)&&c:di(q)||c)),Z=!!(O&&t&&H&&J),Q=di(z.isValidating)?Z:z.isValidating,X=di(z.isLoading)?Z:z.isLoading,ee=(0,so.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,P;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||k.current||D().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return Di?!k.current&&O===T.current&&A.current:O===T.current},l={isValidating:!1,isLoading:!1},f=function(){N(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},di(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(N(p),n.loadingTimeout&&di(M().data)&&setTimeout((function(){a&&c()&&D().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Bi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=li,v=w[O],!di(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&D().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&D().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&D().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=D(),P=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===P||hi(P)&&P(S))&&(D().revalidateOnFocus&&D().revalidateOnReconnect&&!C()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,so.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pe.apply(void 0,[r,T.current].concat(p(t)))}),[]);if(Mi((function(){j.current=t,P.current=n,di(K)||(W.current=K)})),Mi((function(){if(O){var e=ee.bind(li,pf),t=0,n=na(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();D().revalidateOnFocus&&o>t&&C()&&(t=o+D().focusThrottleInterval,e())}else if(1==n)D().revalidateOnReconnect&&C()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return k.current=!1,T.current=O,A.current=!0,N({_k:x}),J&&(di(q)||Ci?e():Ii(e)),function(){k.current=!0,n()}}}),[O]),Mi((function(){var e,t=function(){var t=hi(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!D().isVisible()||!y&&!D().isOnline()?t():ee(pf).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,so.useDebugValue)(Y),a&&di(q)&&O){if(!Di&&Ci)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,P.current=n,k.current=!1;var ne=S[O];if(!di(ne)){var re=te(ne);hf(re)}if(!di($))throw $;var oe=ee(pf);di(Y)||(oe.status="fulfilled",oe.value=!0),hf(oe)}return{mutate:te,get data(){return F.data=!0,Y},get error(){return F.error=!0,$},get isValidating(){return F.isValidating=!0,Q},get isLoading(){return F.isLoading=!0,X}}}));ra(yf,(function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}})),"custom:".concat([["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Zr(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zr(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),n=t[0],r=t[1];return"".concat(n,":").concat(r)})).join(",")),Jr((0,ni.getExtensionInternalStore)()),Jr((0,ni.getExtensionStore)());var vf=so.default.use||function(e){if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((function(t){e.status="fulfilled",e.value=t}),(function(t){e.status="rejected",e.reason=t})),e)},mf={dedupe:!0};fi.defineProperty(Yi,"defaultValue",{value:qi});var gf=ta((function(e,t,n){var r=n.cache,o=n.compare,a=n.suspense,u=n.fallbackData,s=n.revalidateOnMount,c=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,y=n.refreshWhenOffline,v=n.keepPreviousData,g=h(gi.get(r),4),b=g[0],w=g[1],_=g[2],S=g[3],E=h(Li(e),2),O=E[0],x=E[1],A=(0,so.useRef)(!1),k=(0,so.useRef)(!1),T=(0,so.useRef)(O),j=(0,so.useRef)(t),P=(0,so.useRef)(n),D=function(){return P.current},C=function(){return D().isVisible()&&D().isOnline()},I=h(Oi(r,O),4),M=I[0],N=I[1],R=I[2],L=I[3],F=(0,so.useRef)({}).current,B=di(u)?n.fallback[O]:u,U=function(e,t){for(var n in F){var r=n;if("data"===r){if(!o(e[r],t[r])){if(!di(e[r]))return!1;if(!o(Y,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},G=(0,so.useMemo)((function(){var e=!!O&&!!t&&(di(s)?!D().isPaused()&&!a&&(!!di(c)||c):s),n=function(t){var n=pi(t);return delete n._k,e?f({isValidating:!0,isLoading:!0},n):n},r=M(),o=L(),i=n(r),u=r===o?i:n(o),l=i;return[function(){var e=n(M());return U(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},function(){return u}]}),[r,O]),z=(0,si.useSyncExternalStore)((0,so.useCallback)((function(e){return R(O,(function(t,n){U(n,t)||e()}))}),[r,O]),G[0],G[1]),H=!A.current,V=b[O]&&b[O].length>0,K=z.data,q=di(K)?B:K,$=z.error,W=(0,so.useRef)(q),Y=v?di(K)?W.current:K:q,J=!(V&&!di($))&&(H&&!di(s)?s:!D().isPaused()&&(a?!di(q)&&c:di(q)||c)),Z=!!(O&&t&&H&&J),Q=di(z.isValidating)?Z:z.isValidating,X=di(z.isLoading)?Z:z.isLoading,ee=(0,so.useCallback)(function(){var e=i((function(e){var t,r,i,a,u,s,c,l,f,d,p,y,v,g,S,E,P;return m(this,(function(m){switch(m.label){case 0:if(t=j.current,!O||!t||k.current||D().isPaused())return[2,!1];a=!0,u=e||{},s=!_[O]||!u.dedupe,c=function(){return Di?!k.current&&O===T.current&&A.current:O===T.current},l={isValidating:!1,isLoading:!1},f=function(){N(l)},d=function(){var e=_[O];e&&e[1]===i&&delete _[O]},p={isValidating:!0},di(M().data)&&(p.isLoading=!0),m.label=1;case 1:return m.trys.push([1,3,,4]),s&&(N(p),n.loadingTimeout&&di(M().data)&&setTimeout((function(){a&&c()&&D().onLoadingSlow(O,n)}),n.loadingTimeout),_[O]=[t(x),Bi()]),y=h(_[O],2),r=y[0],i=y[1],[4,r];case 2:return r=m.sent(),s&&setTimeout(d,n.dedupingInterval),_[O]&&_[O][1]===i?(l.error=li,v=w[O],!di(v)&&(i<=v[0]||i<=v[1]||0===v[1])?[2,(f(),s&&c()&&D().onDiscarded(O),!1)]:(g=M().data,l.data=o(g,r)?g:r,s&&c()&&D().onSuccess(r,O,n),[3,4])):[2,(s&&c()&&D().onDiscarded(O),!1)];case 3:return S=m.sent(),d(),E=D(),P=E.shouldRetryOnError,E.isPaused()||(l.error=S,s&&c()&&(E.onError(S,O,E),(!0===P||hi(P)&&P(S))&&(D().revalidateOnFocus&&D().revalidateOnReconnect&&!C()||E.onErrorRetry(S,O,E,(function(e){var t=b[O];t&&t[0]&&t[0](3,e)}),{retryCount:(u.retryCount||0)+1,dedupe:!0})))),[3,4];case 4:return[2,(a=!1,f(),!0)]}}))}));return function(t){return e.apply(this,arguments)}}(),[O,r]),te=(0,so.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pe.apply(void 0,[r,T.current].concat(p(t)))}),[]);if(Mi((function(){j.current=t,P.current=n,di(K)||(W.current=K)})),Mi((function(){if(O){var e=ee.bind(li,mf),t=0,n=na(O,b,(function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var o=Date.now();D().revalidateOnFocus&&o>t&&C()&&(t=o+D().focusThrottleInterval,e())}else if(1==n)D().revalidateOnReconnect&&C()&&e();else{if(2==n)return ee();if(3==n)return ee(r)}}));return k.current=!1,T.current=O,A.current=!0,N({_k:x}),J&&(di(q)||Ci?e():Ii(e)),function(){k.current=!0,n()}}}),[O]),Mi((function(){var e,t=function(){var t=hi(l)?l(M().data):l;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){M().error||!d&&!D().isVisible()||!y&&!D().isOnline()?t():ee(mf).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[l,d,y,O]),(0,so.useDebugValue)(Y),a&&di(q)&&O){if(!Di&&Ci)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,P.current=n,k.current=!1;var ne=S[O];if(!di(ne)){var re=te(ne);vf(re)}if(!di($))throw $;var oe=ee(mf);di(Y)||(oe.status="fulfilled",oe.value=!0),vf(oe)}return{mutate:te,get data(){return F.data=!0,Y},get error(){return F.error=!0,$},get isValidating(){return F.isValidating=!0,Q},get isLoading(){return F.isLoading=!0,X}}})),bf=Promise.resolve();ra(gf,(function(e){return function(t,n,r){var o,a=(0,so.useRef)(!1),u=r.cache,s=r.initialSize,c=void 0===s?1:s,l=r.revalidateAll,p=void 0!==l&&l,y=r.persistSize,v=void 0!==y&&y,b=r.revalidateFirstPage,w=void 0===b||b,_=r.revalidateOnMount,S=void 0!==_&&_,E=r.parallel,O=void 0!==E&&E,x=h(gi.get(Vi),4)[3];try{o=function(e){return Li(e?e(0,null):null)[0]}(t),o&&(o=Ji+o)}catch(e){}var A=h(Oi(u,o),3),k=A[0],T=A[1],j=A[2],P=(0,so.useCallback)((function(){return di(k()._l)?c:k()._l}),[u,o,c]);(0,si.useSyncExternalStore)((0,so.useCallback)((function(e){return o?j(o,(function(){e()})):function(){}}),[u,o]),P,P);var D=(0,so.useCallback)((function(){var e=k()._l;return di(e)?c:e}),[o,c]),C=(0,so.useRef)(D());Mi((function(){a.current?o&&T({_l:v?C.current:D()}):a.current=!0}),[o,u]);var I=S&&!a.current,M=e(o,function(){var e=i((function(e){var o,a,s,c,l,f,d,y,v,b,_;return m(this,(function(S){switch(S.label){case 0:o=function(e){var o,l,f,d,g,_,S,E,A;return m(this,(function(k){switch(k.label){case 0:return o=h(Li(t(e,O?null:b)),2),l=o[0],f=o[1],l?(d=h(Oi(u,l),2),g=d[0],_=d[1],S=g().data,E=p||a||di(S)||w&&!e&&!di(y)||I||y&&!di(y[e])&&!r.compare(y[e],S),n&&("function"==typeof s?s(S,f):E)?(A=function(){var t=i((function(){var t;return m(this,(function(r){switch(r.label){case 0:return l in x?(t=x[l],delete x[l],[4,t]):[3,2];case 1:return S=r.sent(),[3,4];case 2:return[4,n(f)];case 3:S=r.sent(),r.label=4;case 4:return _({data:S,_k:f}),c[e]=S,[2]}}))}));return function(){return t.apply(this,arguments)}}(),O?(v.push(A),[3,3]):[3,1]):[3,4]):[2,"break"];case 1:return[4,A()];case 2:k.sent(),k.label=3;case 3:return[3,5];case 4:c[e]=S,k.label=5;case 5:return O||(b=S),[2]}}))},a=k()._i,s=k()._r,T({_r:li}),c=[],l=D(),f=h(Oi(u,e),1),d=f[0],y=d().data,v=[],b=null,_=0,S.label=1;case 1:return _<l?[5,g(o(_))]:[3,4];case 2:if("break"===S.sent())return[3,4];S.label=3;case 3:return++_,[3,1];case 4:return O?[4,Promise.all(v.map((function(e){return e()})))]:[3,6];case 5:S.sent(),S.label=6;case 6:return[2,(T({_i:li}),c)]}}))}));return function(t){return e.apply(this,arguments)}}(),r),N=(0,so.useCallback)((function(e,t){var n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return o?(r&&(di(e)?T({_i:!0,_r:n.revalidate}):T({_i:!1,_r:n.revalidate})),arguments.length?M.mutate(e,d(f({},n),{revalidate:r})):M.mutate()):bf}),[o,u]),R=(0,so.useCallback)((function(e){if(!o)return bf;var n,r=h(Oi(u,o),2)[1];if(hi(e)?n=e(D()):"number"==typeof e&&(n=e),"number"!=typeof n)return bf;r({_l:n}),C.current=n;for(var i=[],a=h(Oi(u,o),1)[0],s=null,c=0;c<n;++c){var l=h(Li(t(c,s)),1)[0],f=h(Oi(u,l),1)[0],d=l?f().data:li;if(di(d))return N(a().data);i.push(d),s=d}return N(i)}),[o,u,N,D]);return{size:D(),setSize:R,mutate:N,get data(){return M.data},get error(){return M.error},get isValidating(){return M.isValidating},get isLoading(){return M.isLoading}}}}));var wf=P(701),_f=P.n(wf);co.default.extend(_f());var Sf={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=Sf)}),1e3),Ef=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){Qr(e,t,n[t])}))}return e}({},{address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State"},{closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header"}),Of=null!=(Of={actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"})?Of:{},Object.getOwnPropertyDescriptors?Object.defineProperties(Ef,Object.getOwnPropertyDescriptors(Of)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(Of)).forEach((function(e){Object.defineProperty(Ef,e,Object.getOwnPropertyDescriptor(Of,e))}));var Ef,Of,xf,Af=P(64);(Af.default.default||Af.default).on("initialized",(function(){window.i18next.loadNamespaces(["core"])})),(0,Xr.defineConfigSchema)("@openmrs/esm-styleguide",uo),xf=function(e,t){document.documentElement.style.setProperty(e,t)},(0,Xr.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(xf("--brand-01",e.config["Brand color #1"]),xf("--brand-02",e.config["Brand color #2"]),xf("--brand-03",e.config["Brand color #3"]))})),r("omrs-logo-full-color",eo),r("omrs-logo-full-mono",eo),r("omrs-logo-full-grey",eo),r("omrs-logo-partial-color",to),r("omrs-logo-partial-mono",to),r("omrs-logo-partial-grey",to),r("omrs-logo-icon-color",no),r("omrs-logo-icon-mono",no),r("omrs-logo-icon-grey",no),r("omrs-logo-white",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 119"><path fill="var(--logo-white)" fill-rule="evenodd" d="M40.29 40.328a27.76 27.76 0 0 1 19.688-8.154c7.669 0 14.613 3.102 19.647 8.116l.02-18.54A42.84 42.84 0 0 0 59.978 17c-7.089 0-13.813 1.93-19.709 4.968zM79.645 79.671a27.74 27.74 0 0 1-19.684 8.154c-7.67 0-14.614-3.101-19.651-8.116l-.02 18.54A42.86 42.86 0 0 0 59.96 103a42.8 42.8 0 0 0 19.672-4.751z" clip-rule="evenodd"/><path fill="var(--logo-grey)" fill-rule="evenodd" d="M40.328 79.696c-5.038-5.037-8.154-11.995-8.154-19.685 0-7.669 3.102-14.612 8.116-19.65l-18.54-.02A42.85 42.85 0 0 0 17 60.012a42.8 42.8 0 0 0 4.752 19.672zM79.634 40.289a27.75 27.75 0 0 1 8.154 19.688 27.74 27.74 0 0 1-8.117 19.646l18.542.02a42.84 42.84 0 0 0 4.749-19.666c0-7.09-1.714-13.779-4.751-19.675z" clip-rule="evenodd"/><path fill="var(--logo-white)" fill-rule="evenodd" d="M156.184 60.003c0-8.749-6.118-15.777-15.025-15.777-8.909 0-15.025 7.028-15.025 15.776s6.116 15.78 15.025 15.78c8.907 0 15.025-7.031 15.025-15.78m-34.881 0c0-11.483 8.318-19.96 19.856-19.96 11.536 0 19.855 8.478 19.855 19.96 0 11.484-8.319 19.964-19.855 19.964-11.538 0-19.856-8.48-19.856-19.964M179.514 75.54c5.507 0 9.05-4.14 9.05-9.482s-3.543-9.483-9.05-9.483c-5.505 0-9.046 4.142-9.046 9.483s3.541 9.482 9.046 9.482M166.22 53.306h4.248v3.704h.11c2.344-2.725 5.449-4.36 9.154-4.36 8.014 0 13.408 5.67 13.408 13.408 0 7.63-5.613 13.406-12.752 13.406-4.58 0-8.231-2.29-9.81-5.178h-.11V90.87h-4.248zM217.773 63.768c-.163-4.305-3-7.193-7.686-7.193-4.685 0-7.79 2.888-8.335 7.193zm3.653 10.412c-3.001 3.868-6.596 5.284-11.339 5.284-8.01 0-12.914-5.993-12.914-13.406 0-7.901 5.559-13.407 13.08-13.407 7.196 0 12.096 4.906 12.096 13.354v1.362h-20.597c.325 4.413 3.704 8.173 8.335 8.173 3.65 0 6.105-1.307 8.12-3.868zM227.854 59.357c0-2.347-.216-4.361-.216-6.05h4.031c0 1.362.11 2.776.11 4.194h.11c1.144-2.505 4.306-4.85 8.5-4.85 6.705 0 9.699 4.252 9.699 10.41v15.748h-4.248v-15.31c0-4.253-1.856-6.924-5.833-6.924-5.503 0-7.903 3.979-7.903 9.811V78.81h-4.25zM259.211 41.009h6.708L278.8 70.79h.107l12.982-29.782h6.549v37.99h-4.506V47.124h-.106L280.192 79h-2.738l-13.629-31.875h-.107V79h-4.507zM312.392 57.752h4.023c4.992 0 11.487 0 11.487-6.282 0-5.47-4.776-6.276-9.177-6.276h-6.333zm-4.506-16.744h9.711c7.352 0 15.132 1.072 15.132 10.462 0 5.527-3.594 9.125-9.495 10.037L334.018 79h-5.525l-10.304-17.063h-5.797V79h-4.506zM358.123 47.713c-1.506-2.414-4.187-3.487-6.926-3.487-3.973 0-8.1 1.88-8.1 6.385 0 3.49 1.931 5.047 7.994 6.98 5.903 1.878 11.377 3.809 11.377 11.267 0 7.567-6.495 11.11-13.36 11.11-4.402 0-9.125-1.45-11.7-5.262l3.862-3.165c1.61 2.794 4.83 4.24 8.105 4.24 3.862 0 8.263-2.253 8.263-6.601 0-4.669-3.165-5.474-9.928-7.728-5.366-1.771-9.442-4.134-9.442-10.463 0-7.298 6.277-10.945 12.929-10.945 4.241 0 7.836 1.178 10.625 4.45z" clip-rule="evenodd"/></svg>'),r("omrs-icon-activity",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6 14.5a.5.5 0 0 1-.46-.31L3.165 8.5H1v-1h2.5a.5.5 0 0 1 .46.31L6 12.64l4.03-10.815a.5.5 0 0 1 .47-.325.5.5 0 0 1 .465.34L12.86 7.5H15v1h-2.5a.5.5 0 0 1-.475-.34L10.5 3.5 6.47 14.175A.5.5 0 0 1 6 14.5"/></svg>'),r("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 7.5V4h-1v3.5H4v1h3.5V12h1V8.5H12v-1z"/></svg>'),r("omrs-icon-arrow-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.295 8.295 8.5 12.085V2h-1v10.085l-3.795-3.79L3 9l5 5 5-5z"/></svg>'),r("omrs-icon-arrow-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m7 13 .705-.705L3.915 8.5H14v-1H3.915l3.79-3.795L7 3 2 8z"/></svg>'),r("omrs-icon-arrow-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m9 3-.715.696 3.79 3.804H2v1h10.075l-3.79 3.787L9 13l5-5z"/></svg>'),r("omrs-icon-arrow-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 2 3 7l.705.705L7.5 3.915V14h1V3.915l3.795 3.79L13 7z"/></svg>'),r("omrs-icon-baby",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 5.667A1.833 1.833 0 1 0 8 2a1.833 1.833 0 0 0 0 3.667m1.667 1.845a19 19 0 0 0 1.826-.369.667.667 0 1 0-.32-1.294c-1.27.314-2.229.455-3.17.452-.945-.004-1.905-.153-3.184-.454a.667.667 0 1 0-.305 1.298c.658.155 1.253.275 1.82.358v.83h3.333zM8.893 10.66c.584-.26.774-.802.774-1.013V9H6.333v.647c0 .21.19.753.774 1.013.067.03.142.067.21.1l.039.02a4 4 0 0 0 .244.114q.253.107.4.106.147.001.4-.106a5 5 0 0 0 .244-.114l.04-.02m.21-.1c-.068.03-.143.067-.21.1zM6.812 11.286a1.8 1.8 0 0 1-.818-.72c-.518.45-.802 1.017-.802 1.764 0 .298.063.745.229 1.107.17.371.397.563.685.563.31 0 .57-.236.57-.54 0-.136-.057-.264-.147-.454l-.006-.013c-.082-.172-.19-.399-.19-.663 0-.29.142-.596.31-.844q.08-.119.169-.2m2.376-.001a1.8 1.8 0 0 0 .818-.719c.518.45.802 1.017.802 1.764 0 .298-.063.745-.229 1.107-.17.371-.397.563-.685.563-.31 0-.57-.236-.57-.54 0-.136.057-.264.147-.454l.006-.013c.082-.172.19-.399.19-.663 0-.29-.142-.596-.31-.844a1.2 1.2 0 0 0-.169-.2z"/></svg>'),r("omrs-icon-calendar-heat-map",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 2h-2V1h-1v1H6V1H5v1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3 3h2v1h1V3h4v1h1V3h2v2H3zm0 3h2.5v3H3zm6.5 7h-3v-3h3zm0-4h-3V6h3zm1 4v-3H13v3z"/></svg>'),r("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 2h-2V1h-1v1H6V1H5v1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1m0 11H3V6h10zm0-8H3V3h2v1h1V3h4v1h1V3h2z"/></svg>'),r("omrs-icon-caret-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 6-4 5-4-5z"/></svg>'),r("omrs-icon-caret-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 12 5 8l5-4z"/></svg>'),r("omrs-icon-caret-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m6 4 5 4-5 4z"/></svg>'),r("omrs-icon-caret-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m4 10 4-5 4 5z"/></svg>'),r("omrs-icon-chart-average",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 12c-1.8 0-2.515-2.088-3.206-4.107C7.638 5.979 6.96 4 5.5 4a1.72 1.72 0 0 0-1.527 1.16l-.947-.318C3.05 4.767 3.66 3 5.5 3c2.175 0 3.006 2.427 3.74 4.569C9.844 9.333 10.415 11 11.5 11a1.72 1.72 0 0 0 1.527-1.16l.947.318C13.95 10.233 13.34 12 11.5 12"/><path d="M2 14V8.5h1v-1H2V1H1v13a1 1 0 0 0 1 1h13v-1z"/><path d="M5 7.5H4v1h1zM7 7.5H6v1h1zM11 7.5h-1v1h1zM13 7.5h-1v1h1zM15 7.5h-1v1h1z"/></svg>'),r("omrs-icon-checkmark-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m-1 9.795-2.5-2.5.795-.795L7 9.205 10.705 5.5l.798.793z"/></svg>'),r("omrs-icon-checkmark-outline",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m7 10.707-2.5-2.5.707-.707L7 9.293 10.793 5.5l.707.707z"/><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 13A6 6 0 1 1 8 2a6 6 0 0 1 0 12"/></svg>'),r("omrs-icon-chemistry",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.616 11.81 10 6.836V2h1V1H5v1h1v4.837L2.384 11.81A2.009 2.009 0 0 0 4.01 15h7.982a2.01 2.01 0 0 0 1.625-3.19M7 7.162V2h2v5.163L10.336 9H5.664zM11.99 14H4.01a1.01 1.01 0 0 1-.817-1.603L4.936 10h6.128l1.743 2.397A1.011 1.011 0 0 1 11.991 14"/></svg>'),r("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 11 3 6l.7-.7L8 9.6l4.3-4.3.7.7z"/></svg>'),r("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m5 8 5-5 .7.7L6.4 8l4.3 4.3-.7.7z"/></svg>'),r("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m11 8-5 5-.7-.7L9.6 8 5.3 3.7 6 3z"/></svg>'),r("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m8 5 5 5-.7.7L8 6.4l-4.3 4.3L3 10z"/></svg>'),r("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z"/></svg>'),r("omrs-icon-close-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7m2.7 10.5L8 8.8l-2.7 2.7-.8-.8L7.2 8 4.5 5.3l.8-.8L8 7.2l2.7-2.7.8.8L8.8 8l2.7 2.7z"/></svg>'),r("omrs-icon-close-outline",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7m0 13c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6"/><path d="M10.7 11.5 8 8.8l-2.7 2.7-.8-.8L7.2 8 4.5 5.3l.8-.8L8 7.2l2.7-2.7.8.8L8.8 8l2.7 2.7z"/></svg>'),r("omrs-icon-document",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12.85 4.65-3.5-3.5C9.25 1.05 9.15 1 9 1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h8c.55 0 1-.45 1-1V5c0-.15-.05-.25-.15-.35M9 2.2 11.8 5H9zM12 14H4V2h4v3c0 .55.45 1 1 1h3z"/><path d="M11 11H5v1h6zM11 8H5v1h6z"/></svg>'),r("omrs-icon-document-attachment",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 15H5.5a1 1 0 0 1-1-1v-3h1v3H13V3H8.5V2H13a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1"/><path d="M12 5H8.5v1H12zM12 7.5H8v1h4zM12 10H7.5v1H12zM4.5 9.5A2.503 2.503 0 0 1 2 7V1.5h1V7a1.5 1.5 0 0 0 3 0V2.5a.5.5 0 1 0-1 0v5H4v-5a1.5 1.5 0 0 1 3 0V7a2.503 2.503 0 0 1-2.5 2.5"/></svg>'),r("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 12v2H3v-2H2v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2zM13 7l-.705-.705-3.795 3.79V1h-1v9.085l-3.795-3.79L3 7l5 5z"/></svg>'),r("omrs-icon-drug-order",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g clip-path="url(#a)"><path fill="none" d="M16 0H0v16h16z"/><path d="M4.667 12.68V3.334h3.728c1.532-.015 2.521.861 2.603 2.414.027.504-.094 1.212-.266 1.555s-.62 1.061-1.612 1.25l.633 1.218 1.175-1.482H12l-1.832 2.292 1.101 2.1H9.992l-.598-1.17-.907 1.17H7.392l1.584-2.022-1.006-2H5.782v4.023zm1.118-4.979H8.55c.321-.02 1.253-.02 1.253-1.892 0-1.231-.748-1.489-1.42-1.485H5.785z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-edit",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 13H1v1h14zM12.7 4.5c.4-.4.4-1 0-1.4l-1.8-1.8c-.4-.4-1-.4-1.4 0L2 8.8V12h3.2zM10.2 2 12 3.8l-1.5 1.5-1.8-1.8zM3 11V9.2l5-5L9.8 6l-5 5z"/></svg>'),r("omrs-icon-event-schedule",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10.5 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8m0-7a3 3 0 1 0 0 6 3 3 0 0 0 0-6"/><path d="M11.295 12.5 10 11.205V9h1v1.795l1 1z"/><path d="M14 3a1 1 0 0 0-1-1h-2V1h-1v1H6V1H5v1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2v-1H3V3h2v1h1V3h4v1h1V3h2v3h1z"/></svg>'),r("omrs-icon-events",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 7h-1v1h1a1.5 1.5 0 0 1 1.5 1.5v2h1v-2A2.503 2.503 0 0 0 13 7M12 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M11.5 15h-1v-1A1.5 1.5 0 0 0 9 12.5H7A1.5 1.5 0 0 0 5.5 14v1h-1v-1A2.503 2.503 0 0 1 7 11.5h2a2.503 2.503 0 0 1 2.5 2.5zM8 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4 7H3A2.503 2.503 0 0 0 .5 9.5v2h1v-2A1.5 1.5 0 0 1 3 8h1zM4 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></svg>'),r("omrs-icon-gender-female",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8.5 9.965a4 4 0 1 0-1 0V11H5v1h2.5v2h1v-2H11v-1H8.5zM5 6a3 3 0 1 1 6 0 3 3 0 0 1-6 0"/></svg>'),r("omrs-icon-gender-male",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M9 2v1h3.293L8.449 6.844a4.014 4.014 0 1 0 .707.707L13 3.707V7h1V2zM6 13a3 3 0 1 1 0-6 3 3 0 0 1 0 6"/></svg>'),r("omrs-icon-gender-other",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M11 1v1h2.293l-3.2 3.2a3.47 3.47 0 0 0-4.185 0l-.7-.7L6.5 3.207 5.793 2.5 4.5 3.793 2.707 2H5V1H1v4h1V2.707L3.793 4.5 2.5 5.793l.707.707L4.5 5.207l.7.7a3.49 3.49 0 0 0 2.3 5.553v1.04h-2v1h2V15h1v-1.5h2v-1h-2v-1.04a3.49 3.49 0 0 0 2.3-5.552L14 2.707V5h1V1zm-3 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5"/></svg>'),r("omrs-icon-gender-unknown",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 12a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M8.5 9.5h-1v-2h1a1 1 0 0 0 0-2h-1a1 1 0 0 0-1 1v.25h-1V6.5a2 2 0 0 1 2-2h1a2 2 0 1 1 0 4z"/><path d="M8 15a1.04 1.04 0 0 1-.737-.305L1.305 8.737a1.043 1.043 0 0 1 0-1.474l5.958-5.958a1.043 1.043 0 0 1 1.474 0l5.958 5.958a1.043 1.043 0 0 1 0 1.474l-5.958 5.958A1.04 1.04 0 0 1 8 15M8 2a.04.04 0 0 0-.03.012L2.012 7.97a.04.04 0 0 0 0 .06l5.958 5.958a.04.04 0 0 0 .06 0l5.958-5.958a.04.04 0 0 0 0-.06L8.03 2.012A.04.04 0 0 0 8 2"/></svg>'),r("omrs-icon-generic-order-type",'<svg xmlns="http://www.w3.org/2000/svg" id="icon" viewBox="0 0 32 32"><defs><style>.cls-2{stroke-width:0}</style></defs><path d="M28.59 20.59 22 27.18l-2.59-2.59L18 26l4 4 8-8zM10 20h6v2h-6zM10 16h8v2h-8z" class="cls-2"/><path d="M8 4h8v6c0 1.1.9 2 2 2h6v6h2v-8c0-.3-.1-.5-.3-.7l-7-7c-.2-.2-.4-.3-.7-.3H8c-1.1 0-2 .9-2 2v24c0 1.1.9 2 2 2h7v-2H8zm10 .4 5.6 5.6H18z" class="cls-2"/><rect id="_Transparent_Rectangle_" data-name="&amp;lt;Transparent Rectangle&amp;gt;" style="fill:none;stroke-width:0"/></svg>'),r("omrs-icon-group",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15.5 15h-1v-1.5A1.5 1.5 0 0 0 13 12h-2a1.5 1.5 0 0 0-1.5 1.5V15h-1v-1.5A2.5 2.5 0 0 1 11 11h2a2.5 2.5 0 0 1 2.5 2.5zM12 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M7.5 11h-1V9.5A1.5 1.5 0 0 0 5 8H3a1.5 1.5 0 0 0-1.5 1.5V11h-1V9.5A2.5 2.5 0 0 1 3 7h2a2.5 2.5 0 0 1 2.5 2.5zM4 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></svg>'),r("omrs-icon-group-access",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M4 9.5H3v-1A1.5 1.5 0 0 1 4.5 7H7v1H4.5a.5.5 0 0 0-.5.5zM6 6.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M10 10a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M13 13h-1v-1a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1H7v-1a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 13 12z"/><path d="M4 15H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h2v1H2v12h2zM14 15h-2v-1h2V2h-2V1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1"/></svg>'),r("omrs-icon-hospital-bed",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.5 8h-4a1 1 0 0 0-1 1v3H2V7H1v8h1v-2h12v2h1v-4.5A2.503 2.503 0 0 0 12.5 8m1.5 4H8.5V9h4a1.5 1.5 0 0 1 1.5 1.5z"/><path d="M4.75 8.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m0-1a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5M10.5 3h-2V1h-1v2h-2v1h2v2h1V4h2z"/></svg>'),r("omrs-icon-image-medical",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13 3v10H3V3zm0-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1"/><path d="M11 8V7H8.5V6H10V5H8.5V4h-1v1H6v1h1.5v1H5v1h2.5v1H5v1h2.5v1H6v1h4v-1H8.5v-1H11V9H8.5V8z"/></svg>'),r("omrs-icon-information",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"/><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"/></svg>'),r("omrs-icon-information-filled",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 3a.75.75 0 1 1 0 1.5A.75.75 0 0 1 8 4m2 8.063H6v-1.126h1.438V8.063H6.5V6.937h2.063v4H10z"/></svg>'),r("omrs-icon-information-square",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"/><path d="M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1M3 3v10h10V3z"/></svg>'),r("omrs-icon-inventory-management",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 12h-2v2h2zM15 12h-2v2h2zM11.5 8.5h-2v2h2zM15 8.5h-2v2h2z"/><path d="M8.5 12H2V5h12v2.5h1V5a1 1 0 0 0-1-1h-3V2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h6.5zM6 2h4v2H6z"/></svg>'),r("omrs-icon-lab-order",'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#E8DAFF" d="M24 0H0v24h24z"/><path fill="#6929C4" d="M17.616 15.81 14 10.836V6h1V5H9v1h1v4.837L6.384 15.81A2.01 2.01 0 0 0 8.01 19h7.982a2.01 2.01 0 0 0 1.625-3.19M11 11.162V6h2v5.163L14.336 13H9.664zM15.99 18H8.01a1.01 1.01 0 0 1-.817-1.603L8.936 14h6.128l1.743 2.397A1.01 1.01 0 0 1 15.991 18"/></svg>'),r("omrs-icon-list-checked",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 4H8v1h7zM3 5.295 1.705 4 1 4.705l2 2 4-4L6.295 2zM15 11H8v1h7zM3 12.295 1.705 11 1 11.705l2 2 4-4L6.295 9z"/></svg>'),r("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 9a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m0-4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3"/><path d="m8 15-4.218-4.974-.174-.226A5.44 5.44 0 0 1 2.5 6.5a5.5 5.5 0 1 1 11 0 5.44 5.44 0 0 1-1.107 3.299h-.001s-.15.198-.172.225zM4.406 9.198s.117.154.144.187L8 13.454l3.455-4.075.14-.183A4.45 4.45 0 0 0 12.5 6.5a4.5 4.5 0 1 0-9 0 4.45 4.45 0 0 0 .906 2.698"/></svg>'),r("omrs-pict-material-order",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g clip-path="url(#a)"><path fill="none" d="M16 0H0v16h16z"/><path fill="none" d="M2.667 2.667h10.667v10.667H2.667z"/><path d="M9.333 9.667H6.667A.667.667 0 0 1 6 9v-.667a.667.667 0 0 1 .667-.666h2.666a.667.667 0 0 1 .667.666V9a.667.667 0 0 1-.667.667M6.667 8.333V9h2.666v-.667z"/><path d="M12 4H4a.667.667 0 0 0-.667.667V6A.667.667 0 0 0 4 6.667V12a.667.667 0 0 0 .667.667h6.666A.667.667 0 0 0 12 12V6.667A.667.667 0 0 0 12.667 6V4.667A.667.667 0 0 0 12 4m-.667 8H4.667V6.667h6.666zM12 6H4V4.667h8z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-maximize",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 1v1h3.293L9 6.291 9.707 7 14 2.707V6h1V1zM7 9.708 6.296 9 2 13.293V10H1v5h5v-1H2.707z"/></svg>'),r("omrs-icon-medication",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12 1H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v9a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1M5 7h1.5v5H5zm6 7H5v-1h2.5V6H5V5h6zM4 4V2h8v2z"/></svg>'),r("omrs-icon-message-queue",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14 14H2a1 1 0 0 1-1-1v-2.5h1V13h12v-2.5h1V13a1 1 0 0 1-1 1"/><path d="M12.5 10.5h-9v1h9zM12.5 8h-9v1h9zM12.5 5.5h-9v1h9zM12.5 3h-9v1h9z"/></svg>'),r("omrs-icon-microscope",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M12.697 12a3.94 3.94 0 0 0-.835-4.284 1.96 1.96 0 0 0-.542-2.207l1.388-1.388a1 1 0 0 0 0-1.415l-1.415-1.414a1 1 0 0 0-1.414 0L3.293 7.88a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0L8.51 8.319a1.966 1.966 0 0 0 2.757.217A2.97 2.97 0 0 1 11.589 12H8v2H2v1h12v-3zm-7.283-2L4 8.586l.94-.94L6.353 9.06zM8 7q0 .19.038.376l-.977.977L5.646 6.94 10.586 2l1.415 1.414-1.625 1.625A1.99 1.99 0 0 0 8 7m2 1a1 1 0 1 1 0-2 1 1 0 0 1 0 2m3 6H9v-1h4z"/></svg>'),r("omrs-icon-money",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15 11H1v1h14zM15 13H1v1h14zM12 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M4 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path d="M14 10H2a1.003 1.003 0 0 1-1-1V3a1.003 1.003 0 0 1 1-1h12a1.003 1.003 0 0 1 1 1v6a1 1 0 0 1-1 1m0-7H2v6h12z"/></svg>'),r("omrs-icon-mother",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.022 7.123a.83.83 0 0 0-.878-.445l-4.417.725c-.367.06-.683.291-.852.622l-1.451 2.859a.83.83 0 0 0 .068.866l1.91 2.633a.833.833 0 0 0 1.35-.979l-.564-.776a.67.67 0 0 1 .358-.46l1.077-.531-1.077-.53a.67.67 0 0 1-.372-.598V9.192a.667.667 0 0 1 1.333 0v.902l1.92.945a.667.667 0 0 1 .206 1.04l.007-.003-.418.576a.833.833 0 1 0 1.35.979l1.91-2.633a.83.83 0 0 0 .068-.867zm.311 2.377A1.167 1.167 0 1 1 9 9.5a1.167 1.167 0 0 1 2.333 0M10.333 3.667a2.333 2.333 0 1 1-4.666 0 2.333 2.333 0 0 1 4.666 0"/></svg>'),r("omrs-icon-movement",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m12 10-.705.705 1.79 1.795H5a2 2 0 1 1 0-4h6a3 3 0 0 0 0-6H2.915L4.705.705 4 0 1 3l3 3 .705-.705L2.915 3.5H11a2 2 0 0 1 0 4H5a3 3 0 1 0 0 6h8.085l-1.79 1.795L12 16l3-3z"/></svg>'),r("omrs-icon-overflow-menu--horizontal",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M4 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-overflow-menu--vertical",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 5a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-password",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10.5 1a4.5 4.5 0 0 0-4.306 5.806L1 12v3h3l5.194-5.194A4.5 4.5 0 1 0 10.5 1m0 8c-.344 0-.687-.051-1.016-.151l-.573-.174-2.015 2.014L6.207 10l-.707.707.69.69-.794.792-.689-.689-.707.707.69.69L3.585 14H2v-1.586L7.325 7.09l-.174-.573A3.5 3.5 0 1 1 10.5 9"/><path d="M11 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'),r("omrs-icon-pedestrian-family",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M10 15H8.5a1 1 0 0 1-1-1v-2.5h1V14H10v-2.5h1v-2a.5.5 0 0 0-.5-.5H6.14l-1-3H2a.5.5 0 0 0-.5.5v3h1V14h2v-3.5h1V14a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3.5a1 1 0 0 1-1-1v-3A1.5 1.5 0 0 1 2 5h3.14a1 1 0 0 1 .948.684L6.86 8h3.64A1.5 1.5 0 0 1 12 9.5v2a1 1 0 0 1-1 1V14a1 1 0 0 1-1 1M14 15h-1V9.5h1.5v-3A.5.5 0 0 0 14 6h-2V5h2a1.5 1.5 0 0 1 1.5 1.5v3a1 1 0 0 1-1 1H14zM3.5 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2M12.5 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2"/><path d="M9.25 7.5a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5m0-2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5"/></svg>'),r("omrs-icon-pen",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.654 3.053 15 1.707 14.293 1l-1.346 1.346L12.4 1.8a.967.967 0 0 0-1.4 0l-9 9V14h3.2l9-9a.967.967 0 0 0 0-1.4zM4.8 13H3v-1.8l8.7-8.7 1.8 1.8zM8.293 2 4.5 5.793l.707.707L9 2.707z"/></svg>'),r("omrs-icon-printer",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14 4.5h-1.5v-3h-9v3H2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h1.5v3h9v-3H14a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1m-9.5-2h7v2h-7zm7 11h-7v-5h7zm2.5-3h-1.5v-3h-9v3H2v-5h12z"/></svg>'),r("omrs-pict-procedure-order",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g clip-path="url(#a)"><path fill="none" d="M16 0H0v16h16z"/><g clip-path="url(#b)"><path fill="#D9FBFB" d="M2.667 2.667h10.667v10.667H2.667z"/><path d="M12.277 4.39a1.367 1.367 0 0 0-1.887 0L2.78 12h3.083c.441 0 .865-.175 1.177-.487l5.237-5.236a1.334 1.334 0 0 0 0-1.887M6.763 8.96l.697-.697.943.944-.696.696zm-.193 2.08a1 1 0 0 1-.707.293H4.39L6.293 9.43l.944.943zm5.233-5.237-2.93 2.934-.943-.944 2.933-2.93a.667.667 0 0 1 .94 0 .667.667 0 0 1 0 .94"/></g></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath><clipPath id="b"><path fill="#fff" d="M2.667 2.667h10.667v10.667H2.667z"/></clipPath></defs></svg>'),r("omrs-icon-programs",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M15 15h-1v-1a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1H9v-1c0-.827.673-1.5 1.5-1.5h3c.827 0 1.5.673 1.5 1.5zM12 12c-1.103 0-2-.897-2-2s.897-2 2-2 2 .897 2 2-.897 2-2 2m0-3a1.001 1.001 0 0 0 0 2 1.001 1.001 0 0 0 0-2M5 10H4v1h1zM9 10H6v1h3zM5 8H4v1h1zM9 8H6v1h3zM5 6H4v1h1zM9 6H6v1h3z"/><path d="M10.5 2.5H9V2c0-.552-.449-1-1-1H5c-.551 0-1 .448-1 1v.5H2.5c-.551 0-1 .449-1 1V13c0 .552.449 1 1 1H7v-1H2.5V3.5H4v1h5v-1h1.5V7h1V3.5c0-.551-.449-1-1-1M8 3.5H5V2h3z"/></svg>'),r("omrs-icon-renew",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6 5H3.39A5.5 5.5 0 0 1 13.5 8h1A6.5 6.5 0 0 0 3 3.84V2H2v4h4zM10 11h2.61A5.5 5.5 0 0 1 2.5 8h-1A6.5 6.5 0 0 0 13 12.16V14h1v-4h-4z"/></svg>'),r("omrs-pict-referral-order",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g clip-path="url(#a)"><path fill="none" d="M16 0H0v16h16z"/><path fill-rule="evenodd" d="M4.667 9.667v-.334H4v.334A2.333 2.333 0 0 0 6.333 12h1v-.667h-1c-.92 0-1.666-.746-1.666-1.666m6-3.334v.334h.666v-.334A2.333 2.333 0 0 0 9 4H8v.667h1a1.667 1.667 0 0 1 1.667 1.666m-4.334 0h-2a1 1 0 0 0-1 1V8H4v-.667C4 7.15 4.15 7 4.333 7h2c.184 0 .334.15.334.333V8h.666v-.667a1 1 0 0 0-1-1m-1-.333a1.333 1.333 0 1 0 0-2.667 1.333 1.333 0 0 0 0 2.667m0-2a.667.667 0 1 1 0 1.333.667.667 0 0 1 0-1.333m6.334 7h-2a1 1 0 0 0-1 1v.667h.666V12c0-.184.15-.333.334-.333h2c.184 0 .333.149.333.333v.667h.667V12a1 1 0 0 0-1-1M9.333 9.333a1.333 1.333 0 1 0 2.667 0 1.333 1.333 0 0 0-2.667 0m2 0a.667.667 0 1 1-1.333 0 .667.667 0 0 1 1.333 0" clip-rule="evenodd"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-report",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M9 9H5v1h4zM11 6.5H5v1h6zM7.5 11.5H5v1h2.5z"/><path d="M12.5 2.5H11V2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v.5H3.5a1 1 0 0 0-1 1V14a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V3.5a1 1 0 0 0-1-1M6 2h4v2H6zm6.5 12h-9V3.5H5V5h6V3.5h1.5z"/></svg>'),r("omrs-icon-reset",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#161616" d="M9 14a6 6 0 1 0-6-6v3.1L1.2 9.3l-.7.7 3 3 3-3-.7-.7L4 11.1V8a5 5 0 1 1 5 5z"/></svg>'),r("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m14.5 13.793-3.776-3.776a5.508 5.508 0 1 0-.707.707l3.776 3.776zM2 6.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0"/></svg>'),r("omrs-icon-save",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#161616" d="m13.855 4.645-2.5-2.5A.5.5 0 0 0 11 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5a.5.5 0 0 0-.145-.355M6 3h4v2H6zm4 10H6V9h4zm1 0V9a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v4H3V3h2v2a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V3.205l2 2V13z"/></svg>'),r("omrs-icon-shopping-cart",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M5 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M14 3.5H2.91L2.5 1.4A.5.5 0 0 0 2 1H0v1h1.59l1.91 9.6a.5.5 0 0 0 .5.4h9v-1H4.41L4 9h9a.5.5 0 0 0 .5-.39l1-4.5a.5.5 0 0 0-.5-.61M12.6 8H3.81l-.7-3.5h10.265z"/></svg>'),r("omrs-icon-shopping-cart--arrow-down",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M5 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M12 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2M2.49 1.402A.5.5 0 0 0 2 1H0v1h1.59l1.92 9.598A.5.5 0 0 0 4 12h9v-1H4.41l-.4-2H13a.5.5 0 0 0 .488-.392L14.622 3.5h-1.024L12.6 8H3.81z"/><path d="M10.793 3.293 9 5.086V1H8v4.086L6.207 3.293 5.5 4l3 3 3-3z"/></svg>'),r("omrs-icon-sticky-note-add",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11.5 1h-1v2h-2v1h2v2h1V4h2V3h-2z"/><path d="M7.5 2h-4a1.003 1.003 0 0 0-1 1v10a1.003 1.003 0 0 0 1 1h6a.45.45 0 0 0 .35-.15l3.5-3.5a.45.45 0 0 0 .15-.35V7h-1v2h-3a1.003 1.003 0 0 0-1 1v3h-5V3h4zm4.8 8-2.8 2.8V10z"/></svg>'),r("omrs-icon-switcher",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M9 2H7v2h2zM4 2H2v2h2zM14 2h-2v2h2zM9 7H7v2h2zM4 7H2v2h2zM14 7h-2v2h2zM9 12H7v2h2zM4 12H2v2h2zM14 12h-2v2h2z"/></svg>'),r("omrs-icon-syringe",'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill-rule="evenodd" d="M.155 3.143a.528.528 0 0 0 .747.748l.374-.374 1.867 1.868L1.65 6.879a.528.528 0 1 0 .747.747l.747-.747 6.351 6.351a2.64 2.64 0 0 0 2.833.592l.53.53c.276.276.668.367 1.02.273l1.221 1.22a.528.528 0 1 0 .747-.747l-1.22-1.22a1.06 1.06 0 0 0-.274-1.021l-.53-.53a2.64 2.64 0 0 0-.59-2.833l-6.352-6.35.747-.748a.528.528 0 1 0-.747-.747L5.385 3.143 3.517 1.275l.374-.373a.528.528 0 0 0-.748-.747zm4.584.646L2.872 1.92l-.95.95L3.788 4.74zm1.494 0L3.79 6.233l2.012 2.012 2.444-2.444zm.315 5.203 1.12 1.121.85-.849a.528.528 0 1 1 .747.748l-.85.848.748.747.849-.848a.528.528 0 1 1 .747.747l-.849.848.23.23c.501.502 1.234.63 1.855.387l.976-.976a1.73 1.73 0 0 0-.387-1.855L8.992 6.548zm7.17 4.525-.013-.014-.376-.377a3 3 0 0 1-.203.203l.376.376q.008.008.015.013a.53.53 0 0 1 .2-.201" clip-rule="evenodd"/></svg>'),r("omrs-icon-table-of-contents",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M11 3H2v1h9zM11 6H2v1h9zM11 9H2v1h9zM11 12H2v1h9zM14 3h-1v1h1zM14 6h-1v1h1zM14 9h-1v1h1zM14 12h-1v1h1z"/></svg>'),r("omrs-icon-table",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M14.5 2.5a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1zm-1 0v2h-11v-2zm0 11h-11v-2h11zm0-3h-11v-2h11zm0-3h-11v-2h11z"/></svg>'),r("omrs-icon-time",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"/><path d="M10.295 11 7.5 8.205V3.5h1v4.29l2.5 2.505z"/></svg>'),r("omrs-icon-tools",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M6.05 1a4.9 4.9 0 0 0-2.7.8L6.55 5a1.05 1.05 0 0 1 .1 1.5 1.05 1.05 0 0 1-1.5-.1l-3.3-3.2A4.9 4.9 0 0 0 1 6.05a5.07 5.07 0 0 0 5.05 5.05c.438.002.874-.048 1.3-.15l3.35 3.35a2.51 2.51 0 1 0 3.55-3.55L10.9 7.4q.153-.641.15-1.3a5 5 0 0 0-5-5.1m4 5.05c0 .355-.051.709-.15 1.05l-.15.55.4.4 3.35 3.35a1.44 1.44 0 0 1 .45 1.05 1.36 1.36 0 0 1-.45 1.05 1.45 1.45 0 0 1-2.1 0l-3.35-3.35-.4-.4-.55.15c-.341.099-.695.15-1.05.15A4.14 4.14 0 0 1 3.2 8.9 3.82 3.82 0 0 1 2 6.05c0-.372.051-.742.15-1.1l2.2 2.2a2.07 2.07 0 0 0 2.95.1 2.07 2.07 0 0 0-.1-2.95L5 2.1c.323-.102.66-.153 1-.15A4.14 4.14 0 0 1 8.85 3.1a4.25 4.25 0 0 1 1.2 2.95"/></svg>'),r("omrs-icon-translate",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M13.925 14.5H15L12 7h-1.175l-3 7.5H8.9l.8-2h3.425zm-3.825-3 1.31-3.28 1.315 3.28zM9 3.5v-1H5.5V1h-1v1.5H1v1h5.37a7.36 7.36 0 0 1-1.595 3.09A6.8 6.8 0 0 1 3.63 4.5H2.58a8.2 8.2 0 0 0 1.5 2.79A8.4 8.4 0 0 1 1.5 9l.375.93A9.2 9.2 0 0 0 4.765 8a8.5 8.5 0 0 0 2.88 1.92L8 9a7.2 7.2 0 0 1-2.56-1.685A8.8 8.8 0 0 0 7.4 3.5z"/></svg>'),r("omrs-icon-trash-can",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M7 6H6v6h1zM10 6H9v6h1z"/><path d="M2 3v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3zm2 11V4h8v10zM10 1H6v1h4z"/></svg>'),r("omrs-icon-tree-view--alt",'<svg xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M11.5 4.502h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-5v-.5a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-.5h2v10a1 1 0 0 0 1 1h2v.5a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-2v-4.5h2v.5a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v.5h-2v-4.5h2v.5a1 1 0 0 0 1 1m0-3h3v2h-3zm-7 2h-3v-2h3zm7 9h3v2h-3zm0-5.5h3v2h-3z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-user-avatar",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 4a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/><path d="M8 1a7 7 0 1 0 7 7 7.01 7.01 0 0 0-7-7M5 13.188V12.5A1.5 1.5 0 0 1 6.5 11h3a1.5 1.5 0 0 1 1.5 1.5v.688a5.95 5.95 0 0 1-6 0m6.996-.725A2.5 2.5 0 0 0 9.5 10h-3a2.5 2.5 0 0 0-2.496 2.463 6 6 0 1 1 7.992 0"/></svg>'),r("omrs-icon-user-follow",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M16 7h-2V5h-1v2h-2v1h2v2h1V8h2zM6 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m0-1a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M11 15h-1v-2.5A2.5 2.5 0 0 0 7.5 10h-3A2.5 2.5 0 0 0 2 12.5V15H1v-2.5A3.5 3.5 0 0 1 4.5 9h3a3.5 3.5 0 0 1 3.5 3.5z"/></svg>'),r("omrs-icon-user-xray",'<svg xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M15.5 1.5h-7A.5.5 0 0 0 8 2v6.5a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5V2a.5.5 0 0 0-.5-.5m-1.5 3h-1.5V6H14v1h-1.5v1h-1V7H10V6h1.5V4.5H10v-1h1.5v-1h1v1H14zM7.5 15h-1v-2A1.473 1.473 0 0 0 5 11.5H3A1.474 1.474 0 0 0 1.5 13v2h-1v-2A2.475 2.475 0 0 1 3 10.5h2A2.476 2.476 0 0 1 7.5 13zM4 5.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0-1a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>'),r("omrs-icon-user",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m0-1a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M13 15h-1v-2.5A2.5 2.5 0 0 0 9.5 10h-3A2.5 2.5 0 0 0 4 12.5V15H3v-2.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5z"/></svg>'),r("omrs-icon-view-off",'<svg xmlns="http://www.w3.org/2000/svg"><path d="m2.62 11.255.715-.71A7 7 0 0 1 1.535 8C2.55 5.465 5.35 3.5 8 3.5a6.2 6.2 0 0 1 2 .36l.775-.78A7.4 7.4 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34 8 8 0 0 0 2.09 3.085"/><path d="M6 7.865a2 2 0 0 1 1.85-1.85l.905-.91A3 3 0 0 0 5.09 8.77zM15.47 7.83a8.2 8.2 0 0 0-2.87-3.72L15 1.705 14.295 1 1 14.295l.705.705 2.55-2.55A7.65 7.65 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M10 8a2 2 0 0 1-3 1.72L9.72 7A2 2 0 0 1 10 8m-2 4.5a6.5 6.5 0 0 1-3-.79l1.27-1.27a3 3 0 0 0 4.175-4.175L11.88 4.83A7.27 7.27 0 0 1 14.465 8C13.45 10.535 10.65 12.5 8 12.5"/></svg>'),r("omrs-icon-view",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M15.47 7.83A8.34 8.34 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34A8.35 8.35 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M8 12.5c-2.65 0-5.45-1.965-6.465-4.5C2.55 5.465 5.35 3.5 8 3.5s5.45 1.965 6.465 4.5C13.45 10.535 10.65 12.5 8 12.5"/><path d="M8 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6m0 5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"/></svg>'),r("omrs-icon-warning",'<svg xmlns="http://www.w3.org/2000/svg"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1m0 13A6 6 0 1 1 8 2a6 6 0 0 1 0 12"/><path d="M8.5 4h-1v5.5h1zM8 11a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5"/></svg>'),r("omrs-pict-home",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M61.48 62H18.52c-.29 0-.52-.23-.52-.52V28.54c0-.29.23-.52.52-.52h30.99v-9.5c0-.29.23-.52.52-.52h11.46c.28 0 .52.23.52.52v42.96c0 .28-.23.52-.52.52z"/><path fill="#7BBCB9" d="M39.63 51.97h-6.85v8.99h6.85zM56.41 52.89h-1.03v-2.87h1.03zM48.54 52.89h-1.03v-2.87h1.03zM24.9 50.02h-1.03v2.86h1.03zM56.41 47.16h-1.03v-2.87h1.03zM48.54 47.16h-1.03v-2.87h1.03zM40.66 44.29h-1.03v2.86h1.03zM32.78 44.29h-1.03v2.86h1.03zM24.9 44.29h-1.03v2.86h1.03zM56.41 41.43h-1.03v-2.86h1.03zM48.54 41.43h-1.03v-2.86h1.03zM40.66 38.57h-1.03v2.86h1.03zM32.78 38.57h-1.03v2.86h1.03zM24.9 38.57h-1.03v2.86h1.03zM56.41 35.7h-1.03v-2.86h1.03zM48.54 35.7h-1.03v-2.86h1.03zM40.66 32.84h-1.03v2.86h1.03zM32.78 32.84h-1.03v2.86h1.03zM24.9 32.84h-1.03v2.86h1.03zM56.41 26.39h-1.03v-2.35h-2.35v-1.03h2.35v-2.35h1.03v2.35h2.35v1.03h-2.35z"/></svg>'),r("omrs-pict-laboratory",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M49.579 55.196h3.66c1.15-2.11 1.76-4.5 1.76-6.93 0-5.11-2.69-9.81-7.06-12.42a5.09 5.09 0 0 1-4.38 2.48c-.86 0-1.67-.21-2.39-.59l-5.02 8.7a.59.59 0 0 1-.81.22l-2.09-1.21-.91 1.58 2.09 1.21c.14.08.23.21.27.36s.02.31-.06.45l-1.5 2.6c-.16.28-.52.38-.81.22l-7.81-4.51a.6.6 0 0 1-.22-.81l1.5-2.6a.59.59 0 0 1 .81-.22l2.09 1.21.91-1.58-2.09-1.21a.58.58 0 0 1-.27-.36.6.6 0 0 1 .06-.45l15.05-26.04a.6.6 0 0 1 .81-.22l7.81 4.51a.59.59 0 0 1 .22.81l-4.92 8.51c1.44.9 2.39 2.5 2.39 4.32 0 .53-.08 1.05-.24 1.54 4.79 2.8 7.75 7.93 7.75 13.5 0 2.41-.56 4.78-1.61 6.93h4.03"/><path fill="#7BBCB9" d="m25.629 46.626 6.79 3.92.91-1.58-4.7-2.71s-.02 0-.02-.01l-2.07-1.2z"/><path fill="#CEE6E5" d="m30.539 45.986.78.45.92-1.58-1.58-.92-.92 1.59z"/><path fill="#7BBCB9" d="M41.399 36.496a3.93 3.93 0 0 0 5.75-1.67c0-.02.02-.04.03-.06a3.926 3.926 0 0 0-3.61-5.46c-2.16 0-3.92 1.76-3.92 3.92 0 1.29.62 2.43 1.58 3.14.01 0 .03.01.05.02.05.03.09.06.13.1z"/><path fill="#CEE6E5" d="M53.659 55.196h4.03c.33 0 .59.26.59.59v9.02c0 .33-.26.59-.59.59h-36.09c-.24 0-.45-.14-.55-.37s-.04-.47.13-.64l6.02-6.01a.6.6 0 0 1 .42-.17h20.46v-2.42c0-.33.26-.59.59-.59h3.66"/></svg>'),r("omrs-pict-patient-lists",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" fill-rule="evenodd" d="M34.824 27.412c.659-.473.879-1.41.784-2.353C35.703 21.133 32.502 18 28.55 18s-7.153 3.133-7.059 7.059c-.094 2.802 1.647 5.26 3.922 6.275C20.11 32.699 16 37.538 16 43.099v11.765h21.961V27.412zM63.06 54.864V43.099c0-5.561-4.11-10.415-9.412-11.765 2.274-1.015 4.016-3.473 3.922-6.275.094-3.926-3.106-7.059-7.06-7.059-3.952 0-7.152 3.133-7.058 7.059-.094.944.11 1.88.784 2.353h-3.137v27.452z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="M28.55 61.138v-11.52c0-5.806 4.11-10.66 9.647-11.934-2.51-1.09-4.251-3.548-4.251-6.405 0-3.87 3.2-7.004 7.153-7.004s7.153 3.133 7.153 7.004c0 2.857-1.741 5.314-4.251 6.405 5.537 1.29 9.647 6.128 9.647 11.934v11.52" clip-rule="evenodd"/></svg>'),r("omrs-pict-appointments",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M59.73 22.18H19.85c-.28 0-.51.23-.51.51v38.45c0 .28.23.51.51.51h39.88c.28 0 .51-.23.51-.51V22.7c0-.28-.23-.51-.51-.51z"/><path fill="#7BBCB9" d="M54.03 46.4h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M36.94 46.4h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M54.03 33.58h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M36.94 33.58h-11.4a.51.51 0 0 0-.51.51v5.7c0 .282.228.51.51.51h11.4a.51.51 0 0 0 .51-.51v-5.7a.51.51 0 0 0-.51-.51M49.76 27.48c-1.07 0-1.94-.87-1.94-1.94v-5.69c0-1.07.87-1.94 1.94-1.94s1.94.87 1.94 1.94v5.7c0 1.07-.87 1.94-1.94 1.94zM29.82 27.48c-1.07 0-1.94-.87-1.94-1.94v-5.69c0-1.07.87-1.94 1.94-1.94s1.94.87 1.94 1.94v5.7c0 1.07-.87 1.94-1.94 1.94z"/><path fill="#CEE6E5" d="M45.48 22.18H34.09v1.03h11.39z"/></svg>'),r("omrs-pict-service-queues",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" fill-rule="evenodd" d="M34.824 27.412c.659-.473.879-1.41.784-2.353C35.703 21.133 32.502 18 28.55 18s-7.153 3.133-7.059 7.059c-.094 2.802 1.647 5.26 3.922 6.275C20.11 32.699 16 37.538 16 43.099v11.765h21.961V27.412zM63.06 54.864V43.099c0-5.561-4.11-10.415-9.412-11.765 2.274-1.015 4.016-3.473 3.922-6.275.094-3.926-3.106-7.059-7.06-7.059-3.952 0-7.152 3.133-7.058 7.059-.094.944.11 1.88.784 2.353h-3.137v27.452z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="M28.55 61.138v-11.52c0-5.806 4.11-10.66 9.647-11.934-2.51-1.09-4.251-3.548-4.251-6.405 0-3.87 3.2-7.004 7.153-7.004s7.153 3.133 7.153 7.004c0 2.857-1.741 5.314-4.251 6.405 5.537 1.29 9.647 6.128 9.647 11.934v11.52" clip-rule="evenodd"/></svg>'),r("omrs-pict-registration",'<svg xmlns="http://www.w3.org/2000/svg"><path fill="#CEE6E5" d="M53.975 60.797H24.762a.525.525 0 0 1-.525-.524V23.762c0-.295.24-.525.525-.525h11.154v-6.773c0-.295.24-.524.524-.524h5.845c.295 0 .525.24.525.524v6.773h11.154c.295 0 .524.24.524.525v36.51c0 .296-.24.525-.524.525z"/><path fill="#7BBCB9" d="M40.57 55.367H30.344v1.05H40.57zM47.868 52.45H30.344v1.05h17.524zM42.242 40.04a5.73 5.73 0 0 0 2.83-4.927 5.726 5.726 0 0 0-5.715-5.714 5.726 5.726 0 0 0-5.713 5.714 5.7 5.7 0 0 0 2.84 4.927c-4.25 1.278-7.265 5.145-7.265 9.417h20.298c0-4.272-3.026-8.14-7.265-9.417zM54.5 65.462h4.096v-4.38c0-.154.12-.285.284-.285h4.38V56.7h-4.38a.28.28 0 0 1-.284-.284v-4.38h-4.097v4.38c0 .153-.12.284-.284.284h-4.38v4.097h4.38c.153 0 .284.12.284.284z"/></svg>'),r("omrs-pict-in-patient",'<svg xmlns="http://www.w3.org/2000/svg"><path fill="#CEE6E5" fill-rule="evenodd" d="M59.32 49.84h.09c2.94 0 5.33-2.4 5.33-5.37 0-2.01-1.09-3.76-2.71-4.68V22.77c0-1.5-1.21-2.71-2.71-2.71H51.2c-.75 0-1.35-.61-1.35-1.35V16h-2.71v2.71c0 1.77 1.13 3.27 2.71 3.83v1.58H48.5c-.75 0-1.35.61-1.35 1.35v8.12c0 .75.61 1.35 1.35 1.35h5.41c.75 0 1.35-.61 1.35-1.35v-8.12c0-.75-.61-1.35-1.35-1.35h-1.35v-1.35h6.77V39.1H35.11c-.11 0-.22-.04-.29-.12l-.5-.5.5-.5c1.99-1.99 2-5.22 0-7.22l-2.44-2.44a5.11 5.11 0 0 0-7.22 0l-.95.95a5.36 5.36 0 0 0-5.27 1.38 5.45 5.45 0 0 0 0 7.68l1.13 1.14V53.9H16v2.71h48.73V53.9h-5.41zm-2.71 4.06H22.77V42.2l7.14 7.19c.29.29.67.45 1.08.45h25.62z" clip-rule="evenodd"/><path fill="#7BBCB9" fill-rule="evenodd" d="m26.59 30.71 5.81 5.85.49-.49c.94-.94.94-2.45 0-3.39l-2.44-2.44a2.39 2.39 0 0 0-3.39 0z" clip-rule="evenodd"/><path fill="#7BBCB9" d="M24.65 63.79a4 4 0 1 0 0-8 4 4 0 0 0 0 8M56.61 63.79a4 4 0 1 0 0-8 4 4 0 0 0 0 8M53.5 23.92h-4.48a2.03 2.03 0 0 0-2.03 2.03v7.02A2.03 2.03 0 0 0 49.02 35h4.48a2.03 2.03 0 0 0 2.03-2.03v-7.02a2.03 2.03 0 0 0-2.03-2.03"/></svg>'),r("omrs-pict-pharmacy",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M12 32.495c0 14.115 11.434 25.549 25.55 25.549 14.115 0 25.549-11.434 25.549-25.55z"/><path fill="#7BBCB9" d="M52.11 32.495 63.724 20.88a5.193 5.193 0 0 0 0-7.354 5.193 5.193 0 0 0-7.354 0L37.4 32.495h14.708"/></svg>'),r("omrs-pict-stock-management",'<svg xmlns="http://www.w3.org/2000/svg" width="92" height="92" fill="none" viewBox="0 0 80 80"><path fill="#CEE6E5" d="M40.9 16 16 27.04v36.17h7.79V32.06h33.32v31.15h7.79V26.1z"/><path fill="#7BBCB9" d="M38.28 53h-8.42a.9.9 0 0 0-.9.9v8.42a.9.9 0 0 0 .9.9h8.42a.9.9 0 0 0 .9-.9V53.9a.9.9 0 0 0-.9-.9M50.36 53h-8.42a.9.9 0 0 0-.9.9v8.42a.9.9 0 0 0 .9.9h8.42a.9.9 0 0 0 .9-.9V53.9a.9.9 0 0 0-.9-.9M44.36 41h-8.42a.9.9 0 0 0-.9.9v8.42a.9.9 0 0 0 .9.9h8.42a.9.9 0 0 0 .9-.9V41.9a.9.9 0 0 0-.9-.9"/></svg>')}(),function(){"use strict";P.r(D)}(),D}())}}}))},58:(e,t,n)=>{"use strict";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}n.d(t,{R:()=>W,a:()=>$});var o,i,a=(o=function(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}({},{address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State"},{closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header"}),i=null!=(i={actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"})?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})),o);const u={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||u,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){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)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new s(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new s(this.logger,e)}}var c=new s;class l{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)})),this}off(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((e=>e!==t)):delete this.observers[e])}emit(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((e=>{e(...n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((t=>{t.apply(t,[e,...n])}))}}function f(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}function d(e){return null==e?"":""+e}function h(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}const i="string"!=typeof t?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function p(e,t,n){const{obj:r,k:o}=h(e,t,Object);r[o]=n}function y(e,t){const{obj:n,k:r}=h(e,t);if(n)return n[r]}function v(e,t,n){for(const 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]):v(e[r],t[r],n):e[r]=t[r]);return e}function m(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function b(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>g[e])):e}const w=[" ",",","?","!",";"];function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;++e){if(!o)return;if("string"==typeof o[r[e]]&&e+1<r.length)return;if(void 0===o[r[e]]){let i=2,a=r.slice(e,e+i).join(n),u=o[a];for(;void 0===u&&r.length>e+i;)i++,a=r.slice(e,e+i).join(n),u=o[a];if(void 0===u)return;if(null===u)return null;if(t.endsWith(a)){if("string"==typeof u)return u;if(a&&"string"==typeof u[a])return u[a]}const s=r.slice(e+i).join(n);return s?_(u,s,n):void 0}o=o[r[e]]}return o}function S(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class E extends l{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));const u=y(this.data,a);return u||!i||"string"!=typeof n?u:_(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),p(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let u=y(this.data,a)||{};r?v(u,n,o):u={...u,...n},p(this.data,a,u),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const x={};class A extends l{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=c.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=w.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=new RegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],s=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${u}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:i}const l=this.resolve(e,t);let f=l&&l.res;const d=l&&l.usedKey||i,h=l&&l.exactUsedKey||i,p=Object.prototype.toString.apply(f),y=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&f&&"string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof y||"[object Array]"!==p)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(l.res=e,l.usedParams=this.getUsedParamsDetails(t),l):e}if(o){const e="[object Array]"===p,n=e?[]:{},r=e?h:d;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(v&&"string"==typeof y&&"[object Array]"===p)f=f.join(y),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const c=void 0!==t.count&&"string"!=typeof t.count,d=A.hasDefaultValue(t),h=c?this.pluralResolver.getSuffix(s,t.count,t):"",p=t.ordinal&&c?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",y=t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=y),this.isValidLookup(f)||(a=!0,f=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,m=d&&y!==f&&this.options.updateMissing;if(a||r||m){if(this.logger.log(m?"updateKey":"missingKey",s,u,i,m?y:f),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.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.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=d&&r!==f?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,n,o,m,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,u,n,o,m,t),this.emit("missingKey",e,u,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{this.pluralResolver.getSuffixes(e,t).forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||y)}))})):r(e,i,y))}f=this.extendTranslation(f,e,t,l,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${u}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}return r?(l.res=f,l.usedParams=this.getUsedParamsDetails(t),l):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(a){const t=e.match(this.interpolator.nestingRegexp);u=t&&t.length}let s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);u<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!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: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,u="string"==typeof a?[a]:a;return null!=e&&u&&u.length&&!1!==n.applyPostProcessor&&(e=O.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const u=this.extractFromKey(e,a),s=u.key;n=s;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const l=void 0!==a.count&&"string"!=typeof a.count,f=l&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,!x[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(x[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${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((n=>{if(this.isValidLookup(t))return;o=n;const i=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,n,e,a);else{let e;l&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(i.push(s+e),a.ordinal&&0===e.indexOf(r)&&i.push(s+e.replace(r,this.options.pluralSeparator)),f&&i.push(s+t)),d){const n=`${s}${this.options.contextSeparator}${a.context}`;i.push(n),l&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),f&&i.push(n+t))}}let u;for(;u=i.pop();)this.isValidLookup(t)||(r=u,t=this.getResource(n,e,u,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let 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)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}function k(e){return e.charAt(0).toUpperCase()+e.slice(1)}class T{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=c.create("languageUtils")}getScriptPartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=S(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=k(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]=k(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=k(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(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||[];let 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||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let j=[{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","kk","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","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}],P={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)}};const D=["v1","v2","v3"],C=["v4"],I={zero:0,one:1,two:2,few:3,many:4,other:5};class M{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=c.create("pluralResolver"),this.options.compatibilityJSON&&!C.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return j.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:P[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(S(e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>I[e]-I[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!D.includes(this.options.compatibilityJSON)}}function N(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){const r=y(e,n);return void 0!==r?r:y(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&(i=_(e,n,r),void 0===i&&(i=_(t,n,r))),i}class R{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=c.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=void 0!==t.escape?t.escape:b,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?m(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?m(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?m(t.nestingPrefix):t.nestingPrefixEscaped||m("$t("),this.nestingSuffix=t.nestingSuffix?m(t.nestingSuffix):t.nestingSuffixEscaped||m(")"),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()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,r){let o,i,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function s(e){return e.replace(/\$/g,"$$$$")}const c=e=>{if(e.indexOf(this.formatSeparator)<0){const o=N(t,u,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(N(t,u,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>s(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?s(this.escape(e)):s(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=c(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(f){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=d(i));const u=t.safeValue(i);if(e=e.replace(o[0],u),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),u=i.match(/"/g);(a&&a.length%2==0&&!u||u.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let u=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let s=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),u=e,s=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=d(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),s&&(r=u.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function L(e){const t={};return function(n,r,o){const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(S(r),o),t[i]=a),a(n)}}class F{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=c.create("formatter"),this.options=e,this.formats={number:L(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:L(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:L(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:L(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:L(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=L(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(!e)return;const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,u,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class B extends l{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=c.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},u={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===u[t]&&(u[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const 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;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:o,k:i}=h(e,t,Object);o[i]=o[i]||[],o[i].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&u&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,u)},u=this.backend[n].bind(this.backend);if(2!==u.length)return u(e,t,a);try{const n=u(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=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."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${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!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const u={...i,isUpdate:o},s=this.backend.create.bind(this.backend);if(s.length<6)try{let o;o=5===s.length?s(e,t,n,r,u):s(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else s(e,t,n,r,a,u)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function G(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.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function z(){}class H extends l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=G(e),this.services={},this.logger=c,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=U();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...G(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?c.init(o(this.modules.logger),this.options):c.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=F);const n=new T(this.options);this.store=new E(this.options.resources,this.options);const i=this.services;i.logger=c,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new M(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new R(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new B(o(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(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new A(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(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=z),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=f(),a=()=>{const e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e))),this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=f();return e||(e=this.languages),t||(t=this.options.ns),n||(n=z),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(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&&O.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=f();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,u=new Array(a>2?a-2:0),s=2;s<a;s++)u[s-2]=arguments[s];i=r.options.overloadTranslationOptionHandler([e,t].concat(u))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,i.keyPrefix=i.keyPrefix||n||o.keyPrefix;const c=r.options.keySeparator||".";let l;return l=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(l,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=f();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=f();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new T(U());return["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","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new H(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new H(r);return void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new E(this.store.data,r),o.services.resourceStore=o.store),o.translator=new A(o.services,r),o.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];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const V=H.createInstance();function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}V.createInstance=H.createInstance,V.createInstance,V.dir,V.init,V.loadResources,V.reloadResources,V.use,V.changeLanguage,V.getFixedT,V.t,V.exists,V.setDefaultNamespace,V.hasLoadedNamespace,V.loadNamespaces,V.loadLanguages;var q=V.default||V;function $(e,t,n,r){return q.t(t,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){K(e,t,n[t])}))}return e}({ns:e,defaultValue:n},r))}function W(e,t,n){return a[e]?$("core",e,null!=t?t:a[e],n):(console.error("O3 Core Translations does not provide key '".concat(e,"'. The key itself is being rendered as text.")),e)}q.on("initialized",(function(){window.i18next.loadNamespaces(["core"])}))},9523:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return a=E()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&m(o,n.prototype),o},a.apply(null,arguments)}function u(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 s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t,n){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},l(e,t,n||e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function h(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function p(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){c(e,t,n[t])}))}return e}function y(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 v(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?o(e):t}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||_(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 b(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function S(e){var t="function"==typeof Map?new Map:void 0;return S=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),m(r,e)},S(e)}function E(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function O(e){var t=E();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}e=n.nmd(e),System.register(["dayjs"],(function(r,a){var u={};return{setters:[function(e){u.default=e.default}],execute:function(){r(function(){var r={6893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(2712).__exportStar(n(715),t)},7542:function(e,t,n){"use strict";var r=function(e){return Intl.getCanonicalLocales(e)},o=function(e,t){var n=t.zoneNames,r=t.uppercaseLinks,o=e.toUpperCase(),i=n.reduce((function(e,t){return e[t.toUpperCase()]=t,e}),{}),a=r[o]||i[o];return"Etc/UTC"===a||"Etc/GMT"===a?"UTC":a},i=function(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",(n=un-r.length)&&(i+=v(n)),i+=r;a=e[t],(n=un-(r=a+"").length)&&(i+=v(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a},a=function(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yt+e)},u=function(e,t,n,r){var o,i,a,u;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=un,o=0):(o=Math.ceil((t+1)/un),t%=un),i=en(10,un-t),u=e[o]%i|0,null==r?t<3?(0==t?u=u/100|0:1==t&&(u=u/10|0),a=n<4&&99999==u||n>3&&49999==u||5e4==u||0==u):a=(n<4&&u+1==i||n>3&&u+1==i/2)&&(e[o+1]/i/100|0)==en(10,t-2)-1||(u==i/2||0==u)&&0==(e[o+1]/i/100|0):t<4?(0==t?u=u/1e3|0:1==t?u=u/100|0:2==t&&(u=u/10|0),a=(r||n<4)&&9999==u||!r&&n>3&&4999==u):a=((r||n<4)&&u+1==i||!r&&n>3&&u+1==i/2)&&(e[o+1]/i/1e3|0)==en(10,t-3)-1,a},s=function(e,t,n){for(var r,o,i=[0],a=0,u=e.length;a<u;){for(o=i.length;o--;)i[o]*=t;for(i[0]+=Ht.indexOf(e.charAt(a++)),r=0;r<i.length;r++)i[r]>n-1&&(void 0===i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()},c=function(e,t,n,r){var o,i,a,u,s,c,l,f,d,h=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(o=1,u=f[0];u>=10;u/=10)o++;if((i=t-o)<0)i+=un,a=t,s=(l=f[d=0])/en(10,o-a-1)%10|0;else if((d=Math.ceil((i+1)/un))>=(u=f.length)){if(!r)break e;for(;u++<=d;)f.push(0);l=s=0,o=1,a=(i%=un)-un+1}else{for(l=u=f[d],o=1;u>=10;u/=10)o++;s=(a=(i%=un)-un+o)<0?0:l/en(10,o-a-1)%10|0}if(r=r||t<0||void 0!==f[d+1]||(a<0?l:l%en(10,o-a-1)),c=n<4?(s||r)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||r||6==n&&(i>0?a>0?l/en(10,o-a):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=en(10,(un-t%un)%un),e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=d,u=1,d--):(f.length=d+1,u=en(10,un-i),f[d]=a>0?(l/en(10,o-a)%en(10,a)|0)*u:0),c)for(;;){if(0==d){for(i=1,a=f[0];a>=10;a/=10)i++;for(a=f[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(e.e++,f[0]==an&&(f[0]=1));break}if(f[d]+=u,f[d]!=an)break;f[d--]=0,u=1}for(i=f.length;0===f[--i];)f.pop()}return $t&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e},l=function(e,t,n){if(!e.isFinite())return S(e);var r,o=e.e,a=i(e.d),u=a.length;return t?(n&&(r=n-u)>0?a=a.charAt(0)+"."+a.slice(1)+v(r):u>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):o<0?(a="0."+v(-o-1)+a,n&&(r=n-u)>0&&(a+=v(r))):o>=u?(a+=v(o+1-u),n&&(r=n-o-1)>0&&(a=a+"."+v(r))):((r=o+1)<u&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-u)>0&&(o+1===u&&(a+="."),a+=v(r))),a},f=function(e,t){var n=e[0];for(t*=un;n>=10;n/=10)t++;return t},d=function(e,t,n){if(t>sn)throw $t=!0,n&&(e.precision=n),Error(Jt);return c(new e(Vt),t,1,!0)},p=function(e,t,n){if(t>cn)throw Error(Jt);return c(new e(Kt),t,n,!0)},y=function(e){var t=e.length-1,n=t*un+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n},v=function(e){for(var t="";e--;)t+="0";return t},m=function(e,t,n,r){var o,i=new e(1),a=Math.ceil(r/un+4);for($t=!1;;){if(n%2&&T((i=i.times(t)).d,a)&&(o=!0),0===(n=Xt(n/2))){n=i.d.length-1,o&&0===i.d[n]&&++i.d[n];break}T((t=t.times(t)).d,a)}return $t=!0,i},g=function(e){return 1&e.d[e.d.length-1]},b=function(e,t,n){for(var r,o,i=new e(t[0]),a=0;++a<t.length;){if(!(o=new e(t[a])).s){i=o;break}((r=i.cmp(o))===n||0===r&&i.s===n)&&(i=o)}return i},_=function(e,t){var n,r,o,a,s,l,f,d=0,h=0,p=0,y=e.constructor,v=y.rounding,m=y.precision;if(!e.d||!e.d[0]||e.e>17)return new y(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?($t=!1,f=m):f=t,l=new y(.03125);e.e>-2;)e=e.times(l),p+=5;for(f+=r=Math.log(en(2,p))/Math.LN10*2+5|0,n=a=s=new y(1),y.precision=f;;){if(a=c(a.times(e),f,1),n=n.times(++h),i((l=s.plus(fn(a,n,f,1))).d).slice(0,f)===i(s.d).slice(0,f)){for(o=p;o--;)s=c(s.times(s),f,1);if(null!=t)return y.precision=m,s;if(!(d<3&&u(s.d,f-r,v,d)))return c(s,y.precision=m,v,$t=!0);y.precision=f+=10,n=a=l=new y(1),h=0,d++}s=l}},S=function(e){return String(e.s*e.s/0)},E=function(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(o=t.length;48===t.charCodeAt(o-1);--o);if(t=t.slice(r,o)){if(o-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%un,n<0&&(r+=un),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=un;r<o;)e.d.push(+t.slice(r,r+=un));t=t.slice(r),r=un-t.length}else r-=o;for(;r--;)t+="0";e.d.push(+t),$t&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e},O=function(e,t,n,r,o){var i,a,u,s,c=e.precision,l=Math.ceil(c/un);for($t=!1,s=n.times(n),u=new e(r);;){if(a=fn(u.times(s),new e(t++*t++),c,1),u=o?r.plus(a):r.minus(a),r=fn(a.times(s),new e(t++*t++),c,1),void 0!==(a=u.plus(r)).d[l]){for(i=l;a.d[i]===u.d[i]&&i--;);if(-1==i)break}i=u,u=r,r=a,a=i}return $t=!0,a.d.length=l+1,a},x=function(e,t){for(var n=e;--t;)n*=e;return n},A=function(e,t){var n,r=t.s<0,o=p(e,e.precision,1),i=o.times(.5);if((t=t.abs()).lte(i))return Ut=r?4:1,t;if((n=t.divToInt(o)).isZero())Ut=r?3:2;else{if((t=t.minus(n.times(o))).lte(i))return Ut=g(n)?r?2:3:r?4:1,t;Ut=g(n)?r?1:4:r?3:2}return t.minus(o).abs()},k=function(e,t,n,r){var o,i,u,c,f,d,h,p,y,v=e.constructor,m=void 0!==n;if(m?(a(n,1,zt),void 0===r?r=v.rounding:a(r,0,8)):(n=v.precision,r=v.rounding),e.isFinite()){for(m?(o=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):o=t,(u=(h=l(e)).indexOf("."))>=0&&(h=h.replace(".",""),(y=new v(1)).e=h.length-u,y.d=s(l(y),10,o),y.e=y.d.length),i=f=(p=s(h,10,o)).length;0==p[--f];)p.pop();if(p[0]){if(u<0?i--:((e=new v(e)).d=p,e.e=i,p=(e=fn(e,y,n,r,0,o)).d,i=e.e,d=Bt),u=p[n],c=o/2,d=d||void 0!==p[n+1],d=r<4?(void 0!==u||d)&&(0===r||r===(e.s<0?3:2)):u>c||u===c&&(4===r||d||6===r&&1&p[n-1]||r===(e.s<0?8:7)),p.length=n,d)for(;++p[--n]>o-1;)p[n]=0,n||(++i,p.unshift(1));for(f=p.length;!p[f-1];--f);for(u=0,h="";u<f;u++)h+=Ht.charAt(p[u]);if(m){if(f>1)if(16==t||8==t){for(u=16==t?4:3,--f;f%u;f++)h+="0";for(f=(p=s(h,o,t)).length;!p[f-1];--f);for(u=1,h="1.";u<f;u++)h+=Ht.charAt(p[u])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>f)for(i-=f;i--;)h+="0";else i<f&&(h=h.slice(0,i)+"."+h.slice(i))}else h=m?"0p+0":"0";h=(16==t?"0x":2==t?"0b":8==t?"0o":"")+h}else h=S(e);return e.s<0?"-"+h:h},T=function(e,t){if(e.length>t)return e.length=t,!0},j=function(e){return new this(e).abs()},P=function(e){return new this(e).acos()},D=function(e){return new this(e).acosh()},C=function(e,t){return new this(e).plus(t)},I=function(e){return new this(e).asin()},M=function(e){return new this(e).asinh()},N=function(e){return new this(e).atan()},R=function(e){return new this(e).atanh()},L=function(e,t){e=new this(e),t=new this(t);var n,r=this.precision,o=this.rounding,i=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?p(this,r,o):new this(0)).s=e.s:!e.d||t.isZero()?(n=p(this,i,1).times(.5)).s=e.s:t.s<0?(this.precision=i,this.rounding=1,n=this.atan(fn(e,t,i,1)),t=p(this,i,1),this.precision=r,this.rounding=o,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(fn(e,t,i,1)):(n=p(this,i,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n},F=function(e){return new this(e).cbrt()},B=function(e){return c(e=new this(e),e.e+1,2)},U=function(e,t,n){return new this(e).clamp(t,n)},G=function(e){if(!e||"object"!=typeof e)throw Error(Wt+"Object expected");var t,n,r,o=!0===e.defaults,i=["precision",1,zt,"rounding",0,8,"toExpNeg",-Gt,0,"toExpPos",0,Gt,"maxE",0,Gt,"minE",-Gt,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],o&&(this[n]=qt[n]),void 0!==(r=e[n])){if(!(Xt(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(Yt+n+": "+r);this[n]=r}if(n="crypto",o&&(this[n]=qt[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Yt+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Zt);this[n]=!0}else this[n]=!1}return this},z=function(e){return new this(e).cos()},H=function(e){return new this(e).cosh()},V=function(e,t){return new this(e).div(t)},K=function(e){return new this(e).exp()},q=function(e){return c(e=new this(e),e.e+1,3)},$=function(){var e,t,n=new this(0);for($t=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return $t=!0,new this(1/0);n=t}return $t=!0,n.sqrt()},W=function(e){return h(e,hn)||e&&e.toStringTag===Qt||!1},Y=function(e){return new this(e).ln()},J=function(e,t){return new this(e).log(t)},Z=function(e){return new this(e).log(2)},Q=function(e){return new this(e).log(10)},X=function(){return b(this,arguments,-1)},ee=function(){return b(this,arguments,1)},te=function(e,t){return new this(e).mod(t)},ne=function(e,t){return new this(e).mul(t)},re=function(e,t){return new this(e).pow(t)},oe=function(e){var t,n,r,o,i=0,u=new this(1),s=[];if(void 0===e?e=this.precision:a(e,1,zt),r=Math.ceil(e/un),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)(o=t[i])>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=o%1e7;else{if(!crypto.randomBytes)throw Error(Zt);for(t=crypto.randomBytes(r*=4);i<r;)(o=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((127&t[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(o%1e7),i+=4);i=r/4}else for(;i<r;)s[i++]=1e7*Math.random()|0;for(r=s[--i],e%=un,r&&e&&(o=en(10,un-e),s[i]=(r/o|0)*o);0===s[i];i--)s.pop();if(i<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=un)s.shift();for(r=1,o=s[0];o>=10;o/=10)r++;r<un&&(n-=un-r)}return u.e=n,u.d=s,u},ie=function(e){return c(e=new this(e),e.e+1,this.rounding)},ae=function(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN},ue=function(e){return new this(e).sin()},se=function(e){return new this(e).sinh()},ce=function(e){return new this(e).sqrt()},le=function(e,t){return new this(e).sub(t)},fe=function(){var e=0,t=arguments,n=new this(t[e]);for($t=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return $t=!0,c(n,this.precision,this.rounding)},de=function(e){return new this(e).tan()},he=function(e){return new this(e).tanh()},pe=function(e){return c(e=new this(e),e.e+1,1)},ye=function(e,t){var n=t&&t.cache?t.cache:wn,r=t&&t.serializer?t.serializer:gn;return(t&&t.strategy?t.strategy:be)(e,{cache:n,serializer:r})},ve=function(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),a=t.get(i);return void 0===a&&(a=e.call(this,r),t.set(i,a)),a},me=function(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i},ge=function(e,t,n,r,o){return n.bind(t,e,r,o)},be=function(e,t){return ge(e,this,1===e.length?ve:me,t.cache.create(),t.serializer)},we=function(e,t){if("function"==typeof e.repeat)return e.repeat(t);for(var n=new Array(t),r=0;r<n.length;r++)n[r]=e;return n.join("")},_e=function(e,t,n,r){e.get(t)||e.set(t,Object.create(null)),e.get(t)[n]=r},Se=function(e,t,n){for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];_e(e,t,i,n[i])}},Ee=function(e,t,n){return Oe(e,t,n)[n]},Oe=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.get(t);if(!o)throw new TypeError("".concat(t," InternalSlot has not been initialized"));return n.reduce((function(e,t){return e[t]=o[t],e}),Object.create(null))},xe=function(e){return"literal"===e.type},Ae=function(e,t,n){var r=n.value;Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},ke=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n})},Te=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},je=function(e){if("symbol"==(void 0===e?"undefined":w(e)))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Pe=function(e){return e.isFinite()?e.abs().greaterThan(8640000000000001)?new hn(NaN):function(e){var t=kn(e);if(t.isNaN()||t.isZero())return yn;if(t.isFinite())return t;var n=t.abs().floor();return t.isNegative()&&(n=n.negated()),n}(e):new hn(NaN)},De=function(e){if(null==e)throw new TypeError("undefined/null cannot be converted to object");return Object(e)},Ce=function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},Ie=function(e){return new Array(e)},Me=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ne=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":"symbol"==(void 0===e?"undefined":w(e))?"Symbol":"bigint"==(void 0===e?"undefined":w(e))?"BigInt":void 0},Re=function(e,t){return e-Math.floor(e/t)*t},Le=function(e){return Math.floor(e/Tn)},Fe=function(e){return Re(Le(e)+4,7)},Be=function(e){return Date.UTC(e,0)/Tn},Ue=function(e){return Date.UTC(e,0)},Ge=function(e){return new Date(e).getUTCFullYear()},ze=function(e){return e%4!=0?365:e%100!=0?366:e%400!=0?365:366},He=function(e){return Le(e)-Be(Ge(e))},Ve=function(e){return 365===ze(Ge(e))?0:1},Ke=function(e){var t=He(e),n=Ve(e);if(t>=0&&t<31)return 0;if(t<59+n)return 1;if(t<90+n)return 2;if(t<120+n)return 3;if(t<151+n)return 4;if(t<181+n)return 5;if(t<212+n)return 6;if(t<243+n)return 7;if(t<273+n)return 8;if(t<304+n)return 9;if(t<334+n)return 10;if(t<365+n)return 11;throw new Error("Invalid time")},qe=function(e){var t=He(e),n=Ke(e),r=Ve(e);if(0===n)return t+1;if(1===n)return t-30;if(2===n)return t-58-r;if(3===n)return t-89-r;if(4===n)return t-119-r;if(5===n)return t-150-r;if(6===n)return t-180-r;if(7===n)return t-211-r;if(8===n)return t-242-r;if(9===n)return t-272-r;if(10===n)return t-303-r;if(11===n)return t-333-r;throw new Error("Invalid time")},$e=function(e){return Re(Math.floor(e/Mn),jn)},We=function(e){return Re(Math.floor(e/In),Pn)},Ye=function(e){return Re(Math.floor(e/Cn),Dn)},Je=function(e){return"function"==typeof e},Ze=function(e,t,n){if(!Je(e))return!1;if(null==n?void 0:n.boundTargetFunction)return h(t,null==n?void 0:n.boundTargetFunction);if("object"!=typeof t)return!1;var r=e.prototype;if("object"!=typeof r)throw new TypeError("OrdinaryHasInstance called on an object with an invalid prototype property.");return Object.prototype.isPrototypeOf.call(r,t)},Qe=function(e){return Re(e,Cn)},Xe=function(e,t){if("object"==typeof e&&null!=e){var n=Symbol.toPrimitive in e?e[Symbol.toPrimitive]:void 0,r=void 0;if(void 0!==n){void 0===t?r="default":"string"===t?r="string":(Te("number"===t,'preferredType must be "string" or "number"'),r="number");var o=n.call(e,r);if("object"!=typeof o)return o;throw new TypeError("Cannot convert exotic object to primitive.")}return void 0===t&&(t="number"),function(e,t){for(var n=0,r="string"===t?["toString","valueOf"]:["valueOf","toString"];n<r.length;n++){var o=e[r[n]];if(Je(o)){var i=o.call(e);if("object"!=typeof i)return i}}throw new TypeError("Cannot convert object to primitive value")}(e,t)}return e},et=function(e){return void 0===e?Object.create(null):De(e)},tt=function(e,t,n,r){if(void 0===e)return r;var o=Number(e);if(isNaN(o)||o<t||o>n)throw new RangeError("".concat(o," is outside of range [").concat(t,", ").concat(n,"]"));return Math.floor(o)},nt=function(e,t,n,r,o){return tt(e[t],n,r,o)},rt=function(e,t,n,r,o){if("object"!=typeof e)throw new TypeError("Options must be an object");var i=e[t];if(void 0!==i){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(i=Boolean(i)),"string"===n&&(i=je(i)),void 0!==r&&!r.filter((function(e){return e==i})).length)throw new RangeError("".concat(i," is not within ").concat(r.join(", ")));return i}return o},ot=function(e){if(void 0===e)return Object.create(null);if("object"==typeof e)return e;throw new TypeError("Options must be an object")},it=function(e,t,n,r,o,i){var a=e[t];if(void 0===a)return i;if(!0===a)return r;if(!1===Boolean(a))return o;if("true"===(a=je(a))||"false"===a)return i;if(-1===(n||[]).indexOf(a))throw new RangeError("Invalid value ".concat(a));return a},at=function(e){return e.slice(e.indexOf("-")+1)},ut=function(e){return Rn.indexOf(e)>-1},st=function(e,t){var n=t.zoneNamesFromData,r=t.uppercaseLinks,o=e.toUpperCase(),i=new Set,a=new Set;return n.map((function(e){return e.toUpperCase()})).forEach((function(e){return i.add(e)})),Object.keys(r).forEach((function(e){a.add(e.toUpperCase()),i.add(r[e].toUpperCase())})),i.has(o)||a.has(o)},ct=function(e){return 3===(e=e.replace(/([a-z])/g,(function(e,t){return t.toUpperCase()}))).length&&!Ln.test(e)},lt=function(e){if(ut(e=e.replace(/([A-Z])/g,(function(e,t){return t.toLowerCase()}))))return!0;var t=e.split("-per-");if(2!==t.length)return!1;var n=t[0],r=t[1];return!(!ut(n)||!ut(r))},ft=function(e,t,n,r){if(e.eq(t))return t;if(Te(t.lessThan(e)&&e.lessThan(n),"x should be between r1 and r2 but x=".concat(e,", r1=").concat(t,", r2=").concat(n)),"zero"===r)return t;if("infinity"===r)return n;var o=e.minus(t),i=n.minus(e);return o.lessThan(i)?t:i.lessThan(o)?n:(Te(o.eq(i),"d1 should be equal to d2"),"half-zero"===r?t:"half-infinity"===r?n:(Te("half-even"===r,"unsignedRoundingMode should be half-even"),t.div(n.minus(t)).mod(2).isZero()?t:n))},dt=function(e,t,n){for(var r=(0,n.getInternalSlots)(e),o=r.dataLocaleData.numbers.symbols[r.numberingSystem],i=new RegExp("s?[".concat(o.rangeSign,"]s?")),a=t.findIndex((function(e){return"literal"===e.type&&i.test(e.value)})),u=[],s=a-1;s>=0&&Fn.has(t[s].type);s--)u.unshift(t[s]);if(Array.from(u.map((function(e){return e.value})).join("")).length>1)return(c=Array.from(t)).splice(a-u.length,u.length),c;var c,l=[];for(s=a+1;s<t.length&&Fn.has(t[s].type);s++)l.push(t[s]);return Array.from(l.map((function(e){return e.value})).join("")).length>1?((c=Array.from(t)).splice(a+1,l.length),c):t},ht=function(e,t){var n=e.notation,r=e.dataLocaleData,o=e.numberingSystem;switch(n){case"standard":return 0;case"scientific":return t.toNumber();case"engineering":return t.div(3).floor().times(3).toNumber();default:Te("compact"===n,"Invalid notation");var i=e.compactDisplay,a=e.style,u=e.currencyDisplay,s=void 0;if("currency"===a&&"name"!==u)s=(r.numbers.currency[o]||r.numbers.currency[r.numbers.nu[0]]).short;else{var c=r.numbers.decimal[o]||r.numbers.decimal[r.numbers.nu[0]];s="long"===i?c.long:c.short}if(!s)return 0;var l=pn.pow(10,t).toString(),f=Object.keys(s);if(l<f[0])return 0;if(l>f[f.length-1])return f[f.length-1].length-1;var d=f.indexOf(l);if(-1===d)return 0;var h=f[d];return"0"===s[h].other?0:h.length-s[h].other.match(/0+/)[0].length}},pt=function(e,t){return t?Bn[e]:Un[e]},yt=function(e,t){return e.times(pn.pow(10,-t))},vt=function(e,t,n,r,o){var i,a,u,s,c=n,l=function(e,t,n){var r=e.times(pn.pow(10,t)).floor().div(n).floor().times(n);return{n1:r,r1:yt(r,t)}}(e,c,r),f=l.n1,d=l.r1,h=function(e,t,n){var r=e.times(pn.pow(10,t)).ceil().div(n).ceil().times(n);return{n2:r,r2:yt(r,t)}}(e,c,r),p=h.n2,y=h.r2;if(ft(e,d,y,o).eq(d)?(i=f,a=d):(i=p,a=y),u=i.isZero()?"0":i.toString(),0!==c){var v=u.length;v<=c&&(u=we("0",c-v+1)+u,v=c+1);var m=u.slice(0,v-c),g=u.slice(u.length-c);u=m+"."+g,s=m.length}else s=u.length;for(var b=n-t;b>0&&"0"===u[u.length-1];)u=u.slice(0,u.length-1),b--;return"."===u[u.length-1]&&(u=u.slice(0,u.length-1)),{formattedString:u,roundedNumber:a,integerDigitsCount:s,roundingMagnitude:-c}},mt=function(e,t,n,r){var o,i,a,u,s=n;if(e.isZero())o=we("0",s),i=0,a=yn;else{var c=function(e,t){for(var n=pn.pow(10,t),r=pn.pow(10,t-1),o=e.div(r).log(10).plus(t).minus(1).ceil();;){var i=e.div(pn.pow(10,o.minus(t).plus(1))).floor();if(i.lessThan(n)&&i.greaterThanOrEqualTo(r)){var a=i.times(pn.pow(10,o.minus(t).plus(1)));if(a.lessThanOrEqualTo(e))return{n1:i,e1:o,r1:a}}o=o.minus(1)}}(e,s),l=c.n1,f=c.e1,d=c.r1,h=function(e,t){for(var n=pn.pow(10,t),r=pn.pow(10,t-1),o=e.div(n).log(10).plus(t).minus(1).floor();;){var i=e.div(pn.pow(10,o.minus(t).plus(1))).ceil();if(i.lessThan(n)&&i.greaterThanOrEqualTo(r)){var a=i.times(pn.pow(10,o.minus(t).plus(1)));if(a.greaterThanOrEqualTo(e))return{n2:i,e2:o,r2:a}}o=o.plus(1)}}(e,s),p=h.n2,y=h.e2,v=h.r2,m=void 0;ft(e,d,v,r).eq(d)?(m=l,i=f.toNumber(),a=d):(m=p,i=y.toNumber(),a=v),o=m.toString()}if(i>=s-1?(o+=we("0",i-s+1),u=i+1):i>=0?(o=o.slice(0,i+1)+"."+o.slice(o.length-(s-(i+1))),u=i+1):(Te(i<0,"e should be less than 0"),o="0."+we("0",-i-1)+o,u=1),o.includes(".")&&n>t){for(var g=n-t;g>0&&"0"===o[o.length-1];)o=o.slice(0,o.length-1),g--;"."===o[o.length-1]&&(o=o.slice(0,o.length-1))}return{formattedString:o,roundedNumber:a,integerDigitsCount:u,roundingMagnitude:i}},gt=function(e,t){var n,r,o=t;o.isZero()&&o.isNegative()?(n="negative",o=yn):(Te(o.isFinite(),"NumberFormatDigitInternalSlots value is not finite"),"negative"==(n=o.lessThan(0)?"negative":"positive")&&(o=o.negated()));var i=e.roundingType,a=pt(e.roundingMode,"negative"===n);switch(i){case"significantDigits":r=mt(o,e.minimumSignificantDigits,e.maximumSignificantDigits,a);break;case"fractionDigits":r=vt(o,e.minimumFractionDigits,e.maximumFractionDigits,e.roundingIncrement,a);break;default:var u=mt(o,e.minimumSignificantDigits,e.maximumSignificantDigits,a),s=vt(o,e.minimumFractionDigits,e.maximumFractionDigits,e.roundingIncrement,a);"morePrecision"===e.roundingType?r=u.roundingMagnitude<=s.roundingMagnitude?u:s:(Te("lessPrecision"===e.roundingType,"Invalid roundingType"),r=u.roundingMagnitude<=s.roundingMagnitude?s:u)}o=r.roundedNumber;var c=r.formattedString;if("stripIfInteger"===e.trailingZeroDisplay&&o.isInteger()){var l=c.indexOf(".");l>-1&&(c=c.slice(0,l))}var f=r.integerDigitsCount,d=e.minimumIntegerDigits;return f<d&&(c=we("0",d-f)+c),"negative"===n&&(o=o.isZero()?vn:o.negated()),{roundedNumber:o,formattedString:c}},bt=function(e,t){if(t.isZero())return[0,0];t.isNegative()&&(t=t.negated());var n=t.log(10).floor(),r=ht(e,n),o=gt(e,t=t.times(pn.pow(10,-r)));return o.roundedNumber.isZero()||o.roundedNumber.log(10).floor().eq(n.minus(r))?[r,n.toNumber()]:[ht(e,n.plus(1)),n.plus(1).toNumber()]},wt=function(e,t){var n=t.currencyDigitsData;return Me(n,e)?n[e]:2},_t=function(e,t,n,r){var o,i,a,u=e.sign,s=e.exponent,c=e.magnitude,l=r.notation,f=r.style,d=r.numberingSystem,h=t.numbers.nu[0],p=null;if("compact"===l&&c&&(p=function(e,t,n,r,o,i,a){var u,s,c=e.roundedNumber,l=e.sign,f=e.magnitude,d=String(Math.pow(10,f)),h=n.numbers.nu[0];if("currency"===r&&"name"!==i){var p=null===(u=((y=n.numbers.currency)[a]||y[h]).short)||void 0===u?void 0:u[d];if(!p)return null;s=Ot(t,c.toNumber(),p)}else{var y,v=((y=n.numbers.decimal)[a]||y[h])[o][d];if(!v)return null;s=Ot(t,c.toNumber(),v)}return"0"===s?null:s=Et(s,l).replace(/([^\s;\-\+\d¤]+)/g,"{c:$1}").replace(/0+/,"0")}(e,n,t,f,r.compactDisplay,r.currencyDisplay,d)),"currency"===f&&"name"!==r.currencyDisplay){var y=t.currencies[r.currency];if(y)switch(r.currencyDisplay){case"code":i=r.currency;break;case"symbol":i=y.symbol;break;default:i=y.narrow}else i=r.currency}a=p||("decimal"===f||"unit"===f||"currency"===f&&"name"===r.currencyDisplay?Et((t.numbers.decimal[d]||t.numbers.decimal[h]).standard,u):Et("currency"===f?(m=t.numbers.currency[d]||t.numbers.currency[h])[r.currencySign]:t.numbers.percent[d]||t.numbers.percent[h],u));var v=$n.exec(a)[0];if(a=a.replace($n,"{0}").replace(/'(.)'/g,"$1"),"currency"===f&&"name"!==r.currencyDisplay){var m,g=(m=t.numbers.currency[d]||t.numbers.currency[h]).currencySpacing.afterInsertBetween;g&&!qn.test(i)&&(a=a.replace("¤{0}","¤".concat(g,"{0}")));var b=m.currencySpacing.beforeInsertBetween;b&&!Kn.test(i)&&(a=a.replace("{0}¤","{0}".concat(b,"¤")))}for(var w=a.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g),_=[],S=t.numbers.symbols[d]||t.numbers.symbols[h],E=0,O=w;E<O.length;E++)if(H=O[E])switch(H){case"{0}":_.push.apply(_,St(S,e,l,s,d,!p&&(null===(o=r.useGrouping)||void 0===o||o),v,f,r.roundingIncrement,pt(r.roundingMode,-1===u)));break;case"-":_.push({type:"minusSign",value:S.minusSign});break;case"+":_.push({type:"plusSign",value:S.plusSign});break;case"%":_.push({type:"percentSign",value:S.percentSign});break;case"¤":_.push({type:"currency",value:i});break;default:/^\{c:/.test(H)?_.push({type:"compact",value:H.substring(3,H.length-1)}):_.push({type:"literal",value:H})}switch(f){case"currency":if("name"===r.currencyDisplay){var x,A=(t.numbers.currency[d]||t.numbers.currency[h]).unitPattern,k=t.currencies[r.currency];x=k?Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),k.displayName):r.currency;for(var T=[],j=0,P=A.split(/(\{[01]\})/g);j<P.length;j++)switch(H=P[j]){case"{0}":T.push.apply(T,_);break;case"{1}":T.push({type:"currency",value:x});break;default:H&&T.push({type:"literal",value:H})}return T}return _;case"unit":var D=r.unit,C=r.unitDisplay,I=t.units.simple[D];if(A=void 0,I)A=Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),t.units.simple[D][C]);else{var M=D.split("-per-"),N=M[0],R=M[1];I=t.units.simple[N];var L=Ot(n,e.roundedNumber.times(pn.pow(10,s)).toNumber(),t.units.simple[N][C]),F=t.units.simple[R].perUnit[C];if(F)A=F.replace("{0}",L);else{var B=t.units.compound.per[C],U=Ot(n,1,t.units.simple[R][C]);A=A=B.replace("{0}",L).replace("{1}",U.replace("{0}",""))}}T=[];for(var G=0,z=A.split(/(\s*\{0\}\s*)/);G<z.length;G++){var H=z[G],V=/^(\s*)\{0\}(\s*)$/.exec(H);V?(V[1]&&T.push({type:"literal",value:V[1]}),T.push.apply(T,_),V[2]&&T.push({type:"literal",value:V[2]})):H&&T.push({type:"unit",value:H})}return T;default:return _}},St=function(e,t,n,r,o,i,a,u,s,c){var l=[],f=t.formattedString,d=t.roundedNumber;if(d.isNaN())return[{type:"nan",value:f}];if(!d.isFinite())return[{type:"infinity",value:f}];var h=Vn[o];h&&(f=f.replace(/\d/g,(function(e){return h[+e]||e})));var p,y,v=f.indexOf(".");v>0?(p=f.slice(0,v),y=f.slice(v+1)):p=f;var m=!1;if("always"===i?m=!0:"min2"===i?m=d.greaterThanOrEqualTo(1e4):("auto"===i||i)&&(m="compact"!==n||d.greaterThanOrEqualTo(1e4)),m){var g="currency"===u&&null!=e.currencyGroup?e.currencyGroup:e.group,b=[],w=a.split(".")[0].split(","),_=3,S=3;w.length>1&&(_=w[w.length-1].length),w.length>2&&(S=w[w.length-2].length);var E=p.length-_;if(E>0){for(b.push(p.slice(E,E+_)),E-=S;E>0;E-=S)b.push(p.slice(E,E+S));b.push(p.slice(0,E+S))}else b.push(p);for(;b.length>0;){var O=b.pop();l.push({type:"integer",value:O}),b.length>0&&l.push({type:"group",value:g})}}else l.push({type:"integer",value:p});if(void 0!==y){var x="currency"===u&&null!=e.currencyDecimal?e.currencyDecimal:e.decimal;l.push({type:"decimal",value:x},{type:"fraction",value:y})}if(("scientific"===n||"engineering"===n)&&d.isFinite()){l.push({type:"exponentSeparator",value:e.exponential}),r<0&&(l.push({type:"exponentMinusSign",value:e.minusSign}),r=-r);var A=vt(new pn(r),0,0,s,c);l.push({type:"exponentInteger",value:A.formattedString})}return l},Et=function(e,t){e.indexOf(";")<0&&(e="".concat(e,";-").concat(e));var n=e.split(";"),r=n[0],o=n[1];switch(t){case 0:return r;case-1:return o;default:return o.indexOf("-")>=0?o.replace(/-/g,"+"):"+".concat(r)}},Ot=function(e,t,n){return n[e.select(t)]||n.other},xt=function(e,t){var n=e.dataLocaleData.numbers.symbols[e.numberingSystem].approximatelySign;return t.push({type:"approximatelySign",value:n}),t},At=function(e,t){var n,r,o,i=t,a=0,u=e.pl,s=e.dataLocaleData,c=e.numberingSystem,l=s.numbers.symbols[c]||s.numbers.symbols[s.numbers.nu[0]],f=0;if(i.isNaN())r=l.nan;else if(i.isFinite()){i.isZero()||(Te(i.isFinite(),"Input must be a mathematical value"),"percent"==e.style&&(i=i.times(100)),f=(n=bt(e,i))[0],a=n[1],i=i.times(pn.pow(10,-f)));var d=gt(e,i);r=d.formattedString,i=d.roundedNumber}else r=l.infinity;var h=e.signDisplay;switch(h){case"never":o=0;break;case"auto":o=i.isPositive()||i.isNaN()?0:-1;break;case"always":o=i.isPositive()||i.isNaN()?1:-1;break;case"exceptZero":o=i.isZero()?0:i.isNegative()?-1:1;break;default:Te("negative"===h,'signDisplay must be "negative"'),o=i.isNegative()&&!i.isZero()?-1:0}return _t({roundedNumber:i,formattedString:r,exponent:f,magnitude:a,sign:o},e.dataLocaleData,u,e)},kt=function(e,t){return At(e,t).map((function(e){return e.value})).join("")},Tt=function(e,t,n,r){var o=r.getInternalSlots;Te(!t.isNaN()&&!n.isNaN(),"Input must be a number",RangeError);var i=o(e),a=At(i,t),u=At(i,n);if(kt(i,t)===kt(i,n)){var s=xt(i,a);return s.forEach((function(e){e.source="shared"})),s}var c=[];a.forEach((function(e){e.source="startRange",c.push(e)}));var l=i.dataLocaleData.numbers.symbols[i.numberingSystem].rangeSign;return c.push({type:"literal",value:l,source:"shared"}),u.forEach((function(e){e.source="endRange",c.push(e)})),dt(e,c,{getInternalSlots:o})},jt=function(e,t,n,r){return Tt(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e){return e.value})).join("")},Pt=function(e,t,n,r){return Tt(e,t,n,{getInternalSlots:r.getInternalSlots}).map((function(e,t){return{type:e.type,value:e.value,source:e.source,result:t.toString()}}))},Dt=function(e,t,n){for(var r=At(n.getInternalSlots(e),t),o=Ie(0),i=0,a=r;i<a.length;i++){var u=a[i];o.push({type:u.type,value:u.value})}return o},Ct=function(e,t,n,r,o){var i=nt(t,"minimumIntegerDigits",1,21,1),a=t.minimumFractionDigits,u=t.maximumFractionDigits,s=t.minimumSignificantDigits,c=t.maximumSignificantDigits;e.minimumIntegerDigits=i;var l=nt(t,"roundingIncrement",1,5e3,1);Te(Yn.has(l),"Invalid rounding increment value: ".concat(l,".\nValid values are ").concat(Array.from(Yn).join(", "),"."));var f=rt(t,"roundingMode","string",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],"halfExpand"),d=rt(t,"roundingPriority","string",["auto","morePrecision","lessPrecision"],"auto"),h=rt(t,"trailingZeroDisplay","string",["auto","stripIfInteger"],"auto");1!==l&&(r=n),e.roundingIncrement=l,e.roundingMode=f,e.trailingZeroDisplay=h;var p=void 0!==s||void 0!==c,y=void 0!==a||void 0!==u,v=!0,m=!0;if("auto"===d&&(v=p,(p||!y&&"compact"===o)&&(m=!1)),v&&(p?(e.minimumSignificantDigits=tt(s,1,21,1),e.maximumSignificantDigits=tt(c,e.minimumSignificantDigits,21,21)):(e.minimumSignificantDigits=1,e.maximumSignificantDigits=21)),m)if(y){if(a=tt(a,0,100,void 0),u=tt(u,0,100,void 0),void 0===a)Te(void 0!==u,"maximumFractionDigits must be defined"),a=Math.min(n,u);else if(void 0===u)u=Math.max(r,a);else if(a>u)throw new RangeError("Invalid range, ".concat(a," > ").concat(u));e.minimumFractionDigits=a,e.maximumFractionDigits=u}else e.minimumFractionDigits=n,e.maximumFractionDigits=r;v||m?"morePrecision"===d?(e.roundingType="morePrecision",e.roundingPriority="morePrecision"):"lessPrecision"===d?(e.roundingType="lessPrecision",e.roundingPriority="lessPrecision"):p?(e.roundingType="significantDigits",e.roundingPriority="auto"):(e.roundingType="fractionDigits",e.roundingPriority="auto"):(e.minimumFractionDigits=0,e.maximumFractionDigits=0,e.minimumSignificantDigits=1,e.maximumSignificantDigits=2,e.roundingType="morePrecision",e.roundingPriority="morePrecision"),1!==l&&(Te("fractionDigits"===e.roundingType,"Invalid roundingType",TypeError),Te(e.maximumFractionDigits===e.minimumFractionDigits,"With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.",RangeError))},It=function(e,t){void 0===t&&(t=Object.create(null));var n=rt(t,"style","string",["decimal","percent","currency","unit"],"decimal");e.style=n;var r=rt(t,"currency","string",void 0,void 0);Te(void 0===r||ct(r),"Malformed currency code",RangeError),Te("currency"!==n||void 0!==r,"currency cannot be undefined",TypeError);var o=rt(t,"currencyDisplay","string",["code","symbol","narrowSymbol","name"],"symbol"),i=rt(t,"currencySign","string",["standard","accounting"],"standard"),a=rt(t,"unit","string",void 0,void 0);Te(void 0===a||lt(a),"Invalid unit argument for Intl.NumberFormat()",RangeError),Te("unit"!==n||void 0!==a,"unit cannot be undefined",TypeError);var u=rt(t,"unitDisplay","string",["short","narrow","long"],"short");"currency"===n&&(e.currency=r.toUpperCase(),e.currencyDisplay=o,e.currencySign=i),"unit"===n&&(e.unit=a,e.unitDisplay=u)},Mt=function(e,t,n,o){var i=o.getInternalSlots,a=o.localeData,u=o.availableLocales,s=o.numberingSystemNames,c=o.getDefaultLocale,l=o.currencyDigitsData,f=r(t),d=et(n),h=Object.create(null),p=rt(d,"localeMatcher","string",["lookup","best fit"],"best fit");h.localeMatcher=p;var y=rt(d,"numberingSystem","string",void 0,void 0);if(void 0!==y&&s.indexOf(y)<0)throw RangeError("Invalid numberingSystems: ".concat(y));h.nu=y;var v=(0,Wn.ResolveLocale)(Array.from(u),f,h,["nu"],a,c),m=a[v.dataLocale];Te(!!m,"Missing locale data for ".concat(v.dataLocale));var g=i(e);g.locale=v.locale,g.dataLocale=v.dataLocale,g.numberingSystem=v.nu,g.dataLocaleData=m,It(g,d);var b,w,_=g.style,S=rt(d,"notation","string",["standard","scientific","engineering","compact"],"standard");if(g.notation=S,"currency"===_&&"standard"===S){var E=wt(g.currency,{currencyDigitsData:l});b=E,w=E}else b=0,w="percent"===_?0:3;Ct(g,d,b,w,S);var O=rt(d,"compactDisplay","string",["short","long"],"short"),x="auto";"compact"===S&&(g.compactDisplay=O,x="min2");var A=it(d,"useGrouping",["min2","auto","always"],"always",!1,x);g.useGrouping=A;var k=rt(d,"signDisplay","string",["auto","never","always","exceptZero","negative"],"auto");return g.signDisplay=k,e},Nt=function(e){for(var t=[],n=e.indexOf("{"),r=0,o=0,i=e.length;n<e.length&&n>-1;)Te((r=e.indexOf("}",n))>n,"Invalid pattern ".concat(e)),n>o&&t.push({type:"literal",value:e.substring(o,n)}),t.push({type:e.substring(n+1,r),value:void 0}),o=r+1,n=e.indexOf("{",o);return o<i&&t.push({type:"literal",value:e.substring(o,i)}),t},Rt=function(e,t,n){return void 0!==n&&rt(n=De(n),"localeMatcher","string",["lookup","best fit"],"best fit"),(0,Wn.LookupSupportedLocales)(Array.from(e),t)},Lt=function(e){return"MISSING_LOCALE_DATA"===e.type},Ft=function(e){var t=Xe(e,"number");if("bigint"==(void 0===t?"undefined":w(t)))return new pn(t);if(void 0===t)return new pn(NaN);if(!0===t)return new pn(1);if(!1===t)return new pn(0);if(null===t)return new pn(0);try{return new pn(t)}catch(e){return new pn(NaN)}};n.r(t),n.d(t,{ApplyUnsignedRoundingMode:function(){return ft},ArrayCreate:function(){return Ie},CanonicalizeLocaleList:function(){return r},CanonicalizeTimeZoneName:function(){return o},CoerceOptionsToObject:function(){return et},CollapseNumberRange:function(){return dt},ComputeExponent:function(){return bt},ComputeExponentForMagnitude:function(){return ht},CurrencyDigits:function(){return wt},DateFromTime:function(){return qe},Day:function(){return Le},DayFromYear:function(){return Be},DayWithinYear:function(){return He},DaysInYear:function(){return ze},FormatApproximately:function(){return xt},FormatNumeric:function(){return kt},FormatNumericRange:function(){return jt},FormatNumericRangeToParts:function(){return Pt},FormatNumericToParts:function(){return Dt},FormatNumericToString:function(){return gt},GetNumberOption:function(){return nt},GetOption:function(){return rt},GetOptionsObject:function(){return ot},GetStringOrBooleanOption:function(){return it},GetUnsignedRoundingMode:function(){return pt},HasOwnProperty:function(){return Me},HourFromTime:function(){return $e},InLeapYear:function(){return Ve},InitializeNumberFormat:function(){return Mt},IsSanctionedSimpleUnitIdentifier:function(){return ut},IsValidTimeZoneName:function(){return st},IsWellFormedCurrencyCode:function(){return ct},IsWellFormedUnitIdentifier:function(){return lt},MinFromTime:function(){return We},MonthFromTime:function(){return Ke},OrdinaryHasInstance:function(){return Ze},PartitionNumberPattern:function(){return At},PartitionNumberRangePattern:function(){return Tt},PartitionPattern:function(){return Nt},RangePatternType:function(){return Gn},SANCTIONED_UNITS:function(){return Nn},SIMPLE_UNITS:function(){return Rn},SameValue:function(){return Ce},SecFromTime:function(){return Ye},SetNumberFormatDigitOptions:function(){return Ct},SetNumberFormatUnitOptions:function(){return It},SupportedLocales:function(){return Rt},TimeClip:function(){return Pe},TimeFromYear:function(){return Ue},ToIntlMathematicalValue:function(){return Ft},ToNumber:function(){return kn},ToObject:function(){return De},ToPrimitive:function(){return Xe},ToRawFixed:function(){return vt},ToRawPrecision:function(){return mt},ToString:function(){return je},Type:function(){return Ne},WeekDay:function(){return Fe},YearFromTime:function(){return Ge},ZERO:function(){return yn},_formatToParts:function(){return _t},createDataProperty:function(){return ke},createMemoizedDateTimeFormat:function(){return En},createMemoizedListFormat:function(){return An},createMemoizedLocale:function(){return xn},createMemoizedNumberFormat:function(){return Sn},createMemoizedPluralRules:function(){return On},defineProperty:function(){return Ae},getInternalSlot:function(){return Ee},getMultiInternalSlots:function(){return Oe},invariant:function(){return Te},isLiteralPart:function(){return xe},isMissingLocaleDataError:function(){return Lt},msFromTime:function(){return Qe},removeUnitNamespace:function(){return at},setInternalSlot:function(){return _e},setMultiInternalSlots:function(){return Se}});var Bt,Ut,Gt=9e15,zt=1e9,Ht="0123456789abcdef",Vt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Kt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qt={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Gt,maxE:Gt,crypto:!1},$t=!0,Wt="[DecimalError] ",Yt=Wt+"Invalid argument: ",Jt=Wt+"Precision limit exceeded",Zt=Wt+"crypto unavailable",Qt="[object Decimal]",Xt=Math.floor,en=Math.pow,tn=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,nn=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,on=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,an=1e7,un=7,sn=Vt.length-1,cn=Kt.length-1,ln={toStringTag:Qt};ln.absoluteValue=ln.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),c(e)},ln.ceil=function(){return c(new this.constructor(this),this.e+1,2)},ln.clampedTo=ln.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Yt+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},ln.comparedTo=ln.cmp=function(e){var t,n,r,o,i=this,a=i.d,u=(e=new i.constructor(e)).d,s=i.s,c=e.s;if(!a||!u)return s&&c?s!==c?s:a===u?0:!a^s<0?1:-1:NaN;if(!a[0]||!u[0])return a[0]?s:u[0]?-c:0;if(s!==c)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(t=0,n=(r=a.length)<(o=u.length)?r:o;t<n;++t)if(a[t]!==u[t])return a[t]>u[t]^s<0?1:-1;return r===o?0:r>o^s<0?1:-1},ln.cosine=ln.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+un,r.rounding=1,n=function(e,t){var n,r,o;if(t.isZero())return t;(r=t.d.length)<32?o=(1/x(4,n=Math.ceil(r/3))).toString():(n=16,o="2.3283064365386962890625e-10"),e.precision+=n,t=O(e,1,t.times(o),new e(1));for(var i=n;i--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,A(r,n)),r.precision=e,r.rounding=t,c(2==Ut||3==Ut?n.neg():n,e,t,!0)):new r(1):new r(NaN)},ln.cubeRoot=ln.cbrt=function(){var e,t,n,r,o,a,u,s,l,f,d=this,h=d.constructor;if(!d.isFinite()||d.isZero())return new h(d);for($t=!1,(a=d.s*en(d.s*d,1/3))&&Math.abs(a)!=1/0?r=new h(a.toString()):(n=i(d.d),(a=((e=d.e)-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=en(n,1/3),e=Xt((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(n=a==1/0?"5e"+e:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=d.s),u=(e=h.precision)+3;;)if(f=(l=(s=r).times(s).times(s)).plus(d),r=fn(f.plus(d).times(s),f.plus(l),u+2,1),i(s.d).slice(0,u)===(n=i(r.d)).slice(0,u)){if("9999"!=(n=n.slice(u-3,u+1))&&(o||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(c(r,e+1,1),t=!r.times(r).times(r).eq(d));break}if(!o&&(c(s,e+1,0),s.times(s).times(s).eq(d))){r=s;break}u+=4,o=1}return $t=!0,c(r,e,h.rounding,t)},ln.decimalPlaces=ln.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-Xt(this.e/un))*un,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},ln.dividedBy=ln.div=function(e){return fn(this,new this.constructor(e))},ln.dividedToIntegerBy=ln.divToInt=function(e){var t=this.constructor;return c(fn(this,new t(e),0,1,1),t.precision,t.rounding)},ln.equals=ln.eq=function(e){return 0===this.cmp(e)},ln.floor=function(){return c(new this.constructor(this),this.e+1,3)},ln.greaterThan=ln.gt=function(e){return this.cmp(e)>0},ln.greaterThanOrEqualTo=ln.gte=function(e){var t=this.cmp(e);return 1==t||0===t},ln.hyperbolicCosine=ln.cosh=function(){var e,t,n,r,o,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;n=a.precision,r=a.rounding,a.precision=n+Math.max(i.e,i.sd())+4,a.rounding=1,(o=i.d.length)<32?t=(1/x(4,e=Math.ceil(o/3))).toString():(e=16,t="2.3283064365386962890625e-10"),i=O(a,1,i.times(t),new a(1),!0);for(var s,l=e,f=new a(8);l--;)s=i.times(i),i=u.minus(s.times(f.minus(s.times(f))));return c(i,a.precision=n,a.rounding=r,!0)},ln.hyperbolicSine=ln.sinh=function(){var e,t,n,r,o=this,i=o.constructor;if(!o.isFinite()||o.isZero())return new i(o);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(o.e,o.sd())+4,i.rounding=1,(r=o.d.length)<3)o=O(i,2,o,o,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,o=O(i,2,o=o.times(1/x(5,e)),o,!0);for(var a,u=new i(5),s=new i(16),l=new i(20);e--;)a=o.times(o),o=o.times(u.plus(a.times(s.times(a).plus(l))))}return i.precision=t,i.rounding=n,c(o,t,n,!0)},ln.hyperbolicTangent=ln.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,fn(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},ln.inverseCosine=ln.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,o=t.rounding;return-1!==n?0===n?e.isNeg()?p(t,r,o):new t(0):new t(NaN):e.isZero()?p(t,r+4,o).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=o,e.times(2))},ln.inverseHyperbolicCosine=ln.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,$t=!1,n=n.times(n).minus(1).sqrt().plus(n),$t=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},ln.inverseHyperbolicSine=ln.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,$t=!1,n=n.times(n).plus(1).sqrt().plus(n),$t=!0,r.precision=e,r.rounding=t,n.ln())},ln.inverseHyperbolicTangent=ln.atanh=function(){var e,t,n,r,o=this,i=o.constructor;return o.isFinite()?o.e>=0?new i(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=i.precision,t=i.rounding,r=o.sd(),Math.max(r,e)<2*-o.e-1?c(new i(o),e,t,!0):(i.precision=n=r-o.e,o=fn(o.plus(1),new i(1).minus(o),n+e,1),i.precision=e+4,i.rounding=1,o=o.ln(),i.precision=e,i.rounding=t,o.times(.5))):new i(NaN)},ln.inverseSine=ln.asin=function(){var e,t,n,r,o=this,i=o.constructor;return o.isZero()?new i(o):(t=o.abs().cmp(1),n=i.precision,r=i.rounding,-1!==t?0===t?((e=p(i,n+4,r).times(.5)).s=o.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,o=o.div(new i(1).minus(o.times(o)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,o.times(2)))},ln.inverseTangent=ln.atan=function(){var e,t,n,r,o,i,a,u,s,l=this,f=l.constructor,d=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&d+4<=cn)return(a=p(f,d+4,h).times(.25)).s=l.s,a}else{if(!l.s)return new f(NaN);if(d+4<=cn)return(a=p(f,d+4,h).times(.5)).s=l.s,a}for(f.precision=u=d+10,f.rounding=1,e=n=Math.min(28,u/un+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for($t=!1,t=Math.ceil(u/un),r=1,s=l.times(l),a=new f(l),o=l;-1!==e;)if(o=o.times(s),i=a.minus(o.div(r+=2)),o=o.times(s),void 0!==(a=i.plus(o.div(r+=2))).d[t])for(e=t;a.d[e]===i.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),$t=!0,c(a,f.precision=d,f.rounding=h,!0)},ln.isFinite=function(){return!!this.d},ln.isInteger=ln.isInt=function(){return!!this.d&&Xt(this.e/un)>this.d.length-2},ln.isNaN=function(){return!this.s},ln.isNegative=ln.isNeg=function(){return this.s<0},ln.isPositive=ln.isPos=function(){return this.s>0},ln.isZero=function(){return!!this.d&&0===this.d[0]},ln.lessThan=ln.lt=function(e){return this.cmp(e)<0},ln.lessThanOrEqualTo=ln.lte=function(e){return this.cmp(e)<1},ln.logarithm=ln.log=function(e){var t,n,r,o,a,s,l,f,h=this,p=h.constructor,y=p.precision,v=p.rounding;if(null==e)e=new p(10),t=!0;else{if(n=(e=new p(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new p(NaN);t=e.eq(10)}if(n=h.d,h.s<0||!n||!n[0]||h.eq(1))return new p(n&&!n[0]?-1/0:1!=h.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(o=n[0];o%10==0;)o/=10;a=1!==o}if($t=!1,s=dn(h,l=y+5),r=t?d(p,l+10):dn(e,l),u((f=fn(s,r,l,1)).d,o=y,v))do{if(s=dn(h,l+=10),r=t?d(p,l+10):dn(e,l),f=fn(s,r,l,1),!a){+i(f.d).slice(o+1,o+15)+1==1e14&&(f=c(f,y+1,0));break}}while(u(f.d,o+=10,v));return $t=!0,c(f,y,v)},ln.minus=ln.sub=function(e){var t,n,r,o,i,a,u,s,l,d,h,p,y=this,v=y.constructor;if(e=new v(e),!y.d||!e.d)return y.s&&e.s?y.d?e.s=-e.s:e=new v(e.d||y.s!==e.s?y:NaN):e=new v(NaN),e;if(y.s!=e.s)return e.s=-e.s,y.plus(e);if(l=y.d,p=e.d,u=v.precision,s=v.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!l[0])return new v(3===s?-0:0);e=new v(y)}return $t?c(e,u,s):e}if(n=Xt(e.e/un),d=Xt(y.e/un),l=l.slice(),i=d-n){for((h=i<0)?(t=l,i=-i,a=p.length):(t=p,n=d,a=l.length),i>(r=Math.max(Math.ceil(u/un),a)+2)&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for((h=(r=l.length)<(a=p.length))&&(a=r),r=0;r<a;r++)if(l[r]!=p[r]){h=l[r]<p[r];break}i=0}for(h&&(t=l,l=p,p=t,e.s=-e.s),a=l.length,r=p.length-a;r>0;--r)l[a++]=0;for(r=p.length;r>i;){if(l[--r]<p[r]){for(o=r;o&&0===l[--o];)l[o]=an-1;--l[o],l[r]+=an}l[r]-=p[r]}for(;0===l[--a];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(e.d=l,e.e=f(l,n),$t?c(e,u,s):e):new v(3===s?-0:0)},ln.modulo=ln.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?c(new r(n),r.precision,r.rounding):($t=!1,9==r.modulo?(t=fn(n,e.abs(),0,3,1)).s*=e.s:t=fn(n,e,0,r.modulo,1),t=t.times(e),$t=!0,n.minus(t))},ln.naturalExponential=ln.exp=function(){return _(this)},ln.naturalLogarithm=ln.ln=function(){return dn(this)},ln.negated=ln.neg=function(){var e=new this.constructor(this);return e.s=-e.s,c(e)},ln.plus=ln.add=function(e){var t,n,r,o,i,a,u,s,l,d,h=this,p=h.constructor;if(e=new p(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new p(e.d||h.s===e.s?h:NaN)):e=new p(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(l=h.d,d=e.d,u=p.precision,s=p.rounding,!l[0]||!d[0])return d[0]||(e=new p(h)),$t?c(e,u,s):e;if(i=Xt(h.e/un),r=Xt(e.e/un),l=l.slice(),o=i-r){for(o<0?(n=l,o=-o,a=d.length):(n=d,r=i,a=l.length),o>(a=(i=Math.ceil(u/un))>a?i+1:a+1)&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((a=l.length)-(o=d.length)<0&&(o=a,n=d,d=l,l=n),t=0;o;)t=(l[--o]=l[o]+d[o]+t)/an|0,l[o]%=an;for(t&&(l.unshift(t),++r),a=l.length;0==l[--a];)l.pop();return e.d=l,e.e=f(l,r),$t?c(e,u,s):e},ln.precision=ln.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Yt+e);return n.d?(t=y(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},ln.round=function(){var e=this,t=e.constructor;return c(new t(e),e.e+1,t.rounding)},ln.sine=ln.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+un,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:O(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=O(e,2,t=t.times(1/x(5,n)),t);for(var o,i=new e(5),a=new e(16),u=new e(20);n--;)o=t.times(t),t=t.times(i.plus(o.times(a.times(o).minus(u))));return t}(r,A(r,n)),r.precision=e,r.rounding=t,c(Ut>2?n.neg():n,e,t,!0)):new r(NaN)},ln.squareRoot=ln.sqrt=function(){var e,t,n,r,o,a,u=this,s=u.d,l=u.e,f=u.s,d=u.constructor;if(1!==f||!s||!s[0])return new d(!f||f<0&&(!s||s[0])?NaN:s?u:1/0);for($t=!1,0==(f=Math.sqrt(+u))||f==1/0?(((t=i(s)).length+l)%2==0&&(t+="0"),f=Math.sqrt(t),l=Xt((l+1)/2)-(l<0||l%2),r=new d(t=f==1/0?"5e"+l:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new d(f.toString()),n=(l=d.precision)+3;;)if(r=(a=r).plus(fn(u,a,n+2,1)).times(.5),i(a.d).slice(0,n)===(t=i(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(c(r,l+1,1),e=!r.times(r).eq(u));break}if(!o&&(c(a,l+1,0),a.times(a).eq(u))){r=a;break}n+=4,o=1}return $t=!0,c(r,l,d.rounding,e)},ln.tangent=ln.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=fn(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,c(2==Ut||4==Ut?n.neg():n,e,t,!0)):new r(NaN)},ln.times=ln.mul=function(e){var t,n,r,o,i,a,u,s,l,d=this,h=d.constructor,p=d.d,y=(e=new h(e)).d;if(e.s*=d.s,!(p&&p[0]&&y&&y[0]))return new h(!e.s||p&&!p[0]&&!y||y&&!y[0]&&!p?NaN:p&&y?0*e.s:e.s/0);for(n=Xt(d.e/un)+Xt(e.e/un),(s=p.length)<(l=y.length)&&(i=p,p=y,y=i,a=s,s=l,l=a),i=[],r=a=s+l;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,o=s+r;o>r;)u=i[o]+y[r]*p[o-r-1]+t,i[o--]=u%an|0,t=u/an|0;i[o]=(i[o]+t)%an|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=f(i,n),$t?c(e,h.precision,h.rounding):e},ln.toBinary=function(e,t){return k(this,2,e,t)},ln.toDecimalPlaces=ln.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(a(e,0,zt),void 0===t?t=r.rounding:a(t,0,8),c(n,e+n.e+1,t))},ln.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=l(r,!0):(a(e,0,zt),void 0===t?t=o.rounding:a(t,0,8),n=l(r=c(new o(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},ln.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?n=l(o):(a(e,0,zt),void 0===t?t=i.rounding:a(t,0,8),n=l(r=c(new i(o),e+o.e+1,t),!1,e+r.e+1)),o.isNeg()&&!o.isZero()?"-"+n:n},ln.toFraction=function(e){var t,n,r,o,a,u,s,c,l,f,d,h,p=this,v=p.d,m=p.constructor;if(!v)return new m(p);if(l=n=new m(1),r=c=new m(0),u=(a=(t=new m(r)).e=y(v)-p.e-1)%un,t.d[0]=en(10,u<0?un+u:u),null==e)e=a>0?t:l;else{if(!(s=new m(e)).isInt()||s.lt(l))throw Error(Yt+s);e=s.gt(t)?a>0?t:l:s}for($t=!1,s=new m(i(v)),f=m.precision,m.precision=a=v.length*un*2;d=fn(s,t,0,1,1),1!=(o=n.plus(d.times(r))).cmp(e);)n=r,r=o,o=l,l=c.plus(d.times(o)),c=o,o=t,t=s.minus(d.times(o)),s=o;return o=fn(e.minus(n),r,0,1,1),c=c.plus(o.times(l)),n=n.plus(o.times(r)),c.s=l.s=p.s,h=fn(l,r,a,1).minus(p).abs().cmp(fn(c,n,a,1).minus(p).abs())<1?[l,r]:[c,n],m.precision=f,$t=!0,h},ln.toHexadecimal=ln.toHex=function(e,t){return k(this,16,e,t)},ln.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:a(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?($t=!1,n=fn(n,e,0,t,1).times(e),$t=!0,c(n)):(e.s=n.s,n=e),n},ln.toNumber=function(){return+this},ln.toOctal=function(e,t){return k(this,8,e,t)},ln.toPower=ln.pow=function(e){var t,n,r,o,a,s,l=this,f=l.constructor,d=+(e=new f(e));if(!(l.d&&e.d&&l.d[0]&&e.d[0]))return new f(en(+l,d));if((l=new f(l)).eq(1))return l;if(r=f.precision,a=f.rounding,e.eq(1))return c(l,r,a);if((t=Xt(e.e/un))>=e.d.length-1&&(n=d<0?-d:d)<=9007199254740991)return o=m(f,l,n,r),e.s<0?new f(1).div(o):c(o,r,a);if((s=l.s)<0){if(t<e.d.length-1)return new f(NaN);if(0==(1&e.d[t])&&(s=1),0==l.e&&1==l.d[0]&&1==l.d.length)return l.s=s,l}return(t=0!=(n=en(+l,d))&&isFinite(n)?new f(n+"").e:Xt(d*(Math.log("0."+i(l.d))/Math.LN10+l.e+1)))>f.maxE+1||t<f.minE-1?new f(t>0?s/0:0):($t=!1,f.rounding=l.s=1,n=Math.min(12,(t+"").length),(o=_(e.times(dn(l,r+n)),r)).d&&u((o=c(o,r+5,1)).d,r,a)&&(t=r+10,+i((o=c(_(e.times(dn(l,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(o=c(o,r+1,0))),o.s=s,$t=!0,f.rounding=a,c(o,r,a))},ln.toPrecision=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=l(r,r.e<=o.toExpNeg||r.e>=o.toExpPos):(a(e,1,zt),void 0===t?t=o.rounding:a(t,0,8),n=l(r=c(new o(r),e,t),e<=r.e||r.e<=o.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},ln.toSignificantDigits=ln.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(a(e,1,zt),void 0===t?t=n.rounding:a(t,0,8)),c(new n(this),e,t)},ln.toString=function(){var e=this,t=e.constructor,n=l(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},ln.truncated=ln.trunc=function(){return c(new this.constructor(this),this.e+1,1)},ln.valueOf=ln.toJSON=function(){var e=this,t=e.constructor,n=l(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var fn=function(){function e(e,t,n){var r,o=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+o,e[i]=r%n|0,o=r/n|0;return o&&e.unshift(o),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a,u,s){var l,f,d,h,p,y,v,m,g,b,w,_,S,E,O,x,A,k,T,j,P=r.constructor,D=r.s==o.s?1:-1,C=r.d,I=o.d;if(!(C&&C[0]&&I&&I[0]))return new P(r.s&&o.s&&(C?!I||C[0]!=I[0]:I)?C&&0==C[0]||!I?0*D:D/0:NaN);for(s?(p=1,f=r.e-o.e):(s=an,p=un,f=Xt(r.e/p)-Xt(o.e/p)),T=I.length,A=C.length,b=(g=new P(D)).d=[],d=0;I[d]==(C[d]||0);d++);if(I[d]>(C[d]||0)&&f--,null==i?(E=i=P.precision,a=P.rounding):E=u?i+(r.e-o.e)+1:i,E<0)b.push(1),y=!0;else{if(E=E/p+2|0,d=0,1==T){for(h=0,I=I[0],E++;(d<A||h)&&E--;d++)O=h*s+(C[d]||0),b[d]=O/I|0,h=O%I|0;y=h||d<A}else{for((h=s/(I[0]+1)|0)>1&&(I=e(I,h,s),C=e(C,h,s),T=I.length,A=C.length),x=T,_=(w=C.slice(0,T)).length;_<T;)w[_++]=0;(j=I.slice()).unshift(0),k=I[0],I[1]>=s/2&&++k;do{h=0,(l=t(I,w,T,_))<0?(S=w[0],T!=_&&(S=S*s+(w[1]||0)),(h=S/k|0)>1?(h>=s&&(h=s-1),1==(l=t(v=e(I,h,s),w,m=v.length,_=w.length))&&(h--,n(v,T<m?j:I,m,s))):(0==h&&(l=h=1),v=I.slice()),(m=v.length)<_&&v.unshift(0),n(w,v,_,s),-1==l&&(l=t(I,w,T,_=w.length))<1&&(h++,n(w,T<_?j:I,_,s)),_=w.length):0===l&&(h++,w=[0]),b[d++]=h,l&&w[0]?w[_++]=C[x]||0:(w=[C[x]],_=1)}while((x++<A||void 0!==w[0])&&E--);y=void 0!==w[0]}b[0]||b.shift()}if(1==p)g.e=f,Bt=y;else{for(d=1,h=b[0];h>=10;h/=10)d++;g.e=d+f*p-1,c(g,u?i+g.e+1:i,a,y)}return g}}();function dn(e,t){var n,r,o,a,s,l,f,h,p,y,v,m=1,g=e,b=g.d,w=g.constructor,_=w.rounding,S=w.precision;if(g.s<0||!b||!b[0]||!g.e&&1==b[0]&&1==b.length)return new w(b&&!b[0]?-1/0:1!=g.s?NaN:b?0:g);if(null==t?($t=!1,p=S):p=t,w.precision=p+=10,r=(n=i(b)).charAt(0),!(Math.abs(a=g.e)<15e14))return h=d(w,p+2,S).times(a+""),g=dn(new w(r+"."+n.slice(1)),p-10).plus(h),w.precision=S,null==t?c(g,S,_,$t=!0):g;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=i((g=g.times(e)).d)).charAt(0),m++;for(a=g.e,r>1?(g=new w("0."+n),a++):g=new w(r+"."+n.slice(1)),y=g,f=s=g=fn(g.minus(1),g.plus(1),p,1),v=c(g.times(g),p,1),o=3;;){if(s=c(s.times(v),p,1),i((h=f.plus(fn(s,new w(o),p,1))).d).slice(0,p)===i(f.d).slice(0,p)){if(f=f.times(2),0!==a&&(f=f.plus(d(w,p+2,S).times(a+""))),f=fn(f,new w(m),p,1),null!=t)return w.precision=S,f;if(!u(f.d,p-10,_,l))return c(f,w.precision=S,_,$t=!0);w.precision=p+=10,h=s=g=fn(y.minus(1),y.plus(1),p,1),v=c(g.times(g),p,1),o=l=1}f=h,o+=2}}ln[Symbol.for("nodejs.util.inspect.custom")]=ln.toString,ln[Symbol.toStringTag]="Decimal";var hn=ln.constructor=function e(t){var n,r,o;function i(e){var t,n,r,o=this;if(!h(o,i))return new i(e);if(o.constructor=i,W(e))return o.s=e.s,void($t?!e.d||e.e>i.maxE?(o.e=NaN,o.d=null):e.e<i.minE?(o.e=0,o.d=[0]):(o.e=e.e,o.d=e.d.slice()):(o.e=e.e,o.d=e.d?e.d.slice():e.d));if("number"==(r=void 0===e?"undefined":w(e))){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void($t?t>i.maxE?(o.e=NaN,o.d=null):t<i.minE?(o.e=0,o.d=[0]):(o.e=t,o.d=[e]):(o.e=t,o.d=[e]))}return 0*e!=0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):E(o,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),o.s=-1):(43===n&&(e=e.slice(1)),o.s=1),on.test(e)?E(o,e):function(e,t){var n,r,o,i,a,u,c,l,d;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),on.test(t))return E(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(nn.test(t))n=16,t=t.toLowerCase();else if(tn.test(t))n=2;else{if(!rn.test(t))throw Error(Yt+t);n=8}for((i=t.search(/p/i))>0?(c=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),a=(i=t.indexOf("."))>=0,r=e.constructor,a&&(i=(u=(t=t.replace(".","")).length)-i,o=m(r,new r(n),i,2*i)),i=d=(l=s(t,n,an)).length-1;0===l[i];--i)l.pop();return i<0?new r(0*e.s):(e.e=f(l,d),e.d=l,$t=!1,a&&(e=fn(e,o,4*u)),c&&(e=e.times(Math.abs(c)<54?en(2,c):hn.pow(2,c))),$t=!0,e)}(o,e);if("bigint"===r)return e<0?(e=-e,o.s=-1):o.s=1,E(o,e.toString());throw Error(Yt+e)}if(i.prototype=ln,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=G,i.clone=e,i.isDecimal=W,i.abs=j,i.acos=P,i.acosh=D,i.add=C,i.asin=I,i.asinh=M,i.atan=N,i.atanh=R,i.atan2=L,i.cbrt=F,i.ceil=B,i.clamp=U,i.cos=z,i.cosh=H,i.div=V,i.exp=K,i.floor=q,i.hypot=$,i.ln=Y,i.log=J,i.log10=Q,i.log2=Z,i.max=X,i.min=ee,i.mod=te,i.mul=ne,i.pow=re,i.random=oe,i.round=ie,i.sign=ae,i.sin=ue,i.sinh=se,i.sqrt=ce,i.sub=le,i.sum=fe,i.tan=de,i.tanh=he,i.trunc=pe,void 0===t&&(t={}),t&&!0!==t.defaults)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}(qt);Vt=new hn(Vt),Kt=new hn(Kt);var pn=hn;new pn(10);var yn=new pn(0),vn=new pn(-0),mn=n(2712),gn=function(){return JSON.stringify(arguments)},bn=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e}(),wn={create:function(){return new bn}},_n={variadic:function(e,t){return ge(e,this,me,t.cache.create(),t.serializer)},monadic:function(e,t){return ge(e,this,ve,t.cache.create(),t.serializer)}},Sn=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),En=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),On=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),xn=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.Locale).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic}),An=ye((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.ListFormat).bind.apply(e,(0,mn.__spreadArray)([void 0],t,!1)))}),{strategy:_n.variadic});function kn(e){if("number"==typeof e)return new hn(e);if(Te("bigint"!=(void 0===e?"undefined":w(e))&&"symbol"!=(void 0===e?"undefined":w(e)),"BigInt and Symbol are not supported",TypeError),void 0===e)return new hn(NaN);if(null===e||0===e)return yn;if(!0===e)return new hn(1);if("string"==typeof e)try{return new hn(e)}catch(e){return new hn(NaN)}Te("object"==typeof e,"object expected",TypeError);var t=Xe(e,"number");return Te("object"!=typeof t,"object expected",TypeError),kn(t)}var Tn=864e5,jn=24,Pn=60,Dn=60,Cn=1e3,In=Cn*Dn,Mn=In*Pn,Nn=["angle-degree","area-acre","area-hectare","concentr-percent","digital-bit","digital-byte","digital-gigabit","digital-gigabyte","digital-kilobit","digital-kilobyte","digital-megabit","digital-megabyte","digital-petabyte","digital-terabit","digital-terabyte","duration-day","duration-hour","duration-millisecond","duration-minute","duration-month","duration-second","duration-week","duration-year","length-centimeter","length-foot","length-inch","length-kilometer","length-meter","length-mile-scandinavian","length-mile","length-millimeter","length-yard","mass-gram","mass-kilogram","mass-ounce","mass-pound","mass-stone","temperature-celsius","temperature-fahrenheit","volume-fluid-ounce","volume-gallon","volume-liter","volume-milliliter"],Rn=Nn.map(at),Ln=/[^A-Z]/,Fn=new Set(["unit","exponentMinusSign","minusSign","plusSign","percentSign","exponentSeparator","percent","percentSign","currency","literal"]);pn.set({toExpPos:100});var Bn={ceil:"zero",floor:"infinity",expand:"infinity",trunc:"zero",halfCeil:"half-zero",halfFloor:"half-infinity",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},Un={ceil:"infinity",floor:"zero",expand:"infinity",trunc:"zero",halfCeil:"half-infinity",halfFloor:"half-zero",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"};pn.set({toExpPos:100});var Gn,zn,Hn=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/,Vn={adlm:["𞥐","𞥑","𞥒","𞥓","𞥔","𞥕","𞥖","𞥗","𞥘","𞥙"],ahom:["𑜰","𑜱","𑜲","𑜳","𑜴","𑜵","𑜶","𑜷","𑜸","𑜹"],arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],bhks:["𑱐","𑱑","𑱒","𑱓","𑱔","𑱕","𑱖","𑱗","𑱘","𑱙"],brah:["𑁦","𑁧","𑁨","𑁩","𑁪","𑁫","𑁬","𑁭","𑁮","𑁯"],cakm:["𑄶","𑄷","𑄸","𑄹","𑄺","𑄻","𑄼","𑄽","𑄾","𑄿"],cham:["꩐","꩑","꩒","꩓","꩔","꩕","꩖","꩗","꩘","꩙"],deva:["०","१","२","३","४","५","६","७","८","९"],diak:["𑥐","𑥑","𑥒","𑥓","𑥔","𑥕","𑥖","𑥗","𑥘","𑥙"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gong:["𑶠","𑶡","𑶢","𑶣","𑶤","𑶥","𑶦","𑶧","𑶨","𑶩"],gonm:["𑵐","𑵑","𑵒","𑵓","𑵔","𑵕","𑵖","𑵗","𑵘","𑵙"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],hmng:["𖭐","𖭑","𖭒","𖭓","𖭔","𖭕","𖭖","𖭗","𖭘","𖭙"],hmnp:["𞅀","𞅁","𞅂","𞅃","𞅄","𞅅","𞅆","𞅇","𞅈","𞅉"],java:["꧐","꧑","꧒","꧓","꧔","꧕","꧖","꧗","꧘","꧙"],kali:["꤀","꤁","꤂","꤃","꤄","꤅","꤆","꤇","꤈","꤉"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],lana:["᪀","᪁","᪂","᪃","᪄","᪅","᪆","᪇","᪈","᪉"],lanatham:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],lepc:["᪐","᪑","᪒","᪓","᪔","᪕","᪖","᪗","᪘","᪙"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mathbold:["𝟎","𝟏","𝟐","𝟑","𝟒","𝟓","𝟔","𝟕","𝟖","𝟗"],mathdbl:["𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"],mathmono:["𝟶","𝟷","𝟸","𝟹","𝟺","𝟻","𝟼","𝟽","𝟾","𝟿"],mathsanb:["𝟬","𝟭","𝟮","𝟯","𝟰","𝟱","𝟲","𝟳","𝟴","𝟵"],mathsans:["𝟢","𝟣","𝟤","𝟥","𝟦","𝟧","𝟨","𝟩","𝟪","𝟫"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],modi:["𑙐","𑙑","𑙒","𑙓","𑙔","𑙕","𑙖","𑙗","𑙘","𑙙"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mroo:["𖩠","𖩡","𖩢","𖩣","𖩤","𖩥","𖩦","𖩧","𖩨","𖩩"],mtei:["꯰","꯱","꯲","꯳","꯴","꯵","꯶","꯷","꯸","꯹"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],mymrshan:["႐","႑","႒","႓","႔","႕","႖","႗","႘","႙"],mymrtlng:["꧰","꧱","꧲","꧳","꧴","꧵","꧶","꧷","꧸","꧹"],newa:["𑑐","𑑑","𑑒","𑑓","𑑔","𑑕","𑑖","𑑗","𑑘","𑑙"],nkoo:["߀","߁","߂","߃","߄","߅","߆","߇","߈","߉"],olck:["᱐","᱑","᱒","᱓","᱔","᱕","᱖","᱗","᱘","᱙"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],osma:["𐒠","𐒡","𐒢","𐒣","𐒤","𐒥","𐒦","𐒧","𐒨","𐒩"],rohg:["𐴰","𐴱","𐴲","𐴳","𐴴","𐴵","𐴶","𐴷","𐴸","𐴹"],saur:["꣐","꣑","꣒","꣓","꣔","꣕","꣖","꣗","꣘","꣙"],segment:["🯰","🯱","🯲","🯳","🯴","🯵","🯶","🯷","🯸","🯹"],shrd:["𑇐","𑇑","𑇒","𑇓","𑇔","𑇕","𑇖","𑇗","𑇘","𑇙"],sind:["𑋰","𑋱","𑋲","𑋳","𑋴","𑋵","𑋶","𑋷","𑋸","𑋹"],sinh:["෦","෧","෨","෩","෪","෫","෬","෭","෮","෯"],sora:["𑃰","𑃱","𑃲","𑃳","𑃴","𑃵","𑃶","𑃷","𑃸","𑃹"],sund:["᮰","᮱","᮲","᮳","᮴","᮵","᮶","᮷","᮸","᮹"],takr:["𑛀","𑛁","𑛂","𑛃","𑛄","𑛅","𑛆","𑛇","𑛈","𑛉"],talu:["᧐","᧑","᧒","᧓","᧔","᧕","᧖","᧗","᧘","᧙"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"],tirh:["𑓐","𑓑","𑓒","𑓓","𑓔","𑓕","𑓖","𑓗","𑓘","𑓙"],vaii:["ᘠ","ᘡ","ᘢ","ᘣ","ᘤ","ᘥ","ᘦ","ᘧ","ᘨ","ᘩ"],wara:["𑣠","𑣡","𑣢","𑣣","𑣤","𑣥","𑣦","𑣧","𑣨","𑣩"],wcho:["𞋰","𞋱","𞋲","𞋳","𞋴","𞋵","𞋶","𞋷","𞋸","𞋹"]},Kn=new RegExp("^".concat(Hn.source)),qn=new RegExp("".concat(Hn.source,"$")),$n=/[#0](?:[\.,][#0]+)*/g,Wn=n(1077),Yn=new Set([1,2,5,10,20,25,50,100,200,250,500,1e3,2e3,2500,5e3]);zn=Error,(0,mn.__extends)((function(){var e=null!==zn&&zn.apply(this,arguments)||this;return e.type="MISSING_LOCALE_DATA",e}),zn),function(e){e.startRange="startRange",e.shared="shared",e.endRange="endRange"}(Gn||(Gn={}))},6979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationRecordSign=function(e){for(var t=0,n=r.TABLE_1;t<n.length;t++){var o=n[t];if(e[o]<0)return-1;if(e[o]>0)return 1}return 0};var r=n(2552)},7332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetDurationUnitOptions=function(e,t,n,o,i,a){var u=(0,r.GetOption)(t,e,"string",o,void 0),s="always";void 0===u&&("digital"===n?("hours"!==e&&"minutes"!==e&&"seconds"!==e&&(s="auto"),u=i):(s="auto",u="numeric"===a||"2-digit"===a?"numeric":n));var c="".concat(e,"Display"),l=(0,r.GetOption)(t,c,"string",["always","auto"],s);if("numeric"===a||"2-digit"===a){if("numeric"!==u&&"2-digit"!==u)throw new RangeError("Can't mix numeric and non-numeric styles");if("minutes"!==e&&"seconds"!==e||(u="2-digit"),"numeric"===u&&"always"===l&&("milliseconds"===e||"microseconds"===e||"nanoseconds"===e))throw new RangeError("Can't display milliseconds, microseconds, or nanoseconds in numeric format")}return{style:u,display:l}};var r=n(7542)},1076:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IsValidDurationRecord=function(e){for(var t=(0,i.DurationRecordSign)(e),n=0,a=o.TABLE_1;n<a.length;n++){var u=a[n],s=e[u];if((0,r.invariant)(isFinite(Number(s)),"".concat(u," is not finite")),s<0&&t>0)return!1;if(s>0&&t<0)return!1}return!0};var r=n(7542),o=n(2552),i=n(6979)},984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PartitionDurationFormatPattern=function(e,t){var n=[],u=!1,s=!1,c=(0,a.getInternalSlots)(e),l=c.dataLocale,f=i.DurationFormat.localeData[l];if(!f)throw new TypeError("Invalid locale");for(var d=c.numberingSystem,h=f.digitalFormat[d],p=function(e){var i=o.TABLE_2[e],a=t[i.valueField],l=c[i.styleSlot],f=c[i.displaySlot],d=i.unit,p=i.numberFormatUnit,y=Object.create(null);if("seconds"!==d&&"milliseconds"!==d&&"microseconds"!==d||"numeric"===("seconds"===d?c.milliseconds:"milliseconds"===d?c.microseconds:c.nanoseconds)&&(a+="seconds"===d?t.milliseconds/1e3+t.microseconds/1e6+t.nanoseconds/1e9:"milliseconds"===d?t.microseconds/1e3+t.nanoseconds/1e6:t.nanoseconds/1e3,void 0===c.fractionalDigits?(y.maximumFractionDigits=9,y.minimumFractionDigits=0):(y.maximumFractionDigits=c.fractionalDigits,y.minimumFractionDigits=c.fractionalDigits),y.roundingMode="trunc",u=!0),0!==a||"auto"!==f){y.numberingSystem=c.numberingSystem,"2-digit"===l&&(y.minimumIntegerDigits=2),"2-digit"!==l&&"numeric"!==l&&(y.style="unit",y.unit=p,y.unitDisplay=l);var v,m=(0,r.createMemoizedNumberFormat)(c.locale,y);s?(v=n[n.length-1]).push({type:"literal",value:h}):v=[],m.formatToParts(a).forEach((function(e){var t=e.type,n=e.value;v.push({type:t,value:n,unit:p})})),s||("2-digit"!==l&&"numeric"!==l||(s=!0),n.push(v))}else s=!1},y=0;y<o.TABLE_2.length&&!u;y++)p(y);var v=Object.create(null);v.type="unit";var m=c.style;"digital"===m&&(m="short"),v.style=m;for(var g=(0,r.createMemoizedListFormat)(c.locale,v),b=[],w=0,_=n;w<_.length;w++){for(var S="",E=0,O=_[w];E<O.length;E++)S+=I=O[E].value;b.push(S)}for(var x=g.formatToParts(b),A=0,k=n.length,T=[],j=0,P=x;j<P.length;j++){var D=P[j],C=D.type,I=D.value;if("element"===C){(0,r.invariant)(A<k,"Index out of bounds");for(var M=0,N=n[A];M<N.length;M++){var R=N[M];T.push(R)}A++}else(0,r.invariant)("literal"===C,"Type must be literal"),T.push({type:"literal",value:I})}return T};var r=n(7542),o=n(2552),i=n(715),a=n(6732)},8905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToDurationRecord=function(e){if("object"!=typeof e){if("string"==typeof e)throw new RangeError("Invalid duration format");throw new TypeError("Invalid duration")}var t={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0};if(void 0!==e.days&&(t.days=(0,o.ToIntegerIfIntegral)(e.days)),void 0!==e.hours&&(t.hours=(0,o.ToIntegerIfIntegral)(e.hours)),void 0!==e.microseconds&&(t.microseconds=(0,o.ToIntegerIfIntegral)(e.microseconds)),void 0!==e.milliseconds&&(t.milliseconds=(0,o.ToIntegerIfIntegral)(e.milliseconds)),void 0!==e.minutes&&(t.minutes=(0,o.ToIntegerIfIntegral)(e.minutes)),void 0!==e.months&&(t.months=(0,o.ToIntegerIfIntegral)(e.months)),void 0!==e.nanoseconds&&(t.nanoseconds=(0,o.ToIntegerIfIntegral)(e.nanoseconds)),void 0!==e.seconds&&(t.seconds=(0,o.ToIntegerIfIntegral)(e.seconds)),void 0!==e.weeks&&(t.weeks=(0,o.ToIntegerIfIntegral)(e.weeks)),void 0!==e.years&&(t.years=(0,o.ToIntegerIfIntegral)(e.years)),void 0===e.years&&void 0===e.months&&void 0===e.weeks&&void 0===e.days&&void 0===e.hours&&void 0===e.minutes&&void 0===e.seconds&&void 0===e.milliseconds&&void 0===e.microseconds&&void 0===e.nanoseconds)throw new TypeError("Invalid duration format");if(!(0,r.IsValidDurationRecord)(t))throw new RangeError("Invalid duration format");return t};var r=n(1076),o=n(1370)},1370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToIntegerIfIntegral=function(e){var t=(0,r.ToNumber)(e);return(0,r.invariant)(t.isInteger(),"".concat(e," is not an integer")),t.toNumber()};var r=n(7542)},2552:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_2=t.TABLE_1=void 0,t.TABLE_1=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"],t.TABLE_2=[{valueField:"years",styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",numberFormatUnit:"year"},{valueField:"months",styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",numberFormatUnit:"month"},{valueField:"weeks",styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",numberFormatUnit:"week"},{valueField:"days",styleSlot:"days",displaySlot:"daysDisplay",unit:"days",numberFormatUnit:"day"},{valueField:"hours",styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",numberFormatUnit:"hour"},{valueField:"minutes",styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",numberFormatUnit:"minute"},{valueField:"seconds",styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",numberFormatUnit:"second"},{valueField:"milliseconds",styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",numberFormatUnit:"millisecond"},{valueField:"microseconds",styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",numberFormatUnit:"microsecond"},{valueField:"nanoseconds",styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",numberFormatUnit:"nanosecond"}]},715:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationFormat=void 0;var r=n(7542),o=n(1077),i=n(7332),a=n(984),u=n(8905),s=n(6732),c=n(743),l=n(2052),f=["locale","style","years","yearsDisplay","months","monthsDisplay","weeks","weeksDisplay","days","daysDisplay","hours","hoursDisplay","minutes","minutesDisplay","seconds","secondsDisplay","milliseconds","millisecondsDisplay","microseconds","microsecondsDisplay","nanoseconds","nanosecondsDisplay","numberingSystem","fractionalDigits"],d=[{styleSlot:"years",displaySlot:"yearsDisplay",unit:"years",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"months",displaySlot:"monthsDisplay",unit:"months",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"weeks",displaySlot:"weeksDisplay",unit:"weeks",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"days",displaySlot:"daysDisplay",unit:"days",values:["long","short","narrow"],digitalDefault:"short"},{styleSlot:"hours",displaySlot:"hoursDisplay",unit:"hours",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"minutes",displaySlot:"minutesDisplay",unit:"minutes",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"seconds",displaySlot:"secondsDisplay",unit:"seconds",values:["long","short","narrow","numeric","2-digit"],digitalDefault:"numeric"},{styleSlot:"milliseconds",displaySlot:"millisecondsDisplay",unit:"milliseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"microseconds",displaySlot:"microsecondsDisplay",unit:"microseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"},{styleSlot:"nanoseconds",displaySlot:"nanosecondsDisplay",unit:"nanoseconds",values:["long","short","narrow","numeric"],digitalDefault:"numeric"}],p=function(){function e(t,n){if(!(this&&h(this,e)?this.constructor:void 0))throw new TypeError("Intl.DurationFormat must be called with 'new'");var a=(0,r.CanonicalizeLocaleList)(t),u=Object.create(null),l=void 0===n?Object.create(null):(0,r.ToObject)(n),f=(0,r.GetOption)(l,"localeMatcher","string",["best fit","lookup"],"best fit"),p=(0,r.GetOption)(l,"numberingSystem","string",void 0,void 0);if(void 0!==p&&c.numberingSystemNames.indexOf(p)<0)throw RangeError("Invalid numberingSystems: ".concat(p));u.nu=p,u.localeMatcher=f;var y=e.localeData,v=e.availableLocales,m=(0,o.ResolveLocale)(v,a,u,["nu"],y,e.getDefaultLocale),g=m.locale,b=(0,s.getInternalSlots)(this);b.initializedDurationFormat=!0,b.locale=g,b.numberingSystem=m.nu;var w=(0,r.GetOption)(l,"style","string",["long","short","narrow","digital"],"short");b.style=w,b.dataLocale=m.dataLocale;var _="";d.forEach((function(e){var t=e.styleSlot,n=e.displaySlot,r=e.unit,o=e.values,a=e.digitalDefault,u=(0,i.GetDurationUnitOptions)(r,l,w,o,a,_);b[t]=u.style,b[n]=u.display,"hours"!==r&&"minutes"!==r&&"seconds"!==r&&"milliseconds"!==r&&"microseconds"!==r||(_=u.style)})),b.fractionalDigits=(0,r.GetNumberOption)(l,"fractionalDigits",0,9,void 0)}return e.prototype.resolvedOptions=function(){if("object"!=typeof this||!(0,r.OrdinaryHasInstance)(e,this))throw TypeError("Method Intl.DurationFormat.prototype.resolvedOptions called on incompatible receiver");for(var t=(0,s.getInternalSlots)(this),n={},o=0,i=f;o<i.length;o++){var a=i[o],u=t[a];"fractionalDigits"===a?void 0!==u&&(u=Number(u)):(0,r.invariant)(void 0!==u,"Missing internal slot ".concat(a)),n[a]=u}return n},e.prototype.formatToParts=function(e){if(void 0===(0,s.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,u.ToDurationRecord)(e),n=[],r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++){var i=o[r],c=i.type,l=i.unit,f={type:c,value:i.value};l&&(f.unit=l),n.push(f)}return n},e.prototype.format=function(e){if(void 0===(0,s.getInternalSlots)(this).initializedDurationFormat)throw new TypeError("Error uninitialized locale");for(var t=(0,u.ToDurationRecord)(e),n="",r=0,o=(0,a.PartitionDurationFormatPattern)(this,t);r<o.length;r++)n+=o[r].value;return n},e.supportedLocalesOf=function(t,n){return(0,r.SupportedLocales)(e.availableLocales,(0,r.CanonicalizeLocaleList)(t),n)},e.__defaultLocale="en",e.availableLocales=new Set,e.localeData=Object.keys(l.TIME_SEPARATORS.localeData).reduce((function(t,n){e.availableLocales.add(n);var r=l.TIME_SEPARATORS.localeData[n].nu;return t[n]={nu:r,digitalFormat:l.TIME_SEPARATORS.localeData[n].separator||r.reduce((function(e,t){return e[t]=l.TIME_SEPARATORS.default,e}),{})},t}),{}),e.getDefaultLocale=function(){return e.__defaultLocale},e.polyfilled=!0,e}();t.DurationFormat=p},6732:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInternalSlots=function(e){var t=n.get(e);return t||(t=Object.create(null),n.set(e,t)),t};var n=new WeakMap},743:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberingSystemNames=void 0,t.numberingSystemNames=["adlm","ahom","arab","arabext","armn","armnlow","bali","beng","bhks","brah","cakm","cham","cyrl","deva","diak","ethi","fullwide","gara","geor","gong","gonm","grek","greklow","gujr","gukh","guru","hanidays","hanidec","hans","hansfin","hant","hantfin","hebr","hmng","hmnp","java","jpan","jpanfin","jpanyear","kali","kawi","khmr","knda","krai","lana","lanatham","laoo","latn","lepc","limb","mathbold","mathdbl","mathmono","mathsanb","mathsans","mlym","modi","mong","mroo","mtei","mymr","mymrepka","mymrpao","mymrshan","mymrtlng","nagm","newa","nkoo","olck","onao","orya","osma","outlined","rohg","roman","romanlow","saur","segment","shrd","sind","sinh","sora","sund","sunu","takr","talu","taml","tamldec","telu","thai","tibt","tirh","tnsa","vaii","wara","wcho"]},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TIME_SEPARATORS=void 0,t.TIME_SEPARATORS={default:":",localeData:{aa:{nu:["latn"]},"aa-DJ":{nu:["latn"]},"aa-ER":{nu:["latn"]},ab:{nu:["latn"]},af:{nu:["latn"]},"af-NA":{nu:["latn"]},agq:{nu:["latn"]},ak:{nu:["latn"]},am:{nu:["latn"]},an:{nu:["latn"]},ann:{nu:["latn"]},apc:{nu:["latn"]},ar:{nu:["latn","latn"]},"ar-AE":{nu:["latn","latn"]},"ar-BH":{nu:["arab","latn"]},"ar-DJ":{nu:["arab","latn"]},"ar-DZ":{nu:["latn","latn"]},"ar-EG":{nu:["arab","latn"]},"ar-EH":{nu:["latn","latn"]},"ar-ER":{nu:["arab","latn"]},"ar-IL":{nu:["arab","latn"]},"ar-IQ":{nu:["arab","latn"]},"ar-JO":{nu:["arab","latn"]},"ar-KM":{nu:["arab","latn"]},"ar-KW":{nu:["arab","latn"]},"ar-LB":{nu:["arab","latn"]},"ar-LY":{nu:["latn","latn"]},"ar-MA":{nu:["latn","latn"]},"ar-MR":{nu:["arab","latn"]},"ar-OM":{nu:["arab","latn"]},"ar-PS":{nu:["arab","latn"]},"ar-QA":{nu:["arab","latn"]},"ar-SA":{nu:["arab","latn"]},"ar-SD":{nu:["arab","latn"]},"ar-SO":{nu:["arab","latn"]},"ar-SS":{nu:["arab","latn"]},"ar-SY":{nu:["arab","latn"]},"ar-TD":{nu:["arab","latn"]},"ar-TN":{nu:["latn","latn"]},"ar-YE":{nu:["arab","latn"]},arn:{nu:["latn"]},as:{nu:["beng"]},asa:{nu:["latn"]},ast:{nu:["latn"]},az:{nu:["latn"]},"az-Arab":{nu:["arabext"]},"az-Arab-IQ":{nu:["arabext"]},"az-Arab-TR":{nu:["arabext"]},"az-Cyrl":{nu:["latn"]},"az-Latn":{nu:["latn"]},ba:{nu:["latn"]},bal:{nu:["latn"]},"bal-Arab":{nu:["latn"]},"bal-Latn":{nu:["latn"]},bas:{nu:["latn"]},be:{nu:["latn"]},"be-tarask":{nu:["latn"]},bem:{nu:["latn"]},bew:{nu:["latn"]},bez:{nu:["latn"]},bg:{nu:["latn"]},bgc:{nu:["deva"]},bgn:{nu:["arabext"]},"bgn-AE":{nu:["arabext"]},"bgn-AF":{nu:["arabext"]},"bgn-IR":{nu:["arabext"]},"bgn-OM":{nu:["arabext"]},bho:{nu:["deva"]},blo:{nu:["latn"]},blt:{nu:["latn"]},bm:{nu:["latn"]},"bm-Nkoo":{nu:["latn"]},bn:{nu:["beng"]},"bn-IN":{nu:["beng"]},bo:{nu:["latn"]},"bo-IN":{nu:["latn"]},br:{nu:["latn"]},brx:{nu:["latn"]},bs:{nu:["latn"]},"bs-Cyrl":{nu:["latn"]},"bs-Latn":{nu:["latn"]},bss:{nu:["latn"]},byn:{nu:["latn"]},ca:{nu:["latn"]},"ca-AD":{nu:["latn"]},"ca-ES-valencia":{nu:["latn"]},"ca-FR":{nu:["latn"]},"ca-IT":{nu:["latn"]},cad:{nu:["latn"]},cch:{nu:["latn"]},ccp:{nu:["cakm"]},"ccp-IN":{nu:["cakm"]},ce:{nu:["latn"]},ceb:{nu:["latn"]},cgg:{nu:["latn"]},cho:{nu:["latn"]},chr:{nu:["latn"]},cic:{nu:["latn"]},ckb:{nu:["arab"]},"ckb-IR":{nu:["arab"]},co:{nu:["latn"]},cs:{nu:["latn"]},csw:{nu:["latn"]},cu:{nu:["latn"]},cv:{nu:["latn"]},cy:{nu:["latn"]},da:{nu:["latn"],separator:{latn:"."}},"da-GL":{nu:["latn"],separator:{latn:"."}},dav:{nu:["latn"]},de:{nu:["latn"]},"de-AT":{nu:["latn"]},"de-BE":{nu:["latn"]},"de-CH":{nu:["latn"]},"de-IT":{nu:["latn"]},"de-LI":{nu:["latn"]},"de-LU":{nu:["latn"]},dje:{nu:["latn"]},doi:{nu:["latn"]},dsb:{nu:["latn"]},dua:{nu:["latn"]},dv:{nu:["latn"]},dyo:{nu:["latn"]},dz:{nu:["tibt"]},ebu:{nu:["latn"]},ee:{nu:["latn"]},"ee-TG":{nu:["latn"]},el:{nu:["latn"]},"el-CY":{nu:["latn"]},"el-polyton":{nu:["latn"]},en:{nu:["latn"]},"en-001":{nu:["latn"]},"en-150":{nu:["latn"]},"en-AE":{nu:["latn"]},"en-AG":{nu:["latn"]},"en-AI":{nu:["latn"]},"en-AS":{nu:["latn"]},"en-AT":{nu:["latn"]},"en-AU":{nu:["latn"]},"en-BB":{nu:["latn"]},"en-BE":{nu:["latn"]},"en-BI":{nu:["latn"]},"en-BM":{nu:["latn"]},"en-BS":{nu:["latn"]},"en-BW":{nu:["latn"]},"en-BZ":{nu:["latn"]},"en-CA":{nu:["latn"]},"en-CC":{nu:["latn"]},"en-CH":{nu:["latn"]},"en-CK":{nu:["latn"]},"en-CM":{nu:["latn"]},"en-CX":{nu:["latn"]},"en-CY":{nu:["latn"]},"en-DE":{nu:["latn"]},"en-DG":{nu:["latn"]},"en-DK":{nu:["latn"],separator:{latn:"."}},"en-DM":{nu:["latn"]},"en-Dsrt":{nu:["latn"]},"en-ER":{nu:["latn"]},"en-FI":{nu:["latn"],separator:{latn:"."}},"en-FJ":{nu:["latn"]},"en-FK":{nu:["latn"]},"en-FM":{nu:["latn"]},"en-GB":{nu:["latn"]},"en-GD":{nu:["latn"]},"en-GG":{nu:["latn"]},"en-GH":{nu:["latn"]},"en-GI":{nu:["latn"]},"en-GM":{nu:["latn"]},"en-GU":{nu:["latn"]},"en-GY":{nu:["latn"]},"en-HK":{nu:["latn"]},"en-ID":{nu:["latn"]},"en-IE":{nu:["latn"]},"en-IL":{nu:["latn"]},"en-IM":{nu:["latn"]},"en-IN":{nu:["latn"]},"en-IO":{nu:["latn"]},"en-JE":{nu:["latn"]},"en-JM":{nu:["latn"]},"en-KE":{nu:["latn"]},"en-KI":{nu:["latn"]},"en-KN":{nu:["latn"]},"en-KY":{nu:["latn"]},"en-LC":{nu:["latn"]},"en-LR":{nu:["latn"]},"en-LS":{nu:["latn"]},"en-MG":{nu:["latn"]},"en-MH":{nu:["latn"]},"en-MO":{nu:["latn"]},"en-MP":{nu:["latn"]},"en-MS":{nu:["latn"]},"en-MT":{nu:["latn"]},"en-MU":{nu:["latn"]},"en-MV":{nu:["latn"]},"en-MW":{nu:["latn"]},"en-MY":{nu:["latn"]},"en-NA":{nu:["latn"]},"en-NF":{nu:["latn"]},"en-NG":{nu:["latn"]},"en-NL":{nu:["latn"]},"en-NR":{nu:["latn"]},"en-NU":{nu:["latn"]},"en-NZ":{nu:["latn"]},"en-PG":{nu:["latn"]},"en-PH":{nu:["latn"]},"en-PK":{nu:["latn"]},"en-PN":{nu:["latn"]},"en-PR":{nu:["latn"]},"en-PW":{nu:["latn"]},"en-RW":{nu:["latn"]},"en-SB":{nu:["latn"]},"en-SC":{nu:["latn"]},"en-SD":{nu:["latn"]},"en-SE":{nu:["latn"]},"en-SG":{nu:["latn"]},"en-SH":{nu:["latn"]},"en-SI":{nu:["latn"]},"en-SL":{nu:["latn"]},"en-SS":{nu:["latn"]},"en-SX":{nu:["latn"]},"en-SZ":{nu:["latn"]},"en-Shaw":{nu:["latn"]},"en-TC":{nu:["latn"]},"en-TK":{nu:["latn"]},"en-TO":{nu:["latn"]},"en-TT":{nu:["latn"]},"en-TV":{nu:["latn"]},"en-TZ":{nu:["latn"]},"en-UG":{nu:["latn"]},"en-UM":{nu:["latn"]},"en-VC":{nu:["latn"]},"en-VG":{nu:["latn"]},"en-VI":{nu:["latn"]},"en-VU":{nu:["latn"]},"en-WS":{nu:["latn"]},"en-ZA":{nu:["latn"]},"en-ZM":{nu:["latn"]},"en-ZW":{nu:["latn"]},eo:{nu:["latn"]},es:{nu:["latn"]},"es-419":{nu:["latn"]},"es-AR":{nu:["latn"]},"es-BO":{nu:["latn"]},"es-BR":{nu:["latn"]},"es-BZ":{nu:["latn"]},"es-CL":{nu:["latn"]},"es-CO":{nu:["latn"]},"es-CR":{nu:["latn"]},"es-CU":{nu:["latn"]},"es-DO":{nu:["latn"]},"es-EA":{nu:["latn"]},"es-EC":{nu:["latn"]},"es-GQ":{nu:["latn"]},"es-GT":{nu:["latn"]},"es-HN":{nu:["latn"]},"es-IC":{nu:["latn"]},"es-MX":{nu:["latn"]},"es-NI":{nu:["latn"]},"es-PA":{nu:["latn"]},"es-PE":{nu:["latn"]},"es-PH":{nu:["latn"]},"es-PR":{nu:["latn"]},"es-PY":{nu:["latn"]},"es-SV":{nu:["latn"]},"es-US":{nu:["latn"]},"es-UY":{nu:["latn"]},"es-VE":{nu:["latn"]},et:{nu:["latn"]},eu:{nu:["latn"]},ewo:{nu:["latn"]},fa:{nu:["arabext"]},"fa-AF":{nu:["arabext"]},ff:{nu:["latn"]},"ff-Adlm":{nu:["adlm"]},"ff-Adlm-BF":{nu:["adlm"]},"ff-Adlm-CM":{nu:["adlm"]},"ff-Adlm-GH":{nu:["adlm"]},"ff-Adlm-GM":{nu:["adlm"]},"ff-Adlm-GW":{nu:["adlm"]},"ff-Adlm-LR":{nu:["adlm"]},"ff-Adlm-MR":{nu:["adlm"]},"ff-Adlm-NE":{nu:["adlm"]},"ff-Adlm-NG":{nu:["adlm"]},"ff-Adlm-SL":{nu:["adlm"]},"ff-Adlm-SN":{nu:["adlm"]},"ff-Latn":{nu:["latn"]},"ff-Latn-BF":{nu:["latn"]},"ff-Latn-CM":{nu:["latn"]},"ff-Latn-GH":{nu:["latn"]},"ff-Latn-GM":{nu:["latn"]},"ff-Latn-GN":{nu:["latn"]},"ff-Latn-GW":{nu:["latn"]},"ff-Latn-LR":{nu:["latn"]},"ff-Latn-MR":{nu:["latn"]},"ff-Latn-NE":{nu:["latn"]},"ff-Latn-NG":{nu:["latn"]},"ff-Latn-SL":{nu:["latn"]},fi:{nu:["latn"],separator:{latn:"."}},fil:{nu:["latn"]},fo:{nu:["latn"]},"fo-DK":{nu:["latn"]},fr:{nu:["latn"]},"fr-BE":{nu:["latn"]},"fr-BF":{nu:["latn"]},"fr-BI":{nu:["latn"]},"fr-BJ":{nu:["latn"]},"fr-BL":{nu:["latn"]},"fr-CA":{nu:["latn"]},"fr-CD":{nu:["latn"]},"fr-CF":{nu:["latn"]},"fr-CG":{nu:["latn"]},"fr-CH":{nu:["latn"]},"fr-CI":{nu:["latn"]},"fr-CM":{nu:["latn"]},"fr-DJ":{nu:["latn"]},"fr-DZ":{nu:["latn"]},"fr-GA":{nu:["latn"]},"fr-GF":{nu:["latn"]},"fr-GN":{nu:["latn"]},"fr-GP":{nu:["latn"]},"fr-GQ":{nu:["latn"]},"fr-HT":{nu:["latn"]},"fr-KM":{nu:["latn"]},"fr-LU":{nu:["latn"]},"fr-MA":{nu:["latn"]},"fr-MC":{nu:["latn"]},"fr-MF":{nu:["latn"]},"fr-MG":{nu:["latn"]},"fr-ML":{nu:["latn"]},"fr-MQ":{nu:["latn"]},"fr-MR":{nu:["latn"]},"fr-MU":{nu:["latn"]},"fr-NC":{nu:["latn"]},"fr-NE":{nu:["latn"]},"fr-PF":{nu:["latn"]},"fr-PM":{nu:["latn"]},"fr-RE":{nu:["latn"]},"fr-RW":{nu:["latn"]},"fr-SC":{nu:["latn"]},"fr-SN":{nu:["latn"]},"fr-SY":{nu:["latn"]},"fr-TD":{nu:["latn"]},"fr-TG":{nu:["latn"]},"fr-TN":{nu:["latn"]},"fr-VU":{nu:["latn"]},"fr-WF":{nu:["latn"]},"fr-YT":{nu:["latn"]},frr:{nu:["latn"]},fur:{nu:["latn"]},fy:{nu:["latn"]},ga:{nu:["latn"]},"ga-GB":{nu:["latn"]},gaa:{nu:["latn"]},gd:{nu:["latn"]},gez:{nu:["latn"]},"gez-ER":{nu:["latn"]},gl:{nu:["latn"]},gn:{nu:["latn"]},gsw:{nu:["latn"]},"gsw-FR":{nu:["latn"]},"gsw-LI":{nu:["latn"]},gu:{nu:["latn"]},guz:{nu:["latn"]},gv:{nu:["latn"]},ha:{nu:["latn"]},"ha-Arab":{nu:["latn"]},"ha-Arab-SD":{nu:["latn"]},"ha-GH":{nu:["latn"]},"ha-NE":{nu:["latn"]},haw:{nu:["latn"]},he:{nu:["latn"]},hi:{nu:["latn"]},"hi-Latn":{nu:["latn"]},hnj:{nu:["hmnp","latn"]},"hnj-Hmnp":{nu:["hmnp","latn"]},hr:{nu:["latn"]},"hr-BA":{nu:["latn"]},hsb:{nu:["latn"]},hu:{nu:["latn"]},hy:{nu:["latn"]},ia:{nu:["latn"]},id:{nu:["latn"],separator:{latn:"."}},ie:{nu:["latn"]},ig:{nu:["latn"]},ii:{nu:["latn"]},io:{nu:["latn"]},is:{nu:["latn"]},it:{nu:["latn"]},"it-CH":{nu:["latn"]},"it-SM":{nu:["latn"]},"it-VA":{nu:["latn"]},iu:{nu:["latn"]},"iu-Latn":{nu:["latn"]},ja:{nu:["latn"]},jbo:{nu:["latn"]},jgo:{nu:["latn"]},jmc:{nu:["latn"]},jv:{nu:["latn"]},ka:{nu:["latn"]},kaa:{nu:["latn"]},"kaa-Cyrl":{nu:["latn"]},"kaa-Latn":{nu:["latn"]},kab:{nu:["latn"]},kaj:{nu:["latn"]},kam:{nu:["latn"]},kcg:{nu:["latn"]},kde:{nu:["latn"]},kea:{nu:["latn"]},ken:{nu:["latn"]},kgp:{nu:["latn"]},khq:{nu:["latn"]},ki:{nu:["latn"]},kk:{nu:["latn"]},"kk-Arab":{nu:["latn"]},"kk-Cyrl":{nu:["latn"]},"kk-KZ":{nu:["latn"]},kkj:{nu:["latn"]},kl:{nu:["latn"]},kln:{nu:["latn"]},km:{nu:["latn"]},kn:{nu:["latn"]},ko:{nu:["latn"]},"ko-CN":{nu:["latn"]},"ko-KP":{nu:["latn"]},kok:{nu:["latn"]},"kok-Deva":{nu:["latn"]},"kok-Latn":{nu:["latn"]},kpe:{nu:["latn"]},"kpe-GN":{nu:["latn"]},ks:{nu:["arabext"]},"ks-Arab":{nu:["arabext"]},"ks-Deva":{nu:["latn"]},ksb:{nu:["latn"]},ksf:{nu:["latn"]},ksh:{nu:["latn"]},ku:{nu:["latn"]},kw:{nu:["latn"]},kxv:{nu:["latn"]},"kxv-Deva":{nu:["latn"]},"kxv-Latn":{nu:["latn"]},"kxv-Orya":{nu:["latn"]},"kxv-Telu":{nu:["latn"]},ky:{nu:["latn"]},la:{nu:["latn"]},lag:{nu:["latn"]},lb:{nu:["latn"]},lg:{nu:["latn"]},lij:{nu:["latn"]},lkt:{nu:["latn"]},lld:{nu:["latn"]},lmo:{nu:["latn"]},ln:{nu:["latn"]},"ln-AO":{nu:["latn"]},"ln-CF":{nu:["latn"]},"ln-CG":{nu:["latn"]},lo:{nu:["latn"]},lrc:{nu:["arabext"]},"lrc-IQ":{nu:["arabext"]},lt:{nu:["latn"]},ltg:{nu:["latn"]},lu:{nu:["latn"]},luo:{nu:["latn"]},luy:{nu:["latn"]},lv:{nu:["latn"]},mai:{nu:["latn"]},mas:{nu:["latn"]},"mas-TZ":{nu:["latn"]},mdf:{nu:["latn"]},mer:{nu:["latn"]},mfe:{nu:["latn"]},mg:{nu:["latn"]},mgh:{nu:["latn"]},mgo:{nu:["latn"]},mhn:{nu:["latn"]},mi:{nu:["latn"]},mic:{nu:["latn"]},mk:{nu:["latn"]},ml:{nu:["latn"]},mn:{nu:["latn"]},"mn-Mong":{nu:["latn"]},"mn-Mong-MN":{nu:["latn"]},mni:{nu:["beng"]},"mni-Beng":{nu:["beng"]},"mni-Mtei":{nu:["mtei"]},moh:{nu:["latn"]},mr:{nu:["deva"]},ms:{nu:["latn"]},"ms-Arab":{nu:["latn"]},"ms-Arab-BN":{nu:["latn"]},"ms-BN":{nu:["latn"]},"ms-ID":{nu:["latn"],separator:{latn:"."}},"ms-SG":{nu:["latn"]},mt:{nu:["latn"]},mua:{nu:["latn"]},mus:{nu:["latn"]},my:{nu:["mymr"]},myv:{nu:["latn"]},mzn:{nu:["arabext"]},naq:{nu:["latn"]},nb:{nu:["latn"]},"nb-SJ":{nu:["latn"]},nd:{nu:["latn"]},nds:{nu:["latn"]},"nds-NL":{nu:["latn"]},ne:{nu:["deva"]},"ne-IN":{nu:["deva"]},nl:{nu:["latn"]},"nl-AW":{nu:["latn"]},"nl-BE":{nu:["latn"]},"nl-BQ":{nu:["latn"]},"nl-CW":{nu:["latn"]},"nl-SR":{nu:["latn"]},"nl-SX":{nu:["latn"]},nmg:{nu:["latn"]},nn:{nu:["latn"]},nnh:{nu:["latn"]},no:{nu:["latn"]},nqo:{nu:["nkoo"]},nr:{nu:["latn"]},nso:{nu:["latn"]},nus:{nu:["latn"]},nv:{nu:["latn"]},ny:{nu:["latn"]},nyn:{nu:["latn"]},oc:{nu:["latn"]},"oc-ES":{nu:["latn"]},om:{nu:["latn"]},"om-KE":{nu:["latn"]},or:{nu:["latn"]},os:{nu:["latn"]},"os-RU":{nu:["latn"]},osa:{nu:["latn"]},pa:{nu:["latn"]},"pa-Arab":{nu:["arabext"]},"pa-Guru":{nu:["latn"]},pap:{nu:["latn"]},"pap-AW":{nu:["latn"]},pcm:{nu:["latn"]},pis:{nu:["latn"]},pl:{nu:["latn"]},prg:{nu:["latn"]},ps:{nu:["arabext"]},"ps-PK":{nu:["arabext"]},pt:{nu:["latn"]},"pt-AO":{nu:["latn"]},"pt-CH":{nu:["latn"]},"pt-CV":{nu:["latn"]},"pt-GQ":{nu:["latn"]},"pt-GW":{nu:["latn"]},"pt-LU":{nu:["latn"]},"pt-MO":{nu:["latn"]},"pt-MZ":{nu:["latn"]},"pt-PT":{nu:["latn"]},"pt-ST":{nu:["latn"]},"pt-TL":{nu:["latn"]},qu:{nu:["latn"]},"qu-BO":{nu:["latn"]},"qu-EC":{nu:["latn"]},quc:{nu:["latn"]},raj:{nu:["deva"]},rhg:{nu:["latn"]},"rhg-Rohg":{nu:["latn"]},"rhg-Rohg-BD":{nu:["latn"]},rif:{nu:["latn"]},rm:{nu:["latn"]},rn:{nu:["latn"]},ro:{nu:["latn"]},"ro-MD":{nu:["latn"]},rof:{nu:["latn"]},ru:{nu:["latn"]},"ru-BY":{nu:["latn"]},"ru-KG":{nu:["latn"]},"ru-KZ":{nu:["latn"]},"ru-MD":{nu:["latn"]},"ru-UA":{nu:["latn"]},rw:{nu:["latn"]},rwk:{nu:["latn"]},sa:{nu:["deva"]},sah:{nu:["latn"]},saq:{nu:["latn"]},sat:{nu:["olck"]},"sat-Deva":{nu:["deva"]},"sat-Olck":{nu:["olck"]},sbp:{nu:["latn"]},sc:{nu:["latn"]},scn:{nu:["latn"]},sd:{nu:["arab"]},"sd-Arab":{nu:["arab"]},"sd-Deva":{nu:["latn"]},sdh:{nu:["arab"]},"sdh-IQ":{nu:["arab"]},se:{nu:["latn"]},"se-FI":{nu:["latn"]},"se-SE":{nu:["latn"]},seh:{nu:["latn"]},ses:{nu:["latn"]},sg:{nu:["latn"]},shi:{nu:["latn"]},"shi-Latn":{nu:["latn"]},"shi-Tfng":{nu:["latn"]},shn:{nu:["latn"]},"shn-TH":{nu:["latn"]},si:{nu:["latn"],separator:{latn:"."}},sid:{nu:["latn"]},sk:{nu:["latn"]},skr:{nu:["latn"]},sl:{nu:["latn"]},sma:{nu:["latn"]},"sma-NO":{nu:["latn"]},smj:{nu:["latn"]},"smj-NO":{nu:["latn"]},smn:{nu:["latn"],separator:{latn:"."}},sms:{nu:["latn"]},sn:{nu:["latn"]},so:{nu:["latn"]},"so-DJ":{nu:["latn"]},"so-ET":{nu:["latn"]},"so-KE":{nu:["latn"]},sq:{nu:["latn"]},"sq-MK":{nu:["latn"]},"sq-XK":{nu:["latn"]},sr:{nu:["latn"]},"sr-Cyrl":{nu:["latn"]},"sr-Cyrl-BA":{nu:["latn"]},"sr-Cyrl-ME":{nu:["latn"]},"sr-Cyrl-XK":{nu:["latn"]},"sr-Latn":{nu:["latn"]},"sr-Latn-BA":{nu:["latn"]},"sr-Latn-ME":{nu:["latn"]},"sr-Latn-XK":{nu:["latn"]},ss:{nu:["latn"]},"ss-SZ":{nu:["latn"]},ssy:{nu:["latn"]},st:{nu:["latn"]},"st-LS":{nu:["latn"]},su:{nu:["latn"],separator:{latn:"."}},"su-Latn":{nu:["latn"],separator:{latn:"."}},sv:{nu:["latn"]},"sv-AX":{nu:["latn"]},"sv-FI":{nu:["latn"],separator:{latn:"."}},sw:{nu:["latn"]},"sw-CD":{nu:["latn"]},"sw-KE":{nu:["latn"]},"sw-UG":{nu:["latn"]},syr:{nu:["latn"]},"syr-SY":{nu:["latn"]},szl:{nu:["latn"]},ta:{nu:["latn"]},"ta-LK":{nu:["latn"]},"ta-MY":{nu:["latn"]},"ta-SG":{nu:["latn"]},te:{nu:["latn"]},teo:{nu:["latn"]},"teo-KE":{nu:["latn"]},tg:{nu:["latn"]},th:{nu:["latn"]},ti:{nu:["latn"]},"ti-ER":{nu:["latn"]},tig:{nu:["latn"]},tk:{nu:["latn"]},tn:{nu:["latn"]},"tn-BW":{nu:["latn"]},to:{nu:["latn"]},tok:{nu:["latn"]},tpi:{nu:["latn"]},tr:{nu:["latn"]},"tr-CY":{nu:["latn"]},trv:{nu:["latn"]},trw:{nu:["latn"]},ts:{nu:["latn"]},tt:{nu:["latn"]},twq:{nu:["latn"]},tyv:{nu:["latn"]},tzm:{nu:["latn"]},ug:{nu:["latn"]},uk:{nu:["latn"]},und:{nu:["latn"]},ur:{nu:["latn"]},"ur-IN":{nu:["arabext"],separator:{arabext:"٫"}},uz:{nu:["latn"]},"uz-Arab":{nu:["arabext"]},"uz-Cyrl":{nu:["latn"]},"uz-Latn":{nu:["latn"]},vai:{nu:["latn"]},"vai-Latn":{nu:["latn"]},"vai-Vaii":{nu:["latn"]},ve:{nu:["latn"]},vec:{nu:["latn"]},vi:{nu:["latn"]},vmw:{nu:["latn"]},vo:{nu:["latn"]},vun:{nu:["latn"]},wa:{nu:["latn"]},wae:{nu:["latn"]},wal:{nu:["latn"]},wbp:{nu:["latn"]},wo:{nu:["latn"]},xh:{nu:["latn"]},xnr:{nu:["latn"]},xog:{nu:["latn"]},yav:{nu:["latn"]},yi:{nu:["latn"]},yo:{nu:["latn"]},"yo-BJ":{nu:["latn"]},yrl:{nu:["latn"]},"yrl-CO":{nu:["latn"]},"yrl-VE":{nu:["latn"]},yue:{nu:["latn"]},"yue-Hans":{nu:["latn"]},"yue-Hant":{nu:["latn"]},"yue-Hant-CN":{nu:["latn"]},za:{nu:["latn"]},zgh:{nu:["latn"]},zh:{nu:["latn"]},"zh-Hans":{nu:["latn"]},"zh-Hans-HK":{nu:["latn"]},"zh-Hans-MO":{nu:["latn"]},"zh-Hans-MY":{nu:["latn"]},"zh-Hans-SG":{nu:["latn"]},"zh-Hant":{nu:["latn"]},"zh-Hant-HK":{nu:["latn"]},"zh-Hant-MO":{nu:["latn"]},"zh-Hant-MY":{nu:["latn"]},"zh-Latn":{nu:["latn"]},zu:{nu:["latn"]}}}},1077:function(e,t,n){"use strict";var r=function(e,t,n){if(void 0===n&&(n=Error),!e)throw new n(t)},o=function(e,t,n){var r=t.split("-"),o=r[0],i=r[1],a=r[2],u=!0;if(a&&"$"===a[0]){var s="!"!==a[1],c=(s?n[a.slice(1)]:n[a.slice(2)]).map((function(e){return v[e]||[e]})).reduce((function(e,t){return(0,p.__spreadArray)((0,p.__spreadArray)([],e,!0),t,!0)}),[]);u&&(u=!(c.indexOf(e.region||"")>-1!=s))}else u&&(u=!e.region||"*"===a||a===e.region);return u&&(u=!e.script||"*"===i||i===e.script),u&&(u=!e.language||"*"===o||o===e.language),u},i=function(e){return[e.language,e.script,e.region].filter(Boolean).join("-")},a=function(e,t,n){for(var r=0,a=n.matches;r<a.length;r++){var u=a[r],s=o(e,u.desired,n.matchVariables)&&o(t,u.supported,n.matchVariables);if(u.oneway||s||(s=o(e,u.supported,n.matchVariables)&&o(t,u.desired,n.matchVariables)),s){var c=10*u.distance;return n.paradigmLocales.indexOf(i(e))>-1!=n.paradigmLocales.indexOf(i(t))>-1?c-1:c}}throw new Error("No matching distance found")},u=function(e,t,n){var r,o,i=[],u=t.reduce((function(e,t){var n=t.replace(m,"");return i.push(n),e[n]=t,e}),{}),s=function(e,t,n){void 0===n&&(n=g);var r=1/0,o={matchedDesiredLocale:"",distances:{}};return e.forEach((function(e,n){o.distances[e]||(o.distances[e]={}),t.forEach((function(t){var i=function(e,t){var n=new Intl.Locale(e).maximize(),r=new Intl.Locale(t).maximize(),o={language:n.language,script:n.script||"",region:n.region||""},i={language:r.language,script:r.script||"",region:r.region||""},u=0,s=function(){var e,t;if(!h){var n=null===(t=null===(e=y.supplemental.languageMatching["written-new"][0])||void 0===e?void 0:e.paradigmLocales)||void 0===t?void 0:t._locales.split(" "),r=y.supplemental.languageMatching["written-new"].slice(1,5),o=y.supplemental.languageMatching["written-new"].slice(5).map((function(e){var t=Object.keys(e)[0],n=e[t];return{supported:t,desired:n._desired,distance:+n._distance,oneway:"true"===n.oneway}}),{});h={matches:o,matchVariables:r.reduce((function(e,t){var n=Object.keys(t)[0],r=t[n];return e[n.slice(1)]=r._value.split("+"),e}),{}),paradigmLocales:(0,p.__spreadArray)((0,p.__spreadArray)([],n,!0),n.map((function(e){return new Intl.Locale(e.replace(/_/g,"-")).maximize().toString()})),!0)}}return h}();return o.language!==i.language&&(u+=a({language:n.language,script:"",region:""},{language:r.language,script:"",region:""},s)),o.script!==i.script&&(u+=a({language:n.language,script:o.script,region:""},{language:r.language,script:i.script,region:""},s)),o.region!==i.region&&(u+=a(o,i,s)),u}(e,t)+0+40*n;o.distances[e][t]=i,i<r&&(r=i,o.matchedDesiredLocale=e,o.matchedSupportedLocale=t)}))})),r>=n&&(o.matchedDesiredLocale=void 0,o.matchedSupportedLocale=void 0),o}(i,e);return s.matchedSupportedLocale&&s.matchedDesiredLocale&&(r=s.matchedSupportedLocale,o=u[s.matchedDesiredLocale].slice(s.matchedDesiredLocale.length)||void 0),r?{locale:r,extension:o}:{locale:n()}},s=function(e){return Intl.getCanonicalLocales(e)[0]},c=function(e,t){for(var n=t;;){if(e.indexOf(n)>-1)return n;var r=n.lastIndexOf("-");if(!~r)return;r>=2&&"-"===n[r-2]&&(r-=2),n=n.slice(0,r)}},l=function(e,t,n,o,i,a){var l,f;f="lookup"===n.localeMatcher?function(e,t,n){for(var r={locale:""},o=0,i=t;o<i.length;o++){var a=i[o],u=a.replace(m,""),s=c(e,u);if(s)return r.locale=s,a!==u&&(r.extension=a.slice(u.length,a.length)),r}return r.locale=n(),r}(Array.from(e),t,a):u(Array.from(e),t,a),null==f&&(f={locale:a(),extension:""});var d,h,p=f.locale,y=i[p],v={locale:"en",dataLocale:p};f.extension?(d=function(e){r(e===e.toLowerCase(),"Expected extension to be lowercase"),r("-u-"===e.slice(0,3),"Expected extension to be a Unicode locale extension");for(var t,n=[],o=[],i=e.length,a=3;a<i;){var u,s=e.indexOf("-",a);u=-1===s?i-a:s-a;var c=e.slice(a,a+u);r(u>=2,"Expected a subtag to have at least 2 characters"),void 0===t&&2!=u?-1===n.indexOf(c)&&n.push(c):2===u?(t={key:c,value:""},void 0===o.find((function(e){return e.key===(null==t?void 0:t.key)}))&&o.push(t)):""===(null==t?void 0:t.value)?t.value=c:(r(void 0!==t,"Expected keyword to be defined"),t.value+="-"+c),a+=u+1}return{attributes:n,keywords:o}}(f.extension),h=d.keywords):h=[];for(var g=[],b=function(e){var t=null!==(l=null==y?void 0:y[e])&&void 0!==l?l:[];r(Array.isArray(t),"keyLocaleData for ".concat(e," must be an array"));var o=t[0];r(void 0===o||"string"==typeof o,"value must be a string or undefined");var i=void 0,a=h.find((function(t){return t.key===e}));if(a){var u=a.value;""!==u?t.indexOf(u)>-1&&(i={key:e,value:o=u}):t.indexOf("true")>-1&&(i={key:e,value:o="true"})}var s,c,f=n[e];r(null==f||"string"==typeof f,"optionsValue must be a string or undefined"),"string"==typeof f&&(s=e.toLowerCase(),c=f.toLowerCase(),r(void 0!==s,"ukey must be defined"),""===(f=c)&&(f="true")),f!==o&&t.indexOf(f)>-1&&(o=f,i=void 0),i&&g.push(i),v[e]=o},w=0,_=o;w<_.length;w++)b(_[w]);return g.length>0&&(p=function(e,t,n){r(-1===e.indexOf("-u-"),"Expected locale to not have a Unicode locale extension");for(var o="-u",i=0,a=[];i<a.length;i++)o+="-".concat(a[i]);for(var u=0,c=n;u<c.length;u++){var l=c[u],f=l.key,d=l.value;o+="-".concat(f),""!==d&&(o+="-".concat(d))}if("-u"===o)return s(e);var h=e.indexOf("-x-");return s(-1===h?e+o:e.slice(0,h)+o+e.slice(h))}(p,0,g)),v.locale=p,v},f=function(e,t){for(var n=[],r=0,o=t;r<o.length;r++){var i=c(e,o[r].replace(m,""));i&&n.push(i)}return n},d=function(e,t,n,r){return l(t,(o=e,Intl.getCanonicalLocales(o)),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return n})).locale;var o};n.r(t),n.d(t,{LookupSupportedLocales:function(){return f},ResolveLocale:function(){return l},match:function(){return d}});var h,p=n(2712),y={supplemental:{languageMatching:{"written-new":[{paradigmLocales:{_locales:"en en_GB es es_419 pt_BR pt_PT"}},{$enUS:{_value:"AS+CA+GU+MH+MP+PH+PR+UM+US+VI"}},{$cnsar:{_value:"HK+MO"}},{$americas:{_value:"019"}},{$maghreb:{_value:"MA+DZ+TN+LY+MR+EH"}},{no:{_desired:"nb",_distance:"1"}},{bs:{_desired:"hr",_distance:"4"}},{bs:{_desired:"sh",_distance:"4"}},{hr:{_desired:"sh",_distance:"4"}},{sr:{_desired:"sh",_distance:"4"}},{aa:{_desired:"ssy",_distance:"4"}},{de:{_desired:"gsw",_distance:"4",_oneway:"true"}},{de:{_desired:"lb",_distance:"4",_oneway:"true"}},{no:{_desired:"da",_distance:"8"}},{nb:{_desired:"da",_distance:"8"}},{ru:{_desired:"ab",_distance:"30",_oneway:"true"}},{en:{_desired:"ach",_distance:"30",_oneway:"true"}},{nl:{_desired:"af",_distance:"20",_oneway:"true"}},{en:{_desired:"ak",_distance:"30",_oneway:"true"}},{en:{_desired:"am",_distance:"30",_oneway:"true"}},{es:{_desired:"ay",_distance:"20",_oneway:"true"}},{ru:{_desired:"az",_distance:"30",_oneway:"true"}},{ur:{_desired:"bal",_distance:"20",_oneway:"true"}},{ru:{_desired:"be",_distance:"20",_oneway:"true"}},{en:{_desired:"bem",_distance:"30",_oneway:"true"}},{hi:{_desired:"bh",_distance:"30",_oneway:"true"}},{en:{_desired:"bn",_distance:"30",_oneway:"true"}},{zh:{_desired:"bo",_distance:"20",_oneway:"true"}},{fr:{_desired:"br",_distance:"20",_oneway:"true"}},{es:{_desired:"ca",_distance:"20",_oneway:"true"}},{fil:{_desired:"ceb",_distance:"30",_oneway:"true"}},{en:{_desired:"chr",_distance:"20",_oneway:"true"}},{ar:{_desired:"ckb",_distance:"30",_oneway:"true"}},{fr:{_desired:"co",_distance:"20",_oneway:"true"}},{fr:{_desired:"crs",_distance:"20",_oneway:"true"}},{sk:{_desired:"cs",_distance:"20"}},{en:{_desired:"cy",_distance:"20",_oneway:"true"}},{en:{_desired:"ee",_distance:"30",_oneway:"true"}},{en:{_desired:"eo",_distance:"30",_oneway:"true"}},{es:{_desired:"eu",_distance:"20",_oneway:"true"}},{da:{_desired:"fo",_distance:"20",_oneway:"true"}},{nl:{_desired:"fy",_distance:"20",_oneway:"true"}},{en:{_desired:"ga",_distance:"20",_oneway:"true"}},{en:{_desired:"gaa",_distance:"30",_oneway:"true"}},{en:{_desired:"gd",_distance:"20",_oneway:"true"}},{es:{_desired:"gl",_distance:"20",_oneway:"true"}},{es:{_desired:"gn",_distance:"20",_oneway:"true"}},{hi:{_desired:"gu",_distance:"30",_oneway:"true"}},{en:{_desired:"ha",_distance:"30",_oneway:"true"}},{en:{_desired:"haw",_distance:"20",_oneway:"true"}},{fr:{_desired:"ht",_distance:"20",_oneway:"true"}},{ru:{_desired:"hy",_distance:"30",_oneway:"true"}},{en:{_desired:"ia",_distance:"30",_oneway:"true"}},{en:{_desired:"ig",_distance:"30",_oneway:"true"}},{en:{_desired:"is",_distance:"20",_oneway:"true"}},{id:{_desired:"jv",_distance:"20",_oneway:"true"}},{en:{_desired:"ka",_distance:"30",_oneway:"true"}},{fr:{_desired:"kg",_distance:"30",_oneway:"true"}},{ru:{_desired:"kk",_distance:"30",_oneway:"true"}},{en:{_desired:"km",_distance:"30",_oneway:"true"}},{en:{_desired:"kn",_distance:"30",_oneway:"true"}},{en:{_desired:"kri",_distance:"30",_oneway:"true"}},{tr:{_desired:"ku",_distance:"30",_oneway:"true"}},{ru:{_desired:"ky",_distance:"30",_oneway:"true"}},{it:{_desired:"la",_distance:"20",_oneway:"true"}},{en:{_desired:"lg",_distance:"30",_oneway:"true"}},{fr:{_desired:"ln",_distance:"30",_oneway:"true"}},{en:{_desired:"lo",_distance:"30",_oneway:"true"}},{en:{_desired:"loz",_distance:"30",_oneway:"true"}},{fr:{_desired:"lua",_distance:"30",_oneway:"true"}},{hi:{_desired:"mai",_distance:"20",_oneway:"true"}},{en:{_desired:"mfe",_distance:"30",_oneway:"true"}},{fr:{_desired:"mg",_distance:"30",_oneway:"true"}},{en:{_desired:"mi",_distance:"20",_oneway:"true"}},{en:{_desired:"ml",_distance:"30",_oneway:"true"}},{ru:{_desired:"mn",_distance:"30",_oneway:"true"}},{hi:{_desired:"mr",_distance:"30",_oneway:"true"}},{id:{_desired:"ms",_distance:"30",_oneway:"true"}},{en:{_desired:"mt",_distance:"30",_oneway:"true"}},{en:{_desired:"my",_distance:"30",_oneway:"true"}},{en:{_desired:"ne",_distance:"30",_oneway:"true"}},{nb:{_desired:"nn",_distance:"20"}},{no:{_desired:"nn",_distance:"20"}},{en:{_desired:"nso",_distance:"30",_oneway:"true"}},{en:{_desired:"ny",_distance:"30",_oneway:"true"}},{en:{_desired:"nyn",_distance:"30",_oneway:"true"}},{fr:{_desired:"oc",_distance:"20",_oneway:"true"}},{en:{_desired:"om",_distance:"30",_oneway:"true"}},{en:{_desired:"or",_distance:"30",_oneway:"true"}},{en:{_desired:"pa",_distance:"30",_oneway:"true"}},{en:{_desired:"pcm",_distance:"20",_oneway:"true"}},{en:{_desired:"ps",_distance:"30",_oneway:"true"}},{es:{_desired:"qu",_distance:"30",_oneway:"true"}},{de:{_desired:"rm",_distance:"20",_oneway:"true"}},{en:{_desired:"rn",_distance:"30",_oneway:"true"}},{fr:{_desired:"rw",_distance:"30",_oneway:"true"}},{hi:{_desired:"sa",_distance:"30",_oneway:"true"}},{en:{_desired:"sd",_distance:"30",_oneway:"true"}},{en:{_desired:"si",_distance:"30",_oneway:"true"}},{en:{_desired:"sn",_distance:"30",_oneway:"true"}},{en:{_desired:"so",_distance:"30",_oneway:"true"}},{en:{_desired:"sq",_distance:"30",_oneway:"true"}},{en:{_desired:"st",_distance:"30",_oneway:"true"}},{id:{_desired:"su",_distance:"20",_oneway:"true"}},{en:{_desired:"sw",_distance:"30",_oneway:"true"}},{en:{_desired:"ta",_distance:"30",_oneway:"true"}},{en:{_desired:"te",_distance:"30",_oneway:"true"}},{ru:{_desired:"tg",_distance:"30",_oneway:"true"}},{en:{_desired:"ti",_distance:"30",_oneway:"true"}},{ru:{_desired:"tk",_distance:"30",_oneway:"true"}},{en:{_desired:"tlh",_distance:"30",_oneway:"true"}},{en:{_desired:"tn",_distance:"30",_oneway:"true"}},{en:{_desired:"to",_distance:"30",_oneway:"true"}},{ru:{_desired:"tt",_distance:"30",_oneway:"true"}},{en:{_desired:"tum",_distance:"30",_oneway:"true"}},{zh:{_desired:"ug",_distance:"20",_oneway:"true"}},{ru:{_desired:"uk",_distance:"20",_oneway:"true"}},{en:{_desired:"ur",_distance:"30",_oneway:"true"}},{ru:{_desired:"uz",_distance:"30",_oneway:"true"}},{fr:{_desired:"wo",_distance:"30",_oneway:"true"}},{en:{_desired:"xh",_distance:"30",_oneway:"true"}},{en:{_desired:"yi",_distance:"30",_oneway:"true"}},{en:{_desired:"yo",_distance:"30",_oneway:"true"}},{zh:{_desired:"za",_distance:"20",_oneway:"true"}},{en:{_desired:"zu",_distance:"30",_oneway:"true"}},{ar:{_desired:"aao",_distance:"10",_oneway:"true"}},{ar:{_desired:"abh",_distance:"10",_oneway:"true"}},{ar:{_desired:"abv",_distance:"10",_oneway:"true"}},{ar:{_desired:"acm",_distance:"10",_oneway:"true"}},{ar:{_desired:"acq",_distance:"10",_oneway:"true"}},{ar:{_desired:"acw",_distance:"10",_oneway:"true"}},{ar:{_desired:"acx",_distance:"10",_oneway:"true"}},{ar:{_desired:"acy",_distance:"10",_oneway:"true"}},{ar:{_desired:"adf",_distance:"10",_oneway:"true"}},{ar:{_desired:"aeb",_distance:"10",_oneway:"true"}},{ar:{_desired:"aec",_distance:"10",_oneway:"true"}},{ar:{_desired:"afb",_distance:"10",_oneway:"true"}},{ar:{_desired:"ajp",_distance:"10",_oneway:"true"}},{ar:{_desired:"apc",_distance:"10",_oneway:"true"}},{ar:{_desired:"apd",_distance:"10",_oneway:"true"}},{ar:{_desired:"arq",_distance:"10",_oneway:"true"}},{ar:{_desired:"ars",_distance:"10",_oneway:"true"}},{ar:{_desired:"ary",_distance:"10",_oneway:"true"}},{ar:{_desired:"arz",_distance:"10",_oneway:"true"}},{ar:{_desired:"auz",_distance:"10",_oneway:"true"}},{ar:{_desired:"avl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayh",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayl",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayn",_distance:"10",_oneway:"true"}},{ar:{_desired:"ayp",_distance:"10",_oneway:"true"}},{ar:{_desired:"bbz",_distance:"10",_oneway:"true"}},{ar:{_desired:"pga",_distance:"10",_oneway:"true"}},{ar:{_desired:"shu",_distance:"10",_oneway:"true"}},{ar:{_desired:"ssh",_distance:"10",_oneway:"true"}},{az:{_desired:"azb",_distance:"10",_oneway:"true"}},{et:{_desired:"vro",_distance:"10",_oneway:"true"}},{ff:{_desired:"ffm",_distance:"10",_oneway:"true"}},{ff:{_desired:"fub",_distance:"10",_oneway:"true"}},{ff:{_desired:"fue",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuf",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuh",_distance:"10",_oneway:"true"}},{ff:{_desired:"fui",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuq",_distance:"10",_oneway:"true"}},{ff:{_desired:"fuv",_distance:"10",_oneway:"true"}},{gn:{_desired:"gnw",_distance:"10",_oneway:"true"}},{gn:{_desired:"gui",_distance:"10",_oneway:"true"}},{gn:{_desired:"gun",_distance:"10",_oneway:"true"}},{gn:{_desired:"nhd",_distance:"10",_oneway:"true"}},{iu:{_desired:"ikt",_distance:"10",_oneway:"true"}},{kln:{_desired:"enb",_distance:"10",_oneway:"true"}},{kln:{_desired:"eyo",_distance:"10",_oneway:"true"}},{kln:{_desired:"niq",_distance:"10",_oneway:"true"}},{kln:{_desired:"oki",_distance:"10",_oneway:"true"}},{kln:{_desired:"pko",_distance:"10",_oneway:"true"}},{kln:{_desired:"sgc",_distance:"10",_oneway:"true"}},{kln:{_desired:"tec",_distance:"10",_oneway:"true"}},{kln:{_desired:"tuy",_distance:"10",_oneway:"true"}},{kok:{_desired:"gom",_distance:"10",_oneway:"true"}},{kpe:{_desired:"gkp",_distance:"10",_oneway:"true"}},{luy:{_desired:"ida",_distance:"10",_oneway:"true"}},{luy:{_desired:"lkb",_distance:"10",_oneway:"true"}},{luy:{_desired:"lko",_distance:"10",_oneway:"true"}},{luy:{_desired:"lks",_distance:"10",_oneway:"true"}},{luy:{_desired:"lri",_distance:"10",_oneway:"true"}},{luy:{_desired:"lrm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lsm",_distance:"10",_oneway:"true"}},{luy:{_desired:"lto",_distance:"10",_oneway:"true"}},{luy:{_desired:"lts",_distance:"10",_oneway:"true"}},{luy:{_desired:"lwg",_distance:"10",_oneway:"true"}},{luy:{_desired:"nle",_distance:"10",_oneway:"true"}},{luy:{_desired:"nyd",_distance:"10",_oneway:"true"}},{luy:{_desired:"rag",_distance:"10",_oneway:"true"}},{lv:{_desired:"ltg",_distance:"10",_oneway:"true"}},{mg:{_desired:"bhr",_distance:"10",_oneway:"true"}},{mg:{_desired:"bjq",_distance:"10",_oneway:"true"}},{mg:{_desired:"bmm",_distance:"10",_oneway:"true"}},{mg:{_desired:"bzc",_distance:"10",_oneway:"true"}},{mg:{_desired:"msh",_distance:"10",_oneway:"true"}},{mg:{_desired:"skg",_distance:"10",_oneway:"true"}},{mg:{_desired:"tdx",_distance:"10",_oneway:"true"}},{mg:{_desired:"tkg",_distance:"10",_oneway:"true"}},{mg:{_desired:"txy",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmv",_distance:"10",_oneway:"true"}},{mg:{_desired:"xmw",_distance:"10",_oneway:"true"}},{mn:{_desired:"mvf",_distance:"10",_oneway:"true"}},{ms:{_desired:"bjn",_distance:"10",_oneway:"true"}},{ms:{_desired:"btj",_distance:"10",_oneway:"true"}},{ms:{_desired:"bve",_distance:"10",_oneway:"true"}},{ms:{_desired:"bvu",_distance:"10",_oneway:"true"}},{ms:{_desired:"coa",_distance:"10",_oneway:"true"}},{ms:{_desired:"dup",_distance:"10",_oneway:"true"}},{ms:{_desired:"hji",_distance:"10",_oneway:"true"}},{ms:{_desired:"id",_distance:"10",_oneway:"true"}},{ms:{_desired:"jak",_distance:"10",_oneway:"true"}},{ms:{_desired:"jax",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvb",_distance:"10",_oneway:"true"}},{ms:{_desired:"kvr",_distance:"10",_oneway:"true"}},{ms:{_desired:"kxd",_distance:"10",_oneway:"true"}},{ms:{_desired:"lce",_distance:"10",_oneway:"true"}},{ms:{_desired:"lcf",_distance:"10",_oneway:"true"}},{ms:{_desired:"liw",_distance:"10",_oneway:"true"}},{ms:{_desired:"max",_distance:"10",_oneway:"true"}},{ms:{_desired:"meo",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfa",_distance:"10",_oneway:"true"}},{ms:{_desired:"mfb",_distance:"10",_oneway:"true"}},{ms:{_desired:"min",_distance:"10",_oneway:"true"}},{ms:{_desired:"mqg",_distance:"10",_oneway:"true"}},{ms:{_desired:"msi",_distance:"10",_oneway:"true"}},{ms:{_desired:"mui",_distance:"10",_oneway:"true"}},{ms:{_desired:"orn",_distance:"10",_oneway:"true"}},{ms:{_desired:"ors",_distance:"10",_oneway:"true"}},{ms:{_desired:"pel",_distance:"10",_oneway:"true"}},{ms:{_desired:"pse",_distance:"10",_oneway:"true"}},{ms:{_desired:"tmw",_distance:"10",_oneway:"true"}},{ms:{_desired:"urk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkk",_distance:"10",_oneway:"true"}},{ms:{_desired:"vkt",_distance:"10",_oneway:"true"}},{ms:{_desired:"xmm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zlm",_distance:"10",_oneway:"true"}},{ms:{_desired:"zmi",_distance:"10",_oneway:"true"}},{ne:{_desired:"dty",_distance:"10",_oneway:"true"}},{om:{_desired:"gax",_distance:"10",_oneway:"true"}},{om:{_desired:"hae",_distance:"10",_oneway:"true"}},{om:{_desired:"orc",_distance:"10",_oneway:"true"}},{or:{_desired:"spv",_distance:"10",_oneway:"true"}},{ps:{_desired:"pbt",_distance:"10",_oneway:"true"}},{ps:{_desired:"pst",_distance:"10",_oneway:"true"}},{qu:{_desired:"qub",_distance:"10",_oneway:"true"}},{qu:{_desired:"qud",_distance:"10",_oneway:"true"}},{qu:{_desired:"quf",_distance:"10",_oneway:"true"}},{qu:{_desired:"qug",_distance:"10",_oneway:"true"}},{qu:{_desired:"quh",_distance:"10",_oneway:"true"}},{qu:{_desired:"quk",_distance:"10",_oneway:"true"}},{qu:{_desired:"qul",_distance:"10",_oneway:"true"}},{qu:{_desired:"qup",_distance:"10",_oneway:"true"}},{qu:{_desired:"qur",_distance:"10",_oneway:"true"}},{qu:{_desired:"qus",_distance:"10",_oneway:"true"}},{qu:{_desired:"quw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qux",_distance:"10",_oneway:"true"}},{qu:{_desired:"quy",_distance:"10",_oneway:"true"}},{qu:{_desired:"qva",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qve",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvi",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvj",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvm",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvs",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvw",_distance:"10",_oneway:"true"}},{qu:{_desired:"qvz",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qwh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qws",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxa",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxc",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxh",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxl",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxn",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxo",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxp",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxr",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxt",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxu",_distance:"10",_oneway:"true"}},{qu:{_desired:"qxw",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdc",_distance:"10",_oneway:"true"}},{sc:{_desired:"sdn",_distance:"10",_oneway:"true"}},{sc:{_desired:"sro",_distance:"10",_oneway:"true"}},{sq:{_desired:"aae",_distance:"10",_oneway:"true"}},{sq:{_desired:"aat",_distance:"10",_oneway:"true"}},{sq:{_desired:"aln",_distance:"10",_oneway:"true"}},{syr:{_desired:"aii",_distance:"10",_oneway:"true"}},{uz:{_desired:"uzs",_distance:"10",_oneway:"true"}},{yi:{_desired:"yih",_distance:"10",_oneway:"true"}},{zh:{_desired:"cdo",_distance:"10",_oneway:"true"}},{zh:{_desired:"cjy",_distance:"10",_oneway:"true"}},{zh:{_desired:"cpx",_distance:"10",_oneway:"true"}},{zh:{_desired:"czh",_distance:"10",_oneway:"true"}},{zh:{_desired:"czo",_distance:"10",_oneway:"true"}},{zh:{_desired:"gan",_distance:"10",_oneway:"true"}},{zh:{_desired:"hak",_distance:"10",_oneway:"true"}},{zh:{_desired:"hsn",_distance:"10",_oneway:"true"}},{zh:{_desired:"lzh",_distance:"10",_oneway:"true"}},{zh:{_desired:"mnp",_distance:"10",_oneway:"true"}},{zh:{_desired:"nan",_distance:"10",_oneway:"true"}},{zh:{_desired:"wuu",_distance:"10",_oneway:"true"}},{zh:{_desired:"yue",_distance:"10",_oneway:"true"}},{"*":{_desired:"*",_distance:"80"}},{"en-Latn":{_desired:"am-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"az-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"bn-Beng",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"bo-Tibt",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"hy-Armn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ka-Geor",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"km-Khmr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"kn-Knda",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"lo-Laoo",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ml-Mlym",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"my-Mymr",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ne-Deva",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"or-Orya",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"pa-Guru",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ps-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"sd-Arab",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"si-Sinh",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ta-Taml",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"te-Telu",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ti-Ethi",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"tk-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"ur-Arab",_distance:"10",_oneway:"true"}},{"ru-Cyrl":{_desired:"uz-Latn",_distance:"10",_oneway:"true"}},{"en-Latn":{_desired:"yi-Hebr",_distance:"10",_oneway:"true"}},{"sr-Cyrl":{_desired:"sr-Latn",_distance:"5"}},{"zh-Hans":{_desired:"za-Latn",_distance:"10",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"zh-Hant":{_desired:"zh-Hani",_distance:"20",_oneway:"true"}},{"ar-Arab":{_desired:"ar-Latn",_distance:"20",_oneway:"true"}},{"bn-Beng":{_desired:"bn-Latn",_distance:"20",_oneway:"true"}},{"gu-Gujr":{_desired:"gu-Latn",_distance:"20",_oneway:"true"}},{"hi-Deva":{_desired:"hi-Latn",_distance:"20",_oneway:"true"}},{"kn-Knda":{_desired:"kn-Latn",_distance:"20",_oneway:"true"}},{"ml-Mlym":{_desired:"ml-Latn",_distance:"20",_oneway:"true"}},{"mr-Deva":{_desired:"mr-Latn",_distance:"20",_oneway:"true"}},{"ta-Taml":{_desired:"ta-Latn",_distance:"20",_oneway:"true"}},{"te-Telu":{_desired:"te-Latn",_distance:"20",_oneway:"true"}},{"zh-Hans":{_desired:"zh-Latn",_distance:"20",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Latn",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hani",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ja-Jpan":{_desired:"ja-Hrkt",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Hira",_distance:"5",_oneway:"true"}},{"ja-Hrkt":{_desired:"ja-Kana",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hani",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Hang",_distance:"5",_oneway:"true"}},{"ko-Kore":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"ko-Hang":{_desired:"ko-Jamo",_distance:"5",_oneway:"true"}},{"*-*":{_desired:"*-*",_distance:"50"}},{"ar-*-$maghreb":{_desired:"ar-*-$maghreb",_distance:"4"}},{"ar-*-$!maghreb":{_desired:"ar-*-$!maghreb",_distance:"4"}},{"ar-*-*":{_desired:"ar-*-*",_distance:"5"}},{"en-*-$enUS":{_desired:"en-*-$enUS",_distance:"4"}},{"en-*-GB":{_desired:"en-*-$!enUS",_distance:"3"}},{"en-*-$!enUS":{_desired:"en-*-$!enUS",_distance:"4"}},{"en-*-*":{_desired:"en-*-*",_distance:"5"}},{"es-*-$americas":{_desired:"es-*-$americas",_distance:"4"}},{"es-*-$!americas":{_desired:"es-*-$!americas",_distance:"4"}},{"es-*-*":{_desired:"es-*-*",_distance:"5"}},{"pt-*-$americas":{_desired:"pt-*-$americas",_distance:"4"}},{"pt-*-$!americas":{_desired:"pt-*-$!americas",_distance:"4"}},{"pt-*-*":{_desired:"pt-*-*",_distance:"5"}},{"zh-Hant-$cnsar":{_desired:"zh-Hant-$cnsar",_distance:"4"}},{"zh-Hant-$!cnsar":{_desired:"zh-Hant-$!cnsar",_distance:"4"}},{"zh-Hant-*":{_desired:"zh-Hant-*",_distance:"5"}},{"*-*-*":{_desired:"*-*-*",_distance:"4"}}]}}},v={"001":["001","001-status-grouping","002","005","009","011","013","014","015","017","018","019","021","029","030","034","035","039","053","054","057","061","142","143","145","150","151","154","155","AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CQ","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","EU","EZ","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","QO","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"002":["002","002-status-grouping","011","014","015","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EA","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","IC","IO","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"],"003":["003","013","021","029","AG","AI","AW","BB","BL","BM","BQ","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"],"005":["005","AR","BO","BR","BV","CL","CO","EC","FK","GF","GS","GY","PE","PY","SR","UY","VE"],"009":["009","053","054","057","061","AC","AQ","AS","AU","CC","CK","CP","CX","DG","FJ","FM","GU","HM","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","QO","SB","TA","TK","TO","TV","UM","VU","WF","WS"],"011":["011","BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"],"013":["013","BZ","CR","GT","HN","MX","NI","PA","SV"],"014":["014","BI","DJ","ER","ET","IO","KE","KM","MG","MU","MW","MZ","RE","RW","SC","SO","SS","TF","TZ","UG","YT","ZM","ZW"],"015":["015","DZ","EA","EG","EH","IC","LY","MA","SD","TN"],"017":["017","AO","CD","CF","CG","CM","GA","GQ","ST","TD"],"018":["018","BW","LS","NA","SZ","ZA"],"019":["003","005","013","019","019-status-grouping","021","029","419","AG","AI","AR","AW","BB","BL","BM","BO","BQ","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"],"021":["021","BM","CA","GL","PM","US"],"029":["029","AG","AI","AW","BB","BL","BQ","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"],"030":["030","CN","HK","JP","KP","KR","MN","MO","TW"],"034":["034","AF","BD","BT","IN","IR","LK","MV","NP","PK"],"035":["035","BN","ID","KH","LA","MM","MY","PH","SG","TH","TL","VN"],"039":["039","AD","AL","BA","ES","GI","GR","HR","IT","ME","MK","MT","PT","RS","SI","SM","VA","XK"],"053":["053","AU","CC","CX","HM","NF","NZ"],"054":["054","FJ","NC","PG","SB","VU"],"057":["057","FM","GU","KI","MH","MP","NR","PW","UM"],"061":["061","AS","CK","NU","PF","PN","TK","TO","TV","WF","WS"],142:["030","034","035","142","143","145","AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","HK","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MO","MV","MY","NP","OM","PH","PK","PS","QA","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"],143:["143","KG","KZ","TJ","TM","UZ"],145:["145","AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"],150:["039","150","151","154","155","AD","AL","AT","AX","BA","BE","BG","BY","CH","CQ","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SJ","SK","SM","UA","VA","XK"],151:["151","BG","BY","CZ","HU","MD","PL","RO","RU","SK","UA"],154:["154","AX","CQ","DK","EE","FI","FO","GB","GG","IE","IM","IS","JE","LT","LV","NO","SE","SJ"],155:["155","AT","BE","CH","DE","FR","LI","LU","MC","NL"],202:["011","014","017","018","202","AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","IO","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TZ","UG","YT","ZA","ZM","ZW"],419:["005","013","029","419","AG","AI","AR","AW","BB","BL","BO","BQ","BR","BS","BV","BZ","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SR","SV","SX","TC","TT","UY","VC","VE","VG","VI"],EU:["AT","BE","BG","CY","CZ","DE","DK","EE","ES","EU","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],EZ:["AT","BE","CY","DE","EE","ES","EZ","FI","FR","GR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"],QO:["AC","AQ","CP","DG","QO","TA"],UN:["AD","AE","AF","AG","AL","AM","AO","AR","AT","AU","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CL","CM","CN","CO","CR","CU","CV","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FM","FR","GA","GB","GD","GE","GH","GM","GN","GQ","GR","GT","GW","GY","HN","HR","HT","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MR","MT","MU","MV","MW","MX","MY","MZ","NA","NE","NG","NI","NL","NO","NP","NR","NZ","OM","PA","PE","PG","PH","PK","PL","PT","PW","PY","QA","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TZ","UA","UG","UN","US","UY","UZ","VC","VE","VN","VU","WS","YE","ZA","ZM","ZW"]},m=/-u(?:-[0-9a-z]{2,8})+/gi,g=838},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},7067:function(e){e.exports=function(){"use strict";return function(e,t,n){var r=t.prototype,o=function(e){var t,o=e.date,i=e.utc,a={};if(!h(t=o,Date)&&!h(t,Array)&&h(t,Object)){if(!Object.keys(o).length)return new Date;var u=i?n.utc():n();Object.keys(o).forEach((function(e){var t,n;a[(t=e,n=r.$utils().p(t),"date"===n?"day":n)]=o[e]}));var s=a.day||(a.year||a.month>=0?1:u.date()),c=a.year||u.year(),l=a.month>=0?a.month:a.year||a.day?0:u.month(),f=a.hour||0,d=a.minute||0,p=a.second||0,y=a.millisecond||0;return i?new Date(Date.UTC(c,l,s,f,d,p,y)):new Date(c,l,s,f,d,p,y)}return o},i=r.parse;r.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=r.set,u=r.add,s=function(e,t,n,r){if(void 0===r&&(r=1),h(t,Object)){var o=Object.keys(t),i=this;return o.forEach((function(n){i=e.bind(i)(t[n]*r,n)})),i}return e.bind(this)(t*r,n)};r.set=function(e,t){return t=void 0===t?e:t,s.bind(this)((function(e,t){return a.bind(this)(t,e)}),t,e)},r.add=function(e,t){return s.bind(this)(u,e,t)},r.subtract=function(e,t){return s.bind(this)(u,e,t,-1)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,e)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()},2257:function(e,t,n){var r=Symbol("SemVer ANY"),o=function(){"use strict";function e(t,n){if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),h(t,e)){if(t.loose===!!n.loose)return t;t=t.value}f("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===r?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}return s(e,[{key:"parse",value:function(e){var t=this.options.loose?u[c.COMPARATORLOOSE]:u[c.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new d(n[2],this.options.loose):this.semver=r}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(f("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!h(t,e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new p(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new p(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),i=this.semver.version===t.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),u=l(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),s=l(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||o||i&&a||u||s}}],[{key:"ANY",get:function(){return r}}]),e}();e.exports=o;var a=n(5765),u=a.re,c=a.t,l=n(7539),f=n(4225),d=n(6376),p=n(6902)},6902:function(e,t,n){var r=function(){"use strict";function e(t,n){var r=this;if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),h(t,e))return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(h(t,o))return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return s(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?l[f.HYPHENRANGELOOSE]:l[f.HYPHENRANGE];e=e.replace(r,k(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[f.COMPARATORTRIM],d),a("comparator trim",e,l[f.COMPARATORTRIM]),e=(e=(e=e.replace(l[f.TILDETRIM],p)).replace(l[f.CARETTRIM],y)).split(/\s+/).join(" ");var i=n?l[f.COMPARATORLOOSE]:l[f.COMPARATOR];return e.split(" ").map((function(e){return m(e,t.options)})).join(" ").split(/\s+/).map((function(e){return A(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(i)}:function(){return!0}).map((function(e){return new o(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!h(t,e))throw new TypeError("a Range is required");return this.set.some((function(e){return v(e,n)&&t.set.some((function(t){return v(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(T(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=r;var o=n(2257),a=n(4225),u=n(6376),c=n(5765),l=c.re,f=c.t,d=c.comparatorTrimReplace,p=c.tildeTrimReplace,y=c.caretTrimReplace,v=function(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n},m=function(e,t){return a("comp",e,t),e=_(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=E(e,t),a("xrange",e),e=x(e,t),a("stars",e),e},g=function(e){return!e||"x"===e.toLowerCase()||"*"===e},b=function(e,t){return e.trim().split(/\s+/).map((function(e){return w(e,t)})).join(" ")},w=function(e,t){var n=t.loose?l[f.TILDELOOSE]:l[f.TILDE];return e.replace(n,(function(t,n,r,o,i){var u;return a("tilde",e,t,n,r,o,i),g(n)?u="":g(r)?u=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):g(o)?u=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):i?(a("replaceTilde pr",i),u=">=".concat(n,".").concat(r,".").concat(o,"-").concat(i," <").concat(n,".").concat(+r+1,".0-0")):u=">=".concat(n,".").concat(r,".").concat(o," <").concat(n,".").concat(+r+1,".0-0"),a("tilde return",u),u}))},_=function(e,t){return e.trim().split(/\s+/).map((function(e){return S(e,t)})).join(" ")},S=function(e,t){a("caret",e,t);var n=t.loose?l[f.CARETLOOSE]:l[f.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,o,i,u){var s;return a("caret",e,t,n,o,i,u),g(n)?s="":g(o)?s=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):g(i)?s="0"===n?">=".concat(n,".").concat(o,".0").concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".0").concat(r," <").concat(+n+1,".0.0-0"):u?(a("replaceCaret pr",u),s="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i,"-").concat(u," <").concat(+n+1,".0.0-0")):(a("no pr"),s="0"===n?"0"===o?">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(o,".").concat(+i+1,"-0"):">=".concat(n,".").concat(o,".").concat(i).concat(r," <").concat(n,".").concat(+o+1,".0-0"):">=".concat(n,".").concat(o,".").concat(i," <").concat(+n+1,".0.0-0")),a("caret return",s),s}))},E=function(e,t){return a("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return O(e,t)})).join(" ")},O=function(e,t){e=e.trim();var n=t.loose?l[f.XRANGELOOSE]:l[f.XRANGE];return e.replace(n,(function(n,r,o,i,u,s){a("xRange",e,n,r,o,i,u,s);var c=g(o),l=c||g(i),f=l||g(u),d=f;return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(i=0),u=0,">"===r?(r=">=",l?(o=+o+1,i=0,u=0):(i=+i+1,u=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(s="-0"),n="".concat(r+o,".").concat(i,".").concat(u).concat(s)):l?n=">=".concat(o,".0.0").concat(s," <").concat(+o+1,".0.0-0"):f&&(n=">=".concat(o,".").concat(i,".0").concat(s," <").concat(o,".").concat(+i+1,".0-0")),a("xRange return",n),n}))},x=function(e,t){return a("replaceStars",e,t),e.trim().replace(l[f.STAR],"")},A=function(e,t){return a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?f.GTE0PRE:f.GTE0],"")},k=function(e){return function(t,n,r,o,i,a,u,s,c,l,f,d,h){return"".concat(n=g(r)?"":g(o)?">=".concat(r,".0.0").concat(e?"-0":""):g(i)?">=".concat(r,".").concat(o,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":"")," ").concat(s=g(c)?"":g(l)?"<".concat(+c+1,".0.0-0"):g(f)?"<".concat(c,".").concat(+l+1,".0-0"):d?"<=".concat(c,".").concat(l,".").concat(f,"-").concat(d):e?"<".concat(c,".").concat(l,".").concat(+f+1,"-0"):"<=".concat(s)).trim()}},T=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(a(e[i].semver),e[i].semver!==o.ANY&&e[i].semver.prerelease.length>0){var u=e[i].semver;if(u.major===t.major&&u.minor===t.minor&&u.patch===t.patch)return!0}return!1}return!0}},6376:function(e,t,n){var r=n(4225),o=n(3295),a=o.MAX_LENGTH,u=o.MAX_SAFE_INTEGER,c=n(5765),l=c.re,f=c.t,d=n(6742).compareIdentifiers,p=function(){"use strict";function e(t,n){if(i(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),h(t,e)){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>a)throw new TypeError("version is longer than ".concat(a," characters"));r("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var o=t.trim().match(n.loose?l[f.LOOSE]:l[f.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<u)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}return s(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(r("SemVer.compare",this.version,this.options,t),!h(t,e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return h(t,e)||(t=new e(t,this.options)),d(this.major,t.major)||d(this.minor,t.minor)||d(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(h(t,e)||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var o=this.prerelease[n],i=t.prerelease[n];if(r("prerelease compare",n,o,i),void 0===o&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===o)return-1;if(o!==i)return d(o,i)}while(++n)}},{key:"compareBuild",value:function(t){h(t,e)||(t=new e(t,this.options));var n=0;do{var o=this.build[n],i=t.build[n];if(r("prerelease compare",n,o,i),void 0===o&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===o)return-1;if(o!==i)return d(o,i)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=p},3507:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:function(e,t,n){var r=n(8718),o=n(1194),i=n(1312),a=n(5903),u=n(1544),s=n(2056);e.exports=function(e,t,n,c){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return u(e,n,c);case"<=":return s(e,n,c);default:throw new TypeError("Invalid operator: ".concat(t))}}},9038:function(e,t,n){var r=n(6376),o=n(3959),i=n(5765),a=i.re,u=i.t;e.exports=function(e,t){if(h(e,r))return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var i;(i=a[u.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),a[u.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;a[u.COERCERTL].lastIndex=-1}else n=e.match(a[u.COERCE]);return null===n?null:o("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},8880:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){var o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},7880:function(e,t,n){var r=n(6269);e.exports=function(e,t){return r(e,t,!0)}},6269:function(e,t,n){var r=n(6376);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},2378:function(e,t,n){var r=n(3959),o=n(8718);e.exports=function(e,t){if(o(e,t))return null;var n=r(e),i=r(t),a=n.prerelease.length||i.prerelease.length,u=a?"pre":"",s=a?"prerelease":"";for(var c in n)if(("major"===c||"minor"===c||"patch"===c)&&n[c]!==i[c])return u+c;return s}},8718:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0===r(e,t,n)}},1312:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>0}},5903:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)>=0}},253:function(e,t,n){var r=n(6376);e.exports=function(e,t,n,o){"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},1544:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<0}},2056:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(e,t,n)<=0}},8679:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).major}},7789:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).minor}},1194:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return 0!==r(e,t,n)}},3959:function(e,t,n){var r=n(3295).MAX_LENGTH,o=n(5765),i=o.re,a=o.t,u=n(6376);e.exports=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),h(e,u))return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new u(e,t)}catch(e){return null}}},2358:function(e,t,n){var r=n(6376);e.exports=function(e,t){return new r(e,t).patch}},7559:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},9795:function(e,t,n){var r=n(6269);e.exports=function(e,t,n){return r(t,e,n)}},3657:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},5712:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},1100:function(e,t,n){var r=n(8880);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},6397:function(e,t,n){var r=n(3959);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},1249:function(e,t,n){var r=n(5765);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(3295).SEMVER_SPEC_VERSION,SemVer:n(6376),compareIdentifiers:n(6742).compareIdentifiers,rcompareIdentifiers:n(6742).rcompareIdentifiers,parse:n(3959),valid:n(6397),clean:n(3507),inc:n(253),diff:n(2378),major:n(8679),minor:n(7789),patch:n(2358),prerelease:n(7559),compare:n(6269),rcompare:n(9795),compareLoose:n(7880),compareBuild:n(8880),sort:n(1100),rsort:n(3657),gt:n(1312),lt:n(1544),eq:n(8718),neq:n(1194),gte:n(5903),lte:n(2056),cmp:n(7539),coerce:n(9038),Comparator:n(2257),Range:n(6902),satisfies:n(5712),toComparators:n(1042),maxSatisfying:n(5775),minSatisfying:n(1657),minVersion:n(5316),validRange:n(9042),outside:n(6826),gtr:n(7606),ltr:n(32),intersects:n(2937),simplifyRange:n(7908),subset:n(799)}},3295:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4225:function(e){var t,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=console).error.apply(t,["SEMVER"].concat(b(n)))}:function(){};e.exports=n},6742:function(e){var t=/^[0-9]+$/,n=function(e,n){var r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:function(e,t){return n(t,e)}}},5765:function(e,t,n){var r=n(3295).MAX_SAFE_COMPONENT_LENGTH,o=n(4225),i=(t=e.exports={}).re=[],a=t.src=[],u=t.t={},s=0,c=function(e,t,n){var r=s++;o(r,t),u[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")\\.(").concat(a[u.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")\\.(").concat(a[u.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(a[u.NUMERICIDENTIFIER],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(a[u.NUMERICIDENTIFIERLOOSE],"|").concat(a[u.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(a[u.PRERELEASEIDENTIFIER],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(a[u.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(a[u.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(a[u.BUILDIDENTIFIER],"(?:\\.").concat(a[u.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(a[u.MAINVERSION]).concat(a[u.PRERELEASE],"?").concat(a[u.BUILD],"?")),c("FULL","^".concat(a[u.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(a[u.MAINVERSIONLOOSE]).concat(a[u.PRERELEASELOOSE],"?").concat(a[u.BUILD],"?")),c("LOOSE","^".concat(a[u.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(a[u.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(a[u.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:\\.(").concat(a[u.XRANGEIDENTIFIER],")(?:").concat(a[u.PRERELEASE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:\\.(").concat(a[u.XRANGEIDENTIFIERLOOSE],")(?:").concat(a[u.PRERELEASELOOSE],")?").concat(a[u.BUILD],"?)?)?")),c("XRANGE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(a[u.GTLT],"\\s*").concat(a[u.XRANGEPLAINLOOSE],"$")),c("COERCE","(^|[^\\d])(\\d{1,".concat(r,"})(?:\\.(\\d{1,").concat(r,"}))?(?:\\.(\\d{1,").concat(r,"}))?(?:$|[^\\d])")),c("COERCERTL",a[u.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(a[u.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(a[u.LONETILDE]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(a[u.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(a[u.LONECARET]).concat(a[u.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(a[u.GTLT],"\\s*(").concat(a[u.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(a[u.GTLT],"\\s*(").concat(a[u.LOOSEPLAIN],"|").concat(a[u.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(a[u.XRANGEPLAIN],")\\s+-\\s+(").concat(a[u.XRANGEPLAIN],")\\s*$")),c("HYPHENRANGELOOSE","^\\s*(".concat(a[u.XRANGEPLAINLOOSE],")\\s+-\\s+(").concat(a[u.XRANGEPLAINLOOSE],")\\s*$")),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},7606:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,">",n)}},2937:function(e,t,n){var r=n(6902);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},32:function(e,t,n){var r=n(6826);e.exports=function(e,t,n){return r(e,t,"<",n)}},5775:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&-1!==a.compare(e)||(a=new r(i=e,n)))})),i}},1657:function(e,t,n){var r=n(6376),o=n(6902);e.exports=function(e,t,n){var i=null,a=null,u=null;try{u=new o(t,n)}catch(e){return null}return e.forEach((function(e){u.test(e)&&(i&&1!==a.compare(e)||(a=new r(i=e,n)))})),i}},5316:function(e,t,n){var r=n(6376),o=n(6902),i=n(1312);e.exports=function(e,t){e=new o(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var a=0;a<e.set.length;++a)e.set[a].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!i(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null}},6826:function(e,t,n){var r=n(6376),o=n(2257),i=o.ANY,a=n(6902),u=n(5712),s=n(1312),c=n(1544),l=n(2056),f=n(5903);e.exports=function(e,t,n,d){var h,p,y,v,m,g=function(n){var r=t.set[n],a=null,u=null;return r.forEach((function(e){e.semver===i&&(e=new o(">=0.0.0")),a=a||e,u=u||e,h(e.semver,a.semver,d)?a=e:y(e.semver,u.semver,d)&&(u=e)})),a.operator===v||a.operator===m?{v:!1}:u.operator&&u.operator!==v||!p(e,u.semver)?u.operator===m&&y(e,u.semver)?{v:!1}:void 0:{v:!1}};switch(e=new r(e,d),t=new a(t,d),n){case">":h=s,p=l,y=c,v=">",m=">=";break;case"<":h=c,p=f,y=s,v="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(e,t,d))return!1;for(var b=0;b<t.set.length;++b){var _=g(b);if("object"===w(_))return _.v}return!0}},7908:function(e,t,n){var r=n(5712),o=n(6269);e.exports=function(e,t,n){var i=[],a=null,u=null,s=e.sort((function(e,t){return o(e,t,n)})),c=!0,l=!1,f=void 0;try{for(var d,h=s[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;r(p,t,n)?(u=p,a||(a=p)):(u&&i.push([a,u]),u=null,a=null)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}a&&i.push([a,null]);var y=[],v=!0,m=!1,b=void 0;try{for(var w,_=i[Symbol.iterator]();!(v=(w=_.next()).done);v=!0){var S=g(w.value,2),E=S[0],O=S[1];E===O?y.push(E):O||E!==s[0]?O?E===s[0]?y.push("<=".concat(O)):y.push("".concat(E," - ").concat(O)):y.push(">=".concat(E)):y.push("*")}}catch(e){m=!0,b=e}finally{try{v||null==_.return||_.return()}finally{if(m)throw b}}var x=y.join(" || "),A="string"==typeof t.raw?t.raw:String(t);return x.length<A.length?x:t}},799:function(e,t,n){var r=n(6902),o=n(2257).ANY,i=n(5712),a=n(6269),u=function(e,t,n){if(1===e.length&&e[0].semver===o)return 1===t.length&&t[0].semver===o;var r,u,l,f,d,h=new Set,p=!0,y=!1,v=void 0;try{for(var m,g=e[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var b=m.value;">"===b.operator||">="===b.operator?r=s(r,b,n):"<"===b.operator||"<="===b.operator?u=c(u,b,n):h.add(b.semver)}}catch(e){y=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(y)throw v}}if(h.size>1)return null;if(r&&u){if((l=a(r.semver,u.semver,n))>0)return null;if(0===l&&(">="!==r.operator||"<="!==u.operator))return null}var w=!0,_=!1,S=void 0;try{for(var E,O=h[Symbol.iterator]();!(w=(E=O.next()).done);w=!0){var x=E.value;if(r&&!i(x,String(r),n))return null;if(u&&!i(x,String(u),n))return null;var A=!0,k=!1,T=void 0;try{for(var j,P=t[Symbol.iterator]();!(A=(j=P.next()).done);A=!0){var D=j.value;if(!i(x,String(D),n))return!1}}catch(e){k=!0,T=e}finally{try{A||null==P.return||P.return()}finally{if(k)throw T}}return!0}}catch(e){_=!0,S=e}finally{try{w||null==O.return||O.return()}finally{if(_)throw S}}var C=!0,I=!1,M=void 0;try{for(var N,R=t[Symbol.iterator]();!(C=(N=R.next()).done);C=!0){var L=N.value;if(d=d||">"===L.operator||">="===L.operator,f=f||"<"===L.operator||"<="===L.operator,r)if(">"===L.operator||">="===L.operator){if(s(r,L,n)===L)return!1}else if(">="===r.operator&&!i(r.semver,String(L),n))return!1;if(u)if("<"===L.operator||"<="===L.operator){if(c(u,L,n)===L)return!1}else if("<="===u.operator&&!i(u.semver,String(L),n))return!1;if(!L.operator&&(u||r)&&0!==l)return!1}}catch(e){I=!0,M=e}finally{try{C||null==R.return||R.return()}finally{if(I)throw M}}return!(r&&f&&!u&&0!==l||u&&d&&!r&&0!==l)},s=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=function(e,t,n){if(!e)return t;var r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new r(e,n),t=new r(t,n);var o=!1,i=!0,a=!1,s=void 0;try{e:for(var c,l=e.set[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var f=c.value,d=!0,h=!1,p=void 0;try{for(var y,v=t.set[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var m=y.value,g=u(f,m,n);if(o=o||null!==g,g)continue e}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}if(o)return!1}}catch(e){a=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}return!0}},1042:function(e,t,n){var r=n(6902);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},9042:function(e,t,n){var r=n(6902);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(e){return null}}},9688:function(e){"use strict";e.exports=u},2712:function(e,t,n){"use strict";var r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(e,t){return function(n,r){t(n,r,e)}},u=function(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[h])("accessor"===s?{get:f.get,set:f.set}:f[c],p);if("accessor"===s){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(u=a(v.get))&&(f.get=u),(u=a(v.set))&&(f.set=u),(u=a(v.init))&&o.unshift(u)}else(u=a(v))&&("field"===s?o.unshift(u):f[c]=u)}l&&Object.defineProperty(l,r.name,f),d=!0},s=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0},c=function(e){return"symbol"==(void 0===e?"undefined":w(e))?e:"".concat(e)},l=function(e,t,n){return"symbol"==(void 0===t?"undefined":w(t))&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},f=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,h(t,n)?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},y=function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||R(t,e,n)},v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e},b=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r},_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},S=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))},t&&(r[e]=t(r[e])))}function u(e,t){try{h((n=o[e](t)).value,L)?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}},E=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:L(e[r](t)),done:!1}:o?o(t):t}:o}},O=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}},x=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},A=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=B(e),r=0;r<n.length;r++)"default"!==n[r]&&R(t,e,n[r]);return F(t,e),t},k=function(e){return e&&e.__esModule?e:{default:e}},T=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},j=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},P=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},D=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t},C=function(e){function t(t){e.error=e.hasError?new U(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,(function(e){return t(e),o()}))}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()},I=function(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e})):e};n.r(t),n.d(t,{__addDisposableResource:function(){return D},__assign:function(){return N},__asyncDelegator:function(){return E},__asyncGenerator:function(){return S},__asyncValues:function(){return O},__await:function(){return L},__awaiter:function(){return d},__classPrivateFieldGet:function(){return T},__classPrivateFieldIn:function(){return P},__classPrivateFieldSet:function(){return j},__createBinding:function(){return R},__decorate:function(){return i},__disposeResources:function(){return C},__esDecorate:function(){return u},__exportStar:function(){return y},__extends:function(){return r},__generator:function(){return p},__importDefault:function(){return k},__importStar:function(){return A},__makeTemplateObject:function(){return x},__metadata:function(){return f},__param:function(){return a},__propKey:function(){return c},__read:function(){return m},__rest:function(){return o},__rewriteRelativeImportExtension:function(){return I},__runInitializers:function(){return s},__setFunctionName:function(){return l},__spread:function(){return g},__spreadArray:function(){return _},__spreadArrays:function(){return b},__values:function(){return v},default:function(){return G}});var M=function(e,t){return M=Object.setPrototypeOf||h({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},M(e,t)},N=function(){return N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},N.apply(this,arguments)},R=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function L(e){return h(this,L)?(this.v=e,this):new L(e)}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},B=function(e){return B=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},B(e)},U="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},G={__extends:r,__assign:N,__rest:o,__decorate:i,__param:a,__esDecorate:u,__runInitializers:s,__propKey:c,__setFunctionName:l,__metadata:f,__awaiter:d,__generator:p,__createBinding:R,__exportStar:y,__values:v,__read:m,__spread:g,__spreadArrays:b,__spreadArray:_,__await:L,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:O,__makeTemplateObject:x,__importStar:A,__importDefault:k,__classPrivateFieldGet:T,__classPrivateFieldSet:j,__classPrivateFieldIn:P,__addDisposableResource:D,__disposeResources:C,__rewriteRelativeImportExtension:I}}},a={};function m(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,m),n.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var _={};return function(){"use strict";var r=function(e){return function(t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];i&&(n[i]=t[r])}return n}},a=function(e){var t=[{name:"timestampWithOffset",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:r(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:r(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:r(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:e.compile("^(".concat(wt,"{2,4})\\s*年\\s*(").concat(wt,"{1,2})\\s*月\\s*(").concat(wt,"{1,2})\\s*日$")),handler:r(["","year","month","day"])},{name:"korean",regex:e.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:r(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:r(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){var t=Dt.now(),n=864e5,r=e[0].toLowerCase(),o={now:0,today:0,tomorrow:n,yesterday:-1*n}[r];0!==o&&t.setTime(t.getTime()+o);var i={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?y(p({},i),{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}):i}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function(e){var t=g(e,5),n=t[1],r=t[2],o=t[3],i=t[4];r=parseFloat(r),"week"===(o=o.length<=2?Pt[o]:(o=o.replace(/s$/,"")).toLowerCase())&&(o="day",r*=7),("-"===n||i)&&(r*=-1);var a=Dt.now();return"millisecond"===o?a.setUTCMilliseconds(a.getUTCMilliseconds()+r):"second"===o?a.setUTCSeconds(a.getUTCSeconds()+r):"minute"===o?a.setUTCMinutes(a.getUTCMinutes()+r):"hour"===o?a.setUTCHours(a.getUTCHours()+r):"day"===o?a.setUTCDate(a.getUTCDate()+r):"month"===o?a.setUTCMonth(a.getUTCMonth()+r):"year"===o&&a.setUTCFullYear(a.getUTCFullYear()+r),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){var t=parseInt(e[1],10),n=new Date(1e3*t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){var t=parseInt(e[1],10),n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:e.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:r(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:r(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:r(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:r(["","hour","minute","second","meridiem"])},{name:"hms24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:r(["","hour","minute","second","millisecond"])},{name:"hm12",regex:e.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:r(["","hour","minute","meridiem"])},{name:"hm24",regex:e.compile("(_H24_):(_MIN_)"),handler:r(["","hour","minute"])},{name:"h12",regex:e.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:r(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:r(["","year","month","day"])},{name:"yearMonthnameDay",regex:e.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:r(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:e.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:r(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:e.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:r(["","monthname","day","","year"])},{name:"dayMonthname",regex:e.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:r(["","day","","monthname"])},{name:"monthnameDay",regex:e.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:r(["","monthname","day"])},{name:"hmsNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:r(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:r(["","hour","minute"])},{name:"ymd",regex:e.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:r(["","year","","month","day"])},{name:"mdy",regex:e.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:r(["","month","","day","year"])},{name:"dmy",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:r(["","day","month","year"])},{name:"yearLoose",regex:e.compile("_YEAR4_"),handler:r(["year"])},{name:"dayMonthnameLoose",regex:e.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:r(["","day","monthname"])},{name:"monthnameDayLoose",regex:e.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:r(["","monthname","day"])},{name:"monthname",regex:e.compile("_MONTHNAME_"),handler:r(["monthname"])},{name:"year4",regex:e.compile("_YEAR4_"),handler:r(["year"])},{name:"md",regex:e.compile("(_MONTH_)[/-](_DAY_)"),handler:r(["","month","day"])},{name:"dm",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:r(["","day","month"])},{name:"day",regex:e.compile("_DAY_"),handler:r(["day"])},{name:"year2",regex:e.compile("_YEAR2_"),handler:r(["year"])},{name:"onlyZone",regex:e.compile("_ZONE_"),handler:r(["zone"])},{name:"onlyOffset",regex:e.compile("_OFFSET_"),handler:r(["offset"])}],n=e.baseName.slice(0,5);return jt.includes(n)?t:t.filter((function(e){return!["mdy","md"].includes(e.name)}))},u=function(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)},E=function(e){return function(t){var n=String(t).slice(0,50);return""===n&&(n="(empty string)"),{invalid:'Unable to parse "'.concat(n,'" with locale "').concat(e,'"')}}},x=function(e){return function(t){var n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.entries(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=g(a.value,2),c=s[0],l=s[1];if("monthname"===c){if(l){var f=e.monthNameToInt(l);void 0!==f&&(n.month=f)}}else if("hour"===c&&t.meridiem){var d=e.h12ToInt(l,t.meridiem);void 0!==d&&(n.hour=d)}else if("zone"===c){if(l){var h=e.zoneToOffset(l);void 0!==h&&(n.offset=h)}}else if("offset"===c){var p=e.offsetToMinutes(l);void 0!==p&&(n.offset=p)}else if("millisecond"===c){var y=e.millisecondToInt(l);"number"==typeof y&&(n.millisecond=y)}else if(It.includes(c)){var v=e.toInt(l);"number"==typeof v&&(n[c]=v)}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n.year<100&&(n.year=gt[n.year]),n.year&&"buddhist"===e.dateOptions.calendar&&(n.year-=543),n}},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt,n=function(e){if(!Mt[e]){var t=Tt.factory(e);Mt[e]=new Ct({doneChecker:u,fallback:E(e),patterns:a(t),formatter:x(t)})}return Mt[e]}(t),r=function(e,t){var n=t.slice(0,2).toLowerCase(),r=Rt[n];if(!r)return e;var o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=g(u.value,2),l=c[0],f=c[1];e=e.replace(l,f)}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return e}(e,t);return n.attempt(r)},k=function(e){e.month&&e.day&&void 0===e.year&&(e.year=(new Date).getFullYear()),60===e.second&&(e.second=59);var t=new yt(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new yt(t.valueOf()-60*e.offset*1e3):t},T=function(e){var t=A(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt),n=t.invalid?new yt(NaN):k(t);return n.isValid()||(n.invalid='Unable to parse date "'.concat(e,'"')),n},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt;return h(e,Date)?new yt(e.valueOf()):"number"==typeof e?new yt(e):T(e,t)},P=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])}},D=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},C=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},I=function(e){var t=this.__data__=new qt(e);this.size=t.size},M=function(){var e=window.i18next.language;return"ht"===(e=e.replace("_","-"))&&(e="fr-HT"),e},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,Ft.default)();if(null==e)return null;var n,r=M(),o=(0,Ft.default)(t);if("string"==typeof e){var i=A(e,r);if(i.invalid)return console.warn("Could not interpret '".concat(e,"' as a date")),null;i.day&&!i.month&&(i=Object.assign({},Lo(i,"day"),{month:i.day})),i.month&&(i.month-=1),i.day&&(i=Object.assign({},Lo(i,"day"),{date:i.day})),n=(0,Ft.default)(o).set(i)}else n=(0,Ft.default)(e);var a=o.diff(n,"hours"),u=o.diff(n,"days"),s=o.diff(n,"weeks"),c=o.diff(n,"months"),l=o.diff(n,"years"),f={},d={style:"short",localeMatcher:"lookup"};if(a<2){var h=o.diff(n,"minutes");f.minutes=h,0===h&&(d.minutesDisplay="always")}else if(u<2)f.hours=a;else if(s<4)f.days=u;else if(l<1){var p=o.subtract(s,"weeks").diff(n,"days");f.weeks=s,f.days=p}else if(l<2){var y=o.subtract(c,"months").diff(n,"days");f.months=c,f.days=y}else if(l<18){var v=o.subtract(l,"year").diff(n,"months");f.years=l,f.months=v}else f.years=l;return new ft.DurationFormat(r,d).format(f)},R=function(e,t){var n=e.copy(),r="hour"in n?function(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,function(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=H(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=H(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=H(e.minute,60);var t=Math.floor(e.hour/24);return e.hour=H(e.hour,24),t}(e)}(n,t):0;L(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,F(n),B(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,F(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,F(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);var o=n.calendar.getYearsInEra(n);if(n.year>o){var i,a,u=null===(i=(a=n.calendar).isInverseEra)||void 0===i?void 0:i.call(a,n);n.year=o,n.month=u?1:n.calendar.getMonthsInYear(n),n.day=u?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);var s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n},L=function(e,t){var n,r;(null===(n=(r=e.calendar).isInverseEra)||void 0===n?void 0:n.call(r,e))&&(t=-t),e.year+=t},F=function(e){for(;e.month<1;)L(e,-1),e.month+=e.calendar.getMonthsInYear(e);for(var t=0;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,L(e,1)},B=function(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))},U=function(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),B(e)},G=function(e,t){return R(e,function(e){var t={};for(var n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}(t))},z=function(e,t){var n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),U(n),n},H=function(e,t){var n=e%t;return n<0&&(n+=t),n},V=function(e,t,n,r){var o=e.copy();switch(t){case"era":var i=e.calendar.getEras(),a=i.indexOf(e.era);if(a<0)throw new Error("Invalid era: "+e.era);a=K(a,n,0,i.length-1,null==r?void 0:r.round),o.era=i[a],U(o);break;case"year":var u,s;(null===(u=(s=o.calendar).isInverseEra)||void 0===u?void 0:u.call(s,o))&&(n=-n),o.year=K(e.year,n,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=K(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=K(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),U(o),o},K=function(e,t,n,r){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4]){(e+=Math.sign(t))<n&&(e=r);var o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e},q=function(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)},$=function(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond},W=function(){return null==Fo&&(Fo=(new Intl.DateTimeFormat).resolvedOptions().timeZone),Fo},Y=function(e,t){return e-t*Math.floor(e/t)},J=function(e,t,n,r){var o=(t=Q(e,t))-1,i=-2;return n<=2?i=0:Z(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*n-362)/12+i+r)},Z=function(e){return e%4==0&&(e%100!=0||e%400==0)},Q=function(e,t){return"BC"===e?1-t:t},X=function(e){var t="AD";return e<=0&&(t="BC",e=1-e),[t,e]},ee=function(e){var t,n=ce(e,new zo);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),"".concat(t,"-").concat(String(n.month).padStart(2,"0"),"-").concat(String(n.day).padStart(2,"0"))},te=function(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)},ne=function(e){var t,n="object"==typeof e[0]?e.shift():new zo;if("string"==typeof e[0])t=e.shift();else{var r=n.getEras();t=r[r.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]},re=function(e){return oe(Q((e=ce(e,new zo)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)},oe=function(e,t,n,r,o,i,a){var u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n),u.getTime()},ie=function(e,t){if("UTC"===t)return 0;if(e>0&&t===W())return-6e4*new Date(e).getTimezoneOffset();var n=ae(e,t),r=n.year,o=n.month,i=n.day,a=n.hour,u=n.minute,s=n.second;return oe(r,o,i,a,u,s,0)-1e3*Math.floor(e/1e3)},ae=function(e,t){var n=$o.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$o.set(t,n));var r=n.formatToParts(new Date(e)),o={},i=!0,a=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;"literal"!==l.type&&(o[l.type]=l.value)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}return{year:"BC"===o.era||"B"===o.era?1-o.year:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}},ue=function(e,t){return new Date(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible",r=se(e);if("UTC"===t)return re(r);if(t===W()&&"compatible"===n){r=ce(r,new zo);var o=new Date,i=Q(r.era,r.year);return o.setFullYear(i,r.month-1,r.day),o.setHours(r.hour,r.minute,r.second,r.millisecond),o.getTime()}var a=re(r),u=ie(a-Wo,t),s=ie(a+Wo,t),c=function(e,t,n,r){return(n===r?[n]:[n,r]).filter((function(n){return function(e,t,n){var r=ae(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}(e,t,n)}))}(r,t,a-u,a-s);if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(a-u,a-s);case"compatible":case"later":return Math.max(a-u,a-s);case"reject":throw new RangeError("No such absolute time found")}}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"compatible"))},se=function(e,t){var n,r,o=0,i=0,a=0,u=0;if("timeZone"in e)o=(n=e).hour,i=n.minute,a=n.second,u=n.millisecond;else if("hour"in e&&!t)return e;return t&&(o=(r=t).hour,i=r.minute,a=r.second,u=r.millisecond),new qo(e.calendar,e.era,e.year,e.month,e.day,o,i,a,u)},ce=function(e,t){if(r=t,null!==(u=null!==(a=null===(o=(n=e.calendar).isEqual)||void 0===o?void 0:o.call(n,r))&&void 0!==a?a:null===(i=r.isEqual)||void 0===i?void 0:i.call(r,n))&&void 0!==u?u:n.identifier===r.identifier)return e;var n,r,o,i,a,u,s=t.fromJulianDay(e.calendar.toJulianDay(e)),c=e.copy();return c.calendar=t,c.era=s.era,c.year=s.year,c.month=s.month,c.day=s.day,U(c),c},le=function(e){var t=g(X(e.year+-543),2),n=t[0],r=t[1];return new Vo(n,r,e.month,e.day)},fe=function(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1},de=function(e,t){var n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-fe(e,n,1,1))/30);return[n,r,t+1-fe(e,n,r,1)]},he=function(e){return Math.floor(e%4/3)},pe=function(e,t){return t%13!=0?30:he(e)+5},ye=function(e){return Y(7*e+1,19)<7},ve=function(e){var t=Math.floor((235*e-234)/19),n=12084+13753*t,r=29*t+Math.floor(n/25920);return Y(3*(r+1),7)<3&&(r+=1),r},me=function(e){return ve(e)+function(e){var t=ve(e-1),n=ve(e);return ve(e+1)-n==356?2:n-t==382?1:0}(e)},ge=function(e){return me(e+1)-me(e)},be=function(e,t){if(t>=6&&!ye(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;var n=function(e){var t=ge(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?ye(e)?30:0:30},we=function(e,t,n,r){return r+Math.ceil(29.5*(n-1))+354*(t-1)+Math.floor((3+11*t)/30)+e-1},_e=function(e,t,n){var r=Math.floor((30*(n-t)+10646)/10631),o=Math.min(12,Math.ceil((n-(29+we(t,r,1,1)))/29.5)+1),i=n-we(t,r,o,1)+1;return new Vo(e,r,o,i)},Se=function(e){return(14+11*e)%30<11},Ee=function(e){return ci+Uo[e-ui]},Oe=function(e,t){var n=1<<11-(t-1);return 0==(Bo[e-ui]&n)?29:30},xe=function(e,t){for(var n=Ee(e),r=1;r<t;r++)n+=Oe(e,r);return n},Ae=function(e){return Uo[e+1-ui]-Uo[e-ui]},ke=function(e){var t=hi.findIndex((function(t){var n=g(t,3),r=n[0],o=n[1],i=n[2];return e.year<r||e.year===r&&e.month<o||e.year===r&&e.month===o&&e.day<i}));return-1===t?hi.length-1:0===t?0:t-1},Te=function(e){var t=yi[vi.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Vo(e.year+t,e.month,e.day)},je=function(e){if(1===e.year){var t=vi.indexOf(e.era);return hi[t]}},Pe=function(e){return"minguo"===e.era?e.year+wi:1-e.year+wi},De=function(e){var t=e-wi;return t>0?["minguo",t]:["before_minguo",1-t]},Ce=function(e){var t=g(X(Pe(e)),2),n=t[0],r=t[1];return new Vo(n,r,e.month,e.day)},Ie=function(e,t){var n=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return function(e,t){return t.get?t.get.call(e):t.value}(e,n)},Me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ne=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){Me(e,t,n[t])}))}return e},Re=function(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&(0,Ft.default)(e,ki).isValid()},Le=function(e){return(0,Ft.default)(e).isToday()},Fe=function(e){return Re(e)?(0,Ft.default)(e,ki).toDate():null},Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,Ft.default)(e);return t&&(n=n.utc()),n.format(ki)},Ue=function(e){return(0,Ft.default)(e).toDate()},Ge=function(e,t){ji.register(e,t)},ze=function(e){var t,n,r=null!=e?e:M();return ji.getCalendar((t=r,(null!=(n=Intl.Locale)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):h(t,n))?r:new Intl.Locale(r)))},He=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A(e,M());if(n.invalid)return console.warn("Could not parse invalid date '".concat(e,"'")),null;!Ai(n.day)&&Ai(n.month)&&(n=Object.assign({},Lo(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},Lo(n,"day"),{date:n.day}));var r=(0,Ft.default)().set(n).toDate();return Ai(n.year)&&(t.year=!1),Ai(n.month)&&(t.month=!1),Ai(n.date)&&(t.day=!1),Ve(r,t)},Ve=function(e,t){var n,r,o=null!==(n=null==t?void 0:t.locale)&&void 0!==n?n:M(),i=new Intl.Locale(o),a=Ne({},Pi,{noToday:"am"===i.language},t),u=a.calendar,s=a.mode,c=a.time,l=a.day,f=a.month,d=a.year,h=a.noToday,p=a.numberingSystem,y={calendar:null!=u?u:ze(i),year:d?"numeric":void 0,month:f?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},v=(0,Ft.default)(e).isToday();if(v&&!h)r=(r=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(o)+r.slice(1);else{"en"===i.language&&(o="en-GB");var m=new Intl.DateTimeFormat(o,y).formatToParts(e);("en"===i.language||"am"===i.language)&&"standard"==s&&d&&l&&(m=m.map(Di("-"))),"wide"==s&&(m=m.map(Di(" — "))),"ethiopic"===y.calendar&&(m=m.filter((function(e,t,n){return!("era"===e.type||"literal"===e.type&&t<n.length-1&&"era"===n[t+1].type)}))),r=m.map((function(e){return e.value})).join("")}return(!0===c||v&&"for today"===c)&&(r+=", ".concat(Ke(e))),r},Ke=function(e){return e.toLocaleTimeString(M(),{hour:"2-digit",minute:"2-digit"})},qe=function(e,t){return Ve(e,(n=Ne({},t),r=null!=(r={time:!0})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},$e=function(e,t){var n=ze("string"==typeof t?new Intl.Locale(t):t);return n?ce(e,function(e){switch(e){case"buddhist":return new Yo;case"ethiopic":return new Xo;case"ethioaa":return new ei;case"coptic":return new ti;case"hebrew":return new ri;case"indian":return new oi;case"islamic-civil":return new li;case"islamic-tbla":return new fi;case"islamic-umalqura":return new di;case"japanese":return new mi;case"persian":return new bi;case"roc":return new _i;default:return new zo}}(n)):e},We=function(e){return!window.offlineEnabled||(null!=e?e:navigator.onLine)},Ye=function(e){return Ze(Xe(e,"usual","official"))},Je=function(e){return Ye(e)},Ze=function(e){var t;return e?null!==(t=e.text)&&void 0!==t?t:function(e){var t,n=null!==(t=e.given)&&void 0!==t?t:[];return(e.family?n.concat(e.family):n).join(" ")}(e):""},Qe=function(e){return Ze(e)},Xe=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];0==n.length&&(n=["usual"]);var o,i=!0,a=!1,u=void 0;try{for(var s,c=function(){var t,n=s.value,r=null===(t=e.name)||void 0===t?void 0:t.find((function(e){return function(e,t){return e.use?e.use===t:"usual"===t}(e,n)}));if(r)return{v:r}},l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var f=c();if("object"==((o=f)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":void 0===o?"undefined":w(o)))return f.v}}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}},et=function(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);return r.length===o.length&&r.every((function(n){return e[n]===t[n]}))},tt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.localStorage;try{return e.getItem("test"),!0}catch(e){return!1}},nt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},rt=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split("."))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),3!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return nt(e,3);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,3):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1],i=n[2];return"".concat(r,".").concat(o,".").concat(i)},ot=function(e,t){var n=function(e){var t=e.indexOf("-");if(t>=0){var n=rt(e.slice(0,t)),r=e.slice(t+1);return"".concat(n,"-").concat(r)}return rt(e)}(t);return Ii.satisfies(n,e,{includePrerelease:!0})},it=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},at=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){it(i,r,o,a,u,"next",e)}function u(e){it(i,r,o,a,u,"throw",e)}a(void 0)}))}},ut=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},st=function(e){return Mi.apply(this,arguments)},ct=function(e){return Ni.apply(this,arguments)};m.r(_),m.d(_,{age:function(){return N},canAccessStorage:function(){return tt},convertToLocaleCalendar:function(){return $e},displayName:function(){return Je},formatDate:function(){return Ve},formatDatetime:function(){return qe},formatPartialDate:function(){return He},formatPatientName:function(){return Ze},formatTime:function(){return Ke},formattedName:function(){return Qe},getDefaultCalendar:function(){return ze},getDefaultsFromConfigSchema:function(){return Ci},getLocale:function(){return M},getPatientName:function(){return Ye},isOmrsDateStrict:function(){return Re},isOmrsDateToday:function(){return Le},isOnline:function(){return We},isVersionSatisfied:function(){return ot},parseDate:function(){return Ue},registerDefaultCalendar:function(){return Ge},retry:function(){return st},selectPreferredName:function(){return Xe},shallowEqual:function(){return et},toDateObjectStrict:function(){return Fe},toOmrsIsoString:function(){return Be}});var lt,ft=m(6893);if("undefined"!=typeof navigator){var dt=navigator;lt=Array.isArray(dt.languages)?dt.languages[0]:dt.language}else if("undefined"!=typeof process){var ht=process.env;lt=ht.LC_ALL||ht.LC_MESSAGES||ht.LANG||ht.LANGUAGE}for(var pt=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(lt||"en-US"),yt=function(e){d(n,e);var t=O(n);function n(){var e;return i(this,n),c(o(e=t.apply(this,arguments)),"invalid",null),e}return s(n,[{key:"isValid",value:function(){return!Number.isNaN(this.valueOf())}}]),n}(S(Date)),vt={},mt=1;mt<100;mt++)vt[(mt<=9?"0":"")+mt]=mt+(mt>51?1900:2e3);var gt=vt,bt={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},wt="[1234567890一二三四五六七八九〇\\d]",_t={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},St={},Et={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Ot={zone:Et,year:gt,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},xt={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(Et).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[±−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},At=y(p({},xt),{YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[±−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"}),kt={},Tt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt;i(this,e),c(this,"locale",void 0),c(this,"lookups",void 0),c(this,"vars",void 0),c(this,"numberingSystem",void 0),c(this,"baseName",void 0),c(this,"dateOptions",void 0),this.locale=t,this.lookups=p({},Ot),this.vars=p({},xt);var n=new Intl.NumberFormat(this.locale);this.numberingSystem=n.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}return s(e,[{key:"toInt",value:function(e){if("number"==typeof e)return e;if("string"==typeof e){if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){var t=parseInt(e,10);if(!isNaN(t))return t}for(var n="",r=0;r<e.length;r++)n+=String(this.lookups.digit[e[r]]);return parseInt(n,10)}}},{key:"millisecondToInt",value:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}}},{key:"monthNameToInt",value:function(e){if("string"==typeof e){var t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}}},{key:"h12ToInt",value:function(e,t){if("string"==typeof e){var n=this.lookups.meridiem[null==t?void 0:t.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}}},{key:"zoneToOffset",value:function(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}},{key:"offsetToMinutes",value:function(e){if("string"==typeof e){var t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){var n=g(t,4),r=n[1],o=n[2],i=n[3];return("-"===r||"−"===r?-1:1)*(60*this.toInt(o)+this.toInt(i||0))}return 0}}},{key:"build",value:function(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=_t:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}},{key:"buildNumbers",value:function(){var e=function(e){if(St[e])return St[e];if("fullwide"===e||"hanidec"===e)return{group:wt,lookup:p({},_t)};var t=bt[e];if(!t)return{group:"\\d",lookup:p({},_t)};for(var n=String.fromCharCode(t),r=String.fromCharCode(t+9),o={},i=0;i<10;i++)o[String.fromCharCode(t+i)]=i;return St[e]={group:"[".concat(n,"-").concat(r,"]"),lookup:o},St[e]}(this.numberingSystem),t=e.group,n=e.lookup;for(var r in this.lookups.digit=n,At)At.hasOwnProperty(r)&&(this.vars[r]=At[r].replace(/\*/g,t))}},{key:"buildMonthNames",value:function(){var e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu".split("|").forEach((function(n,r){["","k","kuu","kuuta"].forEach((function(o,i){e[n+o+(i<2?"\\.?":"")]=!0,t[n+o]=r+1}))}));else{for(var n=[],r=function(e){return"month"===e.type},o=0;o<12;o++)n.push(new Date(2017,o,1));var i=!0,a=!1,u=void 0;try{for(var s,c=["full","long","medium"][Symbol.iterator]();!(i=(s=c.next()).done);i=!0)for(var l=s.value,f=Intl.DateTimeFormat(this.locale,{dateStyle:l}),d=0;d<12;d++){var h=f.formatToParts(n[d]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(h)||(/^ko/i.test(this.locale)&&(h+="월"),"medium"===l?(h=h.replace(/\.$/,""),e["".concat(h,"\\.?")]=!0):e[h]=!0,t[h]=d+1)}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}for(var p=Intl.DateTimeFormat(this.locale,{month:"short"}),y=0;y<12;y++){var v=p.formatToParts(n[y]).find(r).value.toLocaleLowerCase(this.locale);v=v.replace(/\.$/,""),e["".concat(v,"\\.?")]=!0,t[v]=y+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}},{key:"buildDaynames",value:function(){for(var e=[],t=function(e){return"weekday"===e.type},n=0;n<7;n++)e.push(new Date(2017,0,n+1));var r=[],o={},i=!0,a=!1,u=void 0;try{for(var s,c=["long","short"][Symbol.iterator]();!(i=(s=c.next()).done);i=!0)for(var l=s.value,f=Intl.DateTimeFormat(this.locale,{weekday:l}),d=0;d<7;d++){var h=f.formatToParts(e[d]).find(t).value.toLocaleLowerCase(this.locale);"short"===l?(h=h.replace(/\.$/,""),r.push("".concat(h,"\\.?"))):r.push(h),o[h]=d}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=o}},{key:"buildMeridiems",value:function(){for(var e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=function(e){return"dayPeriod"===e.type},n=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"}),i=0;i<2;i++){var a=o.formatToParts(e[i]).find(t);if(!a)return;var u=a.value.toLocaleLowerCase(this.locale);n.push(u),r[u]=12*i}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}},{key:"compile",value:function(e){var t=this,n=e.replace(/_([A-Z0-9]+)_/g,(function(e,n){if(!t.vars[n])throw new Error("Template string contains invalid variable _".concat(n,"_"));return t.vars[n]}));return new RegExp(n,"i")}}],[{key:"factory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt;return kt[t.toLowerCase()]||(kt[t.toLowerCase()]=new e(t)),kt[t.toLowerCase()]}}]),e}(),jt=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],Pt={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Dt={now:function(){return new Date}},Ct=function(){function e(t){var n=t.doneChecker,r=t.fallback,o=t.patterns,a=t.formatter;i(this,e),c(this,"doneChecker",void 0),c(this,"fallback",void 0),c(this,"patterns",void 0),c(this,"formatter",void 0),this.doneChecker=n,this.fallback=r,this.patterns=o,this.formatter=a}return s(e,[{key:"attempt",value:function(e){if("string"!=typeof e)return this.fallback(e);var t=e.trim(),n={},r=!1,o=!0,i=!1,a=void 0;try{for(var u,s=this.patterns[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=t.match(c.regex);if(l){r=!0;var f=c.handler(l);if(f){var d=!0,h=!1,p=void 0;try{for(var y,v=Object.entries(f)[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var m=g(y.value,2),b=m[0],w=m[1];b in n||void 0===w||(n[b]=w)}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}if(t=(t=t.slice(0,l.index)+t.slice(l.index+l[0].length+1)).trim(),this.doneChecker(n,t))break}}}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r?this.formatter(n):this.fallback(e)}}]),e}(),It=["year","month","day","hour","minute","second","millisecond","offset"],Mt={},Nt=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],Rt={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "]].concat(b(Nt)),ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:Nt,id:Nt,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};Date.fromString=yt.fromString=T,Date.fromAny=yt.fromAny=j;var Lt={fromString:T,fromAny:j,fromObject:k,attempt:A};"undefined"!=typeof window&&(window.anyDateParser=Lt);var Ft=m(9688),Bt=m(7067),Ut=m.n(Bt),Gt=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},zt=function(e,t){return e===t||e!=e&&t!=t},Ht=function(e,t){for(var n=e.length;n--;)if(zt(e[n][0],t))return n;return-1},Vt=Array.prototype.splice;P.prototype.clear=function(){this.__data__=[],this.size=0},P.prototype.delete=function(e){var t=this.__data__,n=Ht(t,e);return!(n<0||(n==t.length-1?t.pop():Vt.call(t,n,1),--this.size,0))},P.prototype.get=function(e){var t=this.__data__,n=Ht(t,e);return n<0?void 0:t[n][1]},P.prototype.has=function(e){return Ht(this.__data__,e)>-1},P.prototype.set=function(e,t){var n=this.__data__,r=Ht(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Kt,qt=P,$t="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Wt="object"==typeof self&&self&&self.Object===Object&&self,Yt=$t||Wt||Function("return this")(),Jt=Yt.Symbol,Zt=Object.prototype,Qt=Zt.hasOwnProperty,Xt=Zt.toString,en=Jt?Jt.toStringTag:void 0,tn=Object.prototype.toString,nn=Jt?Jt.toStringTag:void 0,rn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":nn&&nn in Object(e)?function(e){var t=Qt.call(e,en),n=e[en];try{e[en]=void 0;var r=!0}catch(e){}var o=Xt.call(e);return r&&(t?e[en]=n:delete e[en]),o}(e):function(e){return tn.call(e)}(e)},on=function(e){var t=void 0===e?"undefined":w(e);return null!=e&&("object"==t||"function"==t)},an=function(e){if(!on(e))return!1;var t=rn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},un=Yt["__core-js_shared__"],sn=(Kt=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||""))?"Symbol(src)_1."+Kt:"",cn=Function.prototype.toString,ln=function(e){if(null!=e){try{return cn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},fn=/^\[object .+?Constructor\]$/,dn=Function.prototype,hn=Object.prototype,pn=dn.toString,yn=hn.hasOwnProperty,vn=RegExp("^"+pn.call(yn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mn=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!on(e)||(t=e,sn&&sn in t))&&(an(e)?vn:fn).test(ln(e));var t}(n)?n:void 0},gn=mn(Yt,"Map"),bn=mn(Object,"create"),wn=Object.prototype.hasOwnProperty,_n=Object.prototype.hasOwnProperty;D.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},D.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},D.prototype.get=function(e){var t=this.__data__;if(bn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return wn.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return bn?void 0!==t[e]:_n.call(t,e)},D.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bn&&void 0===t?"__lodash_hash_undefined__":t,this};var Sn=D,En=function(e,t){var n,r,o=e.__data__;return("string"==(r=w(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};C.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(gn||qt),string:new Sn}},C.prototype.delete=function(e){var t=En(this,e).delete(e);return this.size-=t?1:0,t},C.prototype.get=function(e){return En(this,e).get(e)},C.prototype.has=function(e){return En(this,e).has(e)},C.prototype.set=function(e,t){var n=En(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var On=C;I.prototype.clear=function(){this.__data__=new qt,this.size=0},I.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},I.prototype.get=function(e){return this.__data__.get(e)},I.prototype.has=function(e){return this.__data__.has(e)},I.prototype.set=function(e,t){var n=this.__data__;if(h(n,qt)){var r=n.__data__;if(!gn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new On(r)}return n.set(e,t),this.size=n.size,this};var xn=I,An=function(){try{var e=mn(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),kn=function(e,t,n){"__proto__"==t&&An?An(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Tn=Object.prototype.hasOwnProperty,jn=function(e,t,n){var r=e[t];Tn.call(e,t)&&zt(r,n)&&(void 0!==n||t in e)||kn(e,t,n)},Pn=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],s=r?r(n[u],e[u],u,n,e):void 0;void 0===s&&(s=e[u]),o?kn(n,u,s):jn(n,u,s)}return n},Dn=function(e){return null!=e&&"object"==typeof e},Cn=function(e){return Dn(e)&&"[object Arguments]"==rn(e)},In=Object.prototype,Mn=In.hasOwnProperty,Nn=In.propertyIsEnumerable,Rn=Cn(function(){return arguments}())?Cn:function(e){return Dn(e)&&Mn.call(e,"callee")&&!Nn.call(e,"callee")},Ln=Rn,Fn=Array.isArray,Bn=t&&!t.nodeType&&t,Un=Bn&&e&&!e.nodeType&&e,Gn=Un&&Un.exports===Bn?Yt.Buffer:void 0,zn=(Gn?Gn.isBuffer:void 0)||function(){return!1},Hn=/^(?:0|[1-9]\d*)$/,Vn=function(e,t){var n=void 0===e?"undefined":w(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Hn.test(e))&&e>-1&&e%1==0&&e<t},Kn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},qn={};qn["[object Float32Array]"]=qn["[object Float64Array]"]=qn["[object Int8Array]"]=qn["[object Int16Array]"]=qn["[object Int32Array]"]=qn["[object Uint8Array]"]=qn["[object Uint8ClampedArray]"]=qn["[object Uint16Array]"]=qn["[object Uint32Array]"]=!0,qn["[object Arguments]"]=qn["[object Array]"]=qn["[object ArrayBuffer]"]=qn["[object Boolean]"]=qn["[object DataView]"]=qn["[object Date]"]=qn["[object Error]"]=qn["[object Function]"]=qn["[object Map]"]=qn["[object Number]"]=qn["[object Object]"]=qn["[object RegExp]"]=qn["[object Set]"]=qn["[object String]"]=qn["[object WeakMap]"]=!1;var $n=function(e){return function(t){return e(t)}},Wn=t&&!t.nodeType&&t,Yn=Wn&&e&&!e.nodeType&&e,Jn=Yn&&Yn.exports===Wn&&$t.process,Zn=function(){try{return Yn&&Yn.require&&Yn.require("util").types||Jn&&Jn.binding&&Jn.binding("util")}catch(e){}}(),Qn=Zn&&Zn.isTypedArray,Xn=Qn?$n(Qn):function(e){return Dn(e)&&Kn(e.length)&&!!qn[rn(e)]},er=Object.prototype.hasOwnProperty,tr=function(e,t){var n=Fn(e),r=!n&&Ln(e),o=!n&&!r&&zn(e),i=!n&&!r&&!o&&Xn(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!t&&!er.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vn(c,s))||u.push(c);return u},nr=Object.prototype,rr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||nr)},or=function(e,t){return function(n){return e(t(n))}},ir=or(Object.keys,Object),ar=Object.prototype.hasOwnProperty,ur=function(e){return null!=e&&Kn(e.length)&&!an(e)},sr=function(e){return ur(e)?tr(e):function(e){if(!rr(e))return ir(e);var t=[];for(var n in Object(e))ar.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},cr=Object.prototype.hasOwnProperty,lr=function(e){return ur(e)?tr(e,!0):function(e){if(!on(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=rr(e),n=[];for(var r in e)("constructor"!=r||!t&&cr.call(e,r))&&n.push(r);return n}(e)},fr=t&&!t.nodeType&&t,dr=fr&&e&&!e.nodeType&&e,hr=dr&&dr.exports===fr?Yt.Buffer:void 0,pr=hr?hr.allocUnsafe:void 0,yr=function(){return[]},vr=Object.prototype.propertyIsEnumerable,mr=Object.getOwnPropertySymbols,gr=mr?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}(mr(e),(function(t){return vr.call(e,t)})))}:yr,br=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},wr=or(Object.getPrototypeOf,Object),_r=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)br(t,gr(e)),e=wr(e);return t}:yr,Sr=function(e,t,n){var r=t(e);return Fn(e)?r:br(r,n(e))},Er=function(e){return Sr(e,sr,gr)},Or=function(e){return Sr(e,lr,_r)},xr=mn(Yt,"DataView"),Ar=mn(Yt,"Promise"),kr=mn(Yt,"Set"),Tr=mn(Yt,"WeakMap"),jr="[object Map]",Pr="[object Promise]",Dr="[object Set]",Cr="[object WeakMap]",Ir="[object DataView]",Mr=ln(xr),Nr=ln(gn),Rr=ln(Ar),Lr=ln(kr),Fr=ln(Tr),Br=rn;(xr&&Br(new xr(new ArrayBuffer(1)))!=Ir||gn&&Br(new gn)!=jr||Ar&&Br(Ar.resolve())!=Pr||kr&&Br(new kr)!=Dr||Tr&&Br(new Tr)!=Cr)&&(Br=function(e){var t=rn(e),n="[object Object]"==t?e.constructor:void 0,r=n?ln(n):"";if(r)switch(r){case Mr:return Ir;case Nr:return jr;case Rr:return Pr;case Lr:return Dr;case Fr:return Cr}return t});var Ur=Br,Gr=Object.prototype.hasOwnProperty,zr=Yt.Uint8Array,Hr=function(e){var t=new e.constructor(e.byteLength);return new zr(t).set(new zr(e)),t},Vr=/\w*$/,Kr=Jt?Jt.prototype:void 0,qr=Kr?Kr.valueOf:void 0,$r=Object.create,Wr=function(){function e(){}return function(t){if(!on(t))return{};if($r)return $r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Yr=Zn&&Zn.isMap,Jr=Yr?$n(Yr):function(e){return Dn(e)&&"[object Map]"==Ur(e)},Zr=Zn&&Zn.isSet,Qr=Zr?$n(Zr):function(e){return Dn(e)&&"[object Set]"==Ur(e)},Xr="[object Arguments]",eo="[object Function]",to="[object Object]",no={};no[Xr]=no["[object Array]"]=no["[object ArrayBuffer]"]=no["[object DataView]"]=no["[object Boolean]"]=no["[object Date]"]=no["[object Float32Array]"]=no["[object Float64Array]"]=no["[object Int8Array]"]=no["[object Int16Array]"]=no["[object Int32Array]"]=no["[object Map]"]=no["[object Number]"]=no[to]=no["[object RegExp]"]=no["[object Set]"]=no["[object String]"]=no["[object Symbol]"]=no["[object Uint8Array]"]=no["[object Uint8ClampedArray]"]=no["[object Uint16Array]"]=no["[object Uint32Array]"]=!0,no["[object Error]"]=no[eo]=no["[object WeakMap]"]=!1;var ro=function e(t,n,r,o,i,a){var u,s=1&n,c=2&n,l=4&n;if(r&&(u=i?r(t,o,i,a):r(t)),void 0!==u)return u;if(!on(t))return t;var f=Fn(t);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Gr.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!s)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,u)}else{var d=Ur(t),h=d==eo||"[object GeneratorFunction]"==d;if(zn(t))return function(e,t){if(t)return e.slice();var n=e.length,r=pr?pr(n):new e.constructor(n);return e.copy(r),r}(t,s);if(d==to||d==Xr||h&&!i){if(u=c||h?{}:function(e){return"function"!=typeof e.constructor||rr(e)?{}:Wr(wr(e))}(t),!s)return c?function(e,t){return Pn(e,_r(e),t)}(t,function(e,t){return e&&Pn(t,lr(t),e)}(u,t)):function(e,t){return Pn(e,gr(e),t)}(t,function(e,t){return e&&Pn(t,sr(t),e)}(u,t))}else{if(!no[d])return i?t:{};u=function(e,t,n){var r,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return Hr(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?Hr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?Hr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,Vr.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=e,qr?Object(qr.call(r)):{}}}(t,d,s)}}a||(a=new xn);var p=a.get(t);if(p)return p;a.set(t,u),Qr(t)?t.forEach((function(o){u.add(e(o,n,r,o,t,a))})):Jr(t)&&t.forEach((function(o,i){u.set(i,e(o,n,r,i,t,a))}));var y=f?void 0:(l?c?Or:Er:c?lr:sr)(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(y||t,(function(o,i){y&&(o=t[i=o]),jn(u,i,e(o,n,r,i,t,a))})),u},oo=function(e){return"symbol"==(void 0===e?"undefined":w(e))||Dn(e)&&"[object Symbol]"==rn(e)},io=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ao=/^\w*$/;function uo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(uo.Cache||On),n}uo.Cache=On;var so,co,lo,fo=uo,ho=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,po=/\\(\\)?/g,yo=function(e){var t=fo((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ho,(function(e,n,r,o){t.push(r?o.replace(po,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}(),vo=Jt?Jt.prototype:void 0,mo=vo?vo.toString:void 0,go=function e(t){if("string"==typeof t)return t;if(Fn(t))return Gt(t,e)+"";if(oo(t))return mo?mo.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},bo=function(e){return null==e?"":go(e)},wo=function(e,t){return Fn(e)?e:function(e,t){if(Fn(e))return!1;var n=void 0===e?"undefined":w(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!oo(e))||ao.test(e)||!io.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:yo(bo(e))},_o=function(e){if("string"==typeof e||oo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},So=function(e,t){return null==(e=function(e,t){return t.length<2?e:function(e,t){for(var n=0,r=(t=wo(t,e)).length;null!=e&&n<r;)e=e[_o(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(t,0,-1))}(e,t=wo(t,e)))||delete e[_o((n=t,r=null==n?0:n.length,r?n[r-1]:void 0))];var n,r},Eo=Function.prototype,Oo=Object.prototype,xo=Eo.toString,Ao=Oo.hasOwnProperty,ko=xo.call(Object),To=function(e){return function(e){if(!Dn(e)||"[object Object]"!=rn(e))return!1;var t=wr(e);if(null===t)return!0;var n=Ao.call(t,"constructor")&&t.constructor;return"function"==typeof n&&h(n,n)&&xo.call(n)==ko}(e)?void 0:e},jo=Jt?Jt.isConcatSpreadable:void 0,Po=function(e){return Fn(e)||Ln(e)||!!(jo&&e&&e[jo])},Do=function e(t,n,r,o,i){var a=-1,u=t.length;for(r||(r=Po),i||(i=[]);++a<u;){var s=t[a];n>0&&r(s)?n>1?e(s,n-1,r,o,i):br(i,s):o||(i[i.length]=s)}return i},Co=function(e){return null!=e&&e.length?Do(e,1):[]},Io=Math.max,Mo=An?function(e,t){return An(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:function(e){return e},No=Date.now,Ro=(so=Mo,co=0,lo=0,function(){var e=No(),t=16-(e-lo);if(lo=e,t>0){if(++co>=800)return arguments[0]}else co=0;return so.apply(void 0,arguments)}),Lo=function(e){return Ro(function(e,t,n){return t=Io(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Io(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,u)}}(e,void 0,Co),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=Gt(t,(function(t){return t=wo(t,e),r||(r=t.length>1),t})),Pn(e,Or(e),n),r&&(n=ro(n,7,To));for(var o=t.length;o--;)So(n,t[o]);return n}));Ft.default.extend(Ut());var Fo=null;new Map;var Bo,Uo,Go={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},zo=function(){function e(){i(this,e),this.identifier="gregory"}return s(e,[{key:"fromJulianDay",value:function(e){var t=e,n=t-1721426,r=Math.floor(n/146097),o=Y(n,146097),i=Math.floor(o/36524),a=Y(o,36524),u=Math.floor(a/1461),s=Y(a,1461),c=Math.floor(s/365),l=g(X(400*r+100*i+4*u+c+(4!==i&&4!==c?1:0)),2),f=l[0],d=l[1],h=t-J(f,d,1,1),p=2;t<J(f,d,3,1)?p=0:Z(d)&&(p=1);var y=Math.floor((12*(h+p)+373)/367),v=t-J(f,d,y,1)+1;return new Vo(f,d,y,v)}},{key:"toJulianDay",value:function(e){return J(e.era,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return Go[Z(e.year)?"leapyear":"standard"][e.month-1]}},{key:"getMonthsInYear",value:function(e){return 12}},{key:"getDaysInYear",value:function(e){return Z(e.year)?366:365}},{key:"getYearsInEra",value:function(e){return 9999}},{key:"getEras",value:function(){return["BC","AD"]}},{key:"isInverseEra",value:function(e){return"BC"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}}]),e}(),Ho=new WeakMap,Vo=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i(this,e),te(this,Ho,{writable:!0,value:void 0});var o=g(ne(n),5),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=l,U(this)}return s(e,[{key:"copy",value:function(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}},{key:"add",value:function(e){return R(this,e)}},{key:"subtract",value:function(e){return G(this,e)}},{key:"set",value:function(e){return z(this,e)}},{key:"cycle",value:function(e,t,n){return V(this,e,t,n)}},{key:"toDate",value:function(e){return ue(this,e)}},{key:"toString",value:function(){return ee(this)}},{key:"compare",value:function(e){return q(this,e)}}]),e}(),Ko=new WeakMap,qo=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i(this,e),te(this,Ko,{writable:!0,value:void 0});var o=g(ne(n),5),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4];this.calendar=a,this.era=u,this.year=s,this.month=c,this.day=l,this.hour=n.shift()||0,this.minute=n.shift()||0,this.second=n.shift()||0,this.millisecond=n.shift()||0,U(this)}return s(e,[{key:"copy",value:function(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}},{key:"add",value:function(e){return R(this,e)}},{key:"subtract",value:function(e){return G(this,e)}},{key:"set",value:function(e){return z(function(e,t){var n,r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),(n=r).millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23)),r}(this,e),e)}},{key:"cycle",value:function(e,t,n){switch(e){case"era":case"year":case"month":case"day":return V(this,e,t,n);default:return function(e,t,n,r){var o=e.copy();switch(t){case"hour":var i=e.hour,a=0,u=23;if(12===(null==r?void 0:r.hourCycle)){var s=i>=12;a=s?12:0,u=s?23:11}o.hour=K(i,n,a,u,null==r?void 0:r.round);break;case"minute":o.minute=K(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":o.second=K(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=K(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return o}(this,e,t,n)}}},{key:"toDate",value:function(e,t){return ue(this,e,t)}},{key:"toString",value:function(){return"".concat(ee(this),"T").concat((e=this,"".concat(String(e.hour).padStart(2,"0"),":").concat(String(e.minute).padStart(2,"0"),":").concat(String(e.second).padStart(2,"0")).concat(e.millisecond?String(e.millisecond/1e3).slice(1):"")));var e}},{key:"compare",value:function(e){var t=q(this,e);return 0===t?function(e,t){return $(e)-$(t)}(this,se(e)):t}}]),e}(),$o=new Map,Wo=864e5,Yo=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="buddhist",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t=l(f(n.prototype),"fromJulianDay",this).call(this,e),r=Q(t.era,t.year);return new Vo(this,r- -543,t.month,t.day)}},{key:"toJulianDay",value:function(e){return l(f(n.prototype),"toJulianDay",this).call(this,le(e))}},{key:"getEras",value:function(){return["BE"]}},{key:"getDaysInMonth",value:function(e){return l(f(n.prototype),"getDaysInMonth",this).call(this,le(e))}},{key:"balanceDate",value:function(){}}]),n}(zo),Jo=1723856,Zo=1824665,Qo=5500,Xo=function(){function e(){i(this,e),this.identifier="ethiopic"}return s(e,[{key:"fromJulianDay",value:function(e){var t=g(de(Jo,e),3),n=t[0],r=t[1],o=t[2],i="AM";return n<=0&&(i="AA",n+=Qo),new Vo(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"AA"===e.era&&(t-=Qo),fe(Jo,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){return pe(e.year,e.month)}},{key:"getMonthsInYear",value:function(){return 13}},{key:"getDaysInYear",value:function(e){return 365+he(e.year)}},{key:"getYearsInEra",value:function(e){return"AA"===e.era?9999:9991}},{key:"getEras",value:function(){return["AA","AM"]}}]),e}(),ei=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="ethioaa",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t=g(de(Jo,e),3),n=t[0],r=t[1],o=t[2];return new Vo(this,"AA",n+=Qo,r,o)}},{key:"getEras",value:function(){return["AA"]}},{key:"getYearsInEra",value:function(){return 9999}}]),n}(Xo),ti=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="coptic",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t=g(de(Zo,e),3),n=t[0],r=t[1],o=t[2],i="CE";return n<=0&&(i="BCE",n=1-n),new Vo(this,i,n,r,o)}},{key:"toJulianDay",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),fe(Zo,t,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=e.year;return"BCE"===e.era&&(t=1-t),pe(t,e.month)}},{key:"isInverseEra",value:function(e){return"BCE"===e.era}},{key:"balanceDate",value:function(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}},{key:"getEras",value:function(){return["BCE","CE"]}},{key:"getYearsInEra",value:function(e){return"BCE"===e.era?9999:9715}}]),n}(Xo),ni=347997,ri=function(){function e(){i(this,e),this.identifier="hebrew"}return s(e,[{key:"fromJulianDay",value:function(e){for(var t=e-ni,n=25920*t/765433,r=Math.floor((19*n+234)/235)+1,o=me(r),i=Math.floor(t-o);i<1;)r--,o=me(r),i=Math.floor(t-o);for(var a=1,u=0;u<i;)u+=be(r,a),a++;return a--,u-=be(r,a),new Vo(this,r,a,i-u)}},{key:"toJulianDay",value:function(e){for(var t=me(e.year),n=1;n<e.month;n++)t+=be(e.year,n);return t+e.day+ni}},{key:"getDaysInMonth",value:function(e){return be(e.year,e.month)}},{key:"getMonthsInYear",value:function(e){return ye(e.year)?13:12}},{key:"getDaysInYear",value:function(e){return ge(e.year)}},{key:"getYearsInEra",value:function(){return 9999}},{key:"getEras",value:function(){return["AM"]}},{key:"balanceYearMonth",value:function(e,t){t.year!==e.year&&(ye(t.year)&&!ye(e.year)&&t.month>6?e.month--:!ye(t.year)&&ye(e.year)&&t.month>6&&e.month++)}}]),e}(),oi=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="indian",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t,r,o,i=l(f(n.prototype),"fromJulianDay",this).call(this,e),a=i.year-78,u=e-J(i.era,i.year,1,1);if(u<80?(a--,u+=155+(t=Z(i.year-1)?31:30)+90+10):(t=Z(i.year)?31:30,u-=80),u<t)r=1,o=u+1;else{var s=u-t;s<155?(r=Math.floor(s/31)+2,o=s%31+1):(s-=155,r=Math.floor(s/30)+7,o=s%30+1)}return new Vo(this,a,r,o)}},{key:"toJulianDay",value:function(e){var t,n,r=e.year+78,o=g(X(r),2),i=o[0],a=o[1];return Z(a)?(t=31,n=J(i,a,3,21)):(t=30,n=J(i,a,3,22)),1===e.month?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=30*(e.month-7)),n+=e.day-1)}},{key:"getDaysInMonth",value:function(e){return 1===e.month&&Z(e.year+78)||e.month>=2&&e.month<=6?31:30}},{key:"getYearsInEra",value:function(){return 9919}},{key:"getEras",value:function(){return["saka"]}},{key:"balanceDate",value:function(){}}]),n}(zo),ii=1948440,ai=1948439,ui=1300,si=1600,ci=460322,li=function(){function e(){i(this,e),this.identifier="islamic-civil"}return s(e,[{key:"fromJulianDay",value:function(e){return _e(this,ii,e)}},{key:"toJulianDay",value:function(e){return we(ii,e.year,e.month,e.day)}},{key:"getDaysInMonth",value:function(e){var t=29+e.month%2;return 12===e.month&&Se(e.year)&&t++,t}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInYear",value:function(e){return Se(e.year)?355:354}},{key:"getYearsInEra",value:function(){return 9665}},{key:"getEras",value:function(){return["AH"]}}]),e}(),fi=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="islamic-tbla",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){return _e(this,ai,e)}},{key:"toJulianDay",value:function(e){return we(ai,e.year,e.month,e.day)}}]),n}(li),di=function(e){d(n,e);var t=O(n);function n(){var e;if(i(this,n),(e=t.call(this)).identifier="islamic-umalqura",Bo||(Bo=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),(function(e){return e.charCodeAt(0)})).buffer)),!Uo){Uo=new Uint32Array(si-ui+1);for(var r=0,o=ui;o<=si;o++){Uo[o-ui]=r;for(var a=1;a<=12;a++)r+=Oe(o,a)}}return v(e)}return s(n,[{key:"fromJulianDay",value:function(e){var t=e-ii,r=Ee(ui),o=Ee(si);if(t<r||t>o)return l(f(n.prototype),"fromJulianDay",this).call(this,e);for(var i=ui-1,a=1,u=1;u>0;){i++,u=t-Ee(i)+1;var s=Ae(i);if(u===s){a=12;break}if(u<s){var c=Oe(i,a);for(a=1;u>c;)u-=c,a++,c=Oe(i,a);break}}return new Vo(this,i,a,t-xe(i,a)+1)}},{key:"toJulianDay",value:function(e){return e.year<ui||e.year>si?l(f(n.prototype),"toJulianDay",this).call(this,e):ii+xe(e.year,e.month)+(e.day-1)}},{key:"getDaysInMonth",value:function(e){return e.year<ui||e.year>si?l(f(n.prototype),"getDaysInMonth",this).call(this,e):Oe(e.year,e.month)}},{key:"getDaysInYear",value:function(e){return e.year<ui||e.year>si?l(f(n.prototype),"getDaysInYear",this).call(this,e):Ae(e.year)}}]),n}(li),hi=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],pi=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],yi=[1867,1911,1925,1988,2018],vi=["meiji","taisho","showa","heisei","reiwa"],mi=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="japanese",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t=l(f(n.prototype),"fromJulianDay",this).call(this,e),r=ke(t);return new Vo(this,vi[r],t.year-yi[r],t.month,t.day)}},{key:"toJulianDay",value:function(e){return l(f(n.prototype),"toJulianDay",this).call(this,Te(e))}},{key:"balanceDate",value:function(e){var t=Te(e),n=ke(t);vi[n]!==e.era&&(e.era=vi[n],e.year=t.year-yi[n]),this.constrainDate(e)}},{key:"constrainDate",value:function(e){var t=vi.indexOf(e.era),n=pi[t];if(null!=n){var r=g(n,3),o=r[0],i=r[1],a=r[2],u=o-yi[t];e.year=Math.max(1,Math.min(u,e.year)),e.year===u&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(1===e.year&&t>=0){var s=g(hi[t],3),c=s[1],l=s[2];e.month=Math.max(c,e.month),e.month===c&&(e.day=Math.max(l,e.day))}}},{key:"getEras",value:function(){return vi}},{key:"getYearsInEra",value:function(e){var t=vi.indexOf(e.era),n=hi[t],r=hi[t+1];if(null==r)return 9999-n[0]+1;var o=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}},{key:"getDaysInMonth",value:function(e){return l(f(n.prototype),"getDaysInMonth",this).call(this,Te(e))}},{key:"getMinimumMonthInYear",value:function(e){var t=je(e);return t?t[1]:1}},{key:"getMinimumDayInMonth",value:function(e){var t=je(e);return t&&e.month===t[1]?t[2]:1}}]),n}(zo),gi=[0,31,62,93,124,155,186,216,246,276,306,336],bi=function(){function e(){i(this,e),this.identifier="persian"}return s(e,[{key:"fromJulianDay",value:function(e){var t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30);return new Vo(this,n,o+1,r-gi[o]+1)}},{key:"toJulianDay",value:function(e){var t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return(t+=gi[e.month-1])+e.day}},{key:"getMonthsInYear",value:function(){return 12}},{key:"getDaysInMonth",value:function(e){return e.month<=6?31:e.month<=11||Y(25*e.year+11,33)<8?30:29}},{key:"getEras",value:function(){return["AP"]}},{key:"getYearsInEra",value:function(){return 9377}}]),e}(),wi=1911,_i=function(e){d(n,e);var t=O(n);function n(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var a;return i(this,n),(a=t.call.apply(t,[this].concat(b(r)))).identifier="roc",v(a)}return s(n,[{key:"fromJulianDay",value:function(e){var t=l(f(n.prototype),"fromJulianDay",this).call(this,e),r=Q(t.era,t.year),o=g(De(r),2),i=o[0],a=o[1];return new Vo(this,i,a,t.month,t.day)}},{key:"toJulianDay",value:function(e){return l(f(n.prototype),"toJulianDay",this).call(this,Ce(e))}},{key:"getEras",value:function(){return["before_minguo","minguo"]}},{key:"balanceDate",value:function(e){var t=g(De(Pe(e)),2),n=t[0],r=t[1];e.era=n,e.year=r}},{key:"isInverseEra",value:function(e){return"before_minguo"===e.era}},{key:"getDaysInMonth",value:function(e){return l(f(n.prototype),"getDaysInMonth",this).call(this,Ce(e))}},{key:"getYearsInEra",value:function(e){return"before_minguo"===e.era?9999:9999-wi}}]),n}(zo),Si=m(4332),Ei=m.n(Si),Oi=m(9014),xi=m.n(Oi),Ai=function(e){return null==e};Ft.default.extend(Ei()),Ft.default.extend(xi()),Ft.default.extend(Ut());var ki="YYYY-MM-DDTHH:mm:ss.SSSZZ",Ti=new WeakMap,ji=new(function(){function e(){var t,n;!function(e,t){if(!h(e,t))throw new TypeError("Cannot call a class as a function")}(this,e),t=Ti,n={writable:!0,value:new Map},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(this,t),t.set(this,n)}var t;return(t=[{key:"register",value:function(e,t){Ie(this,Ti).set(e,t)}},{key:"getCalendar",value:function(e){if(Boolean(e)){if(e.calendar)return e.calendar;if(e.region){var t="".concat(e.language,"-").concat(e.region);if(Ie(this,Ti).has(t))return Ie(this,Ti).get(t)}if(e.language&&Ie(this,Ti).has(e.language))return Ie(this,Ti).get(e.language);var n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Ie(this,Ti).set("".concat(e.language).concat(e.region?"-".concat(e.region):""),n),n}}}])&&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)}}(e.prototype,t),e}()),Pi={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1},Di=function(e){return function(t,n,r){return"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e}}};function Ci(e){var t,n={},r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value;if(e[s].hasOwnProperty("_default"))n[s]=e[s]._default;else{if(s.startsWith("_"))continue;(t=e[s])&&t.constructor===Object?n[s]=Ci(e[s]):n[s]=e[s]}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}var Ii=m(1249);function Mi(){return Mi=at((function(e){var t,n,r,o,i,a,u,s=arguments;return ut(this,(function(c){switch(c.label){case 0:n=(t=s.length>1&&void 0!==s[1]?s[1]:{}).shouldRetry,r=t.getDelay,o=t.onError,n=null!=n?n:function(e){return function(e,t){return e<=5}(e)},r=null!=r?r:function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e+1:e;return t*Math.pow(2,n)}(e,1e3)},i=0,a=void 0,c.label=1;case 1:return c.trys.push([1,4,,5]),[4,ct(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return u=c.sent(),null==o||o(u,i),a=u,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),Mi.apply(this,arguments)}function Ni(){return(Ni=at((function(e){return ut(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}}(),_}())}}}))}}]);