@openmrs/esm-app-shell 5.2.1-pre.1067 → 5.2.1-pre.1069

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 (105) hide show
  1. package/.turbo/turbo-build.log +15 -15
  2. package/dist/index.html +1 -1
  3. package/dist/{openmrs.3a7be248314ee448.js → openmrs.4112ceaba2c91dab.js} +2 -2
  4. package/dist/{openmrs.3a7be248314ee448.js.map → openmrs.4112ceaba2c91dab.js.map} +1 -1
  5. package/dist/service-worker.js +1 -1
  6. package/lib/esm-devtools-app/main.js +1 -1
  7. package/lib/esm-devtools-app/openmrs-esm-devtools-app.js +1 -1
  8. package/lib/esm-devtools-app/openmrs-esm-devtools-app.js.buildmanifest.json +2 -2
  9. package/lib/esm-devtools-app/routes.json +1 -1
  10. package/lib/esm-login-app/111.js +1 -1
  11. package/lib/esm-login-app/111.js.map +1 -1
  12. package/lib/esm-login-app/126.js +1 -1
  13. package/lib/esm-login-app/126.js.map +1 -1
  14. package/lib/esm-login-app/173.js +1 -1
  15. package/lib/esm-login-app/173.js.map +1 -1
  16. package/lib/esm-login-app/337.js +1 -1
  17. package/lib/esm-login-app/337.js.map +1 -1
  18. package/lib/esm-login-app/342.js +1 -1
  19. package/lib/esm-login-app/460.js +1 -0
  20. package/lib/esm-login-app/main.js +1 -1
  21. package/lib/esm-login-app/main.js.map +1 -1
  22. package/lib/esm-login-app/openmrs-esm-login-app.js +1 -1
  23. package/lib/esm-login-app/openmrs-esm-login-app.js.buildmanifest.json +47 -25
  24. package/lib/esm-login-app/openmrs-esm-login-app.js.map +1 -1
  25. package/lib/esm-login-app/routes.json +1 -1
  26. package/lib/esm-offline-tools-app/202.js +1 -1
  27. package/lib/esm-offline-tools-app/202.js.map +1 -1
  28. package/lib/esm-offline-tools-app/224.js +1 -1
  29. package/lib/esm-offline-tools-app/224.js.map +1 -1
  30. package/lib/esm-offline-tools-app/460.js +1 -0
  31. package/lib/esm-offline-tools-app/main.js +1 -1
  32. package/lib/esm-offline-tools-app/main.js.map +1 -1
  33. package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js +1 -1
  34. package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.buildmanifest.json +51 -29
  35. package/lib/esm-offline-tools-app/openmrs-esm-offline-tools-app.js.map +1 -1
  36. package/lib/esm-offline-tools-app/routes.json +1 -1
  37. package/lib/esm-primary-navigation-app/460.js +1 -0
  38. package/lib/esm-primary-navigation-app/948.js +1 -1
  39. package/lib/esm-primary-navigation-app/948.js.map +1 -1
  40. package/lib/esm-primary-navigation-app/main.js +1 -1
  41. package/lib/esm-primary-navigation-app/main.js.map +1 -1
  42. package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js +1 -1
  43. package/lib/esm-primary-navigation-app/openmrs-esm-primary-navigation-app.js.buildmanifest.json +25 -3
  44. package/lib/esm-primary-navigation-app/routes.json +1 -1
  45. package/lib/index.html +2 -2
  46. package/lib/openmrs.js +3 -3
  47. package/lib/service-worker.js +1 -1
  48. package/package.json +4 -4
  49. package/lib/esm-implementer-tools-app/220.js +0 -1
  50. package/lib/esm-implementer-tools-app/220.js.map +0 -1
  51. package/lib/esm-implementer-tools-app/246.js +0 -1
  52. package/lib/esm-implementer-tools-app/246.js.map +0 -1
  53. package/lib/esm-implementer-tools-app/263.js +0 -1
  54. package/lib/esm-implementer-tools-app/263.js.map +0 -1
  55. package/lib/esm-implementer-tools-app/275.js +0 -1
  56. package/lib/esm-implementer-tools-app/275.js.map +0 -1
  57. package/lib/esm-implementer-tools-app/319.js +0 -1
  58. package/lib/esm-implementer-tools-app/329.js +0 -2
  59. package/lib/esm-implementer-tools-app/329.js.LICENSE.txt +0 -9
  60. package/lib/esm-implementer-tools-app/329.js.map +0 -1
  61. package/lib/esm-implementer-tools-app/426.js +0 -1
  62. package/lib/esm-implementer-tools-app/426.js.map +0 -1
  63. package/lib/esm-implementer-tools-app/466.js +0 -1
  64. package/lib/esm-implementer-tools-app/466.js.map +0 -1
  65. package/lib/esm-implementer-tools-app/499.js +0 -1
  66. package/lib/esm-implementer-tools-app/499.js.map +0 -1
  67. package/lib/esm-implementer-tools-app/500.js +0 -1
  68. package/lib/esm-implementer-tools-app/500.js.map +0 -1
  69. package/lib/esm-implementer-tools-app/519.js +0 -1
  70. package/lib/esm-implementer-tools-app/519.js.map +0 -1
  71. package/lib/esm-implementer-tools-app/56.js +0 -1
  72. package/lib/esm-implementer-tools-app/56.js.map +0 -1
  73. package/lib/esm-implementer-tools-app/574.js +0 -1
  74. package/lib/esm-implementer-tools-app/575.js +0 -1
  75. package/lib/esm-implementer-tools-app/575.js.map +0 -1
  76. package/lib/esm-implementer-tools-app/587.js +0 -1
  77. package/lib/esm-implementer-tools-app/587.js.map +0 -1
  78. package/lib/esm-implementer-tools-app/620.js +0 -2
  79. package/lib/esm-implementer-tools-app/620.js.LICENSE.txt +0 -38
  80. package/lib/esm-implementer-tools-app/620.js.map +0 -1
  81. package/lib/esm-implementer-tools-app/625.js +0 -1
  82. package/lib/esm-implementer-tools-app/657.js +0 -1
  83. package/lib/esm-implementer-tools-app/735.js +0 -2
  84. package/lib/esm-implementer-tools-app/735.js.LICENSE.txt +0 -9
  85. package/lib/esm-implementer-tools-app/735.js.map +0 -1
  86. package/lib/esm-implementer-tools-app/757.js +0 -1
  87. package/lib/esm-implementer-tools-app/788.js +0 -2
  88. package/lib/esm-implementer-tools-app/788.js.LICENSE.txt +0 -19
  89. package/lib/esm-implementer-tools-app/788.js.map +0 -1
  90. package/lib/esm-implementer-tools-app/807.js +0 -1
  91. package/lib/esm-implementer-tools-app/807.js.map +0 -1
  92. package/lib/esm-implementer-tools-app/833.js +0 -1
  93. package/lib/esm-implementer-tools-app/837.js +0 -2
  94. package/lib/esm-implementer-tools-app/837.js.LICENSE.txt +0 -5
  95. package/lib/esm-implementer-tools-app/837.js.map +0 -1
  96. package/lib/esm-implementer-tools-app/889.js +0 -2
  97. package/lib/esm-implementer-tools-app/889.js.LICENSE.txt +0 -3
  98. package/lib/esm-implementer-tools-app/889.js.map +0 -1
  99. package/lib/esm-implementer-tools-app/main.js +0 -1
  100. package/lib/esm-implementer-tools-app/main.js.map +0 -1
  101. package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js +0 -1
  102. package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.buildmanifest.json +0 -740
  103. package/lib/esm-implementer-tools-app/openmrs-esm-implementer-tools-app.js.map +0 -1
  104. package/lib/esm-implementer-tools-app/routes.json +0 -1
  105. /package/dist/{openmrs.3a7be248314ee448.js.LICENSE.txt → openmrs.4112ceaba2c91dab.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,O)},k=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},x=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=k,S.i=_,S.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=k(e.locale,null,!0),this.parse(e)},g=v.prototype;return g.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},d=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(r?g-w:g+(6-w),v);case s:case h:return d(m+"Hours",0);case a:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),p=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],d=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[p](d),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(t,r){var l,h=this;t=Number(t);var p=S.p(r),d=function(e){var n=x(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(p===c)return this.set(c,this.$M+t);if(p===f)return this.set(f,this.$y+t);if(p===s)return d(1);if(p===u)return d(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[p]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||d[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,r,h){var p,d=S.p(r),y=x(t),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=S.m(this,y);return m=(p={},p[f]=m/12,p[c]=m,p[l]=m/3,p[u]=(g-v)/6048e5,p[s]=(g-v)/864e5,p[a]=g/n,p[i]=g/e,p[o]=g/1e3,p)[d]||g,h?m:S.a(m)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return x.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=k,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=w[b],x.Ls=w,x.p={},x}()},414:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function s(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 u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(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&&h(e,t)}function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n.r(t),n.d(t,{default:()=>q});var y={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)}},v=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(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||y,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,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){a(this,e),this.observers={}}return u(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 m(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function w(e,t,n){for(var r=function(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e},o=function(){return!e||"string"==typeof e},i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function _(e,t,n){var r=w(e,t,Object);r.obj[r.k]=n}function k(e,t){var n=w(e,t),r=n.obj,o=n.k;if(r)return r[o]}function x(e,t,n){var r=k(e,n);return void 0!==r?r:k(t,n)}function S(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||d(e[r],String)||"string"==typeof t[r]||d(t[r],String)?n&&(e[r]=t[r]):S(e[r],t[r],n):e[r]=t[r]);return e}function O(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function E(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return P[e]})):e}var j="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),j&&g.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),k(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),_(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 a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=k(this.data,s)||{};r?S(u,n,o):u=i({},u,n),_(this.data,s,u),a.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?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),C={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}},T={},A=function(e){function t(e){var n,r,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),j&&g.call(c(n)),r=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=e,i=c(n),r.forEach((function(e){o[e]&&(i[e]=o[e])})),n.options=s,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var d=n.nsSeparator||this.options.nsSeparator;return f+d+c}return c}var y=this.resolve(e,n),v=y&&y.res,g=y&&y.usedKey||c,m=y&&y.exactUsedKey||c,b=Object.prototype.toString.apply(v),w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var k="[object Array]"===b,x=k?[]:{},S=k?m:g;for(var O in v)if(Object.prototype.hasOwnProperty.call(v,O)){var P="".concat(S).concat(s).concat(O);x[O]=this.translate(P,i({},n,{joinArrays:!1,ns:l})),x[O]===P&&(x[O]=v[O])}v=x}}else if(_&&"string"==typeof w&&"[object Array]"===b)(v=v.join(w))&&(v=this.extendTranslation(v,e,n,o));else{var E=!1,j=!1,R=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),T=R?this.pluralResolver.getSuffix(h,n.count):"",A=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(v)&&C&&(E=!0,v=A),this.isValidLookup(v)||(j=!0,v=c);var D=C&&A!==v&&this.options.updateMissing;if(j||E||D){if(this.logger.log(D?"updateKey":"missingKey",h,f,c,D?A:v),s){var L=this.resolve(c,i({},n,{keySeparator:!1}));L&&L.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 K=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var M=0;M<I.length;M++)K.push(I[M]);else"all"===this.options.saveMissingTo?K=this.languageUtils.toResolveHierarchy(n.lng||this.language):K.push(n.lng||this.language);var N=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,D?r:v,D,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,D?r:v,D,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?K.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){N([e],c+t,n["defaultValue".concat(t)]||A)}))})):N(K,c,A))}v=this.extendTranslation(v,e,n,y,o),j&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),j&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=C.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!T["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(T["".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,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&h&&p.push(l+i),h&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),t}(g);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var L=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(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]=D(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]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),K=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],I={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)}},M=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=(n={},K.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:I[e.fc]}}))})),n)}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(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:E,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?O(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?O(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?O(t.nestingPrefix):t.nestingPrefixEscaped||O("$t("),this.nestingSuffix=t.nestingSuffix?O(t.nestingSuffix):t.nestingSuffixEscaped||O(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=function(e){return e.replace(/\$/g,"$$$$")},u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=x(t,c,e);return u.alwaysFormat?u.format(o,void 0,n):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),s=i.join(u.formatSeparator).trim();return u.format(x(t,c,a),s,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return s(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?s(u.escape(e)):s(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(h){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=b(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}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 u.defaultValue,e},a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i({},s);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=b(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return a.format(e,t,s.lng,s)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),F=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),j&&g.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=w(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=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,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(g);function B(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}const q=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),j&&g.call(c(e)),e.options=B(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(o=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,B(n)),this.format=this.options.interpolation.format,o||(o=$),!this.options.isClone){this.modules.logger?v.init(e(this.modules.logger),this.options):v.init(null,this.options);var a=new L(this.options);this.store=new R(this.options.resources,this.options);var s=this.services;s.logger=v,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new M(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new N(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new F(e(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(s.languageDetector=e(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=e(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[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(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var c=m(),l=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(n),o(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};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]:$,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=$),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&&C.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=m();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,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.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=m();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=m();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new A(a.services,a.options),a.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];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g))},774:()=>{"use strict";try{self["workbox:core:6.5.3"]&&_()}catch(e){}},585:()=>{"use strict";try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},238:()=>{"use strict";try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=(e,t,n,r)=>{var o=a[e]=a[e]||{},i=o[t];(!i||!i.loaded&&(!r!=!i.eager?r:s>i.from))&&(o[t]={get:n,from:s,eager:!!r})},c=[];return"default"===r&&(u("dayjs","1.11.5",(()=>()=>n(23)),1),u("i18next","19.9.2",(()=>()=>n(414)),1)),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(774);function e(t,n,o){return e=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.apply(null,arguments)}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(n){var i="function"==typeof Map?new Map:void 0;return o=function(n){if(null===n||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return e(n,arguments,t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,n)},o(n)}function i(){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}}var a=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&&r(e,t)}(s,e);var n,o,a=(n=s,o=i(),function(){var e,r=t(n);if(o){var i=t(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof 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,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=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];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(o(Error)),s=new Set,u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},c=function(e){return e||(t=u.runtime,[u.prefix,t,u.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function l(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function f(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function h(e,t,n,r){return p.apply(this,arguments)}function p(){return p=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e,t,n,r){var o,i,a,s,u,c,l,h,p,d;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(y){switch(y.label){case 0:return o=f(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=y.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(h=l.next()).done);s=!0)if(p=h.value,d=f(p.url,n),o===d)return[2,e.match(p,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))})),p.apply(this,arguments)}var d=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function v(){return g.apply(this,arguments)}function g(){return g=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var e,t,n,r,o,i;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=s[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))})),g.apply(this,arguments)}function m(e){return new Promise((function(t){return setTimeout(t,e)}))}const b="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const _=b||w||Function("return this")(),k=_.Symbol,x=Array.isArray;var S=Object.prototype,O=S.hasOwnProperty,P=S.toString,E=k?k.toStringTag:void 0;var j=Object.prototype.toString;var R=k?k.toStringTag:void 0;const C=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":R&&R in Object(e)?function(e){var t=O.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[E]=n:delete e[E]),o}(e):function(e){return j.call(e)}(e)},T=function(e){return null!=e&&"object"==typeof e};var A=k?k.prototype:void 0,D=A?A.toString:void 0;const L=function e(t){if("string"==typeof t)return t;if(x(t))return 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}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||T(e)&&"[object Symbol]"==C(e);var t}(t))return D?D.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var K=/[\\^$.*+?()[\]{}|]/g,I=RegExp(K.source);const M=function(e){return(e=null==(t=e)?"":L(t))&&I.test(e)?e.replace(K,"\\$&"):e;var t};function N(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,s,"next",e)}function s(e){N(i,r,o,a,s,"throw",e)}a(void 0)}))}}function B(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function $(e){return q.apply(this,arguments)}function q(){return q=F((function(e){var t,n,r,o,i,a,s,u=arguments;return B(this,(function(c){switch(c.label){case 0:n=(t=u.length>1&&void 0!==u[1]?u[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,U(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),q.apply(this,arguments)}function U(e){return W.apply(this,arguments)}function W(){return(W=F((function(e){return B(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const V=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},H=_["__core-js_shared__"];var z,Y=(z=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var G=Function.prototype.toString;var J=/^\[object .+?Constructor\]$/,Q=Function.prototype,X=Object.prototype,Z=Q.toString,ee=X.hasOwnProperty,te=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ne=function(e){return!(!V(e)||(t=e,Y&&Y in t))&&(function(e){if(!V(e))return!1;var t=C(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?te:J).test(function(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},re=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(n)?n:void 0},oe=re(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(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])}}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},se.prototype.get=function(e){var t=this.__data__;if(oe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0},se.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:ae.call(t,e)},se.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};const ue=se,ce=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var le=Array.prototype.splice;function fe(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])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ce(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const he=fe,pe=re(_,"Map"),de=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function ye(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])}}ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ue,map:new(pe||he),string:new ue}},ye.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return de(this,e).get(e)},ye.prototype.has=function(e){return de(this,e).has(e)},ye.prototype.set=function(e,t){var n=de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const ve=ye;function ge(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}ge.prototype.add=ge.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ge.prototype.has=function(e){return this.__data__.has(e)};const me=ge,be=function(e){return e!=e},we=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,be,n)}(e,t,0)>-1},_e=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},ke=function(e,t){return e.has(t)},xe=re(_,"Set"),Se=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Oe=xe&&1/Se(new xe([,-0]))[1]==1/0?function(e){return new xe(e)}:function(){},Pe=function(e){return e&&e.length?function(e,t,n){var r=-1,o=we,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=_e;else if(i>=200){var c=t?null:Oe(e);if(c)return Se(c);a=!1,o=ke,u=new me}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ee="x-omrs-offline-response-body",je="x-omrs-offline-response-status",Re="x-omrs-offline-caching-strategy",Ce="omrs",Te="".concat(Ce,"-spa-cache-v1"),Ae=[{'revision':null,'url':'/openmrs/spa/routes.registry.json'},{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'966c4dfec919951f.js'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e861b352d93d75e6.js'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f587be8fbac73856.js'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'a0b8175b04e3b2fb4fd34a15e4be135d','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.145e521ac51dbb3a.css'},{'revision':null,'url':'openmrs.3a7be248314ee448.js'},{'revision':'051a9b515f786fd01bf724422bd41233','url':'openmrs.3a7be248314ee448.js.LICENSE.txt'}],De=Ie("index.html"),Le=Pe(Ae.map((function(e){return Ie(e.url)}))),Ke=".buildmanifest.json";function Ie(e){return new URL(e,self.location.href).href}const Me=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Ne=function(e){return T(e)&&"[object Arguments]"==C(e)};var Fe=Object.prototype,Be=Fe.hasOwnProperty,$e=Fe.propertyIsEnumerable;const qe=Ne(function(){return arguments}())?Ne:function(e){return T(e)&&Be.call(e,"callee")&&!$e.call(e,"callee")};var Ue=k?k.isConcatSpreadable:void 0;const We=function(e){return x(e)||qe(e)||!!(Ue&&e&&e[Ue])},Ve=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=We),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):Me(i,u):o||(i[i.length]=u)}return i},He=function(e){return null!=e&&e.length?Ve(e,1):[]};function ze(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ye(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ze(i,r,o,a,s,"next",e)}function s(e){ze(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Ge(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Je(e){return Qe.apply(this,arguments)}function Qe(){return Qe=Ye((function(e){var t,n,r,o;return Ge(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Ye((function(e){var t,n;return Ge(this,(function(r){switch(r.label){case 0:return t=function(e){return e+Ke}(e),[4,Xe(t)];case 1:return[2,(n=r.sent())?Ze(e,n):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,He(o)]}var a}))})),Qe.apply(this,arguments)}function Xe(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function Ze(e,t){try{var n,r=[],o=((b=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[b.length-1]="",b.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,p=!1,d=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var g=y.value;r.push(new URL(g,o).toString())}}catch(e){p=!0,d=e}finally{try{h||null==v.return||v.return()}finally{if(p)throw d}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,b}const et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,tt=Object.keys,nt=Array.isArray;function rt(e,t){return"object"!=typeof t||tt(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||et.Promise||(et.Promise=Promise);const ot=Object.getPrototypeOf,it={}.hasOwnProperty;function at(e,t){return it.call(e,t)}function st(e,t){"function"==typeof t&&(t=t(ot(e))),("undefined"==typeof Reflect?tt:Reflect.ownKeys)(t).forEach((n=>{ct(e,n,t[n])}))}const ut=Object.defineProperty;function ct(e,t,n,r){ut(e,t,rt(n&&at(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function lt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ct(e.prototype,"constructor",e),{extend:st.bind(null,e.prototype)}}}}const ft=Object.getOwnPropertyDescriptor;function ht(e,t){let n;return ft(e,t)||(n=ot(e))&&ht(n,t)}const pt=[].slice;function dt(e,t,n){return pt.call(e,t,n)}function yt(e,t){return t(e)}function vt(e){if(!e)throw new Error("Assertion Failed")}function gt(e){et.setImmediate?setImmediate(e):setTimeout(e,0)}function mt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function bt(e,t){if(at(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=bt(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:bt(s,t.substr(a+1))}}function wt(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){vt("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)wt(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?nt(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&at(e,a)||(u=e[a]={}),wt(u,s,n)}}else void 0===n?nt(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function _t(e){var t={};for(var n in e)at(e,n)&&(t[n]=e[n]);return t}const kt=[].concat;function xt(e){return kt.apply([],e)}const St="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(xt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>et[e])),Ot=St.map((e=>et[e]));mt(St,(e=>[e,!0]));let Pt=null;function Et(e){Pt="undefined"!=typeof WeakMap&&new WeakMap;const t=jt(e);return Pt=null,t}function jt(e){if(!e||"object"!=typeof e)return e;let t=Pt&&Pt.get(e);if(t)return t;if(nt(e)){t=[],Pt&&Pt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(jt(e[n]))}else if(Ot.indexOf(e.constructor)>=0)t=e;else{const n=ot(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Pt&&Pt.set(e,t),e)at(e,o)&&(t[o]=jt(e[o]))}return t}const{toString:Rt}={};function Ct(e){return Rt.call(e).slice(8,-1)}const Tt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",At="symbol"==typeof Tt?function(e){var t;return null!=e&&(t=e[Tt])&&t.apply(e)}:function(){return null},Dt={};function Lt(e){var t,n,r,o;if(1===arguments.length){if(nt(e))return e.slice();if(this===Dt&&"string"==typeof e)return[e];if(o=At(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Kt="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var It="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Mt(e,t){It=e,Nt=t}var Nt=()=>!0;const Ft=!new Error("").stack;function Bt(){if(Ft)try{throw Bt.arguments,new Error}catch(e){return e}return new Error}function $t(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(Nt).map((e=>"\n"+e)).join("")):""}var qt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ut=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(qt),Wt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Vt(e,t){this._e=Bt(),this.name=e,this.message=t}function Ht(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function zt(e,t,n,r){this._e=Bt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Ht(e,t)}function Yt(e,t){this._e=Bt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Ht(e,t)}lt(Vt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+$t(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lt(zt).from(Vt),lt(Yt).from(Vt);var Gt=Ut.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Jt=Vt;var Qt=Ut.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Bt(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Wt[t]||n,this.inner=null)}return lt(r).from(Jt),e[t]=r,e}),{});Qt.Syntax=SyntaxError,Qt.Type=TypeError,Qt.Range=RangeError;var Xt=qt.reduce(((e,t)=>(e[t+"Error"]=Qt[t],e)),{}),Zt=Ut.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Qt[t]),e)),{});function en(){}function tn(e){return e}function nn(e,t){return null==e||e===tn?t:function(n){return t(e(n))}}function rn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function on(e,t){return e===en?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?rn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rn(o,this.onerror):o),void 0!==i?i:n}}function an(e,t){return e===en?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?rn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rn(r,this.onerror):r)}}function sn(e,t){return e===en?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?rn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:rt(r,a)}}function un(e,t){return e===en?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function cn(e,t){return e===en?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)}}Zt.ModifyError=zt,Zt.DexieError=Vt,Zt.BulkError=Yt;var ln={};const[fn,hn,pn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ot(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ot(t),e]})(),dn=hn&&hn.then,yn=fn&&fn.constructor,vn=!!pn;var gn=!1,mn=pn?()=>{pn.then($n)}:et.setImmediate?setImmediate.bind(null,$n):et.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{$n(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout($n,0)},bn=function(e,t){jn.push([e,t]),_n&&(mn(),_n=!1)},wn=!0,_n=!0,kn=[],xn=[],Sn=null,On=tn,Pn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:fr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{fr(e[0],e[1])}catch(e){}}))}},En=Pn,jn=[],Rn=0,Cn=[];function Tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=en,this._lib=!1;var t=this._PSD=En;if(It&&(this._stackHolder=Bt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ln)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Kn(this,this._value))}this._state=null,this._value=null,++t.ref,Ln(this,e)}const An={get:function(){var e=En,t=Qn;function n(n,r){var o=!e.global&&(e!==En||t!==Qn);const i=o&&!tr();var a=new Tn(((t,a)=>{Mn(this,new Dn(cr(n,e,o,i),cr(r,e,o,i),t,a,e))}));return It&&Bn(a,this),a}return n.prototype=ln,n},set:function(e){ct(this,"then",e&&e.prototype===ln?An:{get:function(){return e},set:An.set})}};function Dn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Ln(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&qn();t&&"function"==typeof t.then?Ln(e,((e,n)=>{t instanceof Tn?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,In(e)),n&&Un()}}),Kn.bind(null,e))}catch(t){Kn(e,t)}}function Kn(e,t){if(xn.push(t),null===e._state){var n=e._lib&&qn();t=On(t),e._state=!1,e._value=t,It&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=ht(t,"stack");t._promise=e,ct(t,"stack",{get:()=>gn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){kn.some((t=>t._value===e._value))||kn.push(e)}(e),In(e),n&&Un()}}function In(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===Rn&&(++Rn,bn((()=>{0==--Rn&&Wn()}),[]))}function Mn(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,++Rn,bn(Nn,[n,e,t])}else e._listeners.push(t)}function Nn(e,t,n){try{Sn=t;var r,o=t._value;t._state?r=e(o):(xn.length&&(xn=[]),r=e(o),-1===xn.indexOf(o)&&function(e){for(var t=kn.length;t;)if(kn[--t]._value===e._value)return void kn.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Sn=null,0==--Rn&&Wn(),--n.psd.ref||n.psd.finalize()}}function Fn(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=$t(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return It&&((r=$t(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Fn(e._prev,t,n)),t}function Bn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function $n(){qn()&&Un()}function qn(){var e=wn;return wn=!1,_n=!1,e}function Un(){var e,t,n;do{for(;jn.length>0;)for(e=jn,jn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(jn.length>0);wn=!0,_n=!0}function Wn(){var e=kn;kn=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Cn.slice(0),n=t.length;n;)t[--n]()}function Vn(e){return new Tn(ln,!1,e)}function Hn(e,t){var n=En;return function(){var r=qn(),o=En;try{return ir(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ir(o,!1),r&&Un()}}}st(Tn.prototype,{then:An,_then:function(e,t){Mn(this,new Dn(null,null,e,t,En))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Vn(e))):this.then(null,(e=>e&&e.name===t?n(e):Vn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Vn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{gn=!0;var e=Fn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{gn=!1}}},timeout:function(e,t){return e<1/0?new Tn(((n,r)=>{var o=setTimeout((()=>r(new Qt.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ct(Tn.prototype,Symbol.toStringTag,"Dexie.Promise"),Pn.env=ar(),st(Tn,{all:function(){var e=Lt.apply(null,arguments).map(nr);return new Tn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Tn.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Tn)return e;if(e&&"function"==typeof e.then)return new Tn(((t,n)=>{e.then(t,n)}));var t=new Tn(ln,!0,e);return Bn(t,Sn),t},reject:Vn,race:function(){var e=Lt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{e.map((e=>Tn.resolve(e).then(t,n)))}))},PSD:{get:()=>En,set:e=>En=e},totalEchoes:{get:()=>Qn},newPSD:Zn,usePSD:sr,scheduler:{get:()=>bn,set:e=>{bn=e}},rejectionMapper:{get:()=>On,set:e=>{On=e}},follow:(e,t)=>new Tn(((n,r)=>Zn(((t,n)=>{var r=En;r.unhandleds=[],r.onunhandled=n,r.finalize=rn((function(){!function(e){Cn.push((function t(){e(),Cn.splice(Cn.indexOf(t),1)})),++Rn,bn((()=>{0==--Rn&&Wn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),yn&&(yn.allSettled&&ct(Tn,"allSettled",(function(){const e=Lt.apply(null,arguments).map(nr);return new Tn((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Tn.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),yn.any&&"undefined"!=typeof AggregateError&&ct(Tn,"any",(function(){const e=Lt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Tn.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const zn={awaits:0,echoes:0,id:0};var Yn=0,Gn=[],Jn=0,Qn=0,Xn=0;function Zn(e,t,n,r){var o=En,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Xn;var a=Pn.env;i.env=vn?{Promise:Tn,PromiseProp:{value:Tn,configurable:!0,writable:!0},all:Tn.all,race:Tn.race,allSettled:Tn.allSettled,any:Tn.any,resolve:Tn.resolve,reject:Tn.reject,nthen:lr(a.nthen,i),gthen:lr(a.gthen,i)}:{},t&&rt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function er(){return zn.id||(zn.id=++Yn),++zn.awaits,zn.echoes+=100,zn.id}function tr(){return!!zn.awaits&&(0==--zn.awaits&&(zn.id=0),zn.echoes=100*zn.awaits,!0)}function nr(e){return zn.echoes&&e&&e.constructor===yn?(er(),e.then((e=>(tr(),e)),(e=>(tr(),hr(e))))):e}function rr(e){++Qn,zn.echoes&&0!=--zn.echoes||(zn.echoes=zn.id=0),Gn.push(En),ir(e,!0)}function or(){var e=Gn[Gn.length-1];Gn.pop(),ir(e,!1)}function ir(e,t){var n=En;if((t?!zn.echoes||Jn++&&e===En:!Jn||--Jn&&e===En)||ur(t?rr.bind(null,e):or),e!==En&&(En=e,n===Pn&&(Pn.env=ar()),vn)){var r=Pn.env.Promise,o=e.env;hn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(et,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function ar(){var e=et.Promise;return vn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(et,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:hn.then,gthen:e.prototype.then}:{}}function sr(e,t,n,r,o){var i=En;try{return ir(e,!0),t(n,r,o)}finally{ir(i,!1)}}function ur(e){dn.call(fn,e)}function cr(e,t,n,r){return"function"!=typeof e?e:function(){var o=En;n&&er(),ir(t,!0);try{return e.apply(this,arguments)}finally{ir(o,!1),r&&ur(tr)}}}function lr(e,t){return function(n,r){return e.call(this,cr(n,t),cr(r,t))}}function fr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(et.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),rt(r,o)):et.CustomEvent&&rt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&et.dispatchEvent&&(dispatchEvent(r),!et.PromiseRejectionEvent&&et.onunhandledrejection))try{et.onunhandledrejection(r)}catch(e){}It&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+dn).indexOf("[native code]")&&(er=tr=en);var hr=Tn.reject;function pr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||En.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Gt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>pr(e,t,n,r)))):hr(o)}return o._promise(t,((e,t)=>Zn((()=>(En.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return hr(new Qt.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return hr(new Qt.DatabaseClosed);e.open().catch(en)}return e._state.dbReadyPromise.then((()=>pr(e,t,n,r)))}const dr=String.fromCharCode(65535),yr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",vr=[],gr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mr=gr,br=gr,wr=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const kr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function xr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Et(t))[e],t)}class Sr{_trans(e,t,n){const r=this._tx||En.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Qt.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=qn();try{return r&&r.db===this.db?r===En.trans?r._promise(e,i,n):Zn((()=>r._promise(e,i,n)),{trans:r,transless:En.transless||En}):pr(this.db,e,[this.name],i)}finally{a&&Un()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(nt(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=tt(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==dr)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&It&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?_r(n,a&&a.multi?e=>{const t=bt(e,o);return nt(t)&&t.some((e=>i(s,e)))}:e=>i(s,bt(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,nt(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(at(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){rt(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=xr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||nt(e))return this.where(":id").equals(e).modify(t);{const n=bt(e,this.schema.primKey.keyPath);if(void 0===n)return hr(new Qt.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?tt(t).forEach((n=>{wt(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=xr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:kr}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Qt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Qt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(xr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Qt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Qt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(xr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Yt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Or(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=un),o||(o=en);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){tt(e).forEach((function(t){var n=e[t];if(nt(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Qt.InvalidArgument("Invalid event config");var r=i(t,tn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){gt((function(){e.apply(null,t)}))}))}))}}))}}function Pr(e,t){return lt(t).from({prototype:e}),t}function Er(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=_r(e.filter,t)}function Rr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>_r(r(),t()):t,e.justLimit=n&&!r}function Cr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Qt.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Tr(e,t,n){const r=Cr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Ar(e,t,n,r){const o=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),at(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Dr(Tr(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Tr(e,r,n),_r(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,n,r){var o=Hn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=en}),(t=>{e.fail(t),n=en}))||o(e.value,e,(e=>n=e)),n()}))}))}function Lr(e,t){try{const n=Kr(e),r=Kr(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Ir(e),Ir(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Lr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Kr(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Ct(e);return"ArrayBuffer"===n?"binary":n}function Ir(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Mr{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,hr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,hr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)}_iterate(e,t){return Ar(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&rt(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ar(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Er(t,!0))return n.count({trans:e,query:{index:Cr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ar(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Ar(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Er(t)?Rr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Rr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Rr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return jr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return jr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=_r(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0)return this._read((e=>{var n=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return jr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=at(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=tt(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];bt(t,a)!==s&&(wt(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of tt(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=h[e],n={value:Et(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):s||0===Lr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(g.push(o[l+e]),d.push(n.value)))}const m=Er(t)&&t.limit===1/0&&("function"!=typeof e||e===Nr)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(d.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>p(y.length,e))))).then((()=>(g.length>0||m&&e===Nr)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>p(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new zt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Er(e)&&(e.isPrimKey&&!br||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new zt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Nr)}}const Nr=(e,t)=>t.value=null;function Fr(e,t){return e<t?-1:e===t?0:1}function Br(e,t){return e>t?-1:e===t?0:1}function $r(e,t,n){var r=e instanceof zr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function qr(e){return new e.Collection(e,(()=>Hr(""))).limit(0)}function Ur(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Wr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return $r(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Fr:Br;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var p=new e.Collection(e,(()=>Vr(s[0],u[f-1]+r)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,d))return!0;for(var p=null,y=d;y<f;++y){var v=Ur(o,h,s[y],u[y],a,c);null===v&&null===p?d=y+1:(null===p||a(p,v)>0)&&(p=v)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p}function Vr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Hr(e){return{type:1,lower:e,upper:e}}class zr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?qr(this):new this.Collection(this,(()=>Vr(e,t,!n,!r)))}catch(e){return $r(this,yr)}}equals(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Hr(e)))}above(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(e,void 0,!0)))}aboveOrEqual(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(e,void 0,!1)))}below(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(void 0,e)))}startsWith(e){return"string"!=typeof e?$r(this,"String expected."):this.between(e,e+dr,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Wr(this,((e,t)=>0===e.indexOf(t[0])),[e],dr)}equalsIgnoreCase(e){return Wr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Lt.apply(Dt,arguments);return 0===e.length?qr(this):Wr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Lt.apply(Dt,arguments);return 0===e.length?qr(this):Wr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,dr)}anyOf(){const e=Lt.apply(Dt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return $r(this,yr)}if(0===e.length)return qr(this);const n=new this.Collection(this,(()=>Vr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Lt.apply(Dt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return $r(this,yr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return qr(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return $r(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Qt.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return $r(this,yr)}let h=0;const p=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,d=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=p;const v=new this.Collection(this,(()=>Vr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=p,l=r):(y=d,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!p(e)&&!d(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Lt.apply(Dt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?qr(this):this.inAnyRange(e.map((e=>[e,e+dr]))):$r(this,"startsWithAnyOf() only works with strings")}}function Yr(e){return Hn((function(t){return Gr(t),e(t.target.error),!1}))}function Gr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Jr=Or(null,"storagemutated");class Qr{_lock(){return vt(!En.global),++this._reculock,1!==this._reculock||En.global||(En.lockOwnerFor=this),this}_unlock(){if(vt(!En.global),0==--this._reculock)for(En.global||(En.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&En.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(vt(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Qt.DatabaseClosed(n);case"MissingAPIError":throw new Qt.MissingAPI(n.message,n);default:throw new Qt.OpenFailed(n)}if(!this.active)throw new Qt.TransactionInactive;return vt(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Hn((t=>{Gr(t),this._reject(e.error)})),e.onabort=Hn((t=>{Gr(t),this.active&&this._reject(new Qt.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Hn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Jr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return hr(new Qt.ReadOnly("Transaction is readonly"));if(!this.active)return hr(new Qt.TransactionInactive);if(this._locked())return new Tn(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},En])}));if(n)return Zn((()=>{var e=new Tn(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Tn(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Tn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Tn(((e,r)=>{n.then((n=>t._waitingQueue.push(Hn(e.bind(null,n)))),(e=>t._waitingQueue.push(Hn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Qt.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(at(t,e))return t[e];const n=this.schema[e];if(!n)throw new Qt.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Xr(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?"++":"")+Zr(t)}}function Zr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function eo(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:mt(n,(e=>[e.name,e]))}}let to=e=>{try{return e.only([[]]),to=()=>[[]],[[]]}catch(e){return to=()=>dr,dr}};function no(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>bt(t,e)}(e):t=>bt(t,e)}function ro(e){return[].slice.call(e)}let oo=0;function io(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ao(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=ro(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=nt(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:no(t)},indexes:ro(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:nt(o),keyPath:o,unique:n,multiEntry:r,extractKey:no(o)};return i[io(o)]=a,a})),getIndexByKeyPath:e=>i[io(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[io(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Hn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],y=[];let v=0;const g=e=>{++v,Gr(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),p.onerror=g;else for(let t=0;t<h;++t)d.push(p=c[n](e[t])),p.onerror=g}const m=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{g(e),m(e)},p.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Hn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Yr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Hn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Yr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Hn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,p=a.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?d.getAll(y,l):d.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Yr(i)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Yr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Hn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Yr(u),d.onsuccess=Hn((t=>{const n=d.result;if(!n)return void s(null);n.___id=++oo,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Hn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Hn(e),d.onerror=Yr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(d.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Hn((e=>{d.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Hn((t=>e(t.target.result))),l.onerror=Yr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:to(t),schema:o}}function so({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(ao(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function uo({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=ht(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ct(t,n,{get(){return this.table(n)},set(e){ut(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function co({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function lo(e,t){return e._cfg.version-t._cfg.version}function fo(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=En.transless||En;Zn((()=>{En.trans=i,En.transless=s,0===t?(tt(o).forEach((e=>{po(n,e,o[e].primKey,o[e].indexes)})),so(e,n),Tn.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=vo(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;go(e,o,r),go(e,u,r),a=e._dbSchema=u;const c=ho(o,u);c.add.forEach((e=>{po(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Qt.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>yo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),yo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){so(e,r),n._memoizedTables={},s=!0;let t=_t(u);c.del.forEach((e=>{t[e]=o[e]})),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],tt(t),t),n.schema=t;const i=Kt(l);let a;i&&er();const f=Tn.follow((()=>{if(a=l(n),a&&i){var e=tr.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Tn.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&mr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Tn.resolve(o.shift()(n.idbtrans)).then(e):Tn.resolve()}().then((()=>{var e,t;t=r,tt(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||po(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function ho(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!gr)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function po(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>yo(o,e))),o}function yo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function vo(e,t,n){const r={};return dt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Xr(Zr(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Xr(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=eo(e,i,a)})),r}function go({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+dt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&et.WorkerGlobalScope&&et instanceof et.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class mo{_parseStoresSpec(e,t){tt(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Xr(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),nt(r),0===t)})),o=r.shift();if(o.multi)throw new Qt.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Qt.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Qt.Schema("Index must have a name and cannot be an empty string")})),t[n]=eo(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?rt(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{rt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,co(t,[t._allTables,t,t.Transaction.prototype]),uo(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],tt(o),o),t._storeNames=tt(o),this}upgrade(e){return this._cfg.contentUpgrade=cn(this._cfg.contentUpgrade||en,e),this}}function bo(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Bo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function wo(e){return e&&"function"==typeof e.databases}function _o(e){return Zn((function(){return En.letThrough=!0,e()}))}function ko(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function xo(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):nt(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function So(e,t,n){var r=arguments.length;if(r<2)throw new Qt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,xt(o),n]}function Oo(e,t,n,r,o){return Tn.resolve().then((()=>{const i=En.transless||En,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Gt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Oo(e,t,n,null,o)))):hr(r)}const u=Kt(o);let c;u&&er();const l=Tn.follow((()=>{if(c=o.call(a,a),c)if(u){var e=tr.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xo(c))}),s);return(c&&"function"==typeof c.then?Tn.resolve(c).then((e=>a.active?e:hr(new Qt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),hr(e))))}))}function Po(e,t,n){const r=nt(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=io(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:no(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Po(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Po(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[io(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Po(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Po(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function jo(e,t,n,r){return n=n||{},r=r||"",tt(e).forEach((o=>{if(at(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Ct(i);e!==Ct(a)?n[r+o]=t[o]:"Object"===e?jo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),tt(t).forEach((o=>{at(e,o)||(n[r+o]=t[o])})),n}const Ro={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=En.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===en&&s.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===en)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=En.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||wt(e.values[o],r.keyPath,n))}else{const r=jo(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{at(t,e)?t[e]=i[e]:wt(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Co(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Lr(t.keys[o],e[i])&&(r.push(n?Et(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const To={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Co(e.keys,e.trans._cache,"clone"===e.cache);return t?Tn.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Et(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Ao(e){return!("from"in e)}const Do=function(e,t){if(!this){const t=new Do;return e&&"d"in e&&rt(t,e),t}rt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Lo(e,t,n){const r=Lr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Ao(e))return rt(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Lr(n,e.from)<0)return o?Lo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Mo(e);if(Lr(t,e.to)>0)return i?Lo(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Mo(e);Lr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Lr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Ko(e,o),i&&a&&Ko(e,i)}function Ko(e,t){Ao(t)||function e(t,{from:n,to:r,l:o,r:i}){Lo(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Io(e){let t=Ao(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Lr(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||Lr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Mo(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=No(n)}e.d=No(e)}function No({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}st(Do.prototype,{add(e){return Ko(this,e),this},addKey(e){return Lo(this,e,e),this},addKeys(e){return e.forEach((e=>Lo(this,e,e))),this},[Tt](){return Io(this)}});const Fo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Do(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Do)},c=u(""),l=u(":dels"),{type:f}=e;let[h,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const d=e.trans._cache;return o.mutate(e).then((e=>{if(nt(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Co(h,d);t||"add"===f||l.addKeys(h),(t||p)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&nt(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Lr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,p)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new Do(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new Do(e.key)],getMany:e=>[a,(new Do).addKeys(e.keys)],count:l,query:l,openCursor:l};return tt(f).forEach((e=>{c[e]=function(i){const{subscr:a}=En;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Do)},l=c(""),h=c(":dels"),[p,d]=f[e](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Bo{constructor(e,t){this._middlewares={},this.verno=0;const n=Bo.dependencies;this._options=t={addons:Bo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:en,dbReadyPromise:null,cancelOpen:en,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Tn((e=>{o.dbReadyResolve=e})),o.openCanceller=new Tn(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Or(this,"populate","blocked","versionchange","close",{ready:[cn,en]}),this.on.ready.subscribe=yt(this.on.ready.subscribe,(e=>(t,n)=>{Bo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Tn.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Pr(Mr.prototype,(function(e,t){this.db=i;let n=kr,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==tn?s:null}}))),this.Table=function(e){return Pr(Sr.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:Or(null,{creating:[on,en],reading:[nn,tn],updating:[sn,en],deleting:[an,en]})}))}(this),this.Transaction=function(e){return Pr(Qr.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Or(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 Tn(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),hr(e)}))}))}(this),this.Version=function(e){return Pr(mo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Pr(zr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Qt.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=to(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),vr.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Eo),this.use(Ro),this.use(Fo),this.use(To),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Qt.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Qt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(lo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||En.letThrough||this._vip)?e():new Tn(((e,t)=>{if(this._state.openComplete)return t(new Qt.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Qt.DatabaseClosed);this.open().catch(en)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?hr(t.dbOpenError):e));It&&(t.openCanceller._stackHolder=Bt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Qt.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Tn.race([r,("undefined"==typeof navigator?Tn.resolve():ko()).then((()=>new Tn(((r,i)=>{if(o(),!n)throw new Qt.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Qt.MissingAPI;c.onerror=Yr(i),c.onblocked=Hn(e._fireOnBlocked),c.onupgradeneeded=Hn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=Gr,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Hn((()=>{i(new Qt.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Yr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,fo(e,o/10,a,i)}}),i),c.onsuccess=Hn((()=>{a=null;const n=e._novip.idbdb=c.result,o=dt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=vo(0,t,n);e._storeNames=dt(t.objectStoreNames,0),uo(e,[e._allTables],tt(r),r)}(e,n,r):(go(e,e._dbSchema,r),function(e,t){const n=ho(vo(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),so(e,r)}catch(e){}var i;vr.push(e),n.onversionchange=Hn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Hn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&bo(e,t).put({name:n}).catch(en)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Tn.resolve(_o((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(cn,en);return t.onReadyBeingFired=[],Tn.resolve(_o((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),hr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=vr.indexOf(this);if(t>=0&&vr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Tn((t=>{e.dbReadyResolve=t})),e.openCanceller=new Tn(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Qt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Tn(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Hn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&bo(e,t).delete(n).catch(en)}(this._deps,this.name),n()})),e.onerror=Yr(r),e.onblocked=this._fireOnBlocked};if(e)throw new Qt.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return tt(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=So.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=En.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Qt.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Qt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Qt.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):hr(e)}const s=Oo.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):En.trans?sr(En.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!at(this._allTables,e))throw new Qt.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const $o="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class qo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[$o](){return this}}function Uo(e,t){return tt(t).forEach((n=>{Ko(e[n]||(e[n]=new Do),t[n])})),e}let Wo;try{Wo={indexedDB:et.indexedDB||et.mozIndexedDB||et.webkitIndexedDB||et.msIndexedDB,IDBKeyRange:et.IDBKeyRange||et.webkitIDBKeyRange}}catch(et){Wo={indexedDB:null,IDBKeyRange:null}}const Vo=Bo;function Ho(e){let t=zo;try{zo=!0,Jr.storagemutated.fire(e)}finally{zo=t}}st(Vo,{...Zt,delete:e=>new Vo(e,{addons:[]}).delete(),exists:e=>new Vo(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return wo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):bo(e,t).toCollection().primaryKeys()}(Vo.dependencies).then(e)}catch(e){return hr(new Qt.MissingAPI)}},defineClass:()=>function(e){rt(this,e)},ignoreTransaction:e=>En.trans?sr(En.transless,e):e(),vip:_o,async:function(e){return function(){try{var t=xo(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Tn.resolve(t)}catch(e){return hr(e)}}},spawn:function(e,t,n){try{var r=xo(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Tn.resolve(r)}catch(e){return hr(e)}},currentTransaction:{get:()=>En.trans||null},waitFor:function(e,t){const n=Tn.resolve("function"==typeof e?Vo.ignoreTransaction(e):e).timeout(t||6e4);return En.trans?En.trans.waitFor(n):n},Promise:Tn,debug:{get:()=>It,set:e=>{Mt(e,"dexie"===e?()=>!0:wr)}},derive:lt,extend:rt,props:st,override:yt,Events:Or,on:Jr,liveQuery:function(e){return new qo((t=>{const n=Kt(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Jr.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return tt(i).some((e=>o[e]&&function(e,t){const n=Io(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Io(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Lr(s.from,o.to)<=0&&Lr(s.to,o.from)>=0)return!0;Lr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Uo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},p=function(t){n&&er();const r=()=>Zn(e,{subscr:t,trans:null}),o=En.trans?sr(En.transless,r):r();return n&&o.then(tr,tr),o}(h);u||(Jr("storagemutated",l),u=!0),s=!0,Promise.resolve(p).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Uo,getByKeyPath:bt,setByKeyPath:wt,delByKeyPath:function(e,t){"string"==typeof t?wt(e,t,void 0):"length"in t&&[].map.call(t,(function(t){wt(e,t,void 0)}))},shallowClone:_t,deepClone:Et,getObjectDiff:jo,cmp:Lr,asap:gt,minKey:-1/0,addons:[],connections:vr,errnames:Gt,dependencies:Wo,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Vo.maxKey=to(Vo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Jr("storagemutated",(e=>{if(!zo){let t;gr?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),zo=!0,dispatchEvent(t),zo=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{zo||Ho(e)})));let zo=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Jr("storagemutated",(t=>{zo||e.postMessage(t)})),e.onmessage=e=>{e.data&&Ho(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Jr("storagemutated",(e=>{try{zo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Ho(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Ho(e.changedParts)}))}function Yo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Go(e)}function Jo(e,t){return Jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Jo(e,t)}function Qo(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=Go(e);if(t){var o=Go(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Yo(e):t;var n}(this,n)}}Tn.rejectionMapper=function(e,t){if(!e||e instanceof Vt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Xt[e.name])return e;var n=new Xt[e.name](t||e.message,e);return"stack"in e&&ct(n,"stack",{get:function(){return this.inner.stack}}),n},Mt(It,wr);var Xo=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&&Jo(e,t)}(n,e);var t=Qo(n);function n(){var e,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=void 0,(o="dynamicRouteRegistrations")in(r=Yo(e=t.call(this,"ServiceWorker")))?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,e.version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return n}(Bo);function Zo(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zo(i,r,o,a,s,"next",e)}function s(e){Zo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ti(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ni(e){return ri.apply(this,arguments)}function ri(){return(ri=ei((function(e){var t;return ti(this,(function(n){switch(n.label){case 0:return[4,Je(e)];case 1:return[4,ai(t=n.sent())];case 2:return n.sent(),[4,oi(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function oi(e){return ii.apply(this,arguments)}function ii(){return ii=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Te)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ei((function(e){return ti(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,$((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),ii.apply(this,arguments)}function ai(e){return si.apply(this,arguments)}function si(){return si=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return[4,caches.open(Te)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new Xo).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Le.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Le,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),si.apply(this,arguments)}function ui(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ci(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ui(i,r,o,a,s,"next",e)}function s(e){ui(i,r,o,a,s,"throw",e)}a(void 0)}))}}function li(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var fi={onImportMapChanged:function(e){return hi.apply(this,arguments)},clearDynamicRoutes:function(){return pi.apply(this,arguments)},registerDynamicRoute:function(e){return di.apply(this,arguments)}};function hi(){return(hi=ci((function(e){return li(this,(function(t){switch(t.label){case 0:return[4,ni(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function pi(){return(pi=ci((function(){return li(this,(function(e){switch(e.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function di(){return(di=ci((function(e){var t,n,r,o,i;return li(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat(M(n),"$")),o?(i={pattern:o,strategy:r},[4,(new Xo).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function yi(){return yi=ci((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return li(this,(function(f){switch(f.label){case 0:if(!(o=fi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),yi.apply(this,arguments)}n(585);var vi=["DELETE","GET","HEAD","PATCH","POST","PUT"],gi=function(e){return e&&"object"==typeof e?e:{handle:e}};function mi(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)}}var bi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handler=gi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=gi(e)}}])&&mi(t.prototype,n),e}();function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(e)}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function ki(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=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var xi=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&&_i(e,t)}(n,e);var t=ki(n);function n(e,r,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),r,o)}return n}(bi);function Si(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 Oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Pi(e,t,n){return Pi=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&&Ri(o,n.prototype),o},Pi.apply(null,arguments)}function Ei(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 ji(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci,Ti=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Pi(Request,function(e){if(Array.isArray(e))return Si(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Si(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)?Si(e,t):void 0}}(r)||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.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(ji(l,Promise)&&(this._catchHandler||h)){var p=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Oi(i,r,o,a,s,"next",e)}function s(e){Oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return ji(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(p._catchHandler)return[2,p._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,p=f.match({url:t,sameOrigin:n,request:r,event:o});if(p)return h=p,(Array.isArray(h)&&0===h.length||p.constructor===Object&&0===Object.keys(p).length||"boolean"==typeof p)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,gi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=gi(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ei(t.prototype,n),e}(),Ai=function(){return Ci||((Ci=new Ti).addFetchListener(),Ci.addCacheListener()),Ci};function Di(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Li(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 Ki(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ki(i,r,o,a,s,"next",e)}function s(e){Ki(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Mi(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 Ni(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Fi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Bi(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.")}function $i(e){return"string"==typeof e?new Request(e):e}n(238);var qi=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new d,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Li(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Li(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)?Li(e,t):void 0}}(r)||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.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,s,u,c,l,f,h,p,d,y,v,g,m,b,w,_;return Fi(this,(function(k){switch(k.label){case 0:return n=t.event,"navigate"===(r=$i(e)).mode&&Ni(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=k.sent())return[2,o];k.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,k.label=3;case 3:k.trys.push([3,12,,13]),s=!0,u=!1,c=void 0,k.label=4;case 4:k.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),k.label=5;case 5:return(s=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=k.sent(),k.label=7;case 7:return s=!0,[3,5];case 8:return[3,11];case 9:return w=k.sent(),u=!0,c=w,[3,11];case 10:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 11:return[3,13];case 12:if(Ni(h=k.sent(),Error))throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:p=r.clone(),k.label=14;case 14:return k.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:d=k.sent(),y=!0,v=!1,g=void 0,k.label=16;case 16:k.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),k.label=17;case 17:return(y=(b=m.next()).done)?[3,20]:[4,(0,b.value)({event:n,request:p,response:d})];case 18:d=k.sent(),k.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=k.sent(),v=!0,g=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw g}return[7];case 23:return[2,d];case 24:return _=k.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:p.clone()})]:[3,26];case 25:k.sent(),k.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Ii((function(){var n,r;return Fi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c,l,f,h,p,d;return Fi(this,(function(y){switch(y.label){case 0:return n=$i(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(p=h.next()).done)?[3,7]:[4,(0,p.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return d=y.sent(),l=!0,f=d,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Ii((function(){var r,o,i,s,u,c,l,f,p,d,y,g,b,w,_,k,x;return Fi(this,(function(S){switch(S.label){case 0:return r=$i(e),[4,m(0)];case 1:return S.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=S.sent(),!t)throw new a("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=S.sent())?(s=n._strategy,u=s.cacheName,c=s.matchOptions,[4,self.caches.open(u)]):[2,!1];case 4:return l=S.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,h(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return d=S.sent(),[3,7];case 6:d=null,S.label=7;case 7:p=d,S.label=8;case 8:return S.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return S.sent(),[3,14];case 10:return Ni(y=S.sent(),Error)?"QuotaExceededError"!==y.name?[3,12]:[4,v()]:[3,13];case 11:S.sent(),S.label=12;case 12:throw y;case 13:return[3,14];case 14:g=!0,b=!1,w=void 0,S.label=15;case 15:S.trys.push([15,20,21,22]),_=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),S.label=16;case 16:return(g=(k=_.next()).done)?[3,19]:[4,(0,k.value)({cacheName:u,oldResponse:p,newResponse:i.clone(),request:o,event:n.event})];case 17:S.sent(),S.label=18;case 18:return g=!0,[3,16];case 19:return[3,22];case 20:return x=S.sent(),b=!0,w=x,[3,22];case 21:try{g||null==_.return||_.return()}finally{if(b)throw w}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u,c,l;return Fi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=$i.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u;return Fi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return Fi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return Fi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Bi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Ii((function(){var t;return Fi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c;return Fi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&Mi(t.prototype,n),e}();function Ui(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 Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Vi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Hi(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 zi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Yi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Gi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheName=c(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ui(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)?Ui(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.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){zi(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new qi(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return Vi((function(){var o,i,s,u,c,l,f,h,p,d,y,v,g;return Yi(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new a("no-response",{url:t.url});return[3,13];case 4:if(!zi(i=m.sent(),Error))return[3,12];s=!0,u=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(s=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return s=!0,[3,6];case 9:return[3,12];case 10:return g=m.sent(),u=!0,c=g,[3,12];case 11:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,p=!1,d=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return g=m.sent(),p=!0,d=g,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(p)throw d}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return Vi((function(){var o,i,a;return Yi(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return zi(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&Hi(t.prototype,n),e}();function Ji(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Qi(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 Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function Zi(e,t){return Zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zi(e,t)}function ea(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=Xi(e);if(t){var o=Xi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var ta=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&&Zi(e,t)}(o,e);var t,n,r=ea(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return t=o,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ji(i,r,o,a,s,"next",e)}function s(e){Ji(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new a("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&Qi(t.prototype,n),o}(Gi);function na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ra,oa={cacheWillUpdate:(ra=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){na(i,r,o,a,s,"next",e)}function s(e){na(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ra.apply(this,arguments)})};function ia(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function aa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ia(i,r,o,a,s,"next",e)}function s(e){ia(i,r,o,a,s,"throw",e)}a(void 0)}))}}function sa(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 ua(e){return ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ua(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(){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=ua(e);if(t){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}function fa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var ha=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&&ca(e,t)}(o,e);var t,n,r=la(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(oa),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return aa((function(){var r,o,i,s,u,c,l,f;return fa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(s=n._getTimeoutPromise({request:e,logs:r,handler:t}),u=s.id,c=s.promise,i=u,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(aa((function(){var e;return fa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new a("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=aa((function(){return fa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return aa((function(){var e,o,i;return fa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&sa(t.prototype,n),o}(Gi);function pa(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function da(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 ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function va(e,t){return va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},va(e,t)}function ga(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=ya(e);if(t){var o=ya(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var ma=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&&va(e,t)}(o,e);var t,n,r=ga(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pa(i,r,o,a,s,"next",e)}function s(e){pa(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,s,u;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(s=m(1e3*n._networkTimeoutSeconds),i.push(s)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=u=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=u),[3,4];case 4:if(!o)throw new a("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&da(t.prototype,n),o}(Gi);function ba(e){var t,n=+(null!==(t=wa(e,je))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function wa(e,t){return e.get(t)}function _a(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ka(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_a(i,r,o,a,s,"next",e)}function s(e){_a(i,r,o,a,s,"throw",e)}a(void 0)}))}}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Oa,Pa,Ea=new ma,ja=new ta({cacheName:Te}),Ra=new ha({cacheName:Te}),Ca="network-only-or-cache-only",Ta=(xa(Oa={},"network-first",(function(e){return Ra.handle(e)})),xa(Oa,"network-only-or-cache-only",function(){var e=ka((function(e){return Sa(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Ea.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,ja.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Oa);function Aa(e){return Da.apply(this,arguments)}function Da(){return(Da=ka((function(e){var t;return Sa(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Ea.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Te)];case 3:return[4,n.sent().match(De)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function La(e){return Ka.apply(this,arguments)}function Ka(){return Ka=ka((function(e){var t,n,r,o,i,a;return Sa(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Ia(e)];case 1:return r=s.sent(),[3,3];case 2:r=Ca,s.label=3;case 3:i=null!==(o=Ta[n=r])&&void 0!==o?o:Ta[Ca],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response((u=t.headers,null!==(c=wa(u,Ee))&&void 0!==c?c:void 0),{status:ba(t.headers)})];case 7:return[2]}var u,c}))})),Ka.apply(this,arguments)}function Ia(e){return Ma.apply(this,arguments)}function Ma(){return(Ma=ka((function(e){var t,n,r;return Sa(this,(function(o){switch(o.label){case 0:return null===(i=(t=e.request).headers,n=wa(i,Re))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,Na(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}var i}))}))).apply(this,arguments)}function Na(e){return Fa.apply(this,arguments)}function Fa(){return(Fa=ka((function(e){var t,n,r,o;return Sa(this,(function(i){switch(i.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Pe(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:Ca]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,Pa={prefix:Ce},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(u)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof Pa[t]&&(u[t]=Pa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=Di(e,RegExp)?new xi(e,t,n):new bi(e,t,n),Ai().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Aa);var e=Ai(),t=!0,n=!1,r=void 0;try{for(var o,i=vi[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(La,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return yi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(oi(Le))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();
1
+ (()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:h,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,O)},k=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},x=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=m;S.l=k,S.i=_,S.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){var v=function(e){this.$L=k(e.locale,null,!0),this.parse(e)},g=v.prototype;return g.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!S.u(t)||t,l=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},d=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(r?g-w:g+(6-w),v);case s:case h:return d(m+"Hours",0);case a:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=S.p(e),l="set"+(this.$u?"UTC":""),p=(n={},n[s]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],d=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(h,1);y.$d[p](d),y.init(),this.$d=y.set(h,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(t,r){var l,h=this;t=Number(t);var p=S.p(r),d=function(e){var n=x(h);return S.w(n.date(n.date()+Math.round(e*t)),h)};if(p===c)return this.set(c,this.$M+t);if(p===f)return this.set(f,this.$y+t);if(p===s)return d(1);if(p===u)return d(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[p]||1,v=this.$d.getTime()+t*y;return S.w(v,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||d[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,r,h){var p,d=S.p(r),y=x(t),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=S.m(this,y);return m=(p={},p[f]=m/12,p[c]=m,p[l]=m/3,p[u]=(g-v)/6048e5,p[s]=(g-v)/864e5,p[a]=g/n,p[i]=g/e,p[o]=g/1e3,p)[d]||g,h?m:S.a(m)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),P=O.prototype;return x.prototype=P,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",h]].forEach((function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=k,x.isDayjs=_,x.unix=function(e){return x(1e3*e)},x.en=w[b],x.Ls=w,x.p={},x}()},414:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function s(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 u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(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&&h(e,t)}function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}n.r(t),n.d(t,{default:()=>q});var y={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)}},v=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(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||y,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,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){a(this,e),this.observers={}}return u(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 m(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function b(e){return null==e?"":""+e}function w(e,t,n){for(var r=function(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e},o=function(){return!e||"string"==typeof e},i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function _(e,t,n){var r=w(e,t,Object);r.obj[r.k]=n}function k(e,t){var n=w(e,t),r=n.obj,o=n.k;if(r)return r[o]}function x(e,t,n){var r=k(e,n);return void 0!==r?r:k(t,n)}function S(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||d(e[r],String)||"string"==typeof t[r]||d(t[r],String)?n&&(e[r]=t[r]):S(e[r],t[r],n):e[r]=t[r]);return e}function O(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function E(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return P[e]})):e}var j="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),j&&g.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),k(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),_(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 a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=k(this.data,s)||{};r?S(u,n,o):u=i({},u,n),_(this.data,s,u),a.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?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),C={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}},T={},A=function(e){function t(e){var n,r,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),j&&g.call(c(n)),r=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=e,i=c(n),r.forEach((function(e){o[e]&&(i[e]=o[e])})),n.options=s,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(p){var d=n.nsSeparator||this.options.nsSeparator;return f+d+c}return c}var y=this.resolve(e,n),v=y&&y.res,g=y&&y.usedKey||c,m=y&&y.exactUsedKey||c,b=Object.prototype.toString.apply(v),w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var k="[object Array]"===b,x=k?[]:{},S=k?m:g;for(var O in v)if(Object.prototype.hasOwnProperty.call(v,O)){var P="".concat(S).concat(s).concat(O);x[O]=this.translate(P,i({},n,{joinArrays:!1,ns:l})),x[O]===P&&(x[O]=v[O])}v=x}}else if(_&&"string"==typeof w&&"[object Array]"===b)(v=v.join(w))&&(v=this.extendTranslation(v,e,n,o));else{var E=!1,j=!1,R=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),T=R?this.pluralResolver.getSuffix(h,n.count):"",A=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(v)&&C&&(E=!0,v=A),this.isValidLookup(v)||(j=!0,v=c);var D=C&&A!==v&&this.options.updateMissing;if(j||E||D){if(this.logger.log(D?"updateKey":"missingKey",h,f,c,D?A:v),s){var L=this.resolve(c,i({},n,{keySeparator:!1}));L&&L.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 K=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var M=0;M<I.length;M++)K.push(I[M]);else"all"===this.options.saveMissingTo?K=this.languageUtils.toResolveHierarchy(n.lng||this.language):K.push(n.lng||this.language);var N=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,D?r:v,D,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,D?r:v,D,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?K.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){N([e],c+t,n["defaultValue".concat(t)]||A)}))})):N(K,c,A))}v=this.extendTranslation(v,e,n,y,o),j&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),j&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=C.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,h=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!T["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(T["".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,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&h&&p.push(l+i),h&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),t}(g);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var L=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(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]=D(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]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),K=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],I={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)}},M=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=(n={},K.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:I[e.fc]}}))})),n)}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(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:E,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?O(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?O(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?O(t.nestingPrefix):t.nestingPrefixEscaped||O("$t("),this.nestingSuffix=t.nestingSuffix?O(t.nestingSuffix):t.nestingSuffixEscaped||O(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=function(e){return e.replace(/\$/g,"$$$$")},u=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=x(t,c,e);return u.alwaysFormat?u.format(o,void 0,n):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),s=i.join(u.formatSeparator).trim();return u.format(x(t,c,a),s,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return s(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?s(u.escape(e)):s(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(h){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=b(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}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 u.defaultValue,e},a=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i({},s);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=b(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return a.format(e,t,s.lng,s)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),F=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),j&&g.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=w(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=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,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(g);function B(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}const q=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),j&&g.call(c(e)),e.options=B(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(o=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,B(n)),this.format=this.options.interpolation.format,o||(o=$),!this.options.isClone){this.modules.logger?v.init(e(this.modules.logger),this.options):v.init(null,this.options);var a=new L(this.options);this.store=new R(this.options.resources,this.options);var s=this.services;s.logger=v,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new M(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new N(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new F(e(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(s.languageDetector=e(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=e(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[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(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var c=m(),l=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(n),o(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};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]:$,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=$),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&&C.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=m();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,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.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=m();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=m();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new A(a.services,a.options),a.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];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(g))},774:()=>{"use strict";try{self["workbox:core:6.5.3"]&&_()}catch(e){}},585:()=>{"use strict";try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},238:()=>{"use strict";try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{n.S={};var e={},t={};n.I=(r,o)=>{o||(o=[]);var i=t[r];if(i||(i=t[r]={}),!(o.indexOf(i)>=0)){if(o.push(i),e[r])return e[r];n.o(n.S,r)||(n.S[r]={});var a=n.S[r],s="@openmrs/esm-app-shell",u=(e,t,n,r)=>{var o=a[e]=a[e]||{},i=o[t];(!i||!i.loaded&&(!r!=!i.eager?r:s>i.from))&&(o[t]={get:n,from:s,eager:!!r})},c=[];return"default"===r&&(u("dayjs","1.11.5",(()=>()=>n(23)),1),u("i18next","19.9.2",(()=>()=>n(414)),1)),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{"use strict";n(774);function e(t,n,o){return e=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.apply(null,arguments)}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function o(n){var i="function"==typeof Map?new Map:void 0;return o=function(n){if(null===n||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return e(n,arguments,t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,n)},o(n)}function i(){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}}var a=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&&r(e,t)}(s,e);var n,o,a=(n=s,o=i(),function(){var e,r=t(n);if(o){var i=t(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof 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,e)});function s(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var r=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];var o=e;return n.length>0&&(o+=" :: ".concat(JSON.stringify(n))),o}(e,t);return(n=a.call(this,r)).name=e,n.details=t,n}return s}(o(Error)),s=new Set,u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},c=function(e){return e||(t=u.runtime,[u.prefix,t,u.suffix].filter((function(e){return e&&e.length>0})).join("-"));var t};function l(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function f(e,t){var n=new URL(e),r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.searchParams.delete(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n.href}function h(e,t,n,r){return p.apply(this,arguments)}function p(){return p=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e,t,n,r){var o,i,a,s,u,c,l,h,p,d;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(y){switch(y.label){case 0:return o=f(t.url,n),t.url===o?[2,e.match(t,r)]:(i=Object.assign(Object.assign({},r),{ignoreSearch:!0}),[4,e.keys(t,i)]);case 1:a=y.sent(),s=!0,u=!1,c=void 0;try{for(l=a[Symbol.iterator]();!(s=(h=l.next()).done);s=!0)if(p=h.value,d=f(p.url,n),o===d)return[2,e.match(p,r)]}catch(e){u=!0,c=e}finally{try{s||null==l.return||l.return()}finally{if(u)throw c}}return[2]}}))})),p.apply(this,arguments)}var d=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function y(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function v(){return g.apply(this,arguments)}function g(){return g=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var e,t,n,r,o,i;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(a){switch(a.label){case 0:e=!0,t=!1,n=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),r=s[Symbol.iterator](),a.label=2;case 2:return(e=(o=r.next()).done)?[3,5]:[4,(0,o.value)()];case 3:a.sent(),a.label=4;case 4:return e=!0,[3,2];case 5:return[3,8];case 6:return i=a.sent(),t=!0,n=i,[3,8];case 7:try{e||null==r.return||r.return()}finally{if(t)throw n}return[7];case 8:return[2]}}))})),g.apply(this,arguments)}function m(e){return new Promise((function(t){return setTimeout(t,e)}))}const b="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const _=b||w||Function("return this")(),k=_.Symbol,x=Array.isArray;var S=Object.prototype,O=S.hasOwnProperty,P=S.toString,E=k?k.toStringTag:void 0;var j=Object.prototype.toString;var R=k?k.toStringTag:void 0;const C=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":R&&R in Object(e)?function(e){var t=O.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[E]=n:delete e[E]),o}(e):function(e){return j.call(e)}(e)},T=function(e){return null!=e&&"object"==typeof e};var A=k?k.prototype:void 0,D=A?A.toString:void 0;const L=function e(t){if("string"==typeof t)return t;if(x(t))return 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}(t,e)+"";if(function(e){return"symbol"==(void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||T(e)&&"[object Symbol]"==C(e);var t}(t))return D?D.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var K=/[\\^$.*+?()[\]{}|]/g,I=RegExp(K.source);const M=function(e){return(e=null==(t=e)?"":L(t))&&I.test(e)?e.replace(K,"\\$&"):e;var t};function N(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function F(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){N(i,r,o,a,s,"next",e)}function s(e){N(i,r,o,a,s,"throw",e)}a(void 0)}))}}function B(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function $(e){return q.apply(this,arguments)}function q(){return q=F((function(e){var t,n,r,o,i,a,s,u=arguments;return B(this,(function(c){switch(c.label){case 0:n=(t=u.length>1&&void 0!==u[1]?u[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,U(r(i))];case 2:return c.sent(),[4,e()];case 3:return[2,c.sent()];case 4:return s=c.sent(),null==o||o(s,i),a=s,[3,5];case 5:if(n(i++))return[3,1];c.label=6;case 6:throw a}}))})),q.apply(this,arguments)}function U(e){return W.apply(this,arguments)}function W(){return(W=F((function(e){return B(this,(function(t){return e<=0?[2]:[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))).apply(this,arguments)}const V=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},H=_["__core-js_shared__"];var z,Y=(z=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var G=Function.prototype.toString;var J=/^\[object .+?Constructor\]$/,Q=Function.prototype,X=Object.prototype,Z=Q.toString,ee=X.hasOwnProperty,te=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ne=function(e){return!(!V(e)||(t=e,Y&&Y in t))&&(function(e){if(!V(e))return!1;var t=C(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?te:J).test(function(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t},re=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(n)?n:void 0},oe=re(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(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])}}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},se.prototype.get=function(e){var t=this.__data__;if(oe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ie.call(t,e)?t[e]:void 0},se.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:ae.call(t,e)},se.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};const ue=se,ce=function(e,t){for(var n=e.length;n--;)if((r=e[n][0])===(o=t)||r!=r&&o!=o)return n;var r,o;return-1};var le=Array.prototype.splice;function fe(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])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(e){var t=this.__data__,n=ce(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},fe.prototype.get=function(e){var t=this.__data__,n=ce(t,e);return n<0?void 0:t[n][1]},fe.prototype.has=function(e){return ce(this.__data__,e)>-1},fe.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const he=fe,pe=re(_,"Map"),de=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function ye(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])}}ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ue,map:new(pe||he),string:new ue}},ye.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return de(this,e).get(e)},ye.prototype.has=function(e){return de(this,e).has(e)},ye.prototype.set=function(e,t){var n=de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const ve=ye;function ge(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}ge.prototype.add=ge.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ge.prototype.has=function(e){return this.__data__.has(e)};const me=ge,be=function(e){return e!=e},we=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,be,n)}(e,t,0)>-1},_e=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},ke=function(e,t){return e.has(t)},xe=re(_,"Set"),Se=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Oe=xe&&1/Se(new xe([,-0]))[1]==1/0?function(e){return new xe(e)}:function(){},Pe=function(e){return e&&e.length?function(e,t,n){var r=-1,o=we,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=_e;else if(i>=200){var c=t?null:Oe(e);if(c)return Se(c);a=!1,o=ke,u=new me}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}(e):[]};var Ee="x-omrs-offline-response-body",je="x-omrs-offline-response-status",Re="x-omrs-offline-caching-strategy",Ce="omrs",Te="".concat(Ce,"-spa-cache-v1"),Ae=[{'revision':null,'url':'/openmrs/spa/routes.registry.json'},{'revision':null,'url':'023bd53d342b7463.woff'},{'revision':null,'url':'02acc4469a2fe2e4.woff2'},{'revision':null,'url':'033e03f8663ab9b1.woff'},{'revision':null,'url':'052607e67da262ec.woff'},{'revision':null,'url':'081587ca0db8e63f.woff2'},{'revision':null,'url':'08cf53c4e5e71cf1.woff2'},{'revision':null,'url':'090b2bc014d24ea4.woff2'},{'revision':null,'url':'0a28cd0b47497b71.woff'},{'revision':null,'url':'0a9765a89ff0437d.woff'},{'revision':null,'url':'0ae92bcea615e948.woff2'},{'revision':null,'url':'0be8520d8945b3b7.woff2'},{'revision':null,'url':'0bf6b66a8b86b014.woff'},{'revision':null,'url':'0e7dd073cd8bb0ad.woff2'},{'revision':null,'url':'14869ac5d1830304.woff2'},{'revision':null,'url':'14aaceff85fc8b28.woff2'},{'revision':null,'url':'1590052e1cf8f28d.woff'},{'revision':null,'url':'16f443eed01776ca.woff2'},{'revision':null,'url':'183bae0e53a22182.woff2'},{'revision':null,'url':'19b239a0bb74b27e.woff'},{'revision':null,'url':'19c8f94ccd6289f5.woff2'},{'revision':null,'url':'1ae86565eab7451c.woff2'},{'revision':null,'url':'1c7bf8797e0a9be6.woff2'},{'revision':null,'url':'1d9aff9a93a3bb66.woff'},{'revision':null,'url':'1f266d3619b30f16.woff2'},{'revision':null,'url':'1f8c5a4087a524fd.woff2'},{'revision':null,'url':'20ba2b23c5c0cd0b.woff2'},{'revision':null,'url':'2269d45733c5cf8f.woff'},{'revision':null,'url':'258ecbd235953099.woff'},{'revision':null,'url':'295dd01a1fbfee6d.woff2'},{'revision':null,'url':'2d7f835ab7c7c764.woff'},{'revision':null,'url':'2f66cca99eeead63.woff'},{'revision':null,'url':'2f686985e26e7107.woff2'},{'revision':null,'url':'315eff729e4ccbd9.woff2'},{'revision':null,'url':'32f1e5aadf845e08.woff'},{'revision':null,'url':'338484e1c850669c.woff'},{'revision':null,'url':'33b7a82f1e295190.woff'},{'revision':null,'url':'3674d98ec4a9173d.woff'},{'revision':null,'url':'368d16e3259bf207.woff2'},{'revision':null,'url':'36c49aa341a7079a.woff2'},{'revision':null,'url':'36e1e0430475edee.woff2'},{'revision':null,'url':'3bc19662b8630ee9.woff2'},{'revision':null,'url':'3f645f473b3f8fba.woff2'},{'revision':null,'url':'4095df88acae9e98.woff'},{'revision':null,'url':'4218ac9901b9d36d.woff2'},{'revision':null,'url':'4680ba68412e4da9.woff2'},{'revision':null,'url':'47d7a8698d562a0e.woff'},{'revision':null,'url':'47ec6c9dffe776a0.woff'},{'revision':null,'url':'48e37bd7ebf85a1f.woff2'},{'revision':null,'url':'48edfdf51dfb3160.woff'},{'revision':null,'url':'4a35a2746c8ad7a5.woff'},{'revision':null,'url':'4e11b8a7c445255f.woff2'},{'revision':null,'url':'4ea1f5c3baf89fe3.woff'},{'revision':null,'url':'4ea99f41c896bf9d.woff'},{'revision':null,'url':'5005db1d1caf70c7.woff'},{'revision':null,'url':'528a8e7c1c141a31.woff'},{'revision':null,'url':'52ca12f5b516d4ea.woff'},{'revision':null,'url':'537ddd61c5c1fce2.woff2'},{'revision':null,'url':'5432f7541ec25c34.woff'},{'revision':null,'url':'54a95d73a9454ba3.woff'},{'revision':null,'url':'56c4118c0907f151.woff2'},{'revision':null,'url':'5938bc2ae7ec60c0.woff2'},{'revision':null,'url':'594306657c4e44e8.woff'},{'revision':null,'url':'5a538aa477a66067.woff'},{'revision':null,'url':'5c6586155f0d278a.woff2'},{'revision':null,'url':'60ec587649ba812a.woff2'},{'revision':null,'url':'616567cd947eb9dd.woff'},{'revision':null,'url':'65168b59f44caab4.woff'},{'revision':null,'url':'65c0982f98374864.woff'},{'revision':null,'url':'65e6511e035870e1.woff2'},{'revision':null,'url':'661425f6798cd16a.woff2'},{'revision':null,'url':'66b864fe213caf46.woff2'},{'revision':null,'url':'6775fee945132ef9.woff'},{'revision':null,'url':'68bbd362c8e4983b.woff'},{'revision':null,'url':'68d6deec87b6b604.woff'},{'revision':null,'url':'69a7e6d31d390296.woff'},{'revision':null,'url':'69d087d970ee9455.woff2'},{'revision':null,'url':'69fa3fc7363bbc04.woff'},{'revision':null,'url':'6a1f0178b45b2e9e.woff'},{'revision':null,'url':'6c6c45e66ff54281.woff2'},{'revision':null,'url':'6ffb9ed97b21fdc0.woff'},{'revision':null,'url':'7073a7323e92bd11.woff2'},{'revision':null,'url':'718c6cc31274ab1a.woff2'},{'revision':null,'url':'72cdbedfe04be9f9.woff2'},{'revision':null,'url':'7509c9f56fe9e532.woff2'},{'revision':null,'url':'75dc5c5b04adc8bf.woff2'},{'revision':null,'url':'76a7c256fc8b3490.woff'},{'revision':null,'url':'77b48bc05299ecca.woff2'},{'revision':null,'url':'787f56efa306ddbc.woff'},{'revision':null,'url':'7a0a0215c248c73d.woff2'},{'revision':null,'url':'7c4463d9c84f263a.woff'},{'revision':null,'url':'7d112a556b7670d2.woff'},{'revision':null,'url':'7d52d6014b5f2bbc.woff'},{'revision':null,'url':'7f00bebb24e40167.woff2'},{'revision':null,'url':'7f2c6ea3e740417e.woff'},{'revision':null,'url':'802c6176541eeed7.woff2'},{'revision':null,'url':'8080081b3379c637.woff2'},{'revision':null,'url':'8274cc1afc7619f1.woff'},{'revision':null,'url':'8605507b7a8487c4.woff2'},{'revision':null,'url':'8a83d654702f6534.woff2'},{'revision':null,'url':'8ccee65f6cf254ee.woff'},{'revision':null,'url':'8d82a082a4aba439.woff'},{'revision':null,'url':'8de04ae985937b56.woff'},{'revision':null,'url':'8fe71173a13fe571.woff2'},{'revision':null,'url':'90edccb224a51cee.woff'},{'revision':null,'url':'94b292fe87831a8b.woff'},{'revision':null,'url':'95dc66c1b88745f8.woff'},{'revision':null,'url':'95fb698be77c85ef.woff'},{'revision':null,'url':'9624cec0f9bdd81e.woff2'},{'revision':null,'url':'9662331fa31e3f20.woff'},{'revision':null,'url':'966c4dfec919951f.js'},{'revision':null,'url':'98a3af55a1698171.woff2'},{'revision':null,'url':'9ba85996af74c5ce.woff2'},{'revision':null,'url':'9bc133b1df25cb74.woff'},{'revision':null,'url':'9ddb22faa35006e7.woff2'},{'revision':null,'url':'9e97352380611b95.woff'},{'revision':null,'url':'a167fb2799dd741b.woff2'},{'revision':null,'url':'a2045a5cc4fdf94f.woff2'},{'revision':null,'url':'a246c73905a31c93.woff2'},{'revision':null,'url':'a401aa7939cb6e6f.woff2'},{'revision':null,'url':'a41a71258c38684d.woff'},{'revision':null,'url':'a60d94a72d615a8e.woff'},{'revision':null,'url':'a66764dd0c1fa213.woff'},{'revision':null,'url':'a6ed036f17a1ea29.woff2'},{'revision':null,'url':'a8f635129d660202.woff'},{'revision':null,'url':'a9f25ca430709a1a.woff2'},{'revision':null,'url':'ae14d98ad8a1212c.woff'},{'revision':null,'url':'aeec4f78084adf7f.woff'},{'revision':null,'url':'af11e94b0644eba5.woff'},{'revision':null,'url':'afa9121a49e95351.woff2'},{'revision':null,'url':'afcda12d9f805543.woff2'},{'revision':null,'url':'b09ded85a7da77f1.woff2'},{'revision':null,'url':'b2f4e9d1e821b71c.woff2'},{'revision':null,'url':'b30b06698dc369b2.woff'},{'revision':null,'url':'b4a074bf828bb757.woff2'},{'revision':null,'url':'b7f447da43f6e596.woff2'},{'revision':null,'url':'b7f633b871b84820.woff'},{'revision':null,'url':'bcca84a524572d10.woff2'},{'revision':null,'url':'be4d1f97b11d087c.woff2'},{'revision':null,'url':'be91def2232f6776.woff'},{'revision':null,'url':'bec14780d81164de.woff2'},{'revision':null,'url':'c285f4b15d11f172.woff'},{'revision':null,'url':'c4673617b80801f3.woff'},{'revision':null,'url':'c553f7e0199c5084.woff2'},{'revision':null,'url':'c8470ed2c145ace7.woff'},{'revision':null,'url':'c9d9ce9f465df4fe.woff2'},{'revision':null,'url':'ccb2870475da9fe8.woff'},{'revision':null,'url':'d04134fa33c2606d.woff'},{'revision':null,'url':'d11f9c5cd7d9ea16.woff'},{'revision':null,'url':'d188f7f036ac5779.woff2'},{'revision':null,'url':'d265d81c58525ae4.woff2'},{'revision':null,'url':'d5942cd81663e136.woff2'},{'revision':null,'url':'d6097a5c452acf6d.woff'},{'revision':null,'url':'d66b8ff73d95cabb.woff2'},{'revision':null,'url':'d77f5bf95de8edaa.woff'},{'revision':null,'url':'d8829a685af4f372.woff'},{'revision':null,'url':'d88899ef0fd16719.woff2'},{'revision':null,'url':'d9a5d958e69e058d.woff2'},{'revision':null,'url':'da65d9a514c628c8.woff'},{'revision':null,'url':'dac90d495be353a0.woff2'},{'revision':null,'url':'dd7071bc6306585c.woff'},{'revision':null,'url':'dd8ce598529c3fab.woff2'},{'revision':null,'url':'ddef6f2dd566c2b9.woff'},{'revision':null,'url':'de013f1be25103fa.woff2'},{'revision':null,'url':'dee2ff599db31e5b.woff'},{'revision':null,'url':'dee7c6b5dd954d9b.woff'},{'revision':null,'url':'df222fceeffca849.woff2'},{'revision':null,'url':'e0d2e5b12f028b5d.woff'},{'revision':null,'url':'e33e3db8e4f7559f.woff'},{'revision':null,'url':'e62b00b9199c1ac9.woff2'},{'revision':null,'url':'e696cef1407b2610.woff2'},{'revision':null,'url':'e861b352d93d75e6.js'},{'revision':null,'url':'e89ca83b24959664.woff'},{'revision':null,'url':'eb8c0ae77ad55249.woff'},{'revision':null,'url':'ed0997bd7d221b8e.woff'},{'revision':null,'url':'eed48feba743e21c.woff2'},{'revision':null,'url':'f280bda8a6e535a6.woff'},{'revision':null,'url':'f543c88feb236d11.woff2'},{'revision':null,'url':'f587be8fbac73856.js'},{'revision':null,'url':'f591b0079faa93fe.woff2'},{'revision':null,'url':'f6ed27923769ad1d.woff2'},{'revision':null,'url':'f8803bebe640d99a.woff'},{'revision':'30de494bd9e73ae96c18fd0c06fa422b','url':'favicon.ico'},{'revision':null,'url':'fbebeb4336e67012.woff2'},{'revision':null,'url':'fd522cd7a5c646fe.woff'},{'revision':null,'url':'https://dev3.openmrs.org/openmrs/spa/importmap.json'},{'revision':'916dde2cd99c3e7cf9c9be94e36799e0','url':'index.html'},{'revision':'6b758b31ea00150986994edcfb033a94','url':'logo-512.png'},{'revision':'b860db243392596e3b875bad9794b4e5','url':'logo.svg'},{'revision':null,'url':'openmrs.145e521ac51dbb3a.css'},{'revision':null,'url':'openmrs.4112ceaba2c91dab.js'},{'revision':'051a9b515f786fd01bf724422bd41233','url':'openmrs.4112ceaba2c91dab.js.LICENSE.txt'}],De=Ie("index.html"),Le=Pe(Ae.map((function(e){return Ie(e.url)}))),Ke=".buildmanifest.json";function Ie(e){return new URL(e,self.location.href).href}const Me=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Ne=function(e){return T(e)&&"[object Arguments]"==C(e)};var Fe=Object.prototype,Be=Fe.hasOwnProperty,$e=Fe.propertyIsEnumerable;const qe=Ne(function(){return arguments}())?Ne:function(e){return T(e)&&Be.call(e,"callee")&&!$e.call(e,"callee")};var Ue=k?k.isConcatSpreadable:void 0;const We=function(e){return x(e)||qe(e)||!!(Ue&&e&&e[Ue])},Ve=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=We),i||(i=[]);++a<s;){var u=t[a];n>0&&r(u)?n>1?e(u,n-1,r,o,i):Me(i,u):o||(i[i.length]=u)}return i},He=function(e){return null!=e&&e.length?Ve(e,1):[]};function ze(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ye(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ze(i,r,o,a,s,"next",e)}function s(e){ze(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Ge(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Je(e){return Qe.apply(this,arguments)}function Qe(){return Qe=Ye((function(e){var t,n,r,o;return Ge(this,(function(i){switch(i.label){case 0:return t=e.imports,n=void 0===t?{}:t,r=Object.values(n),[4,Promise.all(r.map((a=Ye((function(e){var t,n;return Ge(this,(function(r){switch(r.label){case 0:return t=function(e){return e+Ke}(e),[4,Xe(t)];case 1:return[2,(n=r.sent())?Ze(e,n):[]]}}))})),function(e){return a.apply(this,arguments)})))];case 1:return o=i.sent(),[2,He(o)]}var a}))})),Qe.apply(this,arguments)}function Xe(e){return fetch(e).then((function(e){return e.json()})).catch((function(){return null}))}function Ze(e,t){try{var n,r=[],o=((b=((m=new URL(e,self.location.href)).origin+m.pathname).split("/"))[b.length-1]="",b.join("/")),i=!0,a=!1,s=void 0;try{for(var u,c=(null!==(n=t.chunks)&&void 0!==n?n:[])[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l,f=u.value,h=!0,p=!1,d=void 0;try{for(var y,v=(null!==(l=f.files)&&void 0!==l?l:[])[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var g=y.value;r.push(new URL(g,o).toString())}}catch(e){p=!0,d=e}finally{try{h||null==v.return||v.return()}finally{if(p)throw d}}}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}return r}catch(t){return console.error("[SW] Failed to determine the dependencies of the module with the URL %s. Not precaching any of the module's assets. Error: ",e,t),[]}var m,b}const et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,tt=Object.keys,nt=Array.isArray;function rt(e,t){return"object"!=typeof t||tt(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||et.Promise||(et.Promise=Promise);const ot=Object.getPrototypeOf,it={}.hasOwnProperty;function at(e,t){return it.call(e,t)}function st(e,t){"function"==typeof t&&(t=t(ot(e))),("undefined"==typeof Reflect?tt:Reflect.ownKeys)(t).forEach((n=>{ct(e,n,t[n])}))}const ut=Object.defineProperty;function ct(e,t,n,r){ut(e,t,rt(n&&at(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function lt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ct(e.prototype,"constructor",e),{extend:st.bind(null,e.prototype)}}}}const ft=Object.getOwnPropertyDescriptor;function ht(e,t){let n;return ft(e,t)||(n=ot(e))&&ht(n,t)}const pt=[].slice;function dt(e,t,n){return pt.call(e,t,n)}function yt(e,t){return t(e)}function vt(e){if(!e)throw new Error("Assertion Failed")}function gt(e){et.setImmediate?setImmediate(e):setTimeout(e,0)}function mt(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function bt(e,t){if(at(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=bt(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:bt(s,t.substr(a+1))}}function wt(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){vt("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)wt(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?nt(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&at(e,a)||(u=e[a]={}),wt(u,s,n)}}else void 0===n?nt(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function _t(e){var t={};for(var n in e)at(e,n)&&(t[n]=e[n]);return t}const kt=[].concat;function xt(e){return kt.apply([],e)}const St="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(xt([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>et[e])),Ot=St.map((e=>et[e]));mt(St,(e=>[e,!0]));let Pt=null;function Et(e){Pt="undefined"!=typeof WeakMap&&new WeakMap;const t=jt(e);return Pt=null,t}function jt(e){if(!e||"object"!=typeof e)return e;let t=Pt&&Pt.get(e);if(t)return t;if(nt(e)){t=[],Pt&&Pt.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(jt(e[n]))}else if(Ot.indexOf(e.constructor)>=0)t=e;else{const n=ot(e);for(var o in t=n===Object.prototype?{}:Object.create(n),Pt&&Pt.set(e,t),e)at(e,o)&&(t[o]=jt(e[o]))}return t}const{toString:Rt}={};function Ct(e){return Rt.call(e).slice(8,-1)}const Tt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",At="symbol"==typeof Tt?function(e){var t;return null!=e&&(t=e[Tt])&&t.apply(e)}:function(){return null},Dt={};function Lt(e){var t,n,r,o;if(1===arguments.length){if(nt(e))return e.slice();if(this===Dt&&"string"==typeof e)return[e];if(o=At(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Kt="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var It="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Mt(e,t){It=e,Nt=t}var Nt=()=>!0;const Ft=!new Error("").stack;function Bt(){if(Ft)try{throw Bt.arguments,new Error}catch(e){return e}return new Error}function $t(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(Nt).map((e=>"\n"+e)).join("")):""}var qt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ut=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(qt),Wt={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Vt(e,t){this._e=Bt(),this.name=e,this.message=t}function Ht(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function zt(e,t,n,r){this._e=Bt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Ht(e,t)}function Yt(e,t){this._e=Bt(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=Ht(e,t)}lt(Vt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+$t(this._e,2))}},toString:function(){return this.name+": "+this.message}}),lt(zt).from(Vt),lt(Yt).from(Vt);var Gt=Ut.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const Jt=Vt;var Qt=Ut.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Bt(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=Wt[t]||n,this.inner=null)}return lt(r).from(Jt),e[t]=r,e}),{});Qt.Syntax=SyntaxError,Qt.Type=TypeError,Qt.Range=RangeError;var Xt=qt.reduce(((e,t)=>(e[t+"Error"]=Qt[t],e)),{}),Zt=Ut.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Qt[t]),e)),{});function en(){}function tn(e){return e}function nn(e,t){return null==e||e===tn?t:function(n){return t(e(n))}}function rn(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function on(e,t){return e===en?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?rn(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rn(o,this.onerror):o),void 0!==i?i:n}}function an(e,t){return e===en?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?rn(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rn(r,this.onerror):r)}}function sn(e,t){return e===en?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?rn(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rn(i,this.onerror):i),void 0===r?void 0===a?void 0:a:rt(r,a)}}function un(e,t){return e===en?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function cn(e,t){return e===en?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)}}Zt.ModifyError=zt,Zt.DexieError=Vt,Zt.BulkError=Yt;var ln={};const[fn,hn,pn]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,ot(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ot(t),e]})(),dn=hn&&hn.then,yn=fn&&fn.constructor,vn=!!pn;var gn=!1,mn=pn?()=>{pn.then($n)}:et.setImmediate?setImmediate.bind(null,$n):et.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{$n(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout($n,0)},bn=function(e,t){jn.push([e,t]),_n&&(mn(),_n=!1)},wn=!0,_n=!0,kn=[],xn=[],Sn=null,On=tn,Pn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:fr,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{fr(e[0],e[1])}catch(e){}}))}},En=Pn,jn=[],Rn=0,Cn=[];function Tn(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=en,this._lib=!1;var t=this._PSD=En;if(It&&(this._stackHolder=Bt(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ln)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Kn(this,this._value))}this._state=null,this._value=null,++t.ref,Ln(this,e)}const An={get:function(){var e=En,t=Qn;function n(n,r){var o=!e.global&&(e!==En||t!==Qn);const i=o&&!tr();var a=new Tn(((t,a)=>{Mn(this,new Dn(cr(n,e,o,i),cr(r,e,o,i),t,a,e))}));return It&&Bn(a,this),a}return n.prototype=ln,n},set:function(e){ct(this,"then",e&&e.prototype===ln?An:{get:function(){return e},set:An.set})}};function Dn(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Ln(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&qn();t&&"function"==typeof t.then?Ln(e,((e,n)=>{t instanceof Tn?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,In(e)),n&&Un()}}),Kn.bind(null,e))}catch(t){Kn(e,t)}}function Kn(e,t){if(xn.push(t),null===e._state){var n=e._lib&&qn();t=On(t),e._state=!1,e._value=t,It&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=ht(t,"stack");t._promise=e,ct(t,"stack",{get:()=>gn?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){kn.some((t=>t._value===e._value))||kn.push(e)}(e),In(e),n&&Un()}}function In(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===Rn&&(++Rn,bn((()=>{0==--Rn&&Wn()}),[]))}function Mn(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,++Rn,bn(Nn,[n,e,t])}else e._listeners.push(t)}function Nn(e,t,n){try{Sn=t;var r,o=t._value;t._state?r=e(o):(xn.length&&(xn=[]),r=e(o),-1===xn.indexOf(o)&&function(e){for(var t=kn.length;t;)if(kn[--t]._value===e._value)return void kn.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Sn=null,0==--Rn&&Wn(),--n.psd.ref||n.psd.finalize()}}function Fn(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=$t(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return It&&((r=$t(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Fn(e._prev,t,n)),t}function Bn(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function $n(){qn()&&Un()}function qn(){var e=wn;return wn=!1,_n=!1,e}function Un(){var e,t,n;do{for(;jn.length>0;)for(e=jn,jn=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(jn.length>0);wn=!0,_n=!0}function Wn(){var e=kn;kn=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Cn.slice(0),n=t.length;n;)t[--n]()}function Vn(e){return new Tn(ln,!1,e)}function Hn(e,t){var n=En;return function(){var r=qn(),o=En;try{return ir(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ir(o,!1),r&&Un()}}}st(Tn.prototype,{then:An,_then:function(e,t){Mn(this,new Dn(null,null,e,t,En))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):Vn(e))):this.then(null,(e=>e&&e.name===t?n(e):Vn(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Vn(t))))},stack:{get:function(){if(this._stack)return this._stack;try{gn=!0;var e=Fn(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{gn=!1}}},timeout:function(e,t){return e<1/0?new Tn(((n,r)=>{var o=setTimeout((()=>r(new Qt.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&ct(Tn.prototype,Symbol.toStringTag,"Dexie.Promise"),Pn.env=ar(),st(Tn,{all:function(){var e=Lt.apply(null,arguments).map(nr);return new Tn((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Tn.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Tn)return e;if(e&&"function"==typeof e.then)return new Tn(((t,n)=>{e.then(t,n)}));var t=new Tn(ln,!0,e);return Bn(t,Sn),t},reject:Vn,race:function(){var e=Lt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{e.map((e=>Tn.resolve(e).then(t,n)))}))},PSD:{get:()=>En,set:e=>En=e},totalEchoes:{get:()=>Qn},newPSD:Zn,usePSD:sr,scheduler:{get:()=>bn,set:e=>{bn=e}},rejectionMapper:{get:()=>On,set:e=>{On=e}},follow:(e,t)=>new Tn(((n,r)=>Zn(((t,n)=>{var r=En;r.unhandleds=[],r.onunhandled=n,r.finalize=rn((function(){!function(e){Cn.push((function t(){e(),Cn.splice(Cn.indexOf(t),1)})),++Rn,bn((()=>{0==--Rn&&Wn()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),yn&&(yn.allSettled&&ct(Tn,"allSettled",(function(){const e=Lt.apply(null,arguments).map(nr);return new Tn((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Tn.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),yn.any&&"undefined"!=typeof AggregateError&&ct(Tn,"any",(function(){const e=Lt.apply(null,arguments).map(nr);return new Tn(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Tn.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const zn={awaits:0,echoes:0,id:0};var Yn=0,Gn=[],Jn=0,Qn=0,Xn=0;function Zn(e,t,n,r){var o=En,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Xn;var a=Pn.env;i.env=vn?{Promise:Tn,PromiseProp:{value:Tn,configurable:!0,writable:!0},all:Tn.all,race:Tn.race,allSettled:Tn.allSettled,any:Tn.any,resolve:Tn.resolve,reject:Tn.reject,nthen:lr(a.nthen,i),gthen:lr(a.gthen,i)}:{},t&&rt(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sr(i,e,n,r);return 0===i.ref&&i.finalize(),s}function er(){return zn.id||(zn.id=++Yn),++zn.awaits,zn.echoes+=100,zn.id}function tr(){return!!zn.awaits&&(0==--zn.awaits&&(zn.id=0),zn.echoes=100*zn.awaits,!0)}function nr(e){return zn.echoes&&e&&e.constructor===yn?(er(),e.then((e=>(tr(),e)),(e=>(tr(),hr(e))))):e}function rr(e){++Qn,zn.echoes&&0!=--zn.echoes||(zn.echoes=zn.id=0),Gn.push(En),ir(e,!0)}function or(){var e=Gn[Gn.length-1];Gn.pop(),ir(e,!1)}function ir(e,t){var n=En;if((t?!zn.echoes||Jn++&&e===En:!Jn||--Jn&&e===En)||ur(t?rr.bind(null,e):or),e!==En&&(En=e,n===Pn&&(Pn.env=ar()),vn)){var r=Pn.env.Promise,o=e.env;hn.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(et,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function ar(){var e=et.Promise;return vn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(et,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:hn.then,gthen:e.prototype.then}:{}}function sr(e,t,n,r,o){var i=En;try{return ir(e,!0),t(n,r,o)}finally{ir(i,!1)}}function ur(e){dn.call(fn,e)}function cr(e,t,n,r){return"function"!=typeof e?e:function(){var o=En;n&&er(),ir(t,!0);try{return e.apply(this,arguments)}finally{ir(o,!1),r&&ur(tr)}}}function lr(e,t){return function(n,r){return e.call(this,cr(n,t),cr(r,t))}}function fr(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(et.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),rt(r,o)):et.CustomEvent&&rt(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&et.dispatchEvent&&(dispatchEvent(r),!et.PromiseRejectionEvent&&et.onunhandledrejection))try{et.onunhandledrejection(r)}catch(e){}It&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+dn).indexOf("[native code]")&&(er=tr=en);var hr=Tn.reject;function pr(e,t,n,r){if(e.idbdb&&(e._state.openComplete||En.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Gt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>pr(e,t,n,r)))):hr(o)}return o._promise(t,((e,t)=>Zn((()=>(En.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return hr(new Qt.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return hr(new Qt.DatabaseClosed);e.open().catch(en)}return e._state.dbReadyPromise.then((()=>pr(e,t,n,r)))}const dr=String.fromCharCode(65535),yr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",vr=[],gr="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),mr=gr,br=gr,wr=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function _r(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const kr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function xr(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Et(t))[e],t)}class Sr{_trans(e,t,n){const r=this._tx||En.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Qt.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=qn();try{return r&&r.db===this.db?r===En.trans?r._promise(e,i,n):Zn((()=>r._promise(e,i,n)),{trans:r,transless:En.transless||En}):pr(this.db,e,[this.name],i)}finally{a&&Un()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(nt(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=tt(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==dr)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&It&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?_r(n,a&&a.multi?e=>{const t=bt(e,o);return nt(t)&&t.some((e=>i(s,e)))}:e=>i(s,bt(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,nt(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(at(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){rt(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=xr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||nt(e))return this.where(":id").equals(e).modify(t);{const n=bt(e,this.schema.primKey.keyPath);if(void 0===n)return hr(new Qt.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?tt(t).forEach((n=>{wt(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=xr(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{wt(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:kr}))).then((e=>e.numFailures?Tn.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Qt.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Qt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(xr(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Qt.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Qt.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(xr(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new Yt(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new Yt(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Or(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=un),o||(o=en);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){tt(e).forEach((function(t){var n=e[t];if(nt(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Qt.InvalidArgument("Invalid event config");var r=i(t,tn,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){gt((function(){e.apply(null,t)}))}))}))}}))}}function Pr(e,t){return lt(t).from({prototype:e}),t}function Er(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=_r(e.filter,t)}function Rr(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>_r(r(),t()):t,e.justLimit=n&&!r}function Cr(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Qt.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Tr(e,t,n){const r=Cr(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Ar(e,t,n,r){const o=e.replayFilter?_r(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),at(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Dr(Tr(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Dr(Tr(e,r,n),_r(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Dr(e,t,n,r){var o=Hn(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=en}),(t=>{e.fail(t),n=en}))||o(e.value,e,(e=>n=e)),n()}))}))}function Lr(e,t){try{const n=Kr(e),r=Kr(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Ir(e),Ir(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Lr(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Kr(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=Ct(e);return"ArrayBuffer"===n?"binary":n}function Ir(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Mr{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,hr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,hr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=_r(t.algorithm,e)}_iterate(e,t){return Ar(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&rt(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ar(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Er(t,!0))return n.count({trans:e,query:{index:Cr(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ar(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Ar(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Er(t)?Rr(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Rr(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Rr(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return jr(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return jr(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=_r(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Er(t,!0)&&t.limit>0)return this._read((e=>{var n=Cr(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return jr(this._ctx,(function(e){var t=e.primaryKey.toString(),r=at(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=tt(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];bt(t,a)!==s&&(wt(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const h=[],p=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of tt(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((h=>{const d=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=h[e],n={value:Et(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):s||0===Lr(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(g.push(o[l+e]),d.push(n.value)))}const m=Er(t)&&t.limit===1/0&&("function"!=typeof e||e===Nr)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(d.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>p(y.length,e))))).then((()=>(g.length>0||m&&e===Nr)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>p(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new zt("Error modifying one or more objects",l,f,h);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Er(e)&&(e.isPrimKey&&!br||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new zt("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Nr)}}const Nr=(e,t)=>t.value=null;function Fr(e,t){return e<t?-1:e===t?0:1}function Br(e,t){return e>t?-1:e===t?0:1}function $r(e,t,n){var r=e instanceof zr?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function qr(e){return new e.Collection(e,(()=>Hr(""))).limit(0)}function Ur(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Wr(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return $r(e,"String expected.");function h(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Fr:Br;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}h("next");var p=new e.Collection(e,(()=>Vr(s[0],u[f-1]+r)));p._ondirectionchange=function(e){h(e)};var d=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var h=i(o);if(t(h,u,d))return!0;for(var p=null,y=d;y<f;++y){var v=Ur(o,h,s[y],u[y],a,c);null===v&&null===p?d=y+1:(null===p||a(p,v)>0)&&(p=v)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p}function Vr(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Hr(e){return{type:1,lower:e,upper:e}}class zr{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?qr(this):new this.Collection(this,(()=>Vr(e,t,!n,!r)))}catch(e){return $r(this,yr)}}equals(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Hr(e)))}above(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(e,void 0,!0)))}aboveOrEqual(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(e,void 0,!1)))}below(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?$r(this,yr):new this.Collection(this,(()=>Vr(void 0,e)))}startsWith(e){return"string"!=typeof e?$r(this,"String expected."):this.between(e,e+dr,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Wr(this,((e,t)=>0===e.indexOf(t[0])),[e],dr)}equalsIgnoreCase(e){return Wr(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Lt.apply(Dt,arguments);return 0===e.length?qr(this):Wr(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Lt.apply(Dt,arguments);return 0===e.length?qr(this):Wr(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,dr)}anyOf(){const e=Lt.apply(Dt,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return $r(this,yr)}if(0===e.length)return qr(this);const n=new this.Collection(this,(()=>Vr(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Lt.apply(Dt,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return $r(this,yr)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return qr(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return $r(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Qt.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return $r(this,yr)}let h=0;const p=u?e=>r(e,c[h][1])>0:e=>r(e,c[h][1])>=0,d=s?e=>o(e,c[h][0])>0:e=>o(e,c[h][0])>=0;let y=p;const v=new this.Collection(this,(()=>Vr(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=p,l=r):(y=d,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++h,h===c.length)return t(n),!1;return!!function(e){return!p(e)&&!d(e)}(o)||(0===this._cmp(o,c[h][1])||0===this._cmp(o,c[h][0])||t((()=>{l===r?e.continue(c[h][0]):e.continue(c[h][1])})),!1)})),v}startsWithAnyOf(){const e=Lt.apply(Dt,arguments);return e.every((e=>"string"==typeof e))?0===e.length?qr(this):this.inAnyRange(e.map((e=>[e,e+dr]))):$r(this,"startsWithAnyOf() only works with strings")}}function Yr(e){return Hn((function(t){return Gr(t),e(t.target.error),!1}))}function Gr(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Jr=Or(null,"storagemutated");class Qr{_lock(){return vt(!En.global),++this._reculock,1!==this._reculock||En.global||(En.lockOwnerFor=this),this}_unlock(){if(vt(!En.global),0==--this._reculock)for(En.global||(En.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sr(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&En.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(vt(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Qt.DatabaseClosed(n);case"MissingAPIError":throw new Qt.MissingAPI(n.message,n);default:throw new Qt.OpenFailed(n)}if(!this.active)throw new Qt.TransactionInactive;return vt(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Hn((t=>{Gr(t),this._reject(e.error)})),e.onabort=Hn((t=>{Gr(t),this.active&&this._reject(new Qt.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Hn((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Jr.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return hr(new Qt.ReadOnly("Transaction is readonly"));if(!this.active)return hr(new Qt.TransactionInactive);if(this._locked())return new Tn(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},En])}));if(n)return Zn((()=>{var e=new Tn(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Tn(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Tn.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Tn(((e,r)=>{n.then((n=>t._waitingQueue.push(Hn(e.bind(null,n)))),(e=>t._waitingQueue.push(Hn(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Qt.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(at(t,e))return t[e];const n=this.schema[e];if(!n)throw new Qt.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Xr(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?"++":"")+Zr(t)}}function Zr(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function eo(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:mt(n,(e=>[e.name,e]))}}let to=e=>{try{return e.only([[]]),to=()=>[[]],[[]]}catch(e){return to=()=>dr,dr}};function no(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>bt(t,e)}(e):t=>bt(t,e)}function ro(e){return[].slice.call(e)}let oo=0;function io(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ao(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=ro(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=nt(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:no(t)},indexes:ro(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:nt(o),keyPath:o,unique:n,multiEntry:r,extractKey:no(o)};return i[io(o)]=a,a})),getIndexByKeyPath:e=>i[io(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[io(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Hn(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:h}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const d=[],y=[];let v=0;const g=e=>{++v,Gr(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?d.push(p=c.clear()):d.push(p=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<h;++r)d.push(p=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),p.onerror=g;else for(let t=0;t<h;++t)d.push(p=c[n](e[t])),p.onerror=g}const m=e=>{const t=e.target.result;d.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:d.map((e=>e.result)),lastResult:t})};p.onerror=e=>{g(e),m(e)},p.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Hn(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},h=Yr(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=h,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Hn(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Yr(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Hn(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:h}=c,p=a.objectStore(t),d=f.isPrimaryKey?p:p.index(f.name),y=r(h);if(0===u)return o({result:[]});if(e){const e=s?d.getAll(y,l):d.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Yr(i)}else{let e=0;const t=s||!("openKeyCursor"in d)?d.openCursor(y):d.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Yr(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Hn(s);const{index:c,range:l}=o,f=e.objectStore(t),h=c.isPrimaryKey?f:f.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Yr(u),d.onsuccess=Hn((t=>{const n=d.result;if(!n)return void s(null);n.___id=++oo,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Hn(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Hn(e),d.onerror=Yr(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(d.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return d.onsuccess=Hn((e=>{d.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Hn((t=>e(t.target.result))),l.onerror=Yr(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:to(t),schema:o}}function so({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(ao(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function uo({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=ht(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?ct(t,n,{get(){return this.table(n)},set(e){ut(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function co({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function lo(e,t){return e._cfg.version-t._cfg.version}function fo(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=En.transless||En;Zn((()=>{En.trans=i,En.transless=s,0===t?(tt(o).forEach((e=>{po(n,e,o[e].primKey,o[e].indexes)})),so(e,n),Tn.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=vo(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;go(e,o,r),go(e,u,r),a=e._dbSchema=u;const c=ho(o,u);c.add.forEach((e=>{po(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Qt.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>yo(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),yo(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){so(e,r),n._memoizedTables={},s=!0;let t=_t(u);c.del.forEach((e=>{t[e]=o[e]})),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],tt(t),t),n.schema=t;const i=Kt(l);let a;i&&er();const f=Tn.follow((()=>{if(a=l(n),a&&i){var e=tr.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Tn.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&mr||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),co(e,[e.Transaction.prototype]),uo(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Tn.resolve(o.shift()(n.idbtrans)).then(e):Tn.resolve()}().then((()=>{var e,t;t=r,tt(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||po(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function ho(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!gr)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function po(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>yo(o,e))),o}function yo(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function vo(e,t,n){const r={};return dt(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Xr(Zr(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Xr(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=eo(e,i,a)})),r}function go({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+dt(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&et.WorkerGlobalScope&&et instanceof et.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class mo{_parseStoresSpec(e,t){tt(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Xr(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),nt(r),0===t)})),o=r.shift();if(o.multi)throw new Qt.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Qt.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Qt.Schema("Index must have a name and cannot be an empty string")})),t[n]=eo(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?rt(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{rt(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,co(t,[t._allTables,t,t.Transaction.prototype]),uo(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],tt(o),o),t._storeNames=tt(o),this}upgrade(e){return this._cfg.contentUpgrade=cn(this._cfg.contentUpgrade||en,e),this}}function bo(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Bo("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function wo(e){return e&&"function"==typeof e.databases}function _o(e){return Zn((function(){return En.letThrough=!0,e()}))}function ko(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function xo(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):nt(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function So(e,t,n){var r=arguments.length;if(r<2)throw new Qt.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,xt(o),n]}function Oo(e,t,n,r,o){return Tn.resolve().then((()=>{const i=En.transless||En,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Gt.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Oo(e,t,n,null,o)))):hr(r)}const u=Kt(o);let c;u&&er();const l=Tn.follow((()=>{if(c=o.call(a,a),c)if(u){var e=tr.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xo(c))}),s);return(c&&"function"==typeof c.then?Tn.resolve(c).then((e=>a.active?e:hr(new Qt.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),hr(e))))}))}function Po(e,t,n){const r=nt(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Eo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=io(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:no(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Po(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Po(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[io(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Po(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Po(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function jo(e,t,n,r){return n=n||{},r=r||"",tt(e).forEach((o=>{if(at(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=Ct(i);e!==Ct(a)?n[r+o]=t[o]:"Object"===e?jo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),tt(t).forEach((o=>{at(e,o)||(n[r+o]=t[o])})),n}const Ro={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=En.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===en&&s.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===en)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===en)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=En.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||wt(e.values[o],r.keyPath,n))}else{const r=jo(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{at(t,e)?t[e]=i[e]:wt(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Co(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Lr(t.keys[o],e[i])&&(r.push(n?Et(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const To={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Co(e.keys,e.trans._cache,"clone"===e.cache);return t?Tn.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Et(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Ao(e){return!("from"in e)}const Do=function(e,t){if(!this){const t=new Do;return e&&"d"in e&&rt(t,e),t}rt(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Lo(e,t,n){const r=Lr(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Ao(e))return rt(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Lr(n,e.from)<0)return o?Lo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Mo(e);if(Lr(t,e.to)>0)return i?Lo(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Mo(e);Lr(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Lr(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Ko(e,o),i&&a&&Ko(e,i)}function Ko(e,t){Ao(t)||function e(t,{from:n,to:r,l:o,r:i}){Lo(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Io(e){let t=Ao(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Lr(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||Lr(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Mo(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=No(n)}e.d=No(e)}function No({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}st(Do.prototype,{add(e){return Ko(this,e),this},addKey(e){return Lo(this,e,e),this},addKeys(e){return e.forEach((e=>Lo(this,e,e))),this},[Tt](){return Io(this)}});const Fo={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Do(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Do)},c=u(""),l=u(":dels"),{type:f}=e;let[h,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const d=e.trans._cache;return o.mutate(e).then((e=>{if(nt(h)){"delete"!==f&&(h=e.results),c.addKeys(h);const t=Co(h,d);t||"add"===f||l.addKeys(h),(t||p)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&nt(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Lr(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,p)}else if(h){const e={from:h.lower,to:h.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new Do(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new Do(e.key)],getMany:e=>[a,(new Do).addKeys(e.keys)],count:l,query:l,openCursor:l};return tt(f).forEach((e=>{c[e]=function(i){const{subscr:a}=En;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Do)},l=c(""),h=c(":dels"),[p,d]=f[e](i);if(c(p.name||"").add(d),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):h.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(h.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return h.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}h.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Bo{constructor(e,t){this._middlewares={},this.verno=0;const n=Bo.dependencies;this._options=t={addons:Bo.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:en,dbReadyPromise:null,cancelOpen:en,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Tn((e=>{o.dbReadyResolve=e})),o.openCanceller=new Tn(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Or(this,"populate","blocked","versionchange","close",{ready:[cn,en]}),this.on.ready.subscribe=yt(this.on.ready.subscribe,(e=>(t,n)=>{Bo.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Tn.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Pr(Mr.prototype,(function(e,t){this.db=i;let n=kr,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==tn?s:null}}))),this.Table=function(e){return Pr(Sr.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:Or(null,{creating:[on,en],reading:[nn,tn],updating:[sn,en],deleting:[an,en]})}))}(this),this.Transaction=function(e){return Pr(Qr.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Or(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 Tn(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),hr(e)}))}))}(this),this.Version=function(e){return Pr(mo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Pr(zr.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Qt.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=to(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),vr.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Eo),this.use(Ro),this.use(Fo),this.use(To),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Qt.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Qt.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(lo),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||En.letThrough||this._vip)?e():new Tn(((e,t)=>{if(this._state.openComplete)return t(new Qt.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Qt.DatabaseClosed);this.open().catch(en)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?hr(t.dbOpenError):e));It&&(t.openCanceller._stackHolder=Bt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Qt.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Tn.race([r,("undefined"==typeof navigator?Tn.resolve():ko()).then((()=>new Tn(((r,i)=>{if(o(),!n)throw new Qt.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Qt.MissingAPI;c.onerror=Yr(i),c.onblocked=Hn(e._fireOnBlocked),c.onupgradeneeded=Hn((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=Gr,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Hn((()=>{i(new Qt.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Yr(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,fo(e,o/10,a,i)}}),i),c.onsuccess=Hn((()=>{a=null;const n=e._novip.idbdb=c.result,o=dt(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=vo(0,t,n);e._storeNames=dt(t.objectStoreNames,0),uo(e,[e._allTables],tt(r),r)}(e,n,r):(go(e,e._dbSchema,r),function(e,t){const n=ho(vo(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),so(e,r)}catch(e){}var i;vr.push(e),n.onversionchange=Hn((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Hn((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&bo(e,t).put({name:n}).catch(en)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Tn.resolve(_o((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(cn,en);return t.onReadyBeingFired=[],Tn.resolve(_o((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),hr(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=vr.indexOf(this);if(t>=0&&vr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Tn((t=>{e.dbReadyResolve=t})),e.openCanceller=new Tn(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Qt.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Tn(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Hn((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!wo(e)&&"__dbnames"!==n&&bo(e,t).delete(n).catch(en)}(this._deps,this.name),n()})),e.onerror=Yr(r),e.onblocked=this._fireOnBlocked};if(e)throw new Qt.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return tt(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=So.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=En.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Qt.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Qt.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Qt.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):hr(e)}const s=Oo.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):En.trans?sr(En.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!at(this._allTables,e))throw new Qt.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const $o="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class qo{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[$o](){return this}}function Uo(e,t){return tt(t).forEach((n=>{Ko(e[n]||(e[n]=new Do),t[n])})),e}let Wo;try{Wo={indexedDB:et.indexedDB||et.mozIndexedDB||et.webkitIndexedDB||et.msIndexedDB,IDBKeyRange:et.IDBKeyRange||et.webkitIDBKeyRange}}catch(et){Wo={indexedDB:null,IDBKeyRange:null}}const Vo=Bo;function Ho(e){let t=zo;try{zo=!0,Jr.storagemutated.fire(e)}finally{zo=t}}st(Vo,{...Zt,delete:e=>new Vo(e,{addons:[]}).delete(),exists:e=>new Vo(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return wo(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):bo(e,t).toCollection().primaryKeys()}(Vo.dependencies).then(e)}catch(e){return hr(new Qt.MissingAPI)}},defineClass:()=>function(e){rt(this,e)},ignoreTransaction:e=>En.trans?sr(En.transless,e):e(),vip:_o,async:function(e){return function(){try{var t=xo(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Tn.resolve(t)}catch(e){return hr(e)}}},spawn:function(e,t,n){try{var r=xo(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Tn.resolve(r)}catch(e){return hr(e)}},currentTransaction:{get:()=>En.trans||null},waitFor:function(e,t){const n=Tn.resolve("function"==typeof e?Vo.ignoreTransaction(e):e).timeout(t||6e4);return En.trans?En.trans.waitFor(n):n},Promise:Tn,debug:{get:()=>It,set:e=>{Mt(e,"dexie"===e?()=>!0:wr)}},derive:lt,extend:rt,props:st,override:yt,Events:Or,on:Jr,liveQuery:function(e){return new qo((t=>{const n=Kt(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Jr.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return tt(i).some((e=>o[e]&&function(e,t){const n=Io(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Io(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Lr(s.from,o.to)<=0&&Lr(s.to,o.from)>=0)return!0;Lr(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{Uo(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const h={},p=function(t){n&&er();const r=()=>Zn(e,{subscr:t,trans:null}),o=En.trans?sr(En.transless,r):r();return n&&o.then(tr,tr),o}(h);u||(Jr("storagemutated",l),u=!0),s=!0,Promise.resolve(p).then((e=>{s=!1,r||(c()?f():(o={},i=h,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Uo,getByKeyPath:bt,setByKeyPath:wt,delByKeyPath:function(e,t){"string"==typeof t?wt(e,t,void 0):"length"in t&&[].map.call(t,(function(t){wt(e,t,void 0)}))},shallowClone:_t,deepClone:Et,getObjectDiff:jo,cmp:Lr,asap:gt,minKey:-1/0,addons:[],connections:vr,errnames:Gt,dependencies:Wo,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Vo.maxKey=to(Vo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Jr("storagemutated",(e=>{if(!zo){let t;gr?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),zo=!0,dispatchEvent(t),zo=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{zo||Ho(e)})));let zo=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Jr("storagemutated",(t=>{zo||e.postMessage(t)})),e.onmessage=e=>{e.data&&Ho(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Jr("storagemutated",(e=>{try{zo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Ho(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Ho(e.changedParts)}))}function Yo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Go(e)}function Jo(e,t){return Jo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Jo(e,t)}function Qo(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=Go(e);if(t){var o=Go(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Yo(e):t;var n}(this,n)}}Tn.rejectionMapper=function(e,t){if(!e||e instanceof Vt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Xt[e.name])return e;var n=new Xt[e.name](t||e.message,e);return"stack"in e&&ct(n,"stack",{get:function(){return this.inner.stack}}),n},Mt(It,wr);var Xo=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&&Jo(e,t)}(n,e);var t=Qo(n);function n(){var e,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=void 0,(o="dynamicRouteRegistrations")in(r=Yo(e=t.call(this,"ServiceWorker")))?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,e.version(1).stores({dynamicRouteRegistrations:"++,&pattern"}),e.dynamicRouteRegistrations=e.table("dynamicRouteRegistrations"),e}return n}(Bo);function Zo(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Zo(i,r,o,a,s,"next",e)}function s(e){Zo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function ti(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ni(e){return ri.apply(this,arguments)}function ri(){return(ri=ei((function(e){var t;return ti(this,(function(n){switch(n.label){case 0:return[4,Je(e)];case 1:return[4,ai(t=n.sent())];case 2:return n.sent(),[4,oi(t)];case 3:return n.sent(),[2]}}))}))).apply(this,arguments)}function oi(e){return ii.apply(this,arguments)}function ii(){return ii=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return 0===e.length?[2]:[4,caches.open(Te)];case 1:return t=i.sent(),[4,Promise.all(e.map((a=ei((function(e){return ti(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,$((function(){return t.add(e)}),{onError:function(t,n){return console.debug("[SW] Failure attempt ".concat(n,' at caching "').concat(e,'". Error: '),t)}})];case 1:return n.sent(),[2,{url:e,success:!0}];case 2:return n.sent(),[2,{url:e,success:!1}];case 3:return[2]}}))})),function(e){return a.apply(this,arguments)})))];case 2:return n=i.sent(),r=n.filter((function(e){return e.success})),o=n.filter((function(e){return!e.success})),r.length>0&&console.debug("[SW] Successfully added ".concat(r.length," URLs to the OMRS cache. URLs: "),r.map((function(e){return e.url}))),o.length>0&&console.error("[SW] Failed to cache ".concat(o.length," URLs. URLs: "),o.map((function(e){return e.url}))),[2]}var a}))})),ii.apply(this,arguments)}function ai(e){return si.apply(this,arguments)}function si(){return si=ei((function(e){var t,n,r,o;return ti(this,(function(i){switch(i.label){case 0:return[4,caches.open(Te)];case 1:return[4,(t=i.sent()).keys()];case 2:return n=i.sent().map((function(e){return e.url})),[4,(new Xo).dynamicRouteRegistrations.toArray()];case 3:return r=i.sent(),o=n.filter((function(t){return!Le.includes(t)&&!e.includes(t)&&!r.some((function(e){return new RegExp(e.pattern).test(t)}))})),console.info("[SW] Removing the following expired URLs from the cache: ",o),console.debug("[SW] The following URLs were known and not invalidated: ",Le,e,r),[4,Promise.all(o.map((function(e){return t.delete(e)})))];case 4:return i.sent(),[2]}}))})),si.apply(this,arguments)}function ui(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ci(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ui(i,r,o,a,s,"next",e)}function s(e){ui(i,r,o,a,s,"throw",e)}a(void 0)}))}}function li(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var fi={onImportMapChanged:function(e){return hi.apply(this,arguments)},clearDynamicRoutes:function(){return pi.apply(this,arguments)},registerDynamicRoute:function(e){return di.apply(this,arguments)}};function hi(){return(hi=ci((function(e){return li(this,(function(t){switch(t.label){case 0:return[4,ni(e.importMap)];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function pi(){return(pi=ci((function(){return li(this,(function(e){switch(e.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.clear()];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function di(){return(di=ci((function(e){var t,n,r,o,i;return li(this,(function(a){switch(a.label){case 0:return t=e.pattern,n=e.url,r=e.strategy,!(o=t)&&n&&(o="^".concat(M(n),"$")),o?(i={pattern:o,strategy:r},[4,(new Xo).dynamicRouteRegistrations.put(i)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function yi(){return yi=ci((function(e){var t,n,r,o,i,a,s,u;function c(e){console.warn("[SW] Handling a message resulted in an error.",e),l({success:!1,error:e})}function l(t){e.ports[0].postMessage(null!=t?t:{})}return li(this,(function(f){switch(f.label){case 0:if(!(o=fi[null!==(r=null===(t=e.data)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.toString())&&void 0!==r?r:""]))return c('Received an unknown message of type "'.concat(null===(i=e.data)||void 0===i?void 0:i.type," which cannot be handled.")),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o(e.data)];case 2:return l({success:!0,result:f.sent()}),[3,4];case 3:return a=f.sent(),c(null!==(u=null!==(s=null==a?void 0:a.message)&&void 0!==s?s:null==a?void 0:a.toString())&&void 0!==u?u:"Unknown error."),[3,4];case 4:return[2]}}))})),yi.apply(this,arguments)}n(585);var vi=["DELETE","GET","HEAD","PATCH","POST","PUT"],gi=function(e){return e&&"object"==typeof e?e:{handle:e}};function mi(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)}}var bi=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handler=gi(n),this.match=t,this.method=r}var t,n;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=gi(e)}}])&&mi(t.prototype,n),e}();function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(e)}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function ki(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=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var xi=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&&_i(e,t)}(n,e);var t=ki(n);function n(e,r,o){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),r,o)}return n}(bi);function Si(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 Oi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Pi(e,t,n){return Pi=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&&Ri(o,n.prototype),o},Pi.apply(null,arguments)}function Ei(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 ji(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Ri(e,t){return Ri=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ri(e,t)}var Ci,Ti=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=t.request,r=e.handleRequest({request:n,event:t});r&&t.respondWith(r)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=t.data.payload,r=Promise.all(n.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r,o=Pi(Request,function(e){if(Array.isArray(e))return Si(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Si(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)?Si(e,t):void 0}}(r)||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.")}());return e.handleRequest({request:o,event:t})})));t.waitUntil(r),t.ports&&t.ports[0]&&r.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=e.request,n=e.event,r=new URL(t.url,location.href);if(r.protocol.startsWith("http")){var o=r.origin===location.origin,i=this.findMatchingRoute({event:n,request:t,sameOrigin:o,url:r}),a=i.params,s=i.route,u=s&&s.handler,c=t.method;if(!u&&this._defaultHandlerMap.has(c)&&(u=this._defaultHandlerMap.get(c)),u){var l;try{l=u.handle({url:r,request:t,event:n,params:a})}catch(e){l=Promise.reject(e)}var f,h=s&&s.catchHandler;if(ji(l,Promise)&&(this._catchHandler||h)){var p=this;l=l.catch((f=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Oi(i,r,o,a,s,"next",e)}function s(e){Oi(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(i){switch(i.label){case 0:if(!h)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.handle({url:r,request:t,event:n,params:a})];case 2:return[2,i.sent()];case 3:return ji(o=i.sent(),Error)&&(e=o),[3,4];case 4:if(p._catchHandler)return[2,p._catchHandler.handle({url:r,request:t,event:n})];throw e}}))})),function(e){return f.apply(this,arguments)}))}return l}}}},{key:"findMatchingRoute",value:function(e){var t=e.url,n=e.sameOrigin,r=e.request,o=e.event,i=this._routes.get(r.method)||[],a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value,h=void 0,p=f.match({url:t,sameOrigin:n,request:r,event:o});if(p)return h=p,(Array.isArray(h)&&0===h.length||p.constructor===Object&&0===Object.keys(p).length||"boolean"==typeof p)&&(h=void 0),{route:f,params:h}}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,gi(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=gi(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&Ei(t.prototype,n),e}(),Ai=function(){return Ci||((Ci=new Ti).addFetchListener(),Ci.addCacheListener()),Ci};function Di(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Li(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 Ki(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ii(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ki(i,r,o,a,s,"next",e)}function s(e){Ki(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Mi(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 Ni(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Fi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Bi(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.")}function $i(e){return"string"==typeof e?new Request(e):e}n(238);var qi=function(){function e(t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},Object.assign(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new d,this._extendLifetimePromises=[],this._plugins=function(e){if(Array.isArray(e))return Li(e)}(r=t.plugins)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Li(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)?Li(e,t):void 0}}(r)||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.")}(),this._pluginStateMap=new Map;var o=!0,i=!1,a=void 0;try{for(var s,u=this._plugins[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;this._pluginStateMap.set(c,{})}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}this.event.waitUntil(this._handlerDeferred.promise)}var t,n;return t=e,(n=[{key:"fetch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,s,u,c,l,f,h,p,d,y,v,g,m,b,w,_;return Fi(this,(function(k){switch(k.label){case 0:return n=t.event,"navigate"===(r=$i(e)).mode&&Ni(n,FetchEvent)&&n.preloadResponse?[4,n.preloadResponse]:[3,2];case 1:if(o=k.sent())return[2,o];k.label=2;case 2:i=t.hasCallback("fetchDidFail")?r.clone():null,k.label=3;case 3:k.trys.push([3,12,,13]),s=!0,u=!1,c=void 0,k.label=4;case 4:k.trys.push([4,9,10,11]),l=t.iterateCallbacks("requestWillFetch")[Symbol.iterator](),k.label=5;case 5:return(s=(f=l.next()).done)?[3,8]:[4,(0,f.value)({request:r.clone(),event:n})];case 6:r=k.sent(),k.label=7;case 7:return s=!0,[3,5];case 8:return[3,11];case 9:return w=k.sent(),u=!0,c=w,[3,11];case 10:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 11:return[3,13];case 12:if(Ni(h=k.sent(),Error))throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:h.message});return[3,13];case 13:p=r.clone(),k.label=14;case 14:return k.trys.push([14,24,,27]),[4,fetch(r,"navigate"===r.mode?void 0:t._strategy.fetchOptions)];case 15:d=k.sent(),y=!0,v=!1,g=void 0,k.label=16;case 16:k.trys.push([16,21,22,23]),m=t.iterateCallbacks("fetchDidSucceed")[Symbol.iterator](),k.label=17;case 17:return(y=(b=m.next()).done)?[3,20]:[4,(0,b.value)({event:n,request:p,response:d})];case 18:d=k.sent(),k.label=19;case 19:return y=!0,[3,17];case 20:return[3,23];case 21:return w=k.sent(),v=!0,g=w,[3,23];case 22:try{y||null==m.return||m.return()}finally{if(v)throw g}return[7];case 23:return[2,d];case 24:return _=k.sent(),i?[4,t.runCallbacks("fetchDidFail",{error:_,event:n,originalRequest:i.clone(),request:p.clone()})]:[3,26];case 25:k.sent(),k.label=26;case 26:throw _;case 27:return[2]}}))}))()}},{key:"fetchAndCachePut",value:function(e){var t=this;return Ii((function(){var n,r;return Fi(this,(function(o){switch(o.label){case 0:return[4,t.fetch(e)];case 1:return n=o.sent(),r=n.clone(),t.waitUntil(t.cachePut(e,r)),[2,n]}}))}))()}},{key:"cacheMatch",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c,l,f,h,p,d;return Fi(this,(function(y){switch(y.label){case 0:return n=$i(e),o=t._strategy,i=o.cacheName,a=o.matchOptions,[4,t.getCacheKey(n,"read")];case 1:return s=y.sent(),u=Object.assign(Object.assign({},a),{cacheName:i}),[4,caches.match(s,u)];case 2:r=y.sent(),c=!0,l=!1,f=void 0,y.label=3;case 3:y.trys.push([3,8,9,10]),h=t.iterateCallbacks("cachedResponseWillBeUsed")[Symbol.iterator](),y.label=4;case 4:return(c=(p=h.next()).done)?[3,7]:[4,(0,p.value)({cacheName:i,matchOptions:a,cachedResponse:r,request:s,event:t.event})];case 5:r=y.sent()||void 0,y.label=6;case 6:return c=!0,[3,4];case 7:return[3,10];case 8:return d=y.sent(),l=!0,f=d,[3,10];case 9:try{c||null==h.return||h.return()}finally{if(l)throw f}return[7];case 10:return[2,r]}}))}))()}},{key:"cachePut",value:function(e,t){var n=this;return Ii((function(){var r,o,i,s,u,c,l,f,p,d,y,g,b,w,_,k,x;return Fi(this,(function(S){switch(S.label){case 0:return r=$i(e),[4,m(0)];case 1:return S.sent(),[4,n.getCacheKey(r,"write")];case 2:if(o=S.sent(),!t)throw new a("cache-put-with-no-response",{url:(O=o.url,new URL(String(O),location.href).href.replace(new RegExp("^".concat(location.origin)),""))});return[4,n._ensureResponseSafeToCache(t)];case 3:return(i=S.sent())?(s=n._strategy,u=s.cacheName,c=s.matchOptions,[4,self.caches.open(u)]):[2,!1];case 4:return l=S.sent(),(f=n.hasCallback("cacheDidUpdate"))?[4,h(l,o.clone(),["__WB_REVISION__"],c)]:[3,6];case 5:return d=S.sent(),[3,7];case 6:d=null,S.label=7;case 7:p=d,S.label=8;case 8:return S.trys.push([8,10,,14]),[4,l.put(o,f?i.clone():i)];case 9:return S.sent(),[3,14];case 10:return Ni(y=S.sent(),Error)?"QuotaExceededError"!==y.name?[3,12]:[4,v()]:[3,13];case 11:S.sent(),S.label=12;case 12:throw y;case 13:return[3,14];case 14:g=!0,b=!1,w=void 0,S.label=15;case 15:S.trys.push([15,20,21,22]),_=n.iterateCallbacks("cacheDidUpdate")[Symbol.iterator](),S.label=16;case 16:return(g=(k=_.next()).done)?[3,19]:[4,(0,k.value)({cacheName:u,oldResponse:p,newResponse:i.clone(),request:o,event:n.event})];case 17:S.sent(),S.label=18;case 18:return g=!0,[3,16];case 19:return[3,22];case 20:return x=S.sent(),b=!0,w=x,[3,22];case 21:try{g||null==_.return||_.return()}finally{if(b)throw w}return[7];case 22:return[2,!0]}var O}))}))()}},{key:"getCacheKey",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u,c,l;return Fi(this,(function(f){switch(f.label){case 0:if(r="".concat(e.url," | ").concat(t),n._cacheKeys[r])return[3,9];o=e,i=!0,a=!1,s=void 0,f.label=1;case 1:f.trys.push([1,6,7,8]),u=n.iterateCallbacks("cacheKeyWillBeUsed")[Symbol.iterator](),f.label=2;case 2:return(i=(c=u.next()).done)?[3,5]:[4,(0,c.value)({mode:t,request:o,event:n.event,params:n.params})];case 3:o=$i.apply(void 0,[f.sent()]),f.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return l=f.sent(),a=!0,s=l,[3,8];case 7:try{i||null==u.return||u.return()}finally{if(a)throw s}return[7];case 8:n._cacheKeys[r]=o,f.label=9;case 9:return[2,n._cacheKeys[r]]}}))}))()}},{key:"hasCallback",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._strategy.plugins[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)if(e in o.value)return!0}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return!1}},{key:"runCallbacks",value:function(e,t){var n=this;return Ii((function(){var r,o,i,a,s,u;return Fi(this,(function(c){switch(c.label){case 0:r=!0,o=!1,i=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),a=n.iterateCallbacks(e)[Symbol.iterator](),c.label=2;case 2:return(r=(s=a.next()).done)?[3,5]:[4,(0,s.value)(t)];case 3:c.sent(),c.label=4;case 4:return r=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),o=!0,i=u,[3,8];case 7:try{r||null==a.return||a.return()}finally{if(o)throw i}return[7];case 8:return[2]}}))}))()}},{key:"iterateCallbacks",value:function(e){var t,n,r,o,i,a,s,u;return Fi(this,(function(c){switch(c.label){case 0:t=!0,n=!1,r=void 0,c.label=1;case 1:c.trys.push([1,6,7,8]),o=this,i=function(){var t,n;return Fi(this,(function(r){switch(r.label){case 0:return"function"!=typeof(t=s.value)[e]?[3,2]:(n=o._pluginStateMap.get(t),[4,function(r){var o=Object.assign(Object.assign({},r),{state:n});return t[e](o)}]);case 1:r.sent(),r.label=2;case 2:return[2]}}))},a=this._strategy.plugins[Symbol.iterator](),c.label=2;case 2:return(t=(s=a.next()).done)?[3,5]:[5,Bi(i())];case 3:c.sent(),c.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return u=c.sent(),n=!0,r=u,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2]}}))}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:function(){var e=this;return Ii((function(){var t;return Fi(this,(function(n){switch(n.label){case 0:return(t=e._extendLifetimePromises.shift())?[4,t]:[3,2];case 1:return n.sent(),[3,0];case 2:return[2]}}))}))()}},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:function(e){var t=this;return Ii((function(){var n,r,o,i,a,s,u,c;return Fi(this,(function(l){switch(l.label){case 0:n=e,r=!1,o=!0,i=!1,a=void 0,l.label=1;case 1:l.trys.push([1,6,7,8]),s=t.iterateCallbacks("cacheWillUpdate")[Symbol.iterator](),l.label=2;case 2:return(o=(u=s.next()).done)?[3,5]:[4,(0,u.value)({request:t.request,response:n,event:t.event})];case 3:if(n=l.sent()||void 0,r=!0,!n)return[3,5];l.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return c=l.sent(),i=!0,a=c,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 8:return r||n&&200!==n.status&&(n=void 0),[2,n]}}))}))()}}])&&Mi(t.prototype,n),e}();function Ui(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 Wi(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Vi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Wi(i,r,o,a,s,"next",e)}function s(e){Wi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Hi(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 zi(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Yi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Gi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheName=c(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n;return t=e,(n=[{key:"handle",value:function(e){return function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ui(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)?Ui(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.")}()}(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){zi(e,FetchEvent)&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r="params"in e?e.params:void 0,o=new qi(this,{event:t,request:n,params:r}),i=this._getResponse(o,n,t);return[i,this._awaitComplete(i,o,n,t)]}},{key:"_getResponse",value:function(e,t,n){var r=this;return Vi((function(){var o,i,s,u,c,l,f,h,p,d,y,v,g;return Yi(this,(function(m){switch(m.label){case 0:return[4,e.runCallbacks("handlerWillStart",{event:n,request:t})];case 1:m.sent(),o=void 0,m.label=2;case 2:return m.trys.push([2,4,,13]),[4,r._handle(t,e)];case 3:if(!(o=m.sent())||"error"===o.type)throw new a("no-response",{url:t.url});return[3,13];case 4:if(!zi(i=m.sent(),Error))return[3,12];s=!0,u=!1,c=void 0,m.label=5;case 5:m.trys.push([5,10,11,12]),l=e.iterateCallbacks("handlerDidError")[Symbol.iterator](),m.label=6;case 6:return(s=(f=l.next()).done)?[3,9]:[4,(0,f.value)({error:i,event:n,request:t})];case 7:if(o=m.sent())return[3,9];m.label=8;case 8:return s=!0,[3,6];case 9:return[3,12];case 10:return g=m.sent(),u=!0,c=g,[3,12];case 11:try{s||null==l.return||l.return()}finally{if(u)throw c}return[7];case 12:if(!o)throw i;return[3,13];case 13:h=!0,p=!1,d=void 0,m.label=14;case 14:m.trys.push([14,19,20,21]),y=e.iterateCallbacks("handlerWillRespond")[Symbol.iterator](),m.label=15;case 15:return(h=(v=y.next()).done)?[3,18]:[4,(0,v.value)({event:n,request:t,response:o})];case 16:o=m.sent(),m.label=17;case 17:return h=!0,[3,15];case 18:return[3,21];case 19:return g=m.sent(),p=!0,d=g,[3,21];case 20:try{h||null==y.return||y.return()}finally{if(p)throw d}return[7];case 21:return[2,o]}}))}))()}},{key:"_awaitComplete",value:function(e,t,n,r){return Vi((function(){var o,i,a;return Yi(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,e];case 1:return o=s.sent(),[3,3];case 2:return s.sent(),[3,3];case 3:return s.trys.push([3,6,,7]),[4,t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o})];case 4:return s.sent(),[4,t.doneWaiting()];case 5:return s.sent(),[3,7];case 6:return zi(a=s.sent(),Error)&&(i=a),[3,7];case 7:return[4,t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i})];case 8:if(s.sent(),t.destroy(),i)throw i;return[2]}}))}))()}}])&&Hi(t.prototype,n),e}();function Ji(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Qi(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 Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function Zi(e,t){return Zi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zi(e,t)}function ea(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=Xi(e);if(t){var o=Xi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var ta=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&&Zi(e,t)}(o,e);var t,n,r=ea(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return t=o,n=[{key:"_handle",value:function(e,t){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ji(i,r,o,a,s,"next",e)}function s(e){Ji(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(r){switch(r.label){case 0:return[4,t.cacheMatch(e)];case 1:if(!(n=r.sent()))throw new a("no-response",{url:e.url});return[2,n]}}))}))()}}],n&&Qi(t.prototype,n),o}(Gi);function na(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}var ra,oa={cacheWillUpdate:(ra=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){na(i,r,o,a,s,"next",e)}function s(e){na(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(e){var t;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(n){return 200===(t=e.response).status||0===t.status?[2,t]:[2,null]}))})),function(e){return ra.apply(this,arguments)})};function ia(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function aa(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ia(i,r,o,a,s,"next",e)}function s(e){ia(i,r,o,a,s,"throw",e)}a(void 0)}))}}function sa(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 ua(e){return ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ua(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(){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=ua(e);if(t){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}function fa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var ha=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&&ca(e,t)}(o,e);var t,n,r=la(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(oa),e._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return aa((function(){var r,o,i,s,u,c,l,f;return fa(this,(function(h){switch(h.label){case 0:return r=[],o=[],n._networkTimeoutSeconds&&(s=n._getTimeoutPromise({request:e,logs:r,handler:t}),u=s.id,c=s.promise,i=u,o.push(c)),l=n._getNetworkPromise({timeoutId:i,request:e,logs:r,handler:t}),o.push(l),[4,t.waitUntil(aa((function(){var e;return fa(this,(function(n){switch(n.label){case 0:return[4,t.waitUntil(Promise.race(o))];case 1:return(e=n.sent())?[3,3]:[4,l];case 2:e=n.sent(),n.label=3;case 3:return[2,e]}}))}))())];case 1:if(!(f=h.sent()))throw new a("no-response",{url:e.url});return[2,f]}}))}))()}},{key:"_getTimeoutPromise",value:function(e){var t,n=e.request,r=(e.logs,e.handler),o=this,i=new Promise((function(e){var i=function(){var t=aa((function(){return fa(this,(function(t){switch(t.label){case 0:return[4,r.cacheMatch(n)];case 1:return e.apply(void 0,[t.sent()]),[2]}}))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*o._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:function(e){var t=e.timeoutId,n=e.request,r=(e.logs,e.handler);return aa((function(){var e,o,i;return fa(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r.fetchAndCachePut(n)];case 1:return o=a.sent(),[3,3];case 2:return s=i=a.sent(),(null!=(u=Error)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](s):s instanceof u)&&(e=i),[3,3];case 3:return t&&clearTimeout(t),!e&&o?[3,5]:[4,r.cacheMatch(n)];case 4:o=a.sent(),a.label=5;case 5:return[2,o]}var s,u}))}))()}}],n&&sa(t.prototype,n),o}(Gi);function pa(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function da(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 ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ya(e)}function va(e,t){return va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},va(e,t)}function ga(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=ya(e);if(t){var o=ya(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?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)}}var ma=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&&va(e,t)}(o,e);var t,n,r=ga(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,t))._networkTimeoutSeconds=t.networkTimeoutSeconds||0,e}return t=o,n=[{key:"_handle",value:function(e,t){var n=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pa(i,r,o,a,s,"next",e)}function s(e){pa(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function(){var r,o,i,s,u;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(c){switch(c.label){case 0:r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),i=[t.fetch(e)],n._networkTimeoutSeconds&&(s=m(1e3*n._networkTimeoutSeconds),i.push(s)),[4,Promise.race(i)];case 2:if(!(o=c.sent()))throw new Error("Timed out the network response after "+"".concat(n._networkTimeoutSeconds," seconds."));return[3,4];case 3:return l=u=c.sent(),(null!=(f=Error)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](l):l instanceof f)&&(r=u),[3,4];case 4:if(!o)throw new a("no-response",{url:e.url,error:r});return[2,o]}var l,f}))}))()}}],n&&da(t.prototype,n),o}(Gi);function ba(e){var t,n=+(null!==(t=wa(e,je))&&void 0!==t?t:"");return isNaN(n)||n<200||n>599?503:n}function wa(e,t){return e.get(t)}function _a(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function ka(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_a(i,r,o,a,s,"next",e)}function s(e){_a(i,r,o,a,s,"throw",e)}a(void 0)}))}}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sa(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Oa,Pa,Ea=new ma,ja=new ta({cacheName:Te}),Ra=new ha({cacheName:Te}),Ca="network-only-or-cache-only",Ta=(xa(Oa={},"network-first",(function(e){return Ra.handle(e)})),xa(Oa,"network-only-or-cache-only",function(){var e=ka((function(e){return Sa(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,Ea.handle(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,ja.handle(e)];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()),Oa);function Aa(e){return Da.apply(this,arguments)}function Da(){return(Da=ka((function(e){var t;return Sa(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,5]),[4,Ea.handle(e)];case 1:return[2,n.sent()];case 2:return n.sent(),[4,caches.open(Te)];case 3:return[4,n.sent().match(De)];case 4:return[2,null!=(t=n.sent())?t:Response.error()];case 5:return[2]}}))}))).apply(this,arguments)}function La(e){return Ka.apply(this,arguments)}function Ka(){return Ka=ka((function(e){var t,n,r,o,i,a;return Sa(this,(function(s){switch(s.label){case 0:return t=e.request,"GET"!==e.request.method?[3,2]:[4,Ia(e)];case 1:return r=s.sent(),[3,3];case 2:r=Ca,s.label=3;case 3:i=null!==(o=Ta[n=r])&&void 0!==o?o:Ta[Ca],s.label=4;case 4:return s.trys.push([4,6,,7]),[4,i(e)];case 5:return[2,s.sent()];case 6:return a=s.sent(),console.warn("[SW] Could not handle the request to %s (using handler %s).",t.url,n,a),[2,new Response((u=t.headers,null!==(c=wa(u,Ee))&&void 0!==c?c:void 0),{status:ba(t.headers)})];case 7:return[2]}var u,c}))})),Ka.apply(this,arguments)}function Ia(e){return Ma.apply(this,arguments)}function Ma(){return(Ma=ka((function(e){var t,n,r;return Sa(this,(function(o){switch(o.label){case 0:return null===(i=(t=e.request).headers,n=wa(i,Re))||void 0===n?[3,1]:(r=n,[3,3]);case 1:return[4,Na(t.url)];case 2:r=o.sent(),o.label=3;case 3:return[2,r]}var i}))}))).apply(this,arguments)}function Na(e){return Fa.apply(this,arguments)}function Fa(){return(Fa=ka((function(e){var t,n,r,o;return Sa(this,(function(i){switch(i.label){case 0:return[4,(new Xo).dynamicRouteRegistrations.toArray()];case 1:return t=i.sent(),(r=Pe(t.filter((function(t){return new RegExp(t.pattern).test(e)})).map((function(e){return null!==(n=e.strategy)&&void 0!==n?n:"network-first"})))).length<=1?[2,r[0]]:[2,null!==(o=["network-first","network-only-or-cache-only"].find((function(e){return r.some((function(t){return t===e}))})))&&void 0!==o?o:Ca]}}))}))).apply(this,arguments)}self.__WB_DISABLE_DEV_LOGS=!0,Pa={prefix:Ce},function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(u)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)t=i.value,"string"==typeof Pa[t]&&(u[t]=Pa[t])}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}(),function(){!function(e,t,n){var r;r=Di(e,RegExp)?new xi(e,t,n):new bi(e,t,n),Ai().registerRoute(r)}((function(e){return"navigate"===e.request.mode}),Aa);var e=Ai(),t=!0,n=!1,r=void 0;try{for(var o,i=vi[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.setDefaultHandler(La,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(),self.addEventListener("message",(function(e){return yi.apply(this,arguments)})),self.addEventListener("install",(function(e){self.skipWaiting(),e.waitUntil(oi(Le))})),self.addEventListener("activate",(function(e){e.waitUntil(self.clients.claim())}))})()})();