@openmrs/esm-form-builder-app 3.5.2-pre.3821 → 3.5.2-pre.3826

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 (61) hide show
  1. package/dist/123.js +1 -0
  2. package/dist/123.js.map +1 -0
  3. package/dist/1481.js +1 -0
  4. package/dist/1481.js.map +1 -0
  5. package/dist/1515.js +1 -1
  6. package/dist/1515.js.map +1 -1
  7. package/dist/1617.js +1 -0
  8. package/dist/1617.js.map +1 -0
  9. package/dist/2355.js +1 -0
  10. package/dist/2355.js.map +1 -0
  11. package/dist/3238.js +1 -0
  12. package/dist/3238.js.map +1 -0
  13. package/dist/3334.js +4 -4
  14. package/dist/3334.js.map +1 -1
  15. package/dist/3378.js +1 -1
  16. package/dist/3378.js.map +1 -1
  17. package/dist/3431.js +8 -8
  18. package/dist/3431.js.map +1 -1
  19. package/dist/3877.js +1 -0
  20. package/dist/3877.js.map +1 -0
  21. package/dist/4383.js +1 -1
  22. package/dist/4383.js.map +1 -1
  23. package/dist/4442.js +1 -1
  24. package/dist/4442.js.map +1 -1
  25. package/dist/4511.js +15 -0
  26. package/dist/4511.js.map +1 -0
  27. package/dist/4858.js +1 -1
  28. package/dist/4858.js.map +1 -1
  29. package/dist/4948.js +1 -1
  30. package/dist/4948.js.map +1 -1
  31. package/dist/5354.js +1 -1
  32. package/dist/5354.js.map +1 -1
  33. package/dist/7104.js +1 -1
  34. package/dist/7104.js.map +1 -1
  35. package/dist/7247.js +1 -1
  36. package/dist/7247.js.map +1 -1
  37. package/dist/7992.js +1 -1
  38. package/dist/7992.js.map +1 -1
  39. package/dist/8228.js +1 -1
  40. package/dist/8228.js.map +1 -1
  41. package/dist/8636.js +1 -1
  42. package/dist/8636.js.map +1 -1
  43. package/dist/8668.js +1 -0
  44. package/dist/8668.js.map +1 -0
  45. package/dist/9103.js +1 -1
  46. package/dist/9103.js.map +1 -1
  47. package/dist/9314.js +1 -0
  48. package/dist/9314.js.map +1 -0
  49. package/dist/9316.js +1 -1
  50. package/dist/9316.js.map +1 -1
  51. package/dist/9485.js +1 -1
  52. package/dist/9485.js.map +1 -1
  53. package/dist/openmrs-esm-form-builder-app.js +2 -2
  54. package/dist/openmrs-esm-form-builder-app.js.buildmanifest.json +274 -71
  55. package/dist/openmrs-esm-form-builder-app.js.map +1 -1
  56. package/dist/routes.json +1 -1
  57. package/package.json +2 -1
  58. package/dist/4701.js +0 -11
  59. package/dist/4701.js.map +0 -1
  60. package/dist/8770.js +0 -1
  61. package/dist/8770.js.map +0 -1
package/dist/3431.js CHANGED
@@ -1,6 +1,6 @@
1
- (globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[]).push([["3431"],{47581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,f=i.second||0,p=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},83826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=i(e).local();return f.call(n,o,t,r)}}}()},16767(e,t,r){!function(t){"use strict";var n=r(26974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var i=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},82467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},26974(e,t,r){"use strict";var n=r(97804),o=r(82467),i=r(66743),a=r(28502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=p(o[1]),fill:s=f(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=p(o),a=f(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=p(i=c(this.hash,t)),e=f(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=p(i=c(this.hash,r)),t=f(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},66743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,f=t,p=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^f&(p^h),l=0x5a827999):u<40?(s=f^p^h,l=0x6ed9eba1):u<60?(s=f&p|h&(f|p),l=0x8f1bbcdc):(s=f^p^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=p,p=f<<30|f>>>2,f=d,d=y}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},28502(e,t,r){"use strict";var n=r(97804),o=r(16541);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},16541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},97804(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},48067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],h=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:a=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=i[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:a(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!i)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":i).length<2?u.length<2?`[^${a(u+c)}]`:`(?:(?!${a(u)})[^${a(c)}])`:u.length<2?`(?:(?!${a(c)})[^${a(u)}])`:`(?:(?!${a(c)}|${a(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let m=`^(?:${h.join("|")})`;return f&&(m+=`(?:${a(u)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(54575);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},49850(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(83207);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},466(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(16967);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},54470(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(31396).Subscriber)},76765(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(80453),i=r(97795),a=r(21576);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},52515(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54487),o=r(25158),i=r(86676),a=r(8173),s=r(3344);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},32544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3344),o=r(34163);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},15905(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(31396).Subscriber)},2173(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(55677),s=r(83207),l=r(25495),u=r(16967),c=r(93601);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},83849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},12888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(52515),a=r(31396),s=r(83207),l=r(16967),u=r(93601),c=r(4421),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var f=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(i.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(f);t.AnonymousSubject=p},93601(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(83207).Subscription)},31396(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83385),a=r(32544),s=r(83207),l=r(4421),u=r(3344),c=r(34163),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new f(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new f(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var f=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=f},83207(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(60194),i=r(83385),a=r(61245);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,f=c.length;++d<f;){var p=c[d];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},3344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},64398(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(52515),s=r(87092);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},52871(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(12888),s=r(52515),l=r(31396),u=r(83207),c=r(46888),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new f(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new p(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},98072(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(52515),a=r(52745),s=r(15390);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},50278(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(18244),a=r(34728),s=r(15905),l=r(47849),u=r(35853),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=f},95434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(97795),o=r(6345);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},93180(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(24098),i=r(80453);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},80453(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},24098(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(87092),i=r(17315);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},35853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(70499),i=r(68822);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},5776(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(18244),i=r(49287),a=r(35853);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},97795(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18244),o=r(35853),i=r(68822);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},23827(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(34728),a=r(35853),s=r(15905),l=r(47849);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},21576(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},24529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(25190),i=r(15390),a=r(18244);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},70887(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(35853),a=r(34728),s=r(31396),l=r(57211),u=r(64398);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):"function"==typeof e[l.iterator]?t.push(new f(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},38461(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},32392(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(38461),i=r(24529);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},37954(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},30647(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},16327(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(31396),s=r(18244);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(p,r,{subscriber:a,context:s})),a.add(i.schedule(f,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function f(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(p,r,{subscriber:n,context:i})),this.schedule(e,t))}function p(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},46786(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83207),a=r(47849),s=r(15905);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},11662(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83207),a=r(64398);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},85503(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},24908(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(50278);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},89060(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(50278),i=r(24098);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},16600(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},6345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49287);t.concatAll=function(){return n.mergeAll(1)}},52248(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},43577(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52248);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},88765(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},23287(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},38066(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},12767(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},46965(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(24465),s=r(31396),l=r(76765);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},69861(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(52515),s=r(15905),l=r(47849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new f(e,this.source))},t}(a.Observable),f=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},47642(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},98820(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},21772(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},5075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21772);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},32399(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(37568),o=r(12670),i=r(12056),a=r(12767),s=r(11231);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},32631(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434),o=r(97795);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},47233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},92408(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},1112(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},77736(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},12670(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},91258(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(83207);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},15063(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},42939(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15063);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},69948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(81136),o=r(12670),i=r(11231),a=r(12767),s=r(12056),l=r(44579);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},77784(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(83207),s=r(52515),l=r(12888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new f(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new f(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),f=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=f;var p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},36863(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},63371(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},17064(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(81136),o=r(12670),i=r(23439),a=r(12056),s=r(12767),l=r(44579);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},76808(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},13353(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},92539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(76765);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},56416(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},41570(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5776);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},49287(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206),o=r(44579);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},75206(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},89019(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},52307(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},87198(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},74864(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52871);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},25495(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(76765);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},55029(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(24098),a=r(34728),s=r(64398);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},87304(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},84236(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(55352),o=r(12670);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},11075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(76808);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},35485(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12888),o=r(74864);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},60091(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(466),o=r(74864);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},33433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49850),o=r(74864);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},49622(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173),o=r(74864);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},96721(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(23827);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},22518(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(40253),o=r(23439),i=r(12767),a=r(8173);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},46888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},66483(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(80453);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},10283(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},53160(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},75508(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},61754(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},61183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},40253(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},5017(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},83213(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(74864),o=r(46888),i=r(12888);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},8614(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,l,u,c,d,f,p,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,f=0,p=!1,h=!1,function(e){var t;f++,!r||p?(p=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){p=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){f--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===f&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},28480(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(81136);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},74775(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},2807(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},12519(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},34846(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},94558(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434),o=r(18244);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},70015(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(98072);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},65433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912),o=r(44579);t.switchAll=function(){return n.switchMap(o.identity)}},7912(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},37865(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},11231(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568),s=r(80453);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},23439(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568),s=r(80453);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},51279(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},96518(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},31451(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(7653),s=r(83385);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},30464(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},17661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190),s=r(30464);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},12056(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(81136),a=r(31396);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},15276(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(40253),i=r(93180),a=r(76808);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},88673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(43734),i=r(4053),a=r(21576);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},4053(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(24465),s=r(64398);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},68858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(76808);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},32284(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},77544(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},41565(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(12888);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},43877(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(25190),s=r(31396),l=r(15390),u=r(18244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),f=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(p,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function p(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},5428(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(83207),s=r(15905),l=r(47849);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var f=l.subscribeToResult(this,s,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,c.add(f)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},39284(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(15905),s=r(47849);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},91183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(15905),a=r(47849);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70887);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},53282(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70887);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},68822(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},90229(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207),i=r(57211);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},60002(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207),i=r(86676);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},17315(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60002),o=r(1138),i=r(68822),a=r(90229),s=r(26565),l=r(77328),u=r(51087),c=r(32555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},45666(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(83207).Subscription)},52883(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(80772);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(21076).AsyncAction)},93728(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(94333).AsyncScheduler)},21076(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(45666).Action)},94333(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83849);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},46847(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(21076).AsyncAction)},5044(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(94333).AsyncScheduler)},52745(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52883);t.asapScheduler=new(r(93728)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},25190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21076);t.asyncScheduler=new(r(94333)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},55677(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46847);t.queueScheduler=new(r(5044)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},57211(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},86676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},4421(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},37568(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},81136(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},80772(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},16967(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},43734(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},61245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},54487(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31396);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},34163(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},44579(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},34728(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},51087(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},24465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},83385(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},26565(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86676);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},32555(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57211);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},15390(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},60194(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},77328(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},18244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},7653(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},55352(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},8173(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44579);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},87092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70499),o=r(75259),i=r(98190),a=r(31021),s=r(51087),l=r(77328),u=r(60194),c=r(57211),d=r(86676);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},70499(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},98190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57211);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},31021(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86676);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},75259(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34163);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},47849(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54470),o=r(87092),i=r(52515);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},25158(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31396),o=r(4421),i=r(32544);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},56170(e,t,r){"use strict";r(38461).audit,r(32392).auditTime,r(37954).buffer,r(30647).bufferCount,r(16327).bufferTime,r(46786).bufferToggle,r(11662).bufferWhen,r(85503).catchError,r(24908).combineAll,r(89060).combineLatest,r(16600).concat,r(6345).concatAll,r(52248).concatMap,r(43577).concatMapTo,r(88765).count,r(23287).debounce,r(38066).debounceTime,r(12767).defaultIfEmpty,r(46965).delay,r(69861).delayWhen,r(47642).dematerialize,r(98820).distinct,r(21772).distinctUntilChanged,r(5075).distinctUntilKeyChanged,r(32399).elementAt,r(32631).endWith,r(47233).every,r(92408).exhaust,r(1112).exhaustMap,r(77736).expand,r(12670).filter,r(91258).finalize,r(15063).find,r(42939).findIndex,r(69948).first,r(77784).groupBy,r(36863).ignoreElements,r(63371).isEmpty,r(17064).last,t.map=r(76808).map,r(13353).mapTo,r(92539).materialize,r(56416).max,r(41570).merge,r(49287).mergeAll;var n=r(75206);n.mergeMap,n.flatMap,r(89019).mergeMapTo,r(52307).mergeScan,r(87198).min,r(74864).multicast,r(25495).observeOn,r(55029).onErrorResumeNext,r(87304).pairwise,r(84236).partition,r(11075).pluck,r(35485).publish,r(60091).publishBehavior,r(33433).publishLast,r(49622).publishReplay,r(96721).race,r(22518).reduce,r(66483).repeat,r(10283).repeatWhen,r(53160).retry,r(75508).retryWhen,r(46888).refCount,r(61754).sample,r(61183).sampleTime,r(40253).scan,r(5017).sequenceEqual,r(83213).share,r(8614).shareReplay,r(28480).single,r(74775).skip,r(2807).skipLast,r(12519).skipUntil,r(34846).skipWhile,r(94558).startWith,r(70015).subscribeOn,r(65433).switchAll,r(7912).switchMap,r(37865).switchMapTo,t.take=r(11231).take,r(23439).takeLast,r(51279).takeUntil,r(96518).takeWhile,r(31451).tap,r(30464).throttle,r(17661).throttleTime,r(12056).throwIfEmpty,r(15276).timeInterval,r(88673).timeout,r(4053).timeoutWith,r(68858).timestamp,r(32284).toArray,r(77544).window,r(41565).windowCount,r(43877).windowTime,r(5428).windowToggle,r(39284).windowWhen,r(91183).withLatestFrom,r(909).zip,r(53282).zipAll},43402(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,f,p,h,m;r.r(t),r.d(t,{GenderUnknownIcon:()=>pw,evaluateAsNumber:()=>ux,useOpenmrsSWR:()=>fp,Assessment1Pictogram:()=>Es,ChemistryIcon:()=>pn,StockManagementPictogram:()=>Ej,importDynamic:()=>o3,BabyIcon:()=>f3,DashboardExtension:()=>hw,useFhirPagination:()=>d6,ArrowUpIcon:()=>f1,pictogramIds:()=>Eo,getDynamicOfflineDataHandlers:()=>lU,ActivityIcon:()=>fZ,compile:()=>uO,showActionableNotification:()=>SM,useForceUpdate:()=>d1,PatientBannerPatientIdentifiers:()=>SG,TableBatchActions:()=>fz,getAsyncLifecycle:()=>dC,subscribeOpenmrsEvent:()=>l5,useVisit:()=>fk,TransferPictogram:()=>ET,PasswordIcon:()=>pH,usePagination:()=>fh,useVisitContextStore:()=>fC,Assessment2Pictogram:()=>El,PatientBannerToggleContactDetailsButton:()=>S1,CloseOutlineIcon:()=>pc,ObstetricsPictogram:()=>Ex,CloseIcon:()=>pl,parseDateInput:()=>xR,useFeatureFlag:()=>d0,getConfig:()=>tF,attach:()=>cb,LabOrderIcon:()=>pT,VisitMode:()=>l8,getLocale:()=>wz,offlineUuidPrefix:()=>cU,useLocations:()=>fc,ActionMenuButton:()=>Di,isUrlWithTemplateParameters:()=>t6,getLifecycle:()=>dP,formatDatetime:()=>xk,getVisitsForPatient:()=>ui,useEmrConfiguration:()=>dZ,subscribeConnectivity:()=>b,useLeftNav:()=>fl,formatPartialDate:()=>xD,CustomOverflowMenu:()=>fW,ToolsIcon:()=>hr,ErrorState:()=>Sh,LocationIcon:()=>pM,GroupIcon:()=>pS,canBeginEditSynchronizationItemsOfType:()=>l$,ConditionsIcon:()=>hy,SaveIcon:()=>p1,VisitStatus:()=>l9,createUseStore:()=>c5,detach:()=>cv,getSessionLocation:()=>o$,setCurrentVisit:()=>ur,usePatient:()=>fg,useRenderableExtensions:()=>fv,useWorkspaces:()=>E5,setLeftNav:()=>cD,isDevEnabled:()=>oV,formatTime:()=>xC,useConfig:()=>dW,validator:()=>tc,syncOfflinePatientData:()=>l3,CalendarIcon:()=>f2,closeWorkspaceGroup2:()=>DD,getHistory:()=>ob,StickyNoteAddIcon:()=>p8,ConfigurableLink:()=>cq,subscribeSnackbarShown:()=>j,getPatientName:()=>SL,getVisitStore:()=>ut,getDynamicOfflineDataEntriesFor:()=>lH,getCoreTranslation:()=>op,GenderMaleIcon:()=>pv,getLoggedInUser:()=>oI,isOfflineUuid:()=>cK,getBreadcrumbs:()=>rn,evaluateAsNumberAsync:()=>uS,extractVariableNames:()=>uW,putDynamicOfflineDataFor:()=>lq,EditIcon:()=>pm,translateFrom:()=>of,putDynamicOfflineData:()=>lz,shallowEqual:()=>A,showSnackbar:()=>EV,Type:()=>tu,InPatientPictogram:()=>Eb,MaximizeIcon:()=>pN,getAttachmentsUrl:()=>o7,subscribeNotificationShown:()=>P,PatientBannerActionsMenu:()=>S0,useStoreWithActions:()=>c6,PatientSearchPictogram:()=>ES,WarningIcon:()=>hp,DocumentAttachmentIcon:()=>pf,fhirBaseUrl:()=>ox,matchLocale:()=>DV,registerBreadcrumb:()=>rt,CardiologyPictogram:()=>Ec,EventsIcon:()=>pg,ImageMedicalIcon:()=>pO,calculateInterpretation:()=>Sw,createGlobalStore:()=>K,usePatientPhoto:()=>Ee,getCurrentOfflineMode:()=>cA,useExtensionStore:()=>dX,closeWorkspace:()=>EX,DiagnosisTags:()=>Sc,createAttachment:()=>ie,iconIds:()=>fY,PatientsPictogram:()=>EE,TableIcon:()=>he,interpolateUrl:()=>oh,useLeftNavStore:()=>fu,Icon:()=>h_,InformationFilledIcon:()=>pC,subscribeToastShown:()=>k,LaboratoryPictogram:()=>Ev,detachAll:()=>c_,convertToLocaleCalendar:()=>xj,toDateObjectStrict:()=>xg,DocumentIcon:()=>pd,defineConfigSchema:()=>tI,ActionMenuButton2:()=>DB,setupDynamicOfflineDataHandler:()=>lW,filterBreadcrumbs:()=>ri,makeUrl:()=>oE,oneOf:()=>t8,launchWorkspaceGroup:()=>function e(t,r){let n=function(e){let t=cZ.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return E3}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?Ez(n?.name,()=>{e(t,r)}):E6(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),De(t,o),i?.(),s&&EG(s.name,s.additionalProps??{})},PatientBannerContactDetails:()=>S8,selectPreferredName:()=>SU,getAssignedExtensions:()=>cx,syncDynamicOfflineData:()=>lJ,PatientPhoto:()=>En,MobileCheckIcon:()=>pF,createErrorHandler:()=>R,openmrsObservableFetch:()=>oO,MaterialOrderIcon:()=>pA,MicroscopeIcon:()=>pL,parseDate:()=>xv,getAttachmentByUuid:()=>o8,LeftNavMenu:()=>Sy,registerExtension:()=>cg,ShoppingCartAddItemIcon:()=>hb,PharmacyPictogram:()=>EO,ReferralOrderIcon:()=>pJ,AttachmentIcon:()=>hm,ReportIcon:()=>pX,MoneyIcon:()=>pB,getAttachments:()=>o9,DownloadIcon:()=>pp,PageHeaderContent:()=>SI,MedicationIcon:()=>pI,PrinterIcon:()=>pG,getFullSynchronizationItemsFor:()=>lM,PatientListsPictogram:()=>EN,ShoppingCartArrowDownIcon:()=>p5,provide:()=>tL,AppointmentsAltPictogram:()=>Ea,GenericOrderTypeIcon:()=>px,setupOfflineSync:()=>lB,useAppContext:()=>dI,removeDynamicOfflineDataFor:()=>lY,useConnectivity:()=>dH,ViewIcon:()=>hf,formattedName:()=>SV,sessionEndpoint:()=>oS,GeriatricsPictogram:()=>Ey,useExtensionSlotStore:()=>c7,unregisterContext:()=>oz,duration:()=>xI,SearchIcon:()=>p3,CaretLeftIcon:()=>f5,TableOfContentsIcon:()=>p7,isVersionSatisfied:()=>Dz,isOmrsDateToday:()=>xy,getExtensionStore:()=>u5,BloodBankPictogram:()=>Eu,EmptyCardIllustration:()=>Sf,PenIcon:()=>pq,TriagePictogram:()=>ER,Workspace2:()=>DA,CheckmarkOutlineIcon:()=>pr,refetchCurrentUser:()=>oM,registerOfflinePatientHandler:()=>l1,registerExtensionSlot:()=>cS,AllergiesIcon:()=>hh,ArrowDownIcon:()=>fQ,getGlobalStore:()=>z,reportError:()=>T,showToast:()=>EK,subscribeToContext:()=>oY,OpenmrsDatePicker:()=>Sl,ArrowRightIcon:()=>f0,getDynamicOfflineDataEntries:()=>lK,getLocaleDisplayName:()=>wH,messageOmrsServiceWorker:()=>ih,navigate:()=>oy,launchWorkspace2:()=>DO,registerBreadcrumbs:()=>rr,isUrl:()=>t5,CustomOverflowMenuItem:()=>fK,MotherIcon:()=>pV,CaretDownIcon:()=>f6,ArrowLeftIcon:()=>fX,FacilityPictogram:()=>Em,ViewOffIcon:()=>hd,fetchCurrentPatient:()=>l2,useDefineAppContext:()=>dR,useOnClickOutside:()=>fd,useOpenmrsInfinite:()=>d7,validators:()=>t9,MessageQueueIcon:()=>p$,TwoFactorAuthenticationIcon:()=>ha,Pharmacy2Pictogram:()=>EP,goBackInHistory:()=>ov,GroupAccessIcon:()=>pE,showNotification:()=>SR,getAsyncExtensionLifecycle:()=>dj,WorkspaceContainer:()=>Dx,queueSynchronizationItem:()=>lT,ListCheckedIcon:()=>pR,formatDurationBetween:()=>xL,ResponsiveWrapper:()=>EL,GynaecologyPictogram:()=>Eg,ShoppingCartIcon:()=>p6,defaultVisitCustomRepresentation:()=>l7,Pagination:()=>S$,getBreadcrumbsFor:()=>ra,CheckmarkFilledIcon:()=>pt,MetadataExportPictogram:()=>Ew,clearCurrentUser:()=>oA,useOpenmrsPagination:()=>d3,updateVisit:()=>uo,backendDependencies:()=>oU,ChevronUpIcon:()=>ps,MaybePictogram:()=>EI,beginEditSynchronizationItem:()=>lL,Pictogram:()=>E$,getStartedVisit:()=>ua,omrsOfflineResponseStatusHttpHeaderName:()=>cI,openmrsFetch:()=>oD,saveVisit:()=>un,HomePictogram:()=>EA,ChevronDownIcon:()=>po,DentistryPictogram:()=>Ef,OpenmrsDateRangePicker:()=>Su,ServiceQueuesPictogram:()=>Ek,deleteAttachmentPermanently:()=>it,OverflowMenuHorizontalIcon:()=>pW,getVisitTypes:()=>uu,launchWorkspace:()=>EG,EventScheduleIcon:()=>py,DigitalTrustPictogram:()=>Ep,NumericObservation:()=>SE,attachmentUrl:()=>o5,getSessionStore:()=>oT,interpolateString:()=>om,inRange:()=>t2,registerContext:()=>oH,AppointmentsPictogram:()=>Ei,showModal:()=>SO,toLanguageTag:()=>wK,ProcedureOrderIcon:()=>pY,useAttachments:()=>dF,getRegisteredWorkspace2Names:()=>DT,useConceptReferenceRange:()=>Sx,setSessionLocation:()=>oL,toLocationObject:()=>uc,useExtensionSlotMeta:()=>dQ,useOnVisible:()=>ff,ChartAverageIcon:()=>f7,ChartLineIcon:()=>pe,UserAvatarIcon:()=>hs,UserHasAccess:()=>fw,evaluateAsBooleanAsync:()=>uw,createDashboard:()=>hx,getFeatureFlag:()=>uG,getLocations:()=>ud,EmergencyDepartmentPictogram:()=>Eh,navigateAndLaunchWorkspace:()=>EY,getOfflineDb:()=>lO,getSynchronizationItem:()=>lI,renderExtension:()=>cM,omrsOfflineCachingStrategyHttpHeaderName:()=>c$,formatDate:()=>xO,toVisitTypeObject:()=>ul,useExtensionContext:()=>dJ,useFhirInfinite:()=>fo,useSession:()=>f_,SwitcherIcon:()=>p2,age:()=>SK,syncAllDynamicOfflineData:()=>lZ,useAssignedExtensionIds:()=>dL,useStore:()=>c2,isOmrsDateStrict:()=>xm,userHasAccess:()=>oN,CaretRightIcon:()=>f8,evaluateAsType:()=>uE,usePaginationInfo:()=>fm,evaluateAsync:()=>uv,PageHeader:()=>SN,TranslateIcon:()=>hn,useOpenmrsFetchAll:()=>ft,setUserProperties:()=>oF,MovementIcon:()=>pU,ageAsDuration:()=>SW,removeDynamicOfflineData:()=>lG,subscribePrecacheStaticDependencies:()=>w,getExtensionNameFromId:()=>cm,PaymentsDeskPictogram:()=>ED,useVisitTypes:()=>fj,usePrimaryIdentifierCode:()=>fb,updateContext:()=>oG,deleteSynchronizationItem:()=>lF,getCurrentUser:()=>oj,useLayoutType:()=>fa,ResetIcon:()=>p0,RenewIcon:()=>pQ,useWorkspace2Context:()=>Dj,XrayPictogram:()=>EM,CaretUpIcon:()=>f9,subscribeActionableNotificationShown:()=>C,OpenmrsAppContext:()=>dM,ErrorCard:()=>Sm,GenderFemaleIcon:()=>pb,omrsOfflineResponseBodyHttpHeaderName:()=>cN,getOfflinePatientDataStore:()=>l0,retry:()=>Dq,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(DW(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;DW(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},ExtensionSlot:()=>di,subscribeConnectivityChanged:()=>g,subscribeTo:()=>q,unsetLeftNav:()=>cO,useAbortController:()=>dN,Extension:()=>fT,getFhirServerPaginationHandlers:()=>d5,MaybeIcon:()=>hv,useConnectedExtensions:()=>dK,useCustomOverflowMenu:()=>fU,PedestrianFamilyIcon:()=>pz,generateOfflineUuid:()=>cW,HospitalBedIcon:()=>pD,CtScanPictogram:()=>Ed,OpenmrsFetchError:()=>oP,getSynchronizationItems:()=>lA,UserFollowIcon:()=>hl,RenderIfValueIsTruthy:()=>dA,launchWorkspaceGroup2:()=>DE,normalizeInterpretation:()=>S_,ChevronRightIcon:()=>pa,UserXrayIcon:()=>hu,GenderOtherIcon:()=>p_,CalendarHeatMapIcon:()=>f4,formatDuration:()=>xT,contextStore:()=>oW,registerFeatureFlag:()=>uq,restBaseUrl:()=>ow,getFullSynchronizationItems:()=>lN,useFhirFetchAll:()=>fn,toOmrsIsoString:()=>xb,Labs2Pictogram:()=>E_,PatientBannerPatientInfo:()=>SQ,evaluateAsBoolean:()=>u_,getDefaultCalendar:()=>xS,SettingsIcon:()=>p4,DrugOrderIcon:()=>ph,isOnline:()=>uY,setUserLanguage:()=>oR,useBodyScrollLock:()=>dB,SyringeIcon:()=>p9,LocationPicker:()=>Sg,ProgramsIcon:()=>pZ,useDebounce:()=>dz,TimeIcon:()=>ht,useAssignedExtensions:()=>dt,CloseFilledIcon:()=>pu,canAccessStorage:()=>DU,registerDefaultCalendar:()=>xx,TreeViewAltIcon:()=>hi,AddIcon:()=>fJ,OverflowMenuVerticalIcon:()=>pK,getConfigStore:()=>t_,InventoryManagementIcon:()=>pj,formatPatientName:()=>SB,UserIcon:()=>hc,getContext:()=>oq,InformationSquareIcon:()=>pk,EmptyCard:()=>Sp,ChevronLeftIcon:()=>pi,RadiologyIcon:()=>hg,displayName:()=>SF,evaluate:()=>ub,isDesktop:()=>fs,defineExtensionConfigSchema:()=>t$,RegistrationPictogram:()=>EC,CardHeader:()=>fN,getSyncLifecycle:()=>dk,InformationIcon:()=>pP,TrashCanIcon:()=>ho,evaluateAsTypeAsync:()=>uD});let y="openmrs:connectivity-changed";function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let x="openmrs:notification-shown",S="openmrs:actionable-notification-shown",E="openmrs:toast-shown",D="openmrs:snack-bar-shown";function O(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function P(e){let t=t=>e(t.detail);return window.addEventListener(x,t),()=>window.removeEventListener(x,t)}function C(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function k(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function j(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function T(e){let t=M(e);setTimeout(()=>{throw t})}function R(){let e=Error();return t=>{let r=M(t);r.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[]).push([["3431"],{47581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,f=i.second||0,p=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,f,p)):new Date(l,u,s,c,d,f,p)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},83826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=i(e).local();return f.call(n,o,t,r)}}}()},16767(e,t,r){!function(t){"use strict";var n=r(26974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var i=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},82467(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},26974(e,t,r){"use strict";var n=r(97804),o=r(82467),i=r(66743),a=r(28502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=p(o[0]),s=f(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=p(o[1]),fill:s=f(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=p(o),a=f(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=p(i=c(this.hash,t)),e=f(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=p(i=c(this.hash,r)),t=f(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},66743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,f=t,p=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^f&(p^h),l=0x5a827999):u<40?(s=f^p^h,l=0x6ed9eba1):u<60?(s=f&p|h&(f|p),l=0x8f1bbcdc):(s=f^p^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=p,p=f<<30|f>>>2,f=d,d=y}for(u=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},28502(e,t,r){"use strict";var n=r(97804),o=r(16541);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},16541(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},97804(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},48067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],h=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:a=r}=t,u=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(u[d]))do t+=u[d++];while(o.test(u[d]));else if('"'===u[d]){let r=d;for(;d++<u.length;){if('"'===u[d]){d++,r=0;break}"\\"===u[d]&&d++,t+=u[d]}if(r)throw new l(`Unterminated quote at index ${r}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=i[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:u[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:a(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!i)throw new l(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${u=t,(c=s?"":i).length<2?u.length<2?`[^${a(u+c)}]`:`(?:(?!${a(u)})[^${a(c)}])`:u.length<2?`(?:(?!${a(c)})[^${a(u)}])`:`(?:(?!${a(c)}|${a(u)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,u,p,e.originalPath))}let m=`^(?:${h.join("|")})`;return f&&(m+=`(?:${a(u)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(u)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5338(e,t,r){"use strict";var n=r(54575);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},49850(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(83207);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},466(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(16967);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},54470(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(31396).Subscriber)},76765(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(80453),i=r(97795),a=r(21576);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},52515(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54487),o=r(25158),i=r(86676),a=r(8173),s=r(3344);function l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},32544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3344),o=r(34163);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},15905(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(31396).Subscriber)},2173(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(55677),s=r(83207),l=r(25495),u=r(16967),c=r(93601);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},83849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},12888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(52515),a=r(31396),s=r(83207),l=r(16967),u=r(93601),c=r(4421),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var f=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(i.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(f);t.AnonymousSubject=p},93601(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(83207).Subscription)},31396(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83385),a=r(32544),s=r(83207),l=r(4421),u=r(3344),c=r(34163),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new f(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new f(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var f=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=f},83207(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(60194),i=r(83385),a=r(61245);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,f=c.length;++d<f;){var p=c[d];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},3344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},64398(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(52515),s=r(87092);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},52871(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(12888),s=r(52515),l=r(31396),u=r(83207),c=r(46888),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new f(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new p(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},98072(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(52515),a=r(52745),s=r(15390);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},50278(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(18244),a=r(34728),s=r(15905),l=r(47849),u=r(35853),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=f},95434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(97795),o=r(6345);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},93180(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(24098),i=r(80453);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},80453(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},24098(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(87092),i=r(17315);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},35853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(70499),i=r(68822);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},5776(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(18244),i=r(49287),a=r(35853);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},97795(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18244),o=r(35853),i=r(68822);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},23827(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(34728),a=r(35853),s=r(15905),l=r(47849);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},21576(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},24529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(25190),i=r(15390),a=r(18244);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},70887(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(35853),a=r(34728),s=r(31396),l=r(57211),u=r(64398);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):"function"==typeof e[l.iterator]?t.push(new f(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},38461(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},32392(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(38461),i=r(24529);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},37954(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},30647(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},16327(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(31396),s=r(18244);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(p,r,{subscriber:a,context:s})),a.add(i.schedule(f,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function f(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(p,r,{subscriber:n,context:i})),this.schedule(e,t))}function p(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},46786(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83207),a=r(47849),s=r(15905);t.bufferToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},11662(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83207),a=r(64398);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},85503(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},24908(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(50278);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},89060(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(50278),i=r(24098);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},16600(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},6345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49287);t.concatAll=function(){return n.mergeAll(1)}},52248(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},43577(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52248);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},88765(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},23287(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},38066(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},12767(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},46965(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(24465),s=r(31396),l=r(76765);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},69861(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(52515),s=r(15905),l=r(47849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new f(e,this.source))},t}(a.Observable),f=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},47642(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},98820(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},21772(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},5075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21772);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},32399(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(37568),o=r(12670),i=r(12056),a=r(12767),s=r(11231);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},32631(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434),o=r(97795);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},47233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},92408(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},1112(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},77736(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},12670(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},91258(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(83207);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},15063(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},42939(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15063);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},69948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(81136),o=r(12670),i=r(11231),a=r(12767),s=r(12056),l=r(44579);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},77784(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(83207),s=r(52515),l=r(12888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new f(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new f(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),f=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=f;var p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},36863(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},63371(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},17064(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(81136),o=r(12670),i=r(23439),a=r(12056),s=r(12767),l=r(44579);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},76808(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},13353(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},92539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(76765);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},56416(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},41570(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5776);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},49287(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206),o=r(44579);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},75206(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);function l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},89019(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(75206);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},52307(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},87198(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},74864(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52871);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},25495(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(76765);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},55029(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(24098),a=r(34728),s=r(64398);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},87304(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},84236(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(55352),o=r(12670);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},11075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(76808);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},35485(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12888),o=r(74864);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},60091(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(466),o=r(74864);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},33433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(49850),o=r(74864);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},49622(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173),o=r(74864);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},96721(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728),o=r(23827);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},22518(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(40253),o=r(23439),i=r(12767),a=r(8173);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},46888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},66483(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(80453);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},10283(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},53160(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},75508(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},61754(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},61183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},40253(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},5017(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},83213(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(74864),o=r(46888),i=r(12888);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},8614(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,l,u,c,d,f,p,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,f=0,p=!1,h=!1,function(e){var t;f++,!r||p?(p=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){p=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){f--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===f&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},28480(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(81136);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},74775(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},2807(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},12519(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},34846(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},94558(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(95434),o=r(18244);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},70015(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(98072);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},65433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912),o=r(44579);t.switchAll=function(){return n.switchMap(o.identity)}},7912(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(76808),a=r(24098),s=r(64398);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},37865(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},11231(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568),s=r(80453);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},23439(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(37568),s=r(80453);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},51279(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},96518(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},31451(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(7653),s=r(83385);t.tap=function(e,t,r){return function(n){return n.lift(new l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},30464(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(64398);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},17661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(25190),s=r(30464);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},12056(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(81136),a=r(31396);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},15276(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(40253),i=r(93180),a=r(76808);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},88673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(43734),i=r(4053),a=r(21576);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},4053(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(25190),a=r(24465),s=r(64398);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},68858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(25190),o=r(76808);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},32284(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(22518);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},77544(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(64398);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},41565(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(31396),a=r(12888);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},43877(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(25190),s=r(31396),l=r(15390),u=r(18244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),f=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(p,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function p(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},5428(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(83207),s=r(15905),l=r(47849);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var f=l.subscribeToResult(this,s,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,c.add(f)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},39284(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(12888),a=r(15905),s=r(47849);t.windowWhen=function(e){return function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},91183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(15905),a=r(47849);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70887);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},53282(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70887);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},68822(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},90229(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207),i=r(57211);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},60002(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207),i=r(86676);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52515),o=r(83207);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},17315(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(60002),o=r(1138),i=r(68822),a=r(90229),s=r(26565),l=r(77328),u=r(51087),c=r(32555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},45666(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(83207).Subscription)},52883(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(80772);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(21076).AsyncAction)},93728(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(94333).AsyncScheduler)},21076(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(45666).Action)},94333(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(83849);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},46847(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(21076).AsyncAction)},5044(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(94333).AsyncScheduler)},52745(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52883);t.asapScheduler=new(r(93728)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},25190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(21076);t.asyncScheduler=new(r(94333)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},55677(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(46847);t.queueScheduler=new(r(5044)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},57211(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},86676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},4421(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},37568(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},81136(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},80772(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},16967(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},43734(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},61245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},54487(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31396);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},34163(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},44579(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},34728(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},51087(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},24465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},83385(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},26565(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86676);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},32555(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57211);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},15390(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34728);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},60194(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},77328(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},18244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},7653(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},55352(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},8173(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44579);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},87092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(70499),o=r(75259),i=r(98190),a=r(31021),s=r(51087),l=r(77328),u=r(60194),c=r(57211),d=r(86676);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},70499(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},98190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(57211);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},31021(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(86676);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},75259(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(34163);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},47849(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54470),o=r(87092),i=r(52515);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},25158(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(31396),o=r(4421),i=r(32544);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},56170(e,t,r){"use strict";r(38461).audit,r(32392).auditTime,r(37954).buffer,r(30647).bufferCount,r(16327).bufferTime,r(46786).bufferToggle,r(11662).bufferWhen,r(85503).catchError,r(24908).combineAll,r(89060).combineLatest,r(16600).concat,r(6345).concatAll,r(52248).concatMap,r(43577).concatMapTo,r(88765).count,r(23287).debounce,r(38066).debounceTime,r(12767).defaultIfEmpty,r(46965).delay,r(69861).delayWhen,r(47642).dematerialize,r(98820).distinct,r(21772).distinctUntilChanged,r(5075).distinctUntilKeyChanged,r(32399).elementAt,r(32631).endWith,r(47233).every,r(92408).exhaust,r(1112).exhaustMap,r(77736).expand,r(12670).filter,r(91258).finalize,r(15063).find,r(42939).findIndex,r(69948).first,r(77784).groupBy,r(36863).ignoreElements,r(63371).isEmpty,r(17064).last,t.map=r(76808).map,r(13353).mapTo,r(92539).materialize,r(56416).max,r(41570).merge,r(49287).mergeAll;var n=r(75206);n.mergeMap,n.flatMap,r(89019).mergeMapTo,r(52307).mergeScan,r(87198).min,r(74864).multicast,r(25495).observeOn,r(55029).onErrorResumeNext,r(87304).pairwise,r(84236).partition,r(11075).pluck,r(35485).publish,r(60091).publishBehavior,r(33433).publishLast,r(49622).publishReplay,r(96721).race,r(22518).reduce,r(66483).repeat,r(10283).repeatWhen,r(53160).retry,r(75508).retryWhen,r(46888).refCount,r(61754).sample,r(61183).sampleTime,r(40253).scan,r(5017).sequenceEqual,r(83213).share,r(8614).shareReplay,r(28480).single,r(74775).skip,r(2807).skipLast,r(12519).skipUntil,r(34846).skipWhile,r(94558).startWith,r(70015).subscribeOn,r(65433).switchAll,r(7912).switchMap,r(37865).switchMapTo,t.take=r(11231).take,r(23439).takeLast,r(51279).takeUntil,r(96518).takeWhile,r(31451).tap,r(30464).throttle,r(17661).throttleTime,r(12056).throwIfEmpty,r(15276).timeInterval,r(88673).timeout,r(4053).timeoutWith,r(68858).timestamp,r(32284).toArray,r(77544).window,r(41565).windowCount,r(43877).windowTime,r(5428).windowToggle,r(39284).windowWhen,r(91183).withLatestFrom,r(909).zip,r(53282).zipAll},43402(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,f,p,h,m;r.r(t),r.d(t,{GenderUnknownIcon:()=>pw,evaluateAsNumber:()=>ux,useOpenmrsSWR:()=>fp,Assessment1Pictogram:()=>Es,ChemistryIcon:()=>pn,StockManagementPictogram:()=>ET,importDynamic:()=>o3,BabyIcon:()=>f3,DashboardExtension:()=>hw,useFhirPagination:()=>d6,ArrowUpIcon:()=>f1,pictogramIds:()=>Eo,getDynamicOfflineDataHandlers:()=>lU,ActivityIcon:()=>fZ,compile:()=>uO,showActionableNotification:()=>SM,useForceUpdate:()=>d1,PatientBannerPatientIdentifiers:()=>Sq,TableBatchActions:()=>fz,getAsyncLifecycle:()=>dC,subscribeOpenmrsEvent:()=>l5,useVisit:()=>fk,TransferPictogram:()=>Ej,PasswordIcon:()=>pH,usePagination:()=>fh,useVisitContextStore:()=>fC,Assessment2Pictogram:()=>El,PatientBannerToggleContactDetailsButton:()=>S1,CloseOutlineIcon:()=>pc,ObstetricsPictogram:()=>Ex,CloseIcon:()=>pl,parseDateInput:()=>xR,useFeatureFlag:()=>d0,getConfig:()=>tF,attach:()=>cb,LabOrderIcon:()=>pj,VisitMode:()=>l8,getLocale:()=>wz,offlineUuidPrefix:()=>cU,useLocations:()=>fc,ActionMenuButton:()=>Di,isUrlWithTemplateParameters:()=>t6,getLifecycle:()=>dP,formatDatetime:()=>xk,getVisitsForPatient:()=>ui,useEmrConfiguration:()=>dZ,subscribeConnectivity:()=>b,useLeftNav:()=>fl,formatPartialDate:()=>xD,CustomOverflowMenu:()=>fW,ToolsIcon:()=>hr,ErrorState:()=>Sh,LocationIcon:()=>pM,GroupIcon:()=>pS,canBeginEditSynchronizationItemsOfType:()=>l$,ConditionsIcon:()=>hy,SaveIcon:()=>p1,VisitStatus:()=>l9,createUseStore:()=>c5,detach:()=>cv,getSessionLocation:()=>o$,setCurrentVisit:()=>ur,usePatient:()=>fg,useRenderableExtensions:()=>fv,useWorkspaces:()=>E5,setLeftNav:()=>cD,isDevEnabled:()=>oV,formatTime:()=>xC,useConfig:()=>dW,validator:()=>tc,syncOfflinePatientData:()=>l3,CalendarIcon:()=>f2,closeWorkspaceGroup2:()=>DD,getHistory:()=>ob,StickyNoteAddIcon:()=>p8,ConfigurableLink:()=>cG,subscribeSnackbarShown:()=>T,getPatientName:()=>SL,getVisitStore:()=>ut,getDynamicOfflineDataEntriesFor:()=>lH,getCoreTranslation:()=>op,GenderMaleIcon:()=>pv,getLoggedInUser:()=>oI,isOfflineUuid:()=>cK,getBreadcrumbs:()=>rn,evaluateAsNumberAsync:()=>uS,extractVariableNames:()=>uW,putDynamicOfflineDataFor:()=>lG,EditIcon:()=>pm,translateFrom:()=>of,putDynamicOfflineData:()=>lz,shallowEqual:()=>A,showSnackbar:()=>EV,Type:()=>tu,InPatientPictogram:()=>Eb,MaximizeIcon:()=>pN,getAttachmentsUrl:()=>o7,subscribeNotificationShown:()=>P,PatientBannerActionsMenu:()=>S0,useStoreWithActions:()=>c6,PatientSearchPictogram:()=>ES,WarningIcon:()=>hp,DocumentAttachmentIcon:()=>pf,fhirBaseUrl:()=>ox,matchLocale:()=>DV,registerBreadcrumb:()=>rt,CardiologyPictogram:()=>Ec,EventsIcon:()=>pg,ImageMedicalIcon:()=>pO,calculateInterpretation:()=>Sw,createGlobalStore:()=>K,usePatientPhoto:()=>Ee,getCurrentOfflineMode:()=>cA,useExtensionStore:()=>dX,closeWorkspace:()=>EX,DiagnosisTags:()=>Sc,createAttachment:()=>ie,iconIds:()=>fY,PatientsPictogram:()=>EE,TableIcon:()=>he,interpolateUrl:()=>oh,useLeftNavStore:()=>fu,Icon:()=>h_,InformationFilledIcon:()=>pC,subscribeToastShown:()=>k,LaboratoryPictogram:()=>Ev,detachAll:()=>c_,convertToLocaleCalendar:()=>xT,toDateObjectStrict:()=>xg,DocumentIcon:()=>pd,defineConfigSchema:()=>tI,ActionMenuButton2:()=>DB,setupDynamicOfflineDataHandler:()=>lW,filterBreadcrumbs:()=>ri,makeUrl:()=>oE,oneOf:()=>t8,launchWorkspaceGroup:()=>function e(t,r){let n=function(e){let t=cZ.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return E3}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?Ez(n?.name,()=>{e(t,r)}):E6(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),De(t,o),i?.(),s&&Eq(s.name,s.additionalProps??{})},PatientBannerContactDetails:()=>S8,selectPreferredName:()=>SU,getAssignedExtensions:()=>cx,syncDynamicOfflineData:()=>lJ,PatientPhoto:()=>En,MobileCheckIcon:()=>pF,createErrorHandler:()=>R,openmrsObservableFetch:()=>oO,MaterialOrderIcon:()=>pA,MicroscopeIcon:()=>pL,parseDate:()=>xv,getAttachmentByUuid:()=>o8,LeftNavMenu:()=>Sy,registerExtension:()=>cg,ShoppingCartAddItemIcon:()=>hb,PharmacyPictogram:()=>EO,ReferralOrderIcon:()=>pJ,AttachmentIcon:()=>hm,ReportIcon:()=>pX,MoneyIcon:()=>pB,getAttachments:()=>o9,DownloadIcon:()=>pp,PageHeaderContent:()=>SI,MedicationIcon:()=>pI,PrinterIcon:()=>pq,getFullSynchronizationItemsFor:()=>lM,PatientListsPictogram:()=>EN,ShoppingCartArrowDownIcon:()=>p5,provide:()=>tL,AppointmentsAltPictogram:()=>Ea,GenericOrderTypeIcon:()=>px,setupOfflineSync:()=>lB,useAppContext:()=>dI,removeDynamicOfflineDataFor:()=>lY,useConnectivity:()=>dH,ViewIcon:()=>hf,formattedName:()=>SV,sessionEndpoint:()=>oS,GeriatricsPictogram:()=>Ey,useExtensionSlotStore:()=>c7,unregisterContext:()=>oz,duration:()=>xI,SearchIcon:()=>p3,CaretLeftIcon:()=>f5,TableOfContentsIcon:()=>p7,isVersionSatisfied:()=>Dz,isOmrsDateToday:()=>xy,getExtensionStore:()=>u5,BloodBankPictogram:()=>Eu,EmptyCardIllustration:()=>Sf,PenIcon:()=>pG,TriagePictogram:()=>ER,Workspace2:()=>DA,CheckmarkOutlineIcon:()=>pr,refetchCurrentUser:()=>oM,registerOfflinePatientHandler:()=>l1,registerExtensionSlot:()=>cS,AllergiesIcon:()=>hh,ArrowDownIcon:()=>fQ,getGlobalStore:()=>z,reportError:()=>j,showToast:()=>EK,subscribeToContext:()=>oY,OpenmrsDatePicker:()=>Sl,ArrowRightIcon:()=>f0,getDynamicOfflineDataEntries:()=>lK,getLocaleDisplayName:()=>wH,messageOmrsServiceWorker:()=>ih,navigate:()=>oy,launchWorkspace2:()=>DO,registerBreadcrumbs:()=>rr,isUrl:()=>t5,CustomOverflowMenuItem:()=>fK,MotherIcon:()=>pV,CaretDownIcon:()=>f6,ArrowLeftIcon:()=>fX,FacilityPictogram:()=>Em,ViewOffIcon:()=>hd,fetchCurrentPatient:()=>l2,useDefineAppContext:()=>dR,useOnClickOutside:()=>fd,useOpenmrsInfinite:()=>d7,validators:()=>t9,MessageQueueIcon:()=>p$,TwoFactorAuthenticationIcon:()=>ha,Pharmacy2Pictogram:()=>EP,goBackInHistory:()=>ov,GroupAccessIcon:()=>pE,showNotification:()=>SR,getAsyncExtensionLifecycle:()=>dT,WorkspaceContainer:()=>Dx,queueSynchronizationItem:()=>lj,ListCheckedIcon:()=>pR,formatDurationBetween:()=>xL,ResponsiveWrapper:()=>EL,GynaecologyPictogram:()=>Eg,ShoppingCartIcon:()=>p6,defaultVisitCustomRepresentation:()=>l7,Pagination:()=>S$,getBreadcrumbsFor:()=>ra,CheckmarkFilledIcon:()=>pt,MetadataExportPictogram:()=>Ew,clearCurrentUser:()=>oA,useOpenmrsPagination:()=>d3,updateVisit:()=>uo,backendDependencies:()=>oU,ChevronUpIcon:()=>ps,MaybePictogram:()=>EI,beginEditSynchronizationItem:()=>lL,Pictogram:()=>E$,getStartedVisit:()=>ua,omrsOfflineResponseStatusHttpHeaderName:()=>cI,openmrsFetch:()=>oD,saveVisit:()=>un,HomePictogram:()=>EA,ChevronDownIcon:()=>po,DentistryPictogram:()=>Ef,OpenmrsDateRangePicker:()=>Su,ServiceQueuesPictogram:()=>Ek,deleteAttachmentPermanently:()=>it,OverflowMenuHorizontalIcon:()=>pW,getVisitTypes:()=>uu,launchWorkspace:()=>Eq,EventScheduleIcon:()=>py,DigitalTrustPictogram:()=>Ep,NumericObservation:()=>SE,attachmentUrl:()=>o5,getSessionStore:()=>oj,interpolateString:()=>om,inRange:()=>t2,registerContext:()=>oH,AppointmentsPictogram:()=>Ei,showModal:()=>SO,toLanguageTag:()=>wK,ProcedureOrderIcon:()=>pY,useAttachments:()=>dF,getRegisteredWorkspace2Names:()=>Dj,useConceptReferenceRange:()=>Sx,setSessionLocation:()=>oL,toLocationObject:()=>uc,useExtensionSlotMeta:()=>dQ,useOnVisible:()=>ff,ChartAverageIcon:()=>f7,ChartLineIcon:()=>pe,UserAvatarIcon:()=>hs,UserHasAccess:()=>fw,evaluateAsBooleanAsync:()=>uw,createDashboard:()=>hx,getFeatureFlag:()=>uq,getLocations:()=>ud,EmergencyDepartmentPictogram:()=>Eh,navigateAndLaunchWorkspace:()=>EY,getOfflineDb:()=>lO,getSynchronizationItem:()=>lI,renderExtension:()=>cM,omrsOfflineCachingStrategyHttpHeaderName:()=>c$,formatDate:()=>xO,toVisitTypeObject:()=>ul,useExtensionContext:()=>dJ,useFhirInfinite:()=>fo,useSession:()=>f_,SwitcherIcon:()=>p2,age:()=>SK,syncAllDynamicOfflineData:()=>lZ,useAssignedExtensionIds:()=>dL,useStore:()=>c2,isOmrsDateStrict:()=>xm,userHasAccess:()=>oN,CaretRightIcon:()=>f8,evaluateAsType:()=>uE,usePaginationInfo:()=>fm,evaluateAsync:()=>uv,PageHeader:()=>SN,TranslateIcon:()=>hn,useOpenmrsFetchAll:()=>ft,setUserProperties:()=>oF,MovementIcon:()=>pU,ageAsDuration:()=>SW,removeDynamicOfflineData:()=>lq,subscribePrecacheStaticDependencies:()=>w,getExtensionNameFromId:()=>cm,PaymentsDeskPictogram:()=>ED,useVisitTypes:()=>fT,usePrimaryIdentifierCode:()=>fb,updateContext:()=>oq,deleteSynchronizationItem:()=>lF,getCurrentUser:()=>oT,useLayoutType:()=>fa,ResetIcon:()=>p0,RenewIcon:()=>pQ,useWorkspace2Context:()=>DT,XrayPictogram:()=>EM,CaretUpIcon:()=>f9,subscribeActionableNotificationShown:()=>C,OpenmrsAppContext:()=>dM,ErrorCard:()=>Sm,GenderFemaleIcon:()=>pb,omrsOfflineResponseBodyHttpHeaderName:()=>cN,getOfflinePatientDataStore:()=>l0,retry:()=>DG,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(DW(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;DW(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},ExtensionSlot:()=>di,subscribeConnectivityChanged:()=>g,subscribeTo:()=>G,unsetLeftNav:()=>cO,useAbortController:()=>dN,Extension:()=>fj,getFhirServerPaginationHandlers:()=>d5,MaybeIcon:()=>hv,useConnectedExtensions:()=>dK,useCustomOverflowMenu:()=>fU,PedestrianFamilyIcon:()=>pz,generateOfflineUuid:()=>cW,HospitalBedIcon:()=>pD,CtScanPictogram:()=>Ed,OpenmrsFetchError:()=>oP,getSynchronizationItems:()=>lA,UserFollowIcon:()=>hl,RenderIfValueIsTruthy:()=>dA,launchWorkspaceGroup2:()=>DE,normalizeInterpretation:()=>S_,ChevronRightIcon:()=>pa,UserXrayIcon:()=>hu,GenderOtherIcon:()=>p_,CalendarHeatMapIcon:()=>f4,formatDuration:()=>xj,contextStore:()=>oW,registerFeatureFlag:()=>uG,restBaseUrl:()=>ow,getFullSynchronizationItems:()=>lN,useFhirFetchAll:()=>fn,toOmrsIsoString:()=>xb,Labs2Pictogram:()=>E_,PatientBannerPatientInfo:()=>SQ,evaluateAsBoolean:()=>u_,getDefaultCalendar:()=>xS,SettingsIcon:()=>p4,DrugOrderIcon:()=>ph,isOnline:()=>uY,setUserLanguage:()=>oR,useBodyScrollLock:()=>dB,SyringeIcon:()=>p9,LocationPicker:()=>Sg,ProgramsIcon:()=>pZ,useDebounce:()=>dz,TimeIcon:()=>ht,useAssignedExtensions:()=>dt,CloseFilledIcon:()=>pu,canAccessStorage:()=>DU,registerDefaultCalendar:()=>xx,TreeViewAltIcon:()=>hi,AddIcon:()=>fJ,OverflowMenuVerticalIcon:()=>pK,getConfigStore:()=>t_,InventoryManagementIcon:()=>pT,formatPatientName:()=>SB,UserIcon:()=>hc,getContext:()=>oG,InformationSquareIcon:()=>pk,EmptyCard:()=>Sp,ChevronLeftIcon:()=>pi,RadiologyIcon:()=>hg,displayName:()=>SF,evaluate:()=>ub,isDesktop:()=>fs,defineExtensionConfigSchema:()=>t$,RegistrationPictogram:()=>EC,CardHeader:()=>fN,getSyncLifecycle:()=>dk,InformationIcon:()=>pP,TrashCanIcon:()=>ho,evaluateAsTypeAsync:()=>uD});let y="openmrs:connectivity-changed";function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let x="openmrs:notification-shown",S="openmrs:actionable-notification-shown",E="openmrs:toast-shown",D="openmrs:snack-bar-shown";function O(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function P(e){let t=t=>e(t.detail);return window.addEventListener(x,t),()=>window.removeEventListener(x,t)}function C(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function k(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function T(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function j(e){let t=M(e);setTimeout(()=>{throw t})}function R(){let e=Error();return t=>{let r=M(t);r.stack+=`
2
2
  Async stacktrace:
3
- ${e.stack}`,T(t)}}function M(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function A(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function N(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),O({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),O({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let I=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>I(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>I(t)(e)}}},$=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},L=e=>e?$(e):$;function F(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let B={},V=Symbol.for("openmrs.esm-state.instanceCount"),U=globalThis,W=(U[V]??0)+1;function K(e,t,r="none"){let n=B[e];if(n)return n.active?F()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=G(e,t,r);return B[e]={value:n,active:!0},n}}function H(e,t){let r=B[e];return r?(r.active?F()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(B[e]={value:t,active:!0},t)}function z(e,t,r="none"){let n=B[e];if(!n){let n=G(e,t??{},r);return B[e]={value:n,active:!1},n}return n.value}function q(...e){let[t,r,n]=e,o=void 0===n?r:n,i=void 0===n?e=>e:r,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);A(a,t)||(a=t,o(t))})}function G(e,t,r){return"sessionStorage"===r?L()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let i,a,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=I(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>i.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let h=e((...e)=>{r(...e),f()},n,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return I(i.getItem.bind(i))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=s.merge(e,null!=(t=n())?t:h),!0),f()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:N(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:p))||void 0;return I(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(i=a.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||p}})(()=>t,{name:e,storage:N(()=>sessionStorage)})):L()(()=>t)}U[V]=W,W>1&&!F()&&console.error(`Detected ${W} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=B)},1e3);let Y=function(e){return void 0===e};var Z,J,Q,X,ee,et,er,en,eo,ei,ea=r(76922),es=r(18348),el=r(15647),eu=r(53098),ec=Object.prototype,ed=Function.prototype.toString,ef=ec.hasOwnProperty,ep=ed.call(Object);let eh=function(e){if(!(0,eu.A)(e)||"[object Object]"!=(0,es.A)(e))return!1;var t=(0,el.A)(e);if(null===t)return!0;var r=ef.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ed.call(r)==ep};var em=r(20013),ey=r(52528),eg=r(66984);let eb=function(e,t,r){(void 0===r||(0,eg.A)(e[t],r))&&(void 0!==r||t in e)||(0,ey.A)(e,t,r)},ev=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var e_=r(80154),ew=r(1801),ex=r(39759),eS=r(62042),eE=r(20018),eD=r(92049),eO=r(38446),eP=r(55254),eC=r(89610),ek=r(23149),ej=r(79415);let eT=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eR=r(22031),eM=r(87591);let eA=function(e,t,r,n,o,i,a){var s=eT(e,r),l=eT(t,r),u=a.get(l);if(u)return void eb(e,r,u);var c=i?i(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var f=(0,eD.A)(l),p=!f&&(0,eP.A)(l),h=!f&&!p&&(0,ej.A)(l);(c=l,f||p||h)?(0,eD.A)(s)?c=s:(0,eu.A)(s)&&(0,eO.A)(s)?c=(0,ex.A)(s):p?(d=!1,c=(0,e_.A)(l,!0)):h?(d=!1,c=(0,ew.A)(l,!0)):c=[]:eh(l)||(0,eE.A)(l)?(c=s,(0,eE.A)(s))?c=(0,eR.A)(s,(0,eM.A)(s)):(!(0,ek.A)(s)||(0,eC.A)(s))&&(c=(0,eS.A)(l)):d=!1}d&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),eb(e,r,c)},eN=function e(t,r,n,o,i){t!==r&&ev(r,function(a,s){if(i||(i=new em.A),(0,ek.A)(a))eA(t,r,s,n,e,o,i);else{var l=o?o(eT(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),eb(t,s,l)}},eM.A)},eI=function(e){return e},e$=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var eL=Math.max;let eF=function(e,t,r){return t=eL(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=eL(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),e$(e,this,s)}};var eB=r(84171),eV=eB.A?function(e,t){return(0,eB.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eI,eU=Date.now,eW=(Z=0,J=0,function(){var e=eU(),t=16-(e-J);if(J=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return eV.apply(void 0,arguments)}),eK=r(25353);let eH=function(e,t,r){if(!(0,ek.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,eO.A)(r)&&(0,eK.A)(t,r.length)):"string"==n&&t in r)&&(0,eg.A)(r[t],e)},ez=function(e){var t;return eW(eF(t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&eH(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t},void 0,eI),t+"")};var eq=ez(function(e,t,r,n){eN(e,t,r,n)}),eG=r(58646),eY=r(45572),eZ=r(10098),eJ=r(61882),eQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eX=/^\w*$/;let e0=function(e,t){if((0,eD.A)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,eJ.A)(e))||eX.test(e)||!eQ.test(e)||null!=t&&e in Object(t)};var e1=r(51046);function e3(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(e3.Cache||e1.A),r}e3.Cache=e1.A;var e4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e2=/\\(\\)?/g,e6=(X=(Q=e3(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(e4,function(e,r,n,o){t.push(n?o.replace(e2,"$1"):r||e)}),t},function(e){return 500===X.size&&X.clear(),e})).cache,Q),e5=r(24898);let e8=function(e,t){return(0,eD.A)(e)?e:e0(e,t)?[e]:e6((0,e5.A)(e))},e9=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var e7=1/0;let te=function(e){if("string"==typeof e||(0,eJ.A)(e))return e;var t=e+"";return"0"==t&&1/e==-e7?"-0":t},tt=function(e,t){t=e8(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[te(t[r++])];return r&&r==n?e:void 0};var tr=r(37688);let tn=function(e,t){var r,n;return t=e8(t,e),r=e,null==(e=(n=t).length<2?r:tt(r,(0,tr.A)(n,0,-1)))||delete e[te(e9(t))]},to=function(e){return eh(e)?void 0:e};var ti=r(76335),ta=r(83973),ts=eW(eF(ee=function(e,t){var r={};if(null==e)return r;var n=!1;t=(0,eY.A)(t,function(t){return t=e8(t,e),n||(n=t.length>1),t}),(0,eR.A)(e,(0,ta.A)(e),r),n&&(r=(0,eZ.A)(r,7,to));for(var o=t.length;o--;)tn(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?(0,ti.A)(e,1):[]}),ee+""),tl=r(20903),tu=((et={}).Array="Array",et.Boolean="Boolean",et.ConceptUuid="ConceptUuid",et.Number="Number",et.Object="Object",et.String="String",et.UUID="UUID",et.PersonAttributeTypeUuid="PersonAttributeTypeUuid",et.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",et);function tc(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let td=tc(e=>Array.isArray(e),"must be an array"),tf=tc(e=>"boolean"==typeof e,"must be a boolean"),tp=tc(e=>"number"==typeof e,"must be a number"),th=tc(e=>"string"==typeof e,"must be a string"),tm=tc(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),ty=tc(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string"),tg=K("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),tb=K("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});tb.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tv=K("config-store-of-extension-state",{mountedExtensions:[]});function t_(e){return z(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tw(){return z("config-extension-slots",{slots:{}})}function tx(){return z("config-extensions",{configs:{}})}function tS(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}let tE=L()(()=>({config:{}})),tD=0,tO=!0,tP=!1;function tC(){if(tO&&n&&!tP){tP=!0,tO=!1;try{n()}catch(e){tO=!0,tk(e),console.error("Failed to derive the implementer tools config",e)}finally{tP=!1}}}function tk(e){tE.setState({derivationError:e instanceof Error?e.message:String(e)})}let tj=H("config-implementer-tools",{...tE,getState:()=>(0===tD&&tC(),tE.getState()),setState:(...e)=>(tO=!1,tE.setState(...e)),subscribe(e){tD++,tC();let t=tE.subscribe(e),r=!1;return()=>{!r&&(r=!0,tD--),t()}}});function tT(e,t){if(Array.isArray(t))return t}function tR(e,t){return eq({},e,t,tT)}function tM(){let e=tg.getState(),t=tb.getState(),r=tv.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=t_(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=tN.get(r);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=a?function(e,t,r){let n=t.schemas[e],o=tH(e,tW(t,r));tq(n,o,e);let i=tJ(n,o);return tG(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=tJ(t4,tH(e,tW(t,r)));return tG(t4,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},tN.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&(0,eG.A)(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=tz(tW(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&t1(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||t1(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||t1(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||t1(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!tX(e.configure)&&t1(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let i={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))i[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:tz(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=tw(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&(0,eG.A)(e.config,i)?n[t]=e:(n[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=tx(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=tB.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,f=tW(o,i),p=a?.configure?.[n]??{},h=tH(e,f),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=tz([tH(d,f),p,m]),g=l??o.schemas[t];tq(g,y,d);let b=tJ(g,y);return tG(g,b,d),delete b.extensionSlots,tB.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&(0,eG.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,r,t,n),tO=!0,tD>0&&tC()}function tA(){tE.getState().derivationError&&tE.setState({derivationError:void 0});try{tM()}catch(e){tk(e),console.error("Failed to recompute the configuration",e)}}n=()=>{var e,t;let r,n;return e=tg.getState(),t=tb.getState(),r=tj.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=tU.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:tX(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}((0,tl.A)(n));tU.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=tV.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===a[t])){i[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=tR(l,function e(t,r){return tX(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),tV.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void((0,eG.A)(r.config,n.config)||tj.setState(n))},tM(),[].push(tg.subscribe(tA),tb.subscribe(tA),tv.subscribe(tA));let tN=new Map;function tI(e,t){tK(e,t);let r=tR(t,t4);tg.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function t$(e,t){tK(e,t);let r=tR(t,t4);tg.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),tg.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function tL(e,t="provided"){tg.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function tF(e){var t,r,n;return t=t_(e),r=e=>!!(e.loaded&&e.config),n=e=>ts(e.config,["Display conditions","Translation overrides"]),new Promise(e=>{let o,i=!1;function a(t){!i&&r(t)&&(i=!0,e(n(t)),o?.())}a(t.getState()),i||(o=t.subscribe(a))})}let tB=new Map,tV=new Map,tU=new Map;function tW(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function tK(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let i=r+(r&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!tX(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||tK(e,a,i);let s=a._elements;if(tQ(s)&&tK(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${n}.
3
+ ${e.stack}`,j(t)}}function M(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function A(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function N(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),O({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),O({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let I=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>I(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>I(t)(e)}}},$=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},L=e=>e?$(e):$;function F(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let B={},V=Symbol.for("openmrs.esm-state.instanceCount"),U=globalThis,W=(U[V]??0)+1;function K(e,t,r="none"){let n=B[e];if(n)return n.active?F()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=q(e,t,r);return B[e]={value:n,active:!0},n}}function H(e,t){let r=B[e];return r?(r.active?F()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(B[e]={value:t,active:!0},t)}function z(e,t,r="none"){let n=B[e];if(!n){let n=q(e,t??{},r);return B[e]={value:n,active:!1},n}return n.value}function G(...e){let[t,r,n]=e,o=void 0===n?r:n,i=void 0===n?e=>e:r,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);A(a,t)||(a=t,o(t))})}function q(e,t,r){return"sessionStorage"===r?L()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let i,a,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=I(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>i.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let h=e((...e)=>{r(...e),f()},n,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return I(i.getItem.bind(i))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=s.merge(e,null!=(t=n())?t:h),!0),f()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:N(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:p))||void 0;return I(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(i=a.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||p}})(()=>t,{name:e,storage:N(()=>sessionStorage)})):L()(()=>t)}U[V]=W,W>1&&!F()&&console.error(`Detected ${W} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=B)},1e3);let Y=function(e){return void 0===e};var Z,J,Q,X,ee,et,er,en,eo,ei,ea=r(76922),es=r(18348),el=r(15647),eu=r(53098),ec=Object.prototype,ed=Function.prototype.toString,ef=ec.hasOwnProperty,ep=ed.call(Object);let eh=function(e){if(!(0,eu.A)(e)||"[object Object]"!=(0,es.A)(e))return!1;var t=(0,el.A)(e);if(null===t)return!0;var r=ef.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ed.call(r)==ep};var em=r(20013),ey=r(52528),eg=r(66984);let eb=function(e,t,r){(void 0===r||(0,eg.A)(e[t],r))&&(void 0!==r||t in e)||(0,ey.A)(e,t,r)},ev=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var e_=r(80154),ew=r(1801),ex=r(39759),eS=r(62042),eE=r(20018),eD=r(92049),eO=r(38446),eP=r(55254),eC=r(89610),ek=r(23149),eT=r(79415);let ej=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eR=r(22031),eM=r(87591);let eA=function(e,t,r,n,o,i,a){var s=ej(e,r),l=ej(t,r),u=a.get(l);if(u)return void eb(e,r,u);var c=i?i(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var f=(0,eD.A)(l),p=!f&&(0,eP.A)(l),h=!f&&!p&&(0,eT.A)(l);(c=l,f||p||h)?(0,eD.A)(s)?c=s:(0,eu.A)(s)&&(0,eO.A)(s)?c=(0,ex.A)(s):p?(d=!1,c=(0,e_.A)(l,!0)):h?(d=!1,c=(0,ew.A)(l,!0)):c=[]:eh(l)||(0,eE.A)(l)?(c=s,(0,eE.A)(s))?c=(0,eR.A)(s,(0,eM.A)(s)):(!(0,ek.A)(s)||(0,eC.A)(s))&&(c=(0,eS.A)(l)):d=!1}d&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),eb(e,r,c)},eN=function e(t,r,n,o,i){t!==r&&ev(r,function(a,s){if(i||(i=new em.A),(0,ek.A)(a))eA(t,r,s,n,e,o,i);else{var l=o?o(ej(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),eb(t,s,l)}},eM.A)},eI=function(e){return e},e$=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var eL=Math.max;let eF=function(e,t,r){return t=eL(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=eL(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),e$(e,this,s)}};var eB=r(84171),eV=eB.A?function(e,t){return(0,eB.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eI,eU=Date.now,eW=(Z=0,J=0,function(){var e=eU(),t=16-(e-J);if(J=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return eV.apply(void 0,arguments)}),eK=r(25353);let eH=function(e,t,r){if(!(0,ek.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,eO.A)(r)&&(0,eK.A)(t,r.length)):"string"==n&&t in r)&&(0,eg.A)(r[t],e)},ez=function(e){var t;return eW(eF(t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&eH(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t},void 0,eI),t+"")};var eG=ez(function(e,t,r,n){eN(e,t,r,n)}),eq=r(58646),eY=r(45572),eZ=r(10098),eJ=r(61882),eQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eX=/^\w*$/;let e0=function(e,t){if((0,eD.A)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,eJ.A)(e))||eX.test(e)||!eQ.test(e)||null!=t&&e in Object(t)};var e1=r(51046);function e3(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(e3.Cache||e1.A),r}e3.Cache=e1.A;var e4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e2=/\\(\\)?/g,e6=(X=(Q=e3(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(e4,function(e,r,n,o){t.push(n?o.replace(e2,"$1"):r||e)}),t},function(e){return 500===X.size&&X.clear(),e})).cache,Q),e5=r(24898);let e8=function(e,t){return(0,eD.A)(e)?e:e0(e,t)?[e]:e6((0,e5.A)(e))},e9=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var e7=1/0;let te=function(e){if("string"==typeof e||(0,eJ.A)(e))return e;var t=e+"";return"0"==t&&1/e==-e7?"-0":t},tt=function(e,t){t=e8(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[te(t[r++])];return r&&r==n?e:void 0};var tr=r(37688);let tn=function(e,t){var r,n;return t=e8(t,e),r=e,null==(e=(n=t).length<2?r:tt(r,(0,tr.A)(n,0,-1)))||delete e[te(e9(t))]},to=function(e){return eh(e)?void 0:e};var ti=r(76335),ta=r(83973),ts=eW(eF(ee=function(e,t){var r={};if(null==e)return r;var n=!1;t=(0,eY.A)(t,function(t){return t=e8(t,e),n||(n=t.length>1),t}),(0,eR.A)(e,(0,ta.A)(e),r),n&&(r=(0,eZ.A)(r,7,to));for(var o=t.length;o--;)tn(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?(0,ti.A)(e,1):[]}),ee+""),tl=r(20903),tu=((et={}).Array="Array",et.Boolean="Boolean",et.ConceptUuid="ConceptUuid",et.Number="Number",et.Object="Object",et.String="String",et.UUID="UUID",et.PersonAttributeTypeUuid="PersonAttributeTypeUuid",et.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",et);function tc(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let td=tc(e=>Array.isArray(e),"must be an array"),tf=tc(e=>"boolean"==typeof e,"must be a boolean"),tp=tc(e=>"number"==typeof e,"must be a number"),th=tc(e=>"string"==typeof e,"must be a string"),tm=tc(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),ty=tc(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string"),tg=K("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),tb=K("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});tb.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tv=K("config-store-of-extension-state",{mountedExtensions:[]});function t_(e){return z(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tw(){return z("config-extension-slots",{slots:{}})}function tx(){return z("config-extensions",{configs:{}})}function tS(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}let tE=L()(()=>({config:{}})),tD=0,tO=!0,tP=!1;function tC(){if(tO&&n&&!tP){tP=!0,tO=!1;try{n()}catch(e){tO=!0,tk(e),console.error("Failed to derive the implementer tools config",e)}finally{tP=!1}}}function tk(e){tE.setState({derivationError:e instanceof Error?e.message:String(e)})}let tT=H("config-implementer-tools",{...tE,getState:()=>(0===tD&&tC(),tE.getState()),setState:(...e)=>(tO=!1,tE.setState(...e)),subscribe(e){tD++,tC();let t=tE.subscribe(e),r=!1;return()=>{!r&&(r=!0,tD--),t()}}});function tj(e,t){if(Array.isArray(t))return t}function tR(e,t){return eG({},e,t,tj)}function tM(){let e=tg.getState(),t=tb.getState(),r=tv.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=t_(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=tN.get(r);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=a?function(e,t,r){let n=t.schemas[e],o=tH(e,tW(t,r));tG(n,o,e);let i=tJ(n,o);return tq(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=tJ(t4,tH(e,tW(t,r)));return tq(t4,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},tN.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&(0,eq.A)(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=tz(tW(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&t1(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||t1(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||t1(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||t1(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!tX(e.configure)&&t1(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let i={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))i[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:tz(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=tw(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&(0,eq.A)(e.config,i)?n[t]=e:(n[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=tx(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=tB.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,f=tW(o,i),p=a?.configure?.[n]??{},h=tH(e,f),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=tz([tH(d,f),p,m]),g=l??o.schemas[t];tG(g,y,d);let b=tJ(g,y);return tq(g,b,d),delete b.extensionSlots,tB.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&(0,eq.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,r,t,n),tO=!0,tD>0&&tC()}function tA(){tE.getState().derivationError&&tE.setState({derivationError:void 0});try{tM()}catch(e){tk(e),console.error("Failed to recompute the configuration",e)}}n=()=>{var e,t;let r,n;return e=tg.getState(),t=tb.getState(),r=tT.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=tU.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:tX(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}((0,tl.A)(n));tU.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=tV.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===a[t])){i[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=tR(l,function e(t,r){return tX(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),tV.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void((0,eq.A)(r.config,n.config)||tT.setState(n))},tM(),[].push(tg.subscribe(tA),tb.subscribe(tA),tv.subscribe(tA));let tN=new Map;function tI(e,t){tK(e,t);let r=tR(t,t4);tg.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function t$(e,t){tK(e,t);let r=tR(t,t4);tg.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),tg.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function tL(e,t="provided"){tg.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function tF(e){var t,r,n;return t=t_(e),r=e=>!!(e.loaded&&e.config),n=e=>ts(e.config,["Display conditions","Translation overrides"]),new Promise(e=>{let o,i=!1;function a(t){!i&&r(t)&&(i=!0,e(n(t)),o?.())}a(t.getState()),i||(o=t.subscribe(a))})}let tB=new Map,tV=new Map,tU=new Map;function tW(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function tK(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let i=r+(r&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!tX(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||tK(e,a,i);let s=a._elements;if(tQ(s)&&tK(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${n}.
4
4
 
5
5
  If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=a._type;l&&!Object.values(tu).includes(l)&&console.error(`${e} has invalid type for key '${i}' ${n}.
6
6
 
@@ -8,20 +8,20 @@ If you're the maintainer: the allowed types are ${Object.values(tu).join(", ")}.
8
8
 
9
9
  If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&l&&![tu.Array,tu.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${i}'. ${n}.
10
10
 
11
- If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function tH(e,t){return tz(t.map(({[e]:t})=>t).filter(e=>!!e))}function tz(e){return e.reduce((e,t)=>eq(e,t,tT),{})}function tq(e,t,r=""){for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&t1(i,`Unknown config key '${i}' provided. Ignoring.`);continue}(function e(t,r,n){tY(n,t._type,r),tX(r)?t._type===tu.Object?function(t,r,n){if(t._elements)for(let o of Object.keys(r)){let i=r[o];e(t._elements,i,`${n}.${o}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||tq(t,r,n):t._type===tu.Array&&function(t,r,n){if(tY(n,tu.Array,r)){if(tQ(t._elements))for(let o=0;o<r.length;o++)e(t._elements,r[o],`${n}[${o}]`);for(let e=0;e<r.length;e++)tY(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(a,o,i)}}function tG(e,t,r=""){if(e){if(t!==e._default&&tZ(r,e._validators,t),tX(t))for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];e._type===tu.Object&&e._elements?tG(e._elements,o,i):tG(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)tG(e._elements,t[n],`${r}[${n}]`)}}function tY(e,t,r){return!t||tZ(e,[{Array:td,Boolean:tf,ConceptUuid:ty,Number:tp,Object:tm,String:th,UUID:ty,PersonAttributeTypeUuid:ty,PatientIdentifierTypeUuid:ty}[t]],r)}function tZ(e,t,r){let n=!0;if(t)try{for(let o of t){let t=o(r);if("string"==typeof t){let o="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;t1(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
- ${t}`)}return n}let tJ=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&tQ(e)){if(o._type===tu.Array&&Array.isArray(n)){let o=n.map(t=>tJ(e,t));r[t]=o}else if(o._type===tu.Object)for(let t of Object.keys(n))n[t]=tJ(e,n[t])}}else if(tX(o)){let e=n??{};tX(e)&&(r[t]=tJ(o,e))}}return r};function tQ(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function tX(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let t0=new Set;function t1(e,t){let r=`${e}:::${t}`;t0||(t0=new Set),t0.has(r)||(console.error(t),t0.add(r))}let t3={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:tu.Object,_default:{},_validators:[tc(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},t4={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tu.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tu.String,_default:void 0}},...t3},t2=(e,t)=>tc(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),t6=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tc(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},t5=t6([]),t8=e=>tc(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),t9={inRange:t2,isUrl:t5,isUrlWithTemplateParameters:t6,oneOf:t8};var t7=r(48067);let re=K("breadcrumbs",[]);function rt(e){return rr([e])}function rr(e){let t=[...rn(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,t7.pathToRegexp)(e.matcher).regexp:(0,t7.pathToRegexp)(e.path).regexp,settings:e}))];re.setState(t,!0)}function rn(){return re.getState()}function ro(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=ro(e,r.join("/"));if(t)return t}}(e,t)}function ri(e,t){if(e.length>0){let r=ro(e,t);if(r){let t=[r],n=ro(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=ro(e,n.settings.parent);return t.reverse()}}return[]}function ra(e){return ri(rn(),e)}var rs=Object.freeze({__proto__:null,get start(){return nT},get ensureJQuerySupport(){return na},get setBootstrapMaxTime(){return rJ},get setMountMaxTime(){return rQ},get setUnmountMaxTime(){return rX},get setUnloadMaxTime(){return r0},get registerApplication(){return ng},get unregisterApplication(){return nv},get getMountedApps(){return np},get getAppStatus(){return nm},get unloadApplication(){return n_},get checkActivityFunctions(){return nb},get getAppNames(){return nh},get pathToActiveWhen(){return nS},get navigateToUrl(){return r8},get patchHistoryApi(){return nn},get triggerAppChange(){return nP},get addErrorHandler(){return rf},get removeErrorHandler(){return rp},get mountRootParcel(){return rz},get NOT_LOADED(){return ry},get LOADING_SOURCE_CODE(){return rg},get NOT_BOOTSTRAPPED(){return rb},get BOOTSTRAPPING(){return rv},get NOT_MOUNTED(){return r_},get MOUNTING(){return rw},get UPDATING(){return rS},get LOAD_ERROR(){return rO},get MOUNTED(){return rx},get UNLOADING(){return rD},get UNMOUNTING(){return rE},get SKIP_BECAUSE_BROKEN(){return rP}}),rl=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,ru=!function(){try{var e=new rl("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:rl;let rc=[];function rd(e,t,r){let n=rm(e,t,r);rc.length?rc.forEach(e=>e(n)):setTimeout(()=>{throw n})}function rf(e){if("function"!=typeof e)throw Error(rh(28,!1));rc.push(e)}function rp(e){if("function"!=typeof e)throw Error(rh(29,!1));let t=!1;return rc=rc.filter(r=>{let n=r===e;return t=t||n,!n}),t}function rh(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function rm(e,t,r){let n,o=`${rR(t)} '${rj(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(rh(30,!1,t.status,rj(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=rj(t),t.status=r,n}let ry="NOT_LOADED",rg="LOADING_SOURCE_CODE",rb="NOT_BOOTSTRAPPED",rv="BOOTSTRAPPING",r_="NOT_MOUNTED",rw="MOUNTING",rx="MOUNTED",rS="UPDATING",rE="UNMOUNTING",rD="UNLOADING",rO="LOAD_ERROR",rP="SKIP_BECAUSE_BROKEN";function rC(e){return e.status===rx}function rk(e){try{return e.activeWhen(window.location)}catch(t){return rd(t,e,rP),!1}}function rj(e){return e.name}function rT(e){return!!e.unmountThisParcel}function rR(e){return rT(e)?"parcel":"application"}function rM(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function rA(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function rN(e){return e&&("function"==typeof e||Array.isArray(e)&&!rA(e,e=>"function"!=typeof e))}function rI(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=rR(e),o=rj(e);return function(e){return r.reduce((r,i,a)=>r.then(()=>{let r=i(e);return r$(r)?r:Promise.reject(rh(15,!1,n,o,t,a))}),Promise.resolve())}}function r$(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let rL=[];function rF(e,t){return Promise.resolve().then(()=>e.status!==rb?e:(e.status=rv,e.bootstrap?r1(e,"bootstrap").then(r).catch(r=>{if(t)throw rm(r,e,rP);return rd(r,e,rP),e}):Promise.resolve().then(r)));function r(){return e.status=r_,e}}function rB(e,t){return Promise.resolve().then(()=>{if(e.status!==rx)return e;return e.status=rE,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw rm(r,e,rP);rd(r,e,rP)})).then(()=>e);function r(){return r1(e,"unmount").then(()=>{e.status=r_},r=>{if(t)throw rm(r,e,rP);rd(r,e,rP)})}})}let rV=!1,rU=!1;function rW(e,t){return Promise.resolve().then(()=>e.status!==r_?e:(rV||(window.dispatchEvent(new ru("single-spa:before-first-mount")),rV=!0),e.status=rw,r1(e,"mount").then(()=>(e.status=rx,rU||(window.dispatchEvent(new ru("single-spa:first-mount")),rU=!0),e)).catch(r=>{return e.status=rx,rB(e,!0).then(n,n);function n(){if(t)throw rm(r,e,rP);return rd(r,e,rP),e}})))}let rK=0,rH={parcels:{}};function rz(){return rq.apply(rH,arguments)}function rq(e,t){let r,n,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(rh(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(rh(3,!1,typeof e.name));let a=rK++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(rh(4,!1,s,typeof t));if(!t.domElement)throw Error(rh(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?rg:rb,customProps:t,parentName:rj(i),unmountThisParcel:()=>p.then(()=>{if(c.status!==rx)throw Error(rh(6,!1,s,c.status));return rB(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=rP,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(rh(7,!1));let f=(d=d.then(e=>{if(!e)throw Error(rh(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!rN(e.bootstrap))throw Error(rh(9,!1,s));if(!rN(e.mount))throw Error(rh(10,!1,s));if(!rN(e.unmount))throw Error(rh(11,!1,s));if(e.update&&!rN(e.update))throw Error(rh(12,!1,s));let t=rI(e,"bootstrap"),n=rI(e,"mount"),o=rI(e,"unmount");c.status=rb,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=r3(e.timeouts),e.update&&(c.update=rI(e,"update"),r.update=function(e){return c.customProps=e,rG(Promise.resolve().then(()=>{if(c.status!==rx)throw Error(rh(32,!1,rj(c)));return c.status=rS,r1(c,"update").then(()=>(c.status=rx,c)).catch(e=>{throw rm(e,c,rP)})}))})})).then(()=>rF(c,!0)),p=f.then(()=>rW(c,!0)),h=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>rG(Promise.resolve().then(()=>{if(c.status!==r_)throw Error(rh(13,!1,s,c.status));return i.parcels[a]=c,rW(c)})),unmount:()=>rG(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rG(d),bootstrapPromise:rG(f),mountPromise:rG(p),unmountPromise:rG(h)}}function rG(e){return e.then(()=>null)}function rY(e){let t=rj(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(rh(40,!1),t,r));let n=rM({},r,{name:t,mountParcel:rq.bind(e),singleSpa:rs});return rT(e)&&(n.unmountSelf=e.unmountThisParcel),n}let rZ={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rJ(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(16,!1));rZ.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rQ(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(17,!1));rZ.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rX(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(18,!1));rZ.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function r0(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(19,!1));rZ.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function r1(e,t){let r=e.timeouts[t],n=r.warningMillis,o=rR(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](rY(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=rh(31,!1,t,o,rj(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function r3(e){let t={};for(let r in rZ)t[r]=rM({},rZ[r],e&&e[r]||{});return t}function r4(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==ry&&e.status!==rO?e:(e.status=rg,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(rY(e));if(!r$(n))throw r=!0,Error(rh(33,!1,rj(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!rN(t.bootstrap)&&(n=35),rN(t.mount)||(n=36),rN(t.unmount)||(n=37);let o=rR(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(rh(n,!1,o,rj(e),r),t),rd(void 0,e,rP),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=rM({},e.devtools.overlays,t.devtools.overlays)),e.status=rb,e.bootstrap=rI(t,"bootstrap"),e.mount=rI(t,"mount"),e.unmount=rI(t,"unmount"),e.unload=rI(t,"unload"),e.timeouts=r3(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=rP:(n=rO,e.loadErrorTime=(new Date).getTime()),rd(t,e,n),e}))})}let r2="u">typeof window,r6={hashchange:[],popstate:[]},r5=["hashchange","popstate"];function r8(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(rh(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=no(window.location.href),n=no(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function r9(e){if(e){let t=e[0].type;r5.indexOf(t)>=0&&r6[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function r7(){nC([],arguments)}function ne(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),i=window.location.href;return o&&r===i||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let nt=null,nr=!1;function nn(e){if(nr)throw Error(rh(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,nr=!0,nt=window.history.replaceState,window.addEventListener("hashchange",r7),window.addEventListener("popstate",r7);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&r5.indexOf(e)>=0)||rA(r6[e],e=>e===r))return t.apply(this,arguments);r6[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&r5.indexOf(e)>=0&&(r6[e]=r6[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ne(window.history.pushState,"pushState"),window.history.replaceState=ne(nt,"replaceState")}function no(e){let t=document.createElement("a");return t.href=e,t}r2&&(window.singleSpaNavigate?console.warn(rh(41,!1)):window.singleSpaNavigate=r8);let ni=!1;function na(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ni){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ns.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ns.call(this,r,window.removeEventListener,e,t,arguments)},ni=!0}}function ns(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{r5.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let nl={};function nu(e){return Promise.resolve().then(()=>{let t=nl[rj(e)];if(!t)return e;if(e.status===ry)return nc(e,t),e;if(e.status===rD)return t.promise.then(()=>e);if(e.status!==r_&&e.status!==rO)return e;let r=e.status===rO?Promise.resolve():r1(e,"unload");return e.status=rD,r.then(()=>(nc(e,t),e)).catch(r=>(delete nl[rj(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,rd(r,e,rP),t.reject(r),e))})}function nc(e,t){delete nl[rj(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=ry,t.resolve()}function nd(e,t,r,n){nl[rj(e)]={app:e,resolve:r,reject:n},Object.defineProperty(nl[rj(e)],"promise",{get:t})}let nf=[];function np(){return nf.filter(rC).map(rj)}function nh(){return nf.map(rj)}function nm(e){let t=rA(nf,t=>rj(t)===e);return t?t.status:null}let ny=!1;function ng(e,t,r,n){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(rh(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(rh(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(rh(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(rh(24,!1));if(!nx(e.customProps))throw Error(rh(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(rh(20,!1));if(!t)throw Error(rh(23,!1));if("function"!=typeof r)throw Error(rh(24,!1));if(!nx(n))throw Error(rh(22,!1))}(e,t,r,n),a.name=e,a.loadApp=t,a.activeWhen=r,a.customProps=n),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:nS(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(nj||ny||(ny=!0,setTimeout(()=>{nj||console.warn(rh(1,!1))},5e3)),-1!==nh().indexOf(l.name))throw Error(rh(21,!1,l.name));nf.push(rM({loadErrorTime:null,status:ry,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),r2&&(na(),nC())}function nb(e=window.location){return nf.filter(t=>t.activeWhen(e)).map(rj)}function nv(e){if(0===nf.filter(t=>rj(t)===e).length)throw Error(rh(25,!1,e));return(r2?n_(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=nf.map(rj).indexOf(e);nf.splice(t,1)})}function n_(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(rh(26,!1));let r=rA(nf,t=>rj(t)===e);if(!r)throw Error(rh(27,!1,e));let n=nl[rj(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{nd(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,nw(r,n.resolve,n.reject)):e=new Promise((t,n)=>{nd(r,()=>e,t,n),nw(r,t,n)}),e}}function nw(e,t,r){Promise.resolve().then(()=>{if(rA(nb(),t=>t===rj(e)))return nP()}).then(()=>rB(e).then(nu).then(()=>{t(),setTimeout(()=>{nC()})})).catch(r)}function nx(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function nS(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":a,i===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let nE=!1,nD=[],nO=r2&&window.location.href;function nP(){return nC()}function nC(e=[],t,r=!1){let n,o,i,a,s;if(nE)return new Promise((e,r)=>{nD.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],i=[],a=[],s=(new Date).getTime(),nf.forEach(e=>{let t=e.status!==rP&&rk(e);switch(e.status){case rO:t&&s-e.loadErrorTime>=200&&i.push(e);break;case ry:case rg:t&&i.push(e);break;case rb:case r_:!t&&nl[rj(e)]?n.push(e):t&&a.push(e);break;case rx:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:a}),f,p=[],h=nO,m=nO=window.location.href;return nj?(nE=!0,f=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===f.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(p).then(r=>{if(r.some(e=>e))return nt.call(window.history,history.state,"",h.substring(location.origin.length)),nO=location.href,nE=!1,nC(e,t,!0);let n=l.map(nu),o=Promise.all(u.map(rB).map(e=>e.then(nu)).concat(n));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>r4(e).then(e=>nk(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>nk(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(f=c,Promise.resolve().then(()=>Promise.all(c.map(r4)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch(e=>(console.warn(Error(rh(42,!1))),console.warn(e),!1)))}function g(){let t=np();e.forEach(e=>e.resolve(t));try{w(0===f.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(nE=!1,nD.length>0){let e=nD;nD=[],nC(e)}return t}function b(){r||(e.forEach(e=>{r9(e.eventArguments)}),r9(t))}function v(e=!1,r){let n={},o={[rx]:[],[r_]:[],[ry]:[],[rP]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,rx)}),l.forEach(e=>{a(e,ry)}),u.forEach(e=>{a(e,r_)})):f.forEach(e=>{a(e)});let i={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:f.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return r&&rM(i.detail,r),i;function a(e,t){let r=rj(e);t=t||nm(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new ru(`single-spa:${e}`,t))}}function nk(e,t){return rk(e)?rF(e).then(e=>t.then(()=>rk(e)?rW(e):e)):t.then(()=>e)}let nj=!1;function nT(e){nj=!0,r2&&(nn(e),nC())}r2&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...nf]},reroute:nC,NOT_LOADED:ry,toLoadPromise:r4,toBootstrapPromise:rF,unregisterApplication:nv,getProfilerData:function(){return rL}});let nR={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},nM=e=>"string"==typeof e,nA=()=>{let e,t,r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},nN=e=>null==e?"":""+e,nI=/###/g,n$=e=>e&&e.indexOf("###")>-1?e.replace(nI,"."):e,nL=e=>!e||nM(e),nF=(e,t,r)=>{let n=nM(t)?t.split("."):t,o=0;for(;o<n.length-1;){if(nL(e))return{};let t=n$(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return nL(e)?{}:{obj:e,k:n$(n[o])}},nB=(e,t,r)=>{let{obj:n,k:o}=nF(e,t,Object);if(void 0!==n||1===t.length){n[o]=r;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=nF(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=nF(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},nV=(e,t)=>{let{obj:r,k:n}=nF(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},nU=(e,t,r)=>{for(let n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?nM(e[n])||e[n]instanceof String||nM(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):nU(e[n],t[n],r):e[n]=t[n]);return e};var nW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let nK=e=>nM(e)?e.replace(/[&<>"'\/]/g,e=>nW[e]):e,nH=[" ",",","?","!",";"],nz=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),nq=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let n=t.split(r),o=e;for(let e=0;e<n.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},nG=e=>e?.replace("_","-"),nY={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class nZ{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||nY,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(nM(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new nZ(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new nZ(this.logger,e)}}var nJ=new nZ;class nQ{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class nX extends nQ{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){let o,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):nM(r)&&i?o.push(...r.split(i)):o.push(r)));let s=nV(this.data,o);return(!s&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),!s&&a&&nM(r))?nq(this.data?.[e]?.[t],r,i):s}addResource(e,t,r,n,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),nB(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(let n in r)(nM(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=nV(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?nU(s,r,o):s={...s,...r},nB(this.data,a,s),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var n0={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};let n1=Symbol("i18next/PATH_KEY");function n3(e,t){let r,n,o,{[n1]:i}=e((n=[],(o=Object.create(null)).get=(e,t)=>(r?.revoke?.(),t===n1)?n:(n.push(t),(r=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let n4={},n2=e=>!nM(e)&&"boolean"!=typeof e&&"number"!=typeof e;class n6 extends nQ{constructor(e,t={}){super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=nJ.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(null==e)return!1;let n=this.resolve(e,r);if(n?.res===void 0)return!1;let o=n2(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,r)=>{t=t||"",r=r||"";let n=nH.filter(e=>0>t.indexOf(e)&&0>r.indexOf(e));if(0===n.length)return!0;let o=nz.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:nM(o)?[o]:o};let i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:nM(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=n3(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1],u=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;let f=this.resolve(e,n),p=f?.res,h=f?.usedKey||a,m=f?.exactUsedKey||a,y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!nM(n.count),v=n6.hasDefaultValue(n),w=b?this.pluralResolver.getSuffix(c,n.count,n):"",x=n.ordinal&&b?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",S=b&&!n.ordinal&&0===n.count,E=S&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue,D=p;g&&!p&&v&&(D=E);let O=n2(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(nM(y)&&Array.isArray(D))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(f.res=e,f.usedParams=this.getUsedParamsDetails(n),f):e}if(i){let e=Array.isArray(D),t=e?[]:{},r=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${r}${i}${e}`;v&&!p?t[e]=this.translate(o,{...n,defaultValue:n2(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}p=t}}else if(g&&nM(y)&&Array.isArray(p))(p=p.join(y))&&(p=this.extendTranslation(p,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(p)&&v&&(t=!0,p=E),this.isValidLookup(p)||(o=!0,p=a);let s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,d=v&&E!==p&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?E:p),i){let e=this.resolve(a,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let o=v&&r!==p?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,n),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);S&&n[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||E)})}):r(e,a,E))}p=this.extendTranslation(p,e,n,f,r),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?p:void 0,n))}return o?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){let i;r.interpolation&&this.interpolator.init({...r,...{interpolation:{...this.options.interpolation,...r.interpolation}}});let a=nM(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=r.replace&&!nM(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}let i=r.postProcess||this.options.postProcess,a=nM(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=n0.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return nM(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(r))return;let s=this.extractFromKey(e,t),l=s.key;n=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!nM(t.count),d=c&&!t.ordinal&&0===t.count,f=void 0!==t.context&&(nM(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(a=e,!n4[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(n4[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" 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(n=>{let a;if(this.isValidLookup(r))return;i=n;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+r)),f){let n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),s.push(n+e),d&&s.push(n+r))}}for(;a=s.pop();)this.isValidLookup(r)||(o=a,r=this.getResource(n,e,a,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){let t=e.replace&&!nM(e.replace),r=t?e.replace:e;if(t&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!t)for(let e of(r={...r},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete r[e];return r}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}class n5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nJ.create("languageUtils")}getScriptPartFromCode(e){if(!(e=nG(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=nG(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(nM(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),nM(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return nM(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):nM(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{0>n.indexOf(e)&&o(this.formatLanguageCode(e))}),n}}let n8={zero:0,one:1,two:2,few:3,many:4,other:5},n9={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n7{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=nJ.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r,n=nG("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{r=new Intl.PluralRules(n,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),n9;if(!e.match(/-|_/))return n9;let n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[i]=r,r}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return(r||(r=this.getRule("dev",t)),r)?r.resolvedOptions().pluralCategories.sort((e,t)=>n8[e]-n8[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){let n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}let oe=(e,t,r,n=".",o=!0)=>{let i,a=void 0!==(i=nV(e,r))?i:nV(t,r);return!a&&o&&nM(r)&&void 0===(a=nq(e,r,n))&&(a=nq(t,r,n)),a};class ot{constructor(e={}){this.logger=nJ.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:nK,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=oe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(oe(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof u){let t=u(e,o,n);i=nM(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i="";else nM(i)||this.useRawValueToEscape||(i=nN(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i,a=(e,t)=>{let r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;let n=e.split(RegExp(`${r}[ ]*{`)),o=`{${n[1]}`;e=n[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];(i=(i={...r}).replace&&!nM(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(o=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!nM(o))return o;nM(o)||(o=nN(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}let or=e=>{let t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=n+JSON.stringify(i),s=t[a];return s||(s=e(nG(n),o),t[a]=s),s(r)}},on=e=>(t,r,n)=>e(nG(r),n)(t);class oo{constructor(e={}){this.logger=nJ.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?or:on;this.formats={number:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{let r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{let r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{let r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=or(t)}format(e,t,r,n={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{let a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class oi extends nQ{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=nJ.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){let o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){let n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let a={};this.queue.forEach(r=>{((e,t,r,n)=>{let{obj:o,k:i}=nF(e,t,Object);o[i]=o[i]||[],o[i].push(r)})(r.loaded,[o],i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});let t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2===s.length){try{let r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();nM(e)&&(e=this.languageUtils.toResolveHierarchy(e)),nM(t)&&(t=[t]);let o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=r&&""!==r){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,r,n,s):l(e,t,r,n))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}let oa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),nM(e[1])&&(t.defaultValue=e[1]),nM(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),os=e=>(nM(e.ns)&&(e.ns=[e.ns]),nM(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),nM(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),ol=()=>{};class ou extends nQ{constructor(e={},t){if(super(),this.options=os(e),this.services={},this.logger=nJ,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(nM(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let r=oa();this.options={...r,...this.options,...os(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?nJ.init(n(this.modules.logger),this.options):nJ.init(null,this.options),e=this.modules.formatter?this.modules.formatter:oo;let t=new n5(this.options);this.store=new nX(this.options.resources,this.options);let o=this.services;o.logger=nJ,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new n7(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new ot(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new oi(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new n6(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ol),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=nA(),i=()=>{let e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=ol){let r=t,n=nM(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return r();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){let n=nA();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=ol),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&n0.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=nA();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let r=nM(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(nM(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r){let n=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=n3(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=n3(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return nM(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;let i=(e,t)=>{let r=this.services.backendConnector.state[`${e}|${t}`];return -1===r||0===r||2===r};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!n||i(o,e)))}loadNamespaces(e,t){let r=nA();return this.options.ns?(nM(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=nA();nM(e)&&(e=[e]);let n=this.options.preload||[],o=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new n5(oa());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new ou(e,t)}cloneInstance(e={},t=ol){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},o=new ou(n);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new nX(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{}),n),o.services.resourceStore=o.store),o.translator=new n6(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let oc=ou.createInstance();oc.createInstance=ou.createInstance,oc.createInstance,oc.dir,oc.init,oc.loadResources,oc.reloadResources,oc.use,oc.changeLanguage,oc.getFixedT,oc.t,oc.exists,oc.setDefaultNamespace,oc.hasLoadedNamespace,oc.loadNamespaces,oc.loadLanguages;let od=oc.default||oc;function of(e,t,r,n){return od.t(t,{ns:e,defaultValue:r,...n})}function op(e,t,r){return nR[e]?of("core",e,t??nR[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function oh(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=om(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function om(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function oy({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=oh(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(op("navigateNonHttp"));n.startsWith(r)?r8(n):window.location.assign(n)}od.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let og="openmrs:history";function ob(){return JSON.parse(sessionStorage.getItem(og)??"[]")}function ov({toUrl:e}){let t=ob(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);oy({to:t[r]}),sessionStorage.setItem(og,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function o_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}tu.Boolean,tu.String,t9.isUrl,tu.Array,tu.Number,t9.inRange(100,600),tu.Boolean,tu.Boolean;let ow="/ws/rest/v1",ox="/ws/fhir2/R4",oS=`${ow}/session`;function oE(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function oD(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=oE(e);if(t.headers||(t.headers={}),eh(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(ow)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ox)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await tF("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(r===oE(oS)||204===e.status)&&oy({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return r===oE(oS)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(sessionStorage.removeItem(og),oy({to:t.url||e.headers.get("location")||"${openmrsSpaBase}/login"}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new oP(r,e,o,n)},t=>{throw new oP(r,e,null,n)})})}function oO(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new ea.Observable(n=>{let o=!1;return oD(e,t).then(e=>{o=!0,n.next(e),n.complete()},e=>{o=!0,n.error(e)}),()=>{o||r.abort()}})}class oP extends Error{constructor(e,t,r,n){super(),o_(this,"response",void 0),o_(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
11
+ If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function tH(e,t){return tz(t.map(({[e]:t})=>t).filter(e=>!!e))}function tz(e){return e.reduce((e,t)=>eG(e,t,tj),{})}function tG(e,t,r=""){for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];if(!e.hasOwnProperty(n)){("extensionSlots"!==n||""===r)&&t1(i,`Unknown config key '${i}' provided. Ignoring.`);continue}(function e(t,r,n){tY(n,t._type,r),tX(r)?t._type===tu.Object?function(t,r,n){if(t._elements)for(let o of Object.keys(r)){let i=r[o];e(t._elements,i,`${n}.${o}`)}}(t,r,n):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||tG(t,r,n):t._type===tu.Array&&function(t,r,n){if(tY(n,tu.Array,r)){if(tQ(t._elements))for(let o=0;o<r.length;o++)e(t._elements,r[o],`${n}[${o}]`);for(let e=0;e<r.length;e++)tY(`${n}[${e}]`,t._elements?._type,r[e])}}(t,r,n)})(a,o,i)}}function tq(e,t,r=""){if(e){if(t!==e._default&&tZ(r,e._validators,t),tX(t))for(let n of Object.keys(t)){let o=t[n],i=r+"."+n,a=e[n];e._type===tu.Object&&e._elements?tq(e._elements,o,i):tq(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let n=0;n<t.length;n++)tq(e._elements,t[n],`${r}[${n}]`)}}function tY(e,t,r){return!t||tZ(e,[{Array:td,Boolean:tf,ConceptUuid:ty,Number:tp,Object:tm,String:th,UUID:ty,PersonAttributeTypeUuid:ty,PatientIdentifierTypeUuid:ty}[t]],r)}function tZ(e,t,r){let n=!0;if(t)try{for(let o of t){let t=o(r);if("string"==typeof t){let o="object"==typeof r?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${r} for ${e}: ${t}`;t1(e,o),n=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
+ ${t}`)}return n}let tJ=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&tQ(e)){if(o._type===tu.Array&&Array.isArray(n)){let o=n.map(t=>tJ(e,t));r[t]=o}else if(o._type===tu.Object)for(let t of Object.keys(n))n[t]=tJ(e,n[t])}}else if(tX(o)){let e=n??{};tX(e)&&(r[t]=tJ(o,e))}}return r};function tQ(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function tX(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let t0=new Set;function t1(e,t){let r=`${e}:::${t}`;t0||(t0=new Set),t0.has(r)||(console.error(t),t0.add(r))}let t3={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:tu.Object,_default:{},_validators:[tc(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},t4={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:tu.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:tu.String,_default:void 0}},...t3},t2=(e,t)=>tc(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),t6=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tc(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},t5=t6([]),t8=e=>tc(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),t9={inRange:t2,isUrl:t5,isUrlWithTemplateParameters:t6,oneOf:t8};var t7=r(48067);let re=K("breadcrumbs",[]);function rt(e){return rr([e])}function rr(e){let t=[...rn(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,t7.pathToRegexp)(e.matcher).regexp:(0,t7.pathToRegexp)(e.path).regexp,settings:e}))];re.setState(t,!0)}function rn(){return re.getState()}function ro(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=ro(e,r.join("/"));if(t)return t}}(e,t)}function ri(e,t){if(e.length>0){let r=ro(e,t);if(r){let t=[r],n=ro(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=ro(e,n.settings.parent);return t.reverse()}}return[]}function ra(e){return ri(rn(),e)}var rs=Object.freeze({__proto__:null,get start(){return nj},get ensureJQuerySupport(){return na},get setBootstrapMaxTime(){return rJ},get setMountMaxTime(){return rQ},get setUnmountMaxTime(){return rX},get setUnloadMaxTime(){return r0},get registerApplication(){return ng},get unregisterApplication(){return nv},get getMountedApps(){return np},get getAppStatus(){return nm},get unloadApplication(){return n_},get checkActivityFunctions(){return nb},get getAppNames(){return nh},get pathToActiveWhen(){return nS},get navigateToUrl(){return r8},get patchHistoryApi(){return nn},get triggerAppChange(){return nP},get addErrorHandler(){return rf},get removeErrorHandler(){return rp},get mountRootParcel(){return rz},get NOT_LOADED(){return ry},get LOADING_SOURCE_CODE(){return rg},get NOT_BOOTSTRAPPED(){return rb},get BOOTSTRAPPING(){return rv},get NOT_MOUNTED(){return r_},get MOUNTING(){return rw},get UPDATING(){return rS},get LOAD_ERROR(){return rO},get MOUNTED(){return rx},get UNLOADING(){return rD},get UNMOUNTING(){return rE},get SKIP_BECAUSE_BROKEN(){return rP}}),rl=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,ru=!function(){try{var e=new rl("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:rl;let rc=[];function rd(e,t,r){let n=rm(e,t,r);rc.length?rc.forEach(e=>e(n)):setTimeout(()=>{throw n})}function rf(e){if("function"!=typeof e)throw Error(rh(28,!1));rc.push(e)}function rp(e){if("function"!=typeof e)throw Error(rh(29,!1));let t=!1;return rc=rc.filter(r=>{let n=r===e;return t=t||n,!n}),t}function rh(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function rm(e,t,r){let n,o=`${rR(t)} '${rT(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(rh(30,!1,t.status,rT(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=rT(t),t.status=r,n}let ry="NOT_LOADED",rg="LOADING_SOURCE_CODE",rb="NOT_BOOTSTRAPPED",rv="BOOTSTRAPPING",r_="NOT_MOUNTED",rw="MOUNTING",rx="MOUNTED",rS="UPDATING",rE="UNMOUNTING",rD="UNLOADING",rO="LOAD_ERROR",rP="SKIP_BECAUSE_BROKEN";function rC(e){return e.status===rx}function rk(e){try{return e.activeWhen(window.location)}catch(t){return rd(t,e,rP),!1}}function rT(e){return e.name}function rj(e){return!!e.unmountThisParcel}function rR(e){return rj(e)?"parcel":"application"}function rM(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function rA(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function rN(e){return e&&("function"==typeof e||Array.isArray(e)&&!rA(e,e=>"function"!=typeof e))}function rI(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=rR(e),o=rT(e);return function(e){return r.reduce((r,i,a)=>r.then(()=>{let r=i(e);return r$(r)?r:Promise.reject(rh(15,!1,n,o,t,a))}),Promise.resolve())}}function r$(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let rL=[];function rF(e,t){return Promise.resolve().then(()=>e.status!==rb?e:(e.status=rv,e.bootstrap?r1(e,"bootstrap").then(r).catch(r=>{if(t)throw rm(r,e,rP);return rd(r,e,rP),e}):Promise.resolve().then(r)));function r(){return e.status=r_,e}}function rB(e,t){return Promise.resolve().then(()=>{if(e.status!==rx)return e;return e.status=rE,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw rm(r,e,rP);rd(r,e,rP)})).then(()=>e);function r(){return r1(e,"unmount").then(()=>{e.status=r_},r=>{if(t)throw rm(r,e,rP);rd(r,e,rP)})}})}let rV=!1,rU=!1;function rW(e,t){return Promise.resolve().then(()=>e.status!==r_?e:(rV||(window.dispatchEvent(new ru("single-spa:before-first-mount")),rV=!0),e.status=rw,r1(e,"mount").then(()=>(e.status=rx,rU||(window.dispatchEvent(new ru("single-spa:first-mount")),rU=!0),e)).catch(r=>{return e.status=rx,rB(e,!0).then(n,n);function n(){if(t)throw rm(r,e,rP);return rd(r,e,rP),e}})))}let rK=0,rH={parcels:{}};function rz(){return rG.apply(rH,arguments)}function rG(e,t){let r,n,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(rh(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(rh(3,!1,typeof e.name));let a=rK++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(rh(4,!1,s,typeof t));if(!t.domElement)throw Error(rh(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:l?rg:rb,customProps:t,parentName:rT(i),unmountThisParcel:()=>p.then(()=>{if(c.status!==rx)throw Error(rh(6,!1,s,c.status));return rB(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=rP,o(e),e})};i.parcels[a]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(rh(7,!1));let f=(d=d.then(e=>{if(!e)throw Error(rh(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!rN(e.bootstrap))throw Error(rh(9,!1,s));if(!rN(e.mount))throw Error(rh(10,!1,s));if(!rN(e.unmount))throw Error(rh(11,!1,s));if(e.update&&!rN(e.update))throw Error(rh(12,!1,s));let t=rI(e,"bootstrap"),n=rI(e,"mount"),o=rI(e,"unmount");c.status=rb,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=r3(e.timeouts),e.update&&(c.update=rI(e,"update"),r.update=function(e){return c.customProps=e,rq(Promise.resolve().then(()=>{if(c.status!==rx)throw Error(rh(32,!1,rT(c)));return c.status=rS,r1(c,"update").then(()=>(c.status=rx,c)).catch(e=>{throw rm(e,c,rP)})}))})})).then(()=>rF(c,!0)),p=f.then(()=>rW(c,!0)),h=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>rq(Promise.resolve().then(()=>{if(c.status!==r_)throw Error(rh(13,!1,s,c.status));return i.parcels[a]=c,rW(c)})),unmount:()=>rq(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rq(d),bootstrapPromise:rq(f),mountPromise:rq(p),unmountPromise:rq(h)}}function rq(e){return e.then(()=>null)}function rY(e){let t=rT(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(rh(40,!1),t,r));let n=rM({},r,{name:t,mountParcel:rG.bind(e),singleSpa:rs});return rj(e)&&(n.unmountSelf=e.unmountThisParcel),n}let rZ={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rJ(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(16,!1));rZ.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rQ(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(17,!1));rZ.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rX(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(18,!1));rZ.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function r0(e,t,r){if("number"!=typeof e||e<=0)throw Error(rh(19,!1));rZ.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function r1(e,t){let r=e.timeouts[t],n=r.warningMillis,o=rR(e);return new Promise((i,a)=>{let s=!1,l=!1;e[t](rY(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let u=rh(31,!1,t,o,rT(e),r.millis);function c(e){s||(!0===e?(l=!0,r.dieOnTimeout?a(Error(u)):console.error(u)):!l&&(console.warn(u),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function r3(e){let t={};for(let r in rZ)t[r]=rM({},rZ[r],e&&e[r]||{});return t}function r4(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==ry&&e.status!==rO?e:(e.status=rg,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(rY(e));if(!r$(n))throw r=!0,Error(rh(33,!1,rT(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!rN(t.bootstrap)&&(n=35),rN(t.mount)||(n=36),rN(t.unmount)||(n=37);let o=rR(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(rh(n,!1,o,rT(e),r),t),rd(void 0,e,rP),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=rM({},e.devtools.overlays,t.devtools.overlays)),e.status=rb,e.bootstrap=rI(t,"bootstrap"),e.mount=rI(t,"mount"),e.unmount=rI(t,"unmount"),e.unload=rI(t,"unload"),e.timeouts=r3(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=rP:(n=rO,e.loadErrorTime=(new Date).getTime()),rd(t,e,n),e}))})}let r2="u">typeof window,r6={hashchange:[],popstate:[]},r5=["hashchange","popstate"];function r8(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(rh(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=no(window.location.href),n=no(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function r9(e){if(e){let t=e[0].type;r5.indexOf(t)>=0&&r6[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function r7(){nC([],arguments)}function ne(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),i=window.location.href;return o&&r===i||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let nt=null,nr=!1;function nn(e){if(nr)throw Error(rh(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,nr=!0,nt=window.history.replaceState,window.addEventListener("hashchange",r7),window.addEventListener("popstate",r7);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&r5.indexOf(e)>=0)||rA(r6[e],e=>e===r))return t.apply(this,arguments);r6[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&r5.indexOf(e)>=0&&(r6[e]=r6[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=ne(window.history.pushState,"pushState"),window.history.replaceState=ne(nt,"replaceState")}function no(e){let t=document.createElement("a");return t.href=e,t}r2&&(window.singleSpaNavigate?console.warn(rh(41,!1)):window.singleSpaNavigate=r8);let ni=!1;function na(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ni){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return ns.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return ns.call(this,r,window.removeEventListener,e,t,arguments)},ni=!0}}function ns(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{r5.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let nl={};function nu(e){return Promise.resolve().then(()=>{let t=nl[rT(e)];if(!t)return e;if(e.status===ry)return nc(e,t),e;if(e.status===rD)return t.promise.then(()=>e);if(e.status!==r_&&e.status!==rO)return e;let r=e.status===rO?Promise.resolve():r1(e,"unload");return e.status=rD,r.then(()=>(nc(e,t),e)).catch(r=>(delete nl[rT(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,rd(r,e,rP),t.reject(r),e))})}function nc(e,t){delete nl[rT(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=ry,t.resolve()}function nd(e,t,r,n){nl[rT(e)]={app:e,resolve:r,reject:n},Object.defineProperty(nl[rT(e)],"promise",{get:t})}let nf=[];function np(){return nf.filter(rC).map(rT)}function nh(){return nf.map(rT)}function nm(e){let t=rA(nf,t=>rT(t)===e);return t?t.status:null}let ny=!1;function ng(e,t,r,n){var o,i;let a,s,l=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(rh(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(rh(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(rh(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(rh(24,!1));if(!nx(e.customProps))throw Error(rh(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(rh(20,!1));if(!t)throw Error(rh(23,!1));if("function"!=typeof r)throw Error(rh(24,!1));if(!nx(n))throw Error(rh(22,!1))}(e,t,r,n),a.name=e,a.loadApp=t,a.activeWhen=r,a.customProps=n),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:nS(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(nT||ny||(ny=!0,setTimeout(()=>{nT||console.warn(rh(1,!1))},5e3)),-1!==nh().indexOf(l.name))throw Error(rh(21,!1,l.name));nf.push(rM({loadErrorTime:null,status:ry,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),r2&&(na(),nC())}function nb(e=window.location){return nf.filter(t=>t.activeWhen(e)).map(rT)}function nv(e){if(0===nf.filter(t=>rT(t)===e).length)throw Error(rh(25,!1,e));return(r2?n_(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=nf.map(rT).indexOf(e);nf.splice(t,1)})}function n_(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(rh(26,!1));let r=rA(nf,t=>rT(t)===e);if(!r)throw Error(rh(27,!1,e));let n=nl[rT(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{nd(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,nw(r,n.resolve,n.reject)):e=new Promise((t,n)=>{nd(r,()=>e,t,n),nw(r,t,n)}),e}}function nw(e,t,r){Promise.resolve().then(()=>{if(rA(nb(),t=>t===rT(e)))return nP()}).then(()=>rB(e).then(nu).then(()=>{t(),setTimeout(()=>{nC()})})).catch(r)}function nx(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function nS(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":a,i===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let nE=!1,nD=[],nO=r2&&window.location.href;function nP(){return nC()}function nC(e=[],t,r=!1){let n,o,i,a,s;if(nE)return new Promise((e,r)=>{nD.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(n=[],o=[],i=[],a=[],s=(new Date).getTime(),nf.forEach(e=>{let t=e.status!==rP&&rk(e);switch(e.status){case rO:t&&s-e.loadErrorTime>=200&&i.push(e);break;case ry:case rg:t&&i.push(e);break;case rb:case r_:!t&&nl[rT(e)]?n.push(e):t&&a.push(e);break;case rx:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:a}),f,p=[],h=nO,m=nO=window.location.href;return nT?(nE=!0,f=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===f.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(p).then(r=>{if(r.some(e=>e))return nt.call(window.history,history.state,"",h.substring(location.origin.length)),nO=location.href,nE=!1,nC(e,t,!0);let n=l.map(nu),o=Promise.all(u.map(rB).map(e=>e.then(nu)).concat(n));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>r4(e).then(e=>nk(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>nk(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(f=c,Promise.resolve().then(()=>Promise.all(c.map(r4)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch(e=>(console.warn(Error(rh(42,!1))),console.warn(e),!1)))}function g(){let t=np();e.forEach(e=>e.resolve(t));try{w(0===f.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(nE=!1,nD.length>0){let e=nD;nD=[],nC(e)}return t}function b(){r||(e.forEach(e=>{r9(e.eventArguments)}),r9(t))}function v(e=!1,r){let n={},o={[rx]:[],[r_]:[],[ry]:[],[rP]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,rx)}),l.forEach(e=>{a(e,ry)}),u.forEach(e=>{a(e,r_)})):f.forEach(e=>{a(e)});let i={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:f.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return r&&rM(i.detail,r),i;function a(e,t){let r=rT(e);t=t||nm(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new ru(`single-spa:${e}`,t))}}function nk(e,t){return rk(e)?rF(e).then(e=>t.then(()=>rk(e)?rW(e):e)):t.then(()=>e)}let nT=!1;function nj(e){nT=!0,r2&&(nn(e),nC())}r2&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...nf]},reroute:nC,NOT_LOADED:ry,toLoadPromise:r4,toBootstrapPromise:rF,unregisterApplication:nv,getProfilerData:function(){return rL}});let nR={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},nM=e=>"string"==typeof e,nA=()=>{let e,t,r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},nN=e=>null==e?"":""+e,nI=/###/g,n$=e=>e&&e.indexOf("###")>-1?e.replace(nI,"."):e,nL=e=>!e||nM(e),nF=(e,t,r)=>{let n=nM(t)?t.split("."):t,o=0;for(;o<n.length-1;){if(nL(e))return{};let t=n$(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return nL(e)?{}:{obj:e,k:n$(n[o])}},nB=(e,t,r)=>{let{obj:n,k:o}=nF(e,t,Object);if(void 0!==n||1===t.length){n[o]=r;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=nF(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,s=nF(e,a=a.slice(0,a.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},nV=(e,t)=>{let{obj:r,k:n}=nF(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},nU=(e,t,r)=>{for(let n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?nM(e[n])||e[n]instanceof String||nM(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):nU(e[n],t[n],r):e[n]=t[n]);return e};var nW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let nK=e=>nM(e)?e.replace(/[&<>"'\/]/g,e=>nW[e]):e,nH=[" ",",","?","!",";"],nz=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),nG=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let n=t.split(r),o=e;for(let e=0;e<n.length;){let t;if(!o||"object"!=typeof o)return;let i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],void 0!==(t=o[i])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},nq=e=>e?.replace("_","-"),nY={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class nZ{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||nY,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(nM(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new nZ(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new nZ(this.logger,e)}}var nJ=new nZ;class nQ{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class nX extends nQ{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){let o,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):nM(r)&&i?o.push(...r.split(i)):o.push(r)));let s=nV(this.data,o);return(!s&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),!s&&a&&nM(r))?nG(this.data?.[e]?.[t],r,i):s}addResource(e,t,r,n,o={silent:!1}){let i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),nB(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(let n in r)(nM(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=nV(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?nU(s,r,o):s={...s,...r},nB(this.data,a,s),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var n0={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};let n1=Symbol("i18next/PATH_KEY");function n3(e,t){let r,n,o,{[n1]:i}=e((n=[],(o=Object.create(null)).get=(e,t)=>(r?.revoke?.(),t===n1)?n:(n.push(t),(r=Proxy.revocable(e,o)).proxy),Proxy.revocable(Object.create(null),o).proxy));return i.join(t?.keySeparator??".")}let n4={},n2=e=>!nM(e)&&"boolean"!=typeof e&&"number"!=typeof e;class n6 extends nQ{constructor(e,t={}){super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=nJ.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(null==e)return!1;let n=this.resolve(e,r);if(n?.res===void 0)return!1;let o=n2(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,r)=>{t=t||"",r=r||"";let n=nH.filter(e=>0>t.indexOf(e)&&0>r.indexOf(e));if(0===n.length)return!0;let o=nz.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:nM(o)?[o]:o};let i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:nM(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=n3(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);let o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1],u=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?o?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;let f=this.resolve(e,n),p=f?.res,h=f?.usedKey||a,m=f?.exactUsedKey||a,y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==n.count&&!nM(n.count),v=n6.hasDefaultValue(n),w=b?this.pluralResolver.getSuffix(c,n.count,n):"",x=n.ordinal&&b?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",S=b&&!n.ordinal&&0===n.count,E=S&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue,D=p;g&&!p&&v&&(D=E);let O=n2(D),P=Object.prototype.toString.apply(D);if(g&&D&&O&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(P)&&!(nM(y)&&Array.isArray(D))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(f.res=e,f.usedParams=this.getUsedParamsDetails(n),f):e}if(i){let e=Array.isArray(D),t=e?[]:{},r=e?m:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let o=`${r}${i}${e}`;v&&!p?t[e]=this.translate(o,{...n,defaultValue:n2(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=D[e])}p=t}}else if(g&&nM(y)&&Array.isArray(p))(p=p.join(y))&&(p=this.extendTranslation(p,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(p)&&v&&(t=!0,p=E),this.isValidLookup(p)||(o=!0,p=a);let s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,d=v&&E!==p&&this.options.updateMissing;if(o||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,a,d?E:p),i){let e=this.resolve(a,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let o=v&&r!==p?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,d,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,d,n),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);S&&n[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||E)})}):r(e,a,E))}p=this.extendTranslation(p,e,n,f,r),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?p:void 0,n))}return o?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){let i;r.interpolation&&this.interpolator.init({...r,...{interpolation:{...this.options.interpolation,...r.interpolation}}});let a=nM(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let s=r.replace&&!nM(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),a){let t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}let i=r.postProcess||this.options.postProcess,a=nM(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=n0.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return nM(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(r))return;let s=this.extractFromKey(e,t),l=s.key;n=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!nM(t.count),d=c&&!t.ordinal&&0===t.count,f=void 0!==t.context&&(nM(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(a=e,!n4[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(n4[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" 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(n=>{let a;if(this.isValidLookup(r))return;i=n;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,n,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(o)&&s.push(l+e.replace(o,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+r)),f){let n=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(n),c&&(t.ordinal&&0===e.indexOf(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),s.push(n+e),d&&s.push(n+r))}}for(;a=s.pop();)this.isValidLookup(r)||(o=a,r=this.getResource(n,e,a,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){let t=e.replace&&!nM(e.replace),r=t?e.replace:e;if(t&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!t)for(let e of(r={...r},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete r[e];return r}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}class n5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nJ.create("languageUtils")}getScriptPartFromCode(e){if(!(e=nq(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=nq(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(nM(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),nM(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return nM(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):nM(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{0>n.indexOf(e)&&o(this.formatLanguageCode(e))}),n}}let n8={zero:0,one:1,two:2,few:3,many:4,other:5},n9={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n7{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=nJ.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r,n=nq("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];try{r=new Intl.PluralRules(n,{type:o})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),n9;if(!e.match(/-|_/))return n9;let n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[i]=r,r}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return(r||(r=this.getRule("dev",t)),r)?r.resolvedOptions().pluralCategories.sort((e,t)=>n8[e]-n8[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){let n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}let oe=(e,t,r,n=".",o=!0)=>{let i,a=void 0!==(i=nV(e,r))?i:nV(t,r);return!a&&o&&nM(r)&&void 0===(a=nG(e,r,n))&&(a=nG(t,r,n)),a};class ot{constructor(e={}){this.logger=nJ.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:g}=e.interpolation;this.escape=void 0!==t?t:nK,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):i||"{{",this.suffix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):h||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==g&&g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,a,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let o=oe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(oe(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(a=0;o=t.regex.exec(e);){let r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof u){let t=u(e,o,n);i=nM(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i="";else nM(i)||this.useRawValueToEscape||(i=nN(i));let s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i,a=(e,t)=>{let r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;let n=e.split(RegExp(`${r}[ ]*{`)),o=`{${n[1]}`;e=n[0];let a=(o=this.interpolate(o,i)).match(/'/g),s=o.match(/"/g);((a?.length??0)%2!=0||s)&&s.length%2==0||(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];(i=(i={...r}).replace&&!nM(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(o=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&!nM(o))return o;nM(o)||(o=nN(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}let or=e=>{let t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});let a=n+JSON.stringify(i),s=t[a];return s||(s=e(nq(n),o),t[a]=s),s(r)}},on=e=>(t,r,n)=>e(nq(r),n)(t);class oo{constructor(e={}){this.logger=nJ.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?or:on;this.formats={number:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{let r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{let r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{let r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=or(t)}format(e,t,r,n={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{let a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class oi extends nQ{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=nJ.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){let o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){let n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let a={};this.queue.forEach(r=>{((e,t,r,n)=>{let{obj:o,k:i}=nF(e,t,Object);o[i]=o[i]||[],o[i].push(r)})(r.loaded,[o],i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});let t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;let a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2===s.length){try{let r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}return}return s(e,t,a)}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();nM(e)&&(e=this.languageUtils.toResolveHierarchy(e)),nM(t)&&(t=[t]);let o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=r&&""!==r){if(this.backend?.create){let s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;(o=5===l.length?l(e,t,r,n,s):l(e,t,r,n))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}let oa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),nM(e[1])&&(t.defaultValue=e[1]),nM(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),os=e=>(nM(e.ns)&&(e.ns=[e.ns]),nM(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),nM(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),ol=()=>{};class ou extends nQ{constructor(e={},t){if(super(),this.options=os(e),this.services={},this.logger=nJ,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(nM(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let r=oa();this.options={...r,...this.options,...os(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?nJ.init(n(this.modules.logger),this.options):nJ.init(null,this.options),e=this.modules.formatter?this.modules.formatter:oo;let t=new n5(this.options);this.store=new nX(this.options.resources,this.options);let o=this.services;o.logger=nJ,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new n7(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new ot(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new oi(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new n6(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ol),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=nA(),i=()=>{let e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?i():setTimeout(i,0),o}loadResources(e,t=ol){let r=t,n=nM(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return r();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){let n=nA();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=ol),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw 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&&n0.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=nA();this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);let r=nM(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(nM(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r){let n=(e,t,...o)=>{let i,a;(i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);let s=this.options.keySeparator||".";return i.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=n3(e,{...this.options,...t})),`${i.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=n3(e,{...this.options,...t})),a=i.keyPrefix?`${i.keyPrefix}${s}${e}`:e),this.t(a,i)};return nM(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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;let r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;let i=(e,t)=>{let r=this.services.backendConnector.state[`${e}|${t}`];return -1===r||0===r||2===r};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!n||i(o,e)))}loadNamespaces(e,t){let r=nA();return this.options.ns?(nM(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=nA();nM(e)&&(e=[e]);let n=this.options.preload||[],o=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new n5(oa());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new ou(e,t)}cloneInstance(e={},t=ol){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},o=new ou(n);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new nX(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{}),n),o.services.resourceStore=o.store),o.translator=new n6(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let oc=ou.createInstance();oc.createInstance=ou.createInstance,oc.createInstance,oc.dir,oc.init,oc.loadResources,oc.reloadResources,oc.use,oc.changeLanguage,oc.getFixedT,oc.t,oc.exists,oc.setDefaultNamespace,oc.hasLoadedNamespace,oc.loadNamespaces,oc.loadLanguages;let od=oc.default||oc;function of(e,t,r,n){return od.t(t,{ns:e,defaultValue:r,...n})}function op(e,t,r){return nR[e]?of("core",e,t??nR[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function oh(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=om(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t});return e.startsWith("//")?n:n.replace(/^\/\//,"/")}function om(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function oy({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=oh(e,t).replace(window.location.origin,""),o=new URL(n,window.location.origin);if("http:"!=o.protocol&&"https:"!=o.protocol)throw console.error(`Received request to navigate to non-http URL: ${o.toString()}`),Error(op("navigateNonHttp"));n.startsWith(r)?r8(n):window.location.assign(n)}od.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let og="openmrs:history";function ob(){return JSON.parse(sessionStorage.getItem(og)??"[]")}function ov({toUrl:e}){let t=ob(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);oy({to:t[r]}),sessionStorage.setItem(og,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function o_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}tu.Boolean,tu.String,t9.isUrl,tu.Array,tu.Number,t9.inRange(100,600),tu.Boolean,tu.Boolean;let ow="/ws/rest/v1",ox="/ws/fhir2/R4",oS=`${ow}/session`;function oE(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function oD(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=oE(e);if(t.headers||(t.headers={}),eh(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(ow)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ox)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await tF("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(r===oE(oS)||204===e.status)&&oy({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return r===oE(oS)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(sessionStorage.removeItem(og),oy({to:t.url||e.headers.get("location")||"${openmrsSpaBase}/login"}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new oP(r,e,o,n)},t=>{throw new oP(r,e,null,n)})})}function oO(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new ea.Observable(n=>{let o=!1;return oD(e,t).then(e=>{o=!0,n.next(e),n.complete()},e=>{o=!0,n.error(e)}),()=>{o||r.abort()}})}class oP extends Error{constructor(e,t,r,n){super(),o_(this,"response",void 0),o_(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
13
13
  ${n.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let oC=K("session",{loaded:!1,session:null}),ok=0;function oj(e={includeAuthStatus:!0}){return(ok<Date.now()-6e4||!oC.getState().loaded)&&oM(),new ea.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(oC.getState()),oC.subscribe(r)})}function oT(){return(ok<Date.now()-6e4||!oC.getState().loaded)&&oM(),oC}function oR(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function oM(e,t){ok=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),oB(oD(oS,{headers:r}))}function oA(){oC.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oN(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!Y(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!Y(n.privileges.find(t=>e===t.display))):(Y(r)||console.error(`Could not understand privileges "${r}"`),!0))||!Y(t.roles.find(e=>"System Developer"===e.display))}function oI(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(oC.getState()),e||(t=oC.subscribe(n))})}function o$(){return new Promise((e,t)=>{oj().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function oL(e,t){return oB(oD(oS,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function oF(e,t,r){return r||(r=new AbortController),await oD(`${ow}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),oM()}function oB(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},oC.setState(n),t(n)):(n={loaded:!1,session:null},oC.setState(n),r(n))}).catch(e=>{T(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};oC.setState(t),r(t)})})}function oV(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oC.subscribe(e=>{e.loaded&&e.session&&oR(e.session)});let oU={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"},oW=L()(()=>({}));H("openmrs-app-context",oW);let oK={};function oH(e,t=oK){oW.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===oK?{}:t})})}function oz(e){oW.setState(t=>(e in t&&delete t[e],t))}function oq(e,t=e=>e){let r=oW.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function oG(e,t){oW.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function oY(e,t){let r=oq(e);return t(oZ(r)),oW.subscribe(n=>{let o=e in n?n[e]:null;o!==r&&(r=o,t(oZ(o)))})}function oZ(e){return null===e?null:Object.freeze(Object.assign({},e))}let oJ=null;async function oQ(){return oJ??(oJ=oX().then(({map:e,complete:t})=>(t||(oJ=null),e))),oJ}async function oX(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:function(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}(t),complete:r}}async function o0(){return await oQ()}function o1(e){return e.replace(/[\/\-@]/g,"_")}async function o3(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([o4(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),i&&clearTimeout(i);let s=o1(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function o4(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=o1(e);if(!window[r]){let r=t??await o2();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in{};try{return await function(e){var t;let r=(t=window)[o6]??(t[o6]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let i=new Promise((t,n)=>{let i=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&O({kind:"error",title:op("scriptLoadingFailed","Error: Script failed to load"),description:op("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:op("resetOverrides","Reset overrides"),onActionButtonClick(){console.warn("[Security] Import map overrides are disabled in production mode."),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function o2(){return o0()}let o6=Symbol.for("__openmrs_script_loading"),o5=`${ow}/attachment`;function o8(e,t){return oD(`${o5}/${e}`,{signal:t.signal})}function o9(e,t,r,n){return oD(o7(e,t,n),{signal:r.signal})}function o7(e,t,r){return r?`${o5}?patient=${e}&encounter=${r}`:`${o5}?patient=${e}&includeEncounterless=${t}`}async function ie(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),oD(`${o5}`,{method:"POST",body:n})}function it(e,t){return oD(`${o5}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ir(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function io(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var ia=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function is(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var il=function(e,t){this.type=e,Object.assign(this,t)};function iu(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ic(){}var id={type:"SKIP_WAITING"};function ip(e,t){if(!t)return e&&e.then?e.then(ic):Promise.resolve()}async function ih(e){let t=await (f??Promise.resolve(void 0));return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}!function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new ia,n.en=new ia,n.on=new ia,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!is(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new il(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new il("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new il("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return iu(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new il("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n=t.prototype;n.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return ip(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),iu(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&is(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new il("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},n.update=function(){try{return this.fn?ip(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},n.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},n.messageSW=function(e){try{return iu(this.getSW(),function(t){return ir(t,e)})}catch(e){return Promise.reject(e)}},n.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ir(this.fn.waiting,id)},n.pn=function(){var e=navigator.serviceWorker.controller;return e&&is(e.scriptURL,this.sn.toString())?e:void 0},n.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return iu(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},io(t.prototype,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}]),r&&io(t,r)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return ii(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ii(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());let im="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iy=Object.keys,ig=Array.isArray;function ib(e,t){return"object"!=typeof t||iy(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||im.Promise||(im.Promise=Promise);let iv=Object.getPrototypeOf,i_={}.hasOwnProperty;function iw(e,t){return i_.call(e,t)}function ix(e,t){"function"==typeof t&&(t=t(iv(e))),("u"<typeof Reflect?iy:Reflect.ownKeys)(t).forEach(r=>{iE(e,r,t[r])})}let iS=Object.defineProperty;function iE(e,t,r,n){iS(e,t,ib(r&&iw(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function iD(e){return{from:function(t){return e.prototype=Object.create(t.prototype),iE(e.prototype,"constructor",e),{extend:ix.bind(null,e.prototype)}}}}let iO=Object.getOwnPropertyDescriptor;function iP(e,t){let r;return iO(e,t)||(r=iv(e))&&iP(r,t)}let iC=[].slice;function ik(e,t,r){return iC.call(e,t,r)}function ij(e,t){return t(e)}function iT(e){if(!e)throw Error("Assertion Failed")}function iR(e){im.setImmediate?setImmediate(e):setTimeout(e,0)}function iM(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function iA(e,t){if("string"==typeof t&&iw(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=iA(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:iA(s,t.substr(a+1))}}function iN(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){iT("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)iN(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?ig(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&iw(e,a)||(l=e[a]={}),iN(l,s,r)}}else void 0===r?ig(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function iI(e){var t={};for(var r in e)iw(e,r)&&(t[r]=e[r]);return t}let i$=[].concat;function iL(e){return i$.apply([],e)}let iF="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(iL([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>im[e]),iB=iF.map(e=>im[e]);iM(iF,e=>[e,!0]);let iV=null;function iU(e){iV="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=iV&&iV.get(t);if(r)return r;if(ig(t)){r=[],iV&&iV.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(iB.indexOf(t.constructor)>=0)r=t;else{let n=iv(t);for(var i in r=n===Object.prototype?{}:Object.create(n),iV&&iV.set(t,r),t)iw(t,i)&&(r[i]=e(t[i]))}return r}(e);return iV=null,t}let{toString:iW}={};function iK(e){return iW.call(e).slice(8,-1)}let iH="u">typeof Symbol?Symbol.iterator:"@@iterator",iz="symbol"==typeof iH?function(e){var t;return null!=e&&(t=e[iH])&&t.apply(e)}:function(){return null},iq={};function iG(e){var t,r,n,o;if(1==arguments.length){if(ig(e))return e.slice();if(this===iq&&"string"==typeof e)return[e];if(o=iz(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let iY="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var iZ="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),iJ=()=>!0;let iQ=!Error("").stack;function iX(){if(iQ)try{throw iX.arguments,Error()}catch(e){return e}return Error()}function i0(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(iJ).map(e=>"\n"+e).join("")):""}var i1=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],i3=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(i1),i4={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 i2(e,t){this._e=iX(),this.name=e,this.message=t}function i6(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function i5(e,t,r,n){this._e=iX(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=i6(e,t)}function i8(e,t){this._e=iX(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=i6(e,t)}iD(i2).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+i0(this._e,2))}},toString:function(){return this.name+": "+this.message}}),iD(i5).from(i2),iD(i8).from(i2);var i9=i3.reduce((e,t)=>(e[t]=t+"Error",e),{}),i7=i3.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=iX(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=i4[t]||r,this.inner=null)}return iD(n).from(i2),e[t]=n,e},{});i7.Syntax=SyntaxError,i7.Type=TypeError,i7.Range=RangeError;var ae=i1.reduce((e,t)=>(e[t+"Error"]=i7[t],e),{}),at=i3.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=i7[t]),e),{});function ar(){}function an(e){return e}function ao(e,t){return null==e||e===an?t:function(r){return t(e(r))}}function ai(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function aa(e,t){return e===ar?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?ai(n,this.onsuccess):n),o&&(this.onerror=this.onerror?ai(o,this.onerror):o),void 0!==i?i:r}}function as(e,t){return e===ar?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?ai(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ai(n,this.onerror):n)}}function al(e,t){return e===ar?t:function(r){var n=e.apply(this,arguments);ib(r,n);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?ai(o,this.onsuccess):o),i&&(this.onerror=this.onerror?ai(i,this.onerror):i),void 0===n?void 0===a?void 0:a:ib(n,a)}}function au(e,t){return e===ar?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function ac(e,t){return e===ar?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}at.ModifyError=i5,at.DexieError=i2,at.BulkError=i8;var ad={};let[af,ap,ah]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iv(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,iv(t),e]})(),am=ap&&ap.then,ay=af&&af.constructor,ag=!!ah;var ab=!1,av=ah?()=>{ah.then(aB)}:im.setImmediate?setImmediate.bind(null,aB):im.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{aB(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(aB,0)},a_=function(e,t){ak.push([e,t]),ax&&(av(),ax=!1)},aw=!0,ax=!0,aS=[],aE=[],aD=null,aO=an,aP={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:se,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{se(e[0],e[1])}catch(e){}})}},aC=aP,ak=[],aj=0,aT=[];function aR(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ar,this._lib=!1;var t=this._PSD=aC;if(iZ&&(this._stackHolder=iX(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ad)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&aN(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&aV();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof aR?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,aI(t)),n&&aU()}},aN.bind(null,t))}catch(e){aN(t,e)}}(this,e)}let aM={get:function(){var e=aC,t=aZ;function r(r,n){var o=!e.global&&(e!==aC||t!==aZ);let i=o&&!a0();var a=new aR((t,a)=>{a$(this,new aA(a8(r,e,o,i),a8(n,e,o,i),t,a,e))});return iZ&&aF(a,this),a}return r.prototype=ad,r},set:function(e){iE(this,"then",e&&e.prototype===ad?aM:{get:function(){return e},set:aM.set})}};function aA(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function aN(e,t){if(aE.push(t),null===e._state){var r=e._lib&&aV();t=aO(t),e._state=!1,e._value=t,iZ&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=iP(t,"stack");t._promise=e,iE(t,"stack",{get:()=>ab?r&&(r.get?r.get.apply(t):r.value):e.stack})}),aS.some(t=>t._value===e._value)||aS.push(e),aI(e),r&&aU()}}function aI(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)a$(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===aj&&(++aj,a_(()=>{0==--aj&&aW()},[]))}function a$(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++aj,a_(aL,[r,e,t])}else e._listeners.push(t)}function aL(e,t,r){try{aD=t;var n,o=t._value;t._state?n=e(o):(aE.length&&(aE=[]),n=e(o),-1===aE.indexOf(o)&&function(e){for(var t=aS.length;t;)if(aS[--t]._value===e._value)return void aS.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{aD=null,0==--aj&&aW(),--r.psd.ref||r.psd.finalize()}}function aF(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function aB(){aV()&&aU()}function aV(){var e=aw;return aw=!1,ax=!1,e}function aU(){var e,t,r;do for(;ak.length>0;)for(e=ak,ak=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(ak.length>0);aw=!0,ax=!0}function aW(){var e=aS;aS=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=aT.slice(0),r=t.length;r;)t[--r]()}function aK(e){return new aR(ad,!1,e)}function aH(e,t){var r=aC;return function(){var n=aV(),o=aC;try{return a2(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{a2(o,!1),n&&aU()}}}ix(aR.prototype,{then:aM,_then:function(e,t){a$(this,new aA(null,null,e,t,aC))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):aK(e)):this.then(null,e=>e&&e.name===t?r(e):aK(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),aK(t)))},stack:{get:function(){if(this._stack)return this._stack;try{ab=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=i0(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return iZ&&((o=i0(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{ab=!1}}},timeout:function(e,t){return e<1/0?new aR((r,n)=>{var o=setTimeout(()=>n(new i7.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iE(aR.prototype,Symbol.toStringTag,"Dexie.Promise"),aP.env=a6(),ix(aR,{all:function(){var e=iG.apply(null,arguments).map(a1);return new aR(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>aR.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof aR)return e;if(e&&"function"==typeof e.then)return new aR((t,r)=>{e.then(t,r)});var t=new aR(ad,!0,e);return aF(t,aD),t},reject:aK,race:function(){var e=iG.apply(null,arguments).map(a1);return new aR((t,r)=>{e.map(e=>aR.resolve(e).then(t,r))})},PSD:{get:()=>aC,set:e=>aC=e},totalEchoes:{get:()=>aZ},newPSD:aQ,usePSD:a5,scheduler:{get:()=>a_,set:e=>{a_=e}},rejectionMapper:{get:()=>aO,set:e=>{aO=e}},follow:(e,t)=>new aR((r,n)=>aQ((t,r)=>{var n=aC;n.unhandleds=[],n.onunhandled=r,n.finalize=ai(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},aT.push(function t(){e(),aT.splice(aT.indexOf(t),1)}),++aj,a_(()=>{0==--aj&&aW()},[])},n.finalize),e()},t,r,n))}),ay&&(ay.allSettled&&iE(aR,"allSettled",function(){let e=iG.apply(null,arguments).map(a1);return new aR(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>aR.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),ay.any&&"u">typeof AggregateError&&iE(aR,"any",function(){let e=iG.apply(null,arguments).map(a1);return new aR((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>aR.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let az={awaits:0,echoes:0,id:0};var aq=0,aG=[],aY=0,aZ=0,aJ=0;function aQ(e,t,r,n){var o=aC,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++aJ;var a=aP.env;i.env=ag?{Promise:aR,PromiseProp:{value:aR,configurable:!0,writable:!0},all:aR.all,race:aR.race,allSettled:aR.allSettled,any:aR.any,resolve:aR.resolve,reject:aR.reject,nthen:a9(a.nthen,i),gthen:a9(a.gthen,i)}:{},t&&ib(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=a5(i,e,r,n);return 0===i.ref&&i.finalize(),s}function aX(){return az.id||(az.id=++aq),++az.awaits,az.echoes+=100,az.id}function a0(){return!!az.awaits&&(0==--az.awaits&&(az.id=0),az.echoes=100*az.awaits,!0)}function a1(e){return az.echoes&&e&&e.constructor===ay?(aX(),e.then(e=>(a0(),e),e=>(a0(),st(e)))):e}function a3(e){++aZ,az.echoes&&0!=--az.echoes||(az.echoes=az.id=0),aG.push(aC),a2(e,!0)}function a4(){var e=aG[aG.length-1];aG.pop(),a2(e,!1)}function a2(e,t){var r,n=aC;if((t?!az.echoes||aY++&&e===aC:!aY||--aY&&e===aC)||(r=t?a3.bind(null,e):a4,am.call(af,r)),e!==aC&&(aC=e,n===aP&&(aP.env=a6()),ag)){var o=aP.env.Promise,i=e.env;ap.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(im,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function a6(){var e=im.Promise;return ag?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(im,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ap.then,gthen:e.prototype.then}:{}}function a5(e,t,r,n,o){var i=aC;try{return a2(e,!0),t(r,n,o)}finally{a2(i,!1)}}function a8(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=aC;r&&aX(),a2(t,!0);try{return e.apply(this,arguments)}finally{a2(i,!1),n&&(o=a0,am.call(af,o))}}}function a9(e,t){return function(r,n){return e.call(this,a8(r,t),a8(n,t))}}-1===(""+am).indexOf("[native code]")&&(aX=a0=ar);let a7="unhandledrejection";function se(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(im.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(a7,!0,!0),ib(n,o)):im.CustomEvent&&ib(n=new CustomEvent(a7,{detail:o}),o),n&&im.dispatchEvent&&(dispatchEvent(n),!im.PromiseRejectionEvent&&im.onunhandledrejection))try{im.onunhandledrejection(n)}catch(e){}iZ&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var st=aR.reject;let sr="3.2.7",sn=String.fromCharCode(65535),so=-1/0,si="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",sa="String expected.",ss=[],sl="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),su=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),sc="__dbnames",sd="readonly",sf="readwrite";function sp(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let sh={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function sm(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=iU(t))[e],t)}class sy{_trans(e,t,r){let n=this._tx||aC.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new i7.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=aV();try{return n&&n.db===this.db?n===aC.trans?n._promise(e,i,r):aQ(()=>n._promise(e,i,r),{trans:n,transless:aC.transless||aC}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||aC.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===i9.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):st(i)}return i._promise(r,(e,t)=>aQ(()=>(aC.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return st(new i7.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return st(new i7.DatabaseClosed);t.open().catch(ar)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&aU()}}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(ig(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=iy(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(r&&this.db._maxKey!==sn){let n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map(t=>e[t]))}!r&&iZ&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?sp(r,a&&a.multi?e=>{let t=iA(e,o);return ig(t)&&t.some(e=>i(s,e))}:e=>i(s,iA(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?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,ig(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(iw(t,n))try{r[n]=t[n]}catch(e){}return r};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){ib(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sm(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?aR.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{iN(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||ig(e))return this.where(":id").equals(e).modify(t);{let r=iA(e,this.schema.primKey.keyPath);if(void 0===r)return st(new i7.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?iy(t).forEach(r=>{iN(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sm(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?aR.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{iN(e,n,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?aR.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:sh})).then(e=>e.numFailures?aR.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,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new i7.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new i7.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sm(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new i8(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new i7.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new i7.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sm(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new i8(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new i8(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function sg(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"!=typeof e){n||(n=au),o||(o=ar);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,o)}};return t[e]=r[e]=a,a}iy(e).forEach(function(t){var r=e[t];if(ig(r))i(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new i7.InvalidArgument("Invalid event config");var n=i(t,an,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){iR(function(){e.apply(null,t)})})})}})}}function sb(e,t){return iD(t).from({prototype:e}),t}function sv(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function s_(e,t){e.filter=sp(e.filter,t)}function sw(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>sp(n(),t()):t,e.justLimit=r&&!n}function sx(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new i7.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function sS(e,t,r){let n=sx(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function sE(e,t,r,n){let o=e.replayFilter?sp(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),iw(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),sD(sS(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return sD(sS(e,n,r),sp(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function sD(e,t,r,n){var o=aH(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=ar},t=>{e.fail(t),r=ar})||o(e.value,e,e=>r=e),r()})})}function sO(e,t){try{let r=sP(e),n=sP(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(sC(e),sC(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=sO(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function sP(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=iK(e);return"ArrayBuffer"===r?"binary":r}function sC(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class sk{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,st.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,st.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=sp(t.algorithm,e)}_iterate(e,t){return sE(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&ib(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>sE(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(sv(t,!0))return r.count({trans:e,query:{index:sx(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return sE(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?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&&sv(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=sx(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return sE(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,sv(t)?sw(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):sw(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),sw(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return s_(this._ctx,function(r,n,o){return!e(r.value)||(n(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;return s_(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=sp(t.isMatch,e),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,r){e(r.key,r)})}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,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&sv(t,!0)&&t.limit>0)return this._read(e=>{var r=sx(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).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 r={};return s_(this._ctx,function(e){var t=e.primaryKey.toString(),n=iw(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=iy(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];iA(t,a)!==s&&(iN(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,iy(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=f[e],r={value:iU(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===sO(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=sv(t)&&t.limit===1/0&&("function"!=typeof e||e===sj)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(g.length>0||b&&e===sj)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>p(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new i5("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return sv(e)&&(e.isPrimKey&&!sl||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new i5("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(sj)}}let sj=(e,t)=>t.value=null;function sT(e,t){return e<t?-1:+(e!==t)}function sR(e,t){return e>t?-1:+(e!==t)}function sM(e,t,r){var n=e instanceof sL?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function sA(e){return new e.Collection(e,()=>s$("")).limit(0)}function sN(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return sM(e,sa);function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?sT:sR;var t=r.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}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>sI(s[0],l[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,l,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],l[m],a,u);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function sI(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function s$(e){return{type:1,lower:e,upper:e}}class sL{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?sA(this):new this.Collection(this,()=>sI(e,t,!r,!n))}catch(e){return sM(this,si)}}equals(e){return null==e?sM(this,si):new this.Collection(this,()=>s$(e))}above(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(e,void 0,!0))}aboveOrEqual(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(e,void 0,!1))}below(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(void 0,e,!1,!0))}belowOrEqual(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(void 0,e))}startsWith(e){return"string"!=typeof e?sM(this,sa):this.between(e,e+sn,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):sN(this,(e,t)=>0===e.indexOf(t[0]),[e],sn)}equalsIgnoreCase(e){return sN(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=iG.apply(iq,arguments);return 0===e.length?sA(this):sN(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=iG.apply(iq,arguments);return 0===e.length?sA(this):sN(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,sn)}anyOf(){let e=iG.apply(iq,arguments),t=this._cmp;try{e.sort(t)}catch(e){return sM(this,si)}if(0===e.length)return sA(this);let r=new this.Collection(this,()=>sI(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[so,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=iG.apply(iq,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return sM(this,si)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[so,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return sA(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return sM(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",i7.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return sM(this,si)}let f=0,p=l?e=>n(e,u[f][1])>0:e=>n(e,u[f][1])>=0,h=s?e=>o(e,u[f][0])>0:e=>o(e,u[f][0])>=0,m=p,y=new this.Collection(this,()=>sI(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===u.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,u[f][1])||0===this._cmp(o,u[f][0])||t(()=>{c===n?e.continue(u[f][0]):e.continue(u[f][1])}),!1)}),y}startsWithAnyOf(){let e=iG.apply(iq,arguments);return e.every(e=>"string"==typeof e)?0===e.length?sA(this):this.inAnyRange(e.map(e=>[e,e+sn])):sM(this,"startsWithAnyOf() only works with strings")}}function sF(e){return aH(function(t){return sB(t),e(t.target.error),!1})}function sB(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let sV="storagemutated",sU="x-storagemutated-1",sW=sg(null,sV);class sK{_lock(){return iT(!aC.global),++this._reculock,1!==this._reculock||aC.global||(aC.lockOwnerFor=this),this}_unlock(){if(iT(!aC.global),0==--this._reculock)for(aC.global||(aC.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{a5(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&aC.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(iT(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new i7.DatabaseClosed(r);case"MissingAPIError":throw new i7.MissingAPI(r.message,r);default:throw new i7.OpenFailed(r)}if(!this.active)throw new i7.TransactionInactive;return iT(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=aH(t=>{sB(t),this._reject(e.error)}),e.onabort=aH(t=>{sB(t),this.active&&this._reject(new i7.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=aH(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&sW.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return st(new i7.ReadOnly("Transaction is readonly"));if(!this.active)return st(new i7.TransactionInactive);if(this._locked())return new aR((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},aC])});if(r)return aQ(()=>{var e=new aR((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new aR((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=aR.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new aR((e,n)=>{r.then(r=>t._waitingQueue.push(aH(e.bind(null,r))),e=>t._waitingQueue.push(aH(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new i7.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(iw(t,e))return t[e];let r=this.schema[e];if(!r)throw new i7.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function sH(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+sz(t)}}function sz(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function sq(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:iM(r,e=>[e.name,e])}}let sG=e=>{try{return e.only([[]]),sG=()=>[[]],[[]]}catch(e){return sG=()=>sn,sn}};function sY(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>iA(t,e):t=>iA(t,e)}function sZ(e){return[].slice.call(e)}let sJ=0;function sQ(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function sX({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=sZ(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=ig(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:sY(t)},indexes:sZ(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:ig(o),keyPath:o,unique:r,multiEntry:n,extractKey:sY(o)};return i[sQ(o)]=a,a}),getIndexByKeyPath:e=>i[sQ(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[sQ(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=aH(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,sB(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=g;else for(let t=0;t<p;++t)h.push(u=c[r](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=aH(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},f=sF(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=f,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=aH(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=sF(o)}),query:e=>new Promise((r,n)=>{r=aH(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:f}=u,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=sF(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=sF(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=aH(s);let{index:u,range:c}=n,d=e.objectStore(t),f=u.isPrimaryKey?d:d.index(u.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=sF(l),h.onsuccess=aH(t=>{let r=h.result;if(!r)return void s(null);r.___id=++sJ,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=aH(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=aH(e),h.onerror=sF(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=aH(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=aH(t=>e(t.target.result)),c.onerror=sF(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:sG(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function s0({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=iP(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?iE(t,r,{get(){return this.table(r)},set(e){iS(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function s1({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function s3(e,t){return e._cfg.version-t._cfg.version}function s4(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||sl)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];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 e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function s2(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>s6(o,e)),o}function s6(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function s5(e,t,r){let n={};return ik(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=sH(sz(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=sH(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=sq(e,i,a)}),n}function s8({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+ik(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&im.WorkerGlobalScope&&im instanceof im.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class s9{_parseStoresSpec(e,t){iy(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return sH(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),ig(n),0===t)}),o=n.shift();if(o.multi)throw new i7.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new i7.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new i7.Schema("Index must have a name and cannot be an empty string")}),t[r]=sq(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?ib(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{ib(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,s1(t,[t._allTables,t,t.Transaction.prototype]),s0(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],iy(o),o),t._storeNames=iy(o),this}upgrade(e){return this._cfg.contentUpgrade=ac(this._cfg.contentUpgrade||ar,e),this}}function s7(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new lb(sc,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function le(e){return e&&"function"==typeof e.databases}function lt(e){return aQ(function(){return aC.letThrough=!0,e()})}function lr(e){var t=t=>e.next(t),r=o(t),n=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(r,n):ig(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function ln(e,t,r){var n=arguments.length;if(n<2)throw new i7.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,iL(o),r]}function lo(e,t,r){let n=ig(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let li={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=sQ(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:sY(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:lo(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:lo(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[sQ(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(lo(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(lo(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function la(e,t,r,n){return r=r||{},n=n||"",iy(e).forEach(o=>{if(iw(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=iK(i);e!==iK(a)?r[n+o]=t[o]:"Object"===e?la(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),iy(t).forEach(o=>{iw(e,o)||(r[n+o]=t[o])}),r}let ls={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=aC.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===ar&&s.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===ar)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=aC.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||iN(e.values[o],n.keyPath,r))}else{let t=la(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{iw(t,e)?t[e]=n[e]:iN(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function ll(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===sO(t.keys[o],e[i])&&(n.push(r?iU(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let lu={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=ll(e.keys,e.trans._cache,"clone"===e.cache);return t?aR.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?iU(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function lc(e){return!("from"in e)}let ld=function(e,t){if(!this){let t=new ld;return e&&"d"in e&&ib(t,e),t}ib(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function lf(e,t,r){let n=sO(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(lc(e))return ib(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>sO(r,e.from))return o?lf(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},lm(e);if(sO(t,e.to)>0)return i?lf(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},lm(e);0>sO(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),sO(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&lp(e,o),i&&a&&lp(e,i)}function lp(e,t){lc(t)||function e(t,{from:r,to:n,l:o,r:i}){lf(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function lh(e){let t=lc(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>sO(e,t.n.from);)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,!r||0>=sO(e,t.n.to))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 lm(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=ly(r)}e.d=ly(e)}function ly({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}ix(ld.prototype,{add(e){return lp(this,e),this},addKey(e){return lf(this,e,e),this},addKeys(e){return e.forEach(e=>lf(this,e,e)),this},[iH](){return lh(this)}});let lg={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new ld(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new ld)},u=l(""),c=l(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(ig(f)){"delete"!==d&&(f=e.results),u.addKeys(f);let t=ll(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&ig(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==sO(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new ld(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new ld(e.key)],getMany:e=>[a,(new ld).addKeys(e.keys)],count:c,query:c,openCursor:c};return iy(d).forEach(e=>{u[e]=function(i){let{subscr:a}=aC;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new ld)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class lb{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=lb.dependencies;this._options=t={addons:lb.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ar,dbReadyPromise:null,cancelOpen:ar,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new aR(e=>{i.dbReadyResolve=e}),i.openCanceller=new aR((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=sg(this,"populate","blocked","versionchange","close",{ready:[ac,ar]}),this.on.ready.subscribe=ij(this.on.ready.subscribe,e=>(t,r)=>{lb.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||aR.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,sb(sk.prototype,function(e,t){this.db=r;let n=sh,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.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:o,or:i.or,valueMapper:s!==an?s:null}})),this.Table=function(e){return sb(sy.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:sg(null,{creating:[aa,ar],reading:[ao,an],updating:[al,ar],deleting:[as,ar]})})}(this),this.Transaction=function(e){return sb(sK.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=sg(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 aR((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(),st(e)})})}(this),this.Version=function(e){return sb(s9.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return sb(sL.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new i7.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)=>0>o.cmp(e,t)?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=sG(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),ss.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(li),this.use(ls),this.use(lg),this.use(lu),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new i7.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new i7.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(s3),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||aC.letThrough||this._vip)?e():new aR((e,t)=>{if(this._state.openComplete)return t(new i7.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new i7.DatabaseClosed);this.open().catch(ar)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?st(r.dbOpenError):e);iZ&&(r.openCanceller._stackHolder=iX()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new i7.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1,u=()=>new aR((t,o)=>{if(i(),!n)throw new i7.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new i7.MissingAPI;u.onerror=sF(o),u.onblocked=aH(e._fireOnBlocked),u.onupgradeneeded=aH(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=sB,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=aH(()=>{o(new i7.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=sF(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=aC.transless||aC,aQ(()=>{aC.trans=n,aC.transless=f,0===i?(iy(r).forEach(e=>{s2(c,e,r[e].primKey,r[e].indexes)}),sX(e,c),aR.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=s5(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;s8(e,o,n),s8(e,l,n),a=e._dbSchema=l;let u=s4(o,l);u.add.forEach(e=>{s2(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new i7.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>s6(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),s6(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;sX(e,n),r._memoizedTables={},s=!0;let i=iI(l);u.del.forEach(e=>{i[e]=o[e]}),s1(e,[e.Transaction.prototype]),s0(e,[e.Transaction.prototype],iy(i),i),r.schema=i;let a=iY(c);a&&aX();let d=aR.follow(()=>{if((t=c(r))&&a){var e=a0.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?aR.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&sl||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),s1(e,[e.Transaction.prototype]),s0(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?aR.resolve(o.shift()(r.idbtrans)).then(e):aR.resolve()})().then(()=>{var e;iy(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||s2(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=aH(()=>{s=null;let n=e._novip.idbdb=u.result,o=ik(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=s5(0,t,r);e._storeNames=ik(t.objectStoreNames,0),s0(e,[e._allTables],iy(n),n)}(e,n,i):(s8(e,e._dbSchema,i),((t=s4(s5(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),sX(e,i)}catch(e){}ss.push(e),n.onversionchange=aH(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=aH(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){le(e)||r===sc||s7(e,t).put({name:r}).catch(ar)}(e._deps,a),t()},o)}).catch(e=>e&&"UnknownError"===e.name&&r.PR1398_maxLoop>0?(r.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u()):aR.reject(e));return aR.race([o,("u"<typeof navigator?aR.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(u)]).then(()=>(i(),r.onReadyBeingFired=[],aR.resolve(lt(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(ac,ar);return r.onReadyBeingFired=[],aR.resolve(lt(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),st(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=ss.indexOf(this);if(t>=0&&ss.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new aR(t=>{e.dbReadyResolve=t}),e.openCanceller=new aR((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new i7.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new aR((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=aH(()=>{!function({indexedDB:e,IDBKeyRange:t},r){le(e)||r===sc||s7(e,t).delete(r).catch(ar)}(this._deps,this.name),r()}),e.onerror=sF(n),e.onblocked=this._fireOnBlocked};if(e)throw new i7.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return iy(this._allTables).map(e=>this._allTables[e])}transaction(){let e=ln.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=aC.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===sd)n=sd;else{if("rw"!=e&&e!=sf)throw new i7.InvalidArgument("Invalid transaction mode: "+e);n=sf}if(i){if(i.mode===sd&&n===sf){if(!a)throw new i7.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new i7.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):st(e)}let s=(function e(t,r,n,o,i){return aR.resolve().then(()=>{let a,s=aC.transless||aC,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===i9.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):st(o)}let u=iY(i);u&&aX();let c=aR.follow(()=>{if(a=i.call(l,l))if(u){var e=a0.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=lr(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?aR.resolve(a).then(e=>l.active?e:st(new i7.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),st(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):aC.trans?a5(aC.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!iw(this._allTables,e))throw new i7.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let lv="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class l_{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[lv](){return this}}function lw(e,t){return iy(t).forEach(r=>{lp(e[r]||(e[r]=new ld),t[r])}),e}try{i={indexedDB:im.indexedDB||im.mozIndexedDB||im.webkitIndexedDB||im.msIndexedDB,IDBKeyRange:im.IDBKeyRange||im.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function lx(e){let t=lS;try{lS=!0,sW.storagemutated.fire(e)}finally{lS=t}}ix(lb,{...at,delete:e=>new lb(e,{addons:[]}).delete(),exists:e=>new lb(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return le(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==sc)):s7(e,t).toCollection().primaryKeys()})(lb.dependencies).then(e)}catch(e){return st(new i7.MissingAPI)}},defineClass:()=>function(e){ib(this,e)},ignoreTransaction:e=>aC.trans?a5(aC.transless,e):e(),vip:lt,async:function(e){return function(){try{var t=lr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:aR.resolve(t)}catch(e){return st(e)}}},spawn:function(e,t,r){try{var n=lr(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:aR.resolve(n)}catch(e){return st(e)}},currentTransaction:{get:()=>aC.trans||null},waitFor:function(e,t){let r=aR.resolve("function"==typeof e?lb.ignoreTransaction(e):e).timeout(t||6e4);return aC.trans?aC.trans.waitFor(r):r},Promise:aR,debug:{get:()=>iZ,set:e=>{iZ=e,iJ="dexie"===e?()=>!0:su}},derive:iD,extend:ib,props:ix,override:ij,Events:sg,on:sW,liveQuery:function(e){let t,r=!1,n=new l_(n=>{let o=iY(e),i=!1,a={},s={},l={get closed(){return i},unsubscribe:()=>{i=!0,sW.storagemutated.unsubscribe(f)}};n.start&&n.start(l);let u=!1,c=!1;function d(){return iy(s).some(e=>a[e]&&function(e,t){let r=lh(t),n=r.next();if(n.done)return!1;let o=n.value,i=lh(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=sO(s.from,o.to)&&sO(s.to,o.from)>=0)return!0;0>sO(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(a[e],s[e]))}let f=e=>{lw(a,e),d()&&p()},p=()=>{let h,m;if(u||i)return;a={};let y={},g=(o&&aX(),h=()=>aQ(e,{subscr:y,trans:null}),m=aC.trans?a5(aC.transless,h):h(),o&&m.then(a0,a0),m);c||(sW(sV,f),c=!0),u=!0,Promise.resolve(g).then(e=>{r=!0,t=e,u=!1,i||(d()?p():(a={},s=y,n.next&&n.next(e)))},e=>{u=!1,r=!1,n.error&&n.error(e),l.unsubscribe()})};return p(),l});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:lw,getByKeyPath:iA,setByKeyPath:iN,delByKeyPath:function(e,t){"string"==typeof t?iN(e,t,void 0):"length"in t&&[].map.call(t,function(t){iN(e,t,void 0)})},shallowClone:iI,deepClone:iU,getObjectDiff:la,cmp:sO,asap:iR,minKey:so,addons:[],connections:ss,errnames:i9,dependencies:i,semVer:sr,version:sr.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),lb.maxKey=sG(lb.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(sW(sV,e=>{if(!lS){let t;sl?(t=document.createEvent("CustomEvent")).initCustomEvent(sU,!0,!0,e):t=new CustomEvent(sU,{detail:e}),lS=!0,dispatchEvent(t),lS=!1}}),addEventListener(sU,({detail:e})=>{lS||lx(e)}));let lS=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(sU);"function"==typeof e.unref&&e.unref(),sW(sV,t=>{lS||e.postMessage(t)}),e.onmessage=e=>{e.data&&lx(e.data)}}else if("u">typeof self&&"u">typeof navigator){sW(sV,e=>{try{lS||("u">typeof localStorage&&localStorage.setItem(sU,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:sU,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===sU){let t=JSON.parse(e.newValue);t&&lx(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===sU&&lx(e.changedParts)})}function lE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}aR.rejectionMapper=function(e,t){if(!e||e instanceof i2||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ae[e.name])return e;var r=new ae[e.name](t||e.message,e);return"stack"in e&&iE(r,"stack",{get:function(){return this.inner.stack}}),r},iJ=su;class lD extends lb{constructor(){super("EsmOffline"),lE(this,"syncQueue",void 0),lE(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function lO(){return new lD}let lP=new lD,lC={};async function lk(){let e=await oI();return e?.uuid||"*"}async function lj(e,t,r,n){let o=n&&n.id;return void 0!==o&&await lP.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(lb.errnames.DatabaseClosed),await lP.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(lb.errnames.DatabaseClosed,()=>-1)}async function lT(e,t,r){let n=await lk();return await lj(n,e,t,r)}async function lR(e,t){return(await lM(e,t)).map(e=>e.content)}async function lM(e,t){return await lP.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(lb.errnames.DatabaseClosed,()=>[])}async function lA(e){let t=await lk();return await lR(t,e)}async function lN(e){let t=await lk();return await lM(t,e)}async function lI(e){return await lP.syncQueue.get(e).catch(lb.errnames.DatabaseClosed,()=>void 0)}function l$(e){return!!lC[e]?.options.onBeginEditSyncItem}async function lL(e){let t=await lI(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=lC[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function lF(e){await lP.syncQueue.delete(e).catch(lb.errnames.DatabaseClosed)}function lB(e,t,r,n={}){lC[e]={type:e,dependsOn:t,process:r,options:n}}K("offline-synchronization",{});let lV={};function lU(){return Object.values(lV)}function lW(e){lV[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),lV[e.id]=e}async function lK(e){let t=await lQ();return await lH(t,e)}async function lH(e,t){let r=new lD;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(lb.errnames.DatabaseClosed,()=>[])}async function lz(e,t){let r=await lQ();return await lq(r,e,t)}async function lq(e,t,r){let n=new lD,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(lb.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(lb.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(lb.errnames.DatabaseClosed)}async function lG(e,t){let r=await lQ();return await lY(r,e,t)}async function lY(e,t,r){let n=new lD,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(lb.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(lb.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(lb.errnames.DatabaseClosed))}async function lZ(e,t){let r=await lK(e);await Promise.all(r.map(async e=>lJ(e.type,e.identifier,t)))}async function lJ(e,t,r){await lz(e,t);let n=new lD,o=await lQ(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(lb.errnames.DatabaseClosed,()=>void 0),a=lU().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(lb.errnames.DatabaseClosed)}async function lQ(){let e=(await oI()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let lX=K("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function l0(){return l4(),lX}function l1(e,t){l4(),lW({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function l3(e){l4(),await lJ("patient",e)}function l4(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function l2(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([oD(`${ox}/Patient/${e}`,t).catch(e=>n=e),r?l6(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function l6(e){let t=(await lA("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function l5(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var l8=((er={}).NEWVISIT="startVisit",er.EDITVISIT="editVisit",er.LOADING="loadingVisit",er),l9=((en={}).NOTSTARTED="notStarted",en.ONGOING="ongoing",en);let l7="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",ue=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function ut(){return z("visit",ue)}function ur(e,t){ut().setState({patientUuid:e,manuallySetVisitUuid:t})}function un(e,t){return oD(`${ow}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function uo(e,t,r){return oD(`${ow}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function ui(e,t,r){return oD(`${ow}/visit?patient=${e}&v=${r??l7}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}ut().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let ua=new ea.BehaviorSubject(null);var us=r(56170);function ul(e){return{uuid:e.uuid,display:e.display,name:e.name}}function uu(){return oO(`${ow}/visittype`).pipe((0,us.map)(e=>e.data.results.map(ul))).pipe((0,us.take)(1))}function uc(e){return{uuid:e.uuid,display:e.display}}function ud(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return oO(`${ow}/location${n?"?"+n:""}`).pipe((0,us.map)(e=>e.data.results.map(uc))).pipe((0,us.take)(1))}class uf{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+uf.version}static addUnaryOp(e){return uf.max_unop_len=Math.max(e.length,uf.max_unop_len),uf.unary_ops[e]=1,uf}static addBinaryOp(e,t,r){return uf.max_binop_len=Math.max(e.length,uf.max_binop_len),uf.binary_ops[e]=t,r?uf.right_associative.add(e):uf.right_associative.delete(e),uf}static addIdentifierChar(e){return uf.additional_identifier_chars.add(e),uf}static addLiteral(e,t){return uf.literals[e]=t,uf}static removeUnaryOp(e){return delete uf.unary_ops[e],e.length===uf.max_unop_len&&(uf.max_unop_len=uf.getMaxKeyLen(uf.unary_ops)),uf}static removeAllUnaryOps(){return uf.unary_ops={},uf.max_unop_len=0,uf}static removeIdentifierChar(e){return uf.additional_identifier_chars.delete(e),uf}static removeBinaryOp(e){return delete uf.binary_ops[e],e.length===uf.max_binop_len&&(uf.max_binop_len=uf.getMaxKeyLen(uf.binary_ops)),uf.right_associative.delete(e),uf}static removeAllBinaryOps(){return uf.binary_ops={},uf.max_binop_len=0,uf}static removeLiteral(e){return delete uf.literals[e],uf}static removeAllLiterals(){return uf.literals={},uf}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new uf(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return uf.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!uf.binary_ops[String.fromCharCode(e)]||uf.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return uf.isIdentifierStart(e)||uf.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(uf.hooks[e]){let r={context:this,node:t};return uf.hooks.run(e,r),r.node}return t}searchHook(e){if(uf.hooks[e]){let t={context:this};return uf.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===uf.SPACE_CODE||e===uf.TAB_CODE||e===uf.LF_CODE||e===uf.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:uf.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===uf.SEMCOL_CODE||r===uf.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,uf.max_binop_len),t=e.length;for(;t>0;){if(uf.binary_ops.hasOwnProperty(e)&&(!uf.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!uf.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:uf.binaryPrecedence(t),right_a:uf.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=uf.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:uf.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:uf.BINARY_EXP,operator:t,left:i,right:a},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:uf.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,uf.isDecimalDigit(e)||e===uf.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===uf.SQUOTE_CODE||e===uf.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===uf.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,uf.max_unop_len)).length;r>0;){if(uf.unary_ops.hasOwnProperty(t)&&(!uf.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!uf.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:uf.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}uf.isIdentifierStart(e)?(n=this.gobbleIdentifier(),uf.literals.hasOwnProperty(n.name)?n={type:uf.LITERAL,value:uf.literals[n.name],raw:n.name}:n.name===uf.this_str&&(n={type:uf.THIS_EXP})):e===uf.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===uf.PERIOD_CODE||t===uf.OBRACK_CODE||t===uf.OPAREN_CODE||t===uf.QUMARK_CODE;){let r;if(t===uf.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==uf.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===uf.OBRACK_CODE?((e={type:uf.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==uf.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===uf.OPAREN_CODE?e={type:uf.CALL_EXP,arguments:this.gobbleArguments(uf.CPAREN_CODE),callee:e}:(t===uf.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:uf.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===uf.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);uf.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,uf.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===uf.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===uf.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:uf.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:uf.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(uf.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,uf.isIdentifierPart(e))this.index++;else break;return{type:uf.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===uf.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===uf.COMMA_CODE){if(this.index++,++n!==t.length){if(e===uf.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===uf.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==uf.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(uf.CPAREN_CODE);if(this.code===uf.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:uf.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:uf.ARRAY_EXP,elements:this.gobbleArguments(uf.CBRACK_CODE)}}}Object.assign(uf,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(uf),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),uf.max_unop_len=uf.getMaxKeyLen(uf.unary_ops),uf.max_binop_len=uf.getMaxKeyLen(uf.binary_ops);let up=e=>new uf(e).parse(),uh=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(uf).filter(e=>!uh.includes(e)&&void 0===up[e]).forEach(e=>{up[e]=uf[e]}),up.Jsep=uf,up.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let um="ArrowFunctionExpression",uy={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},ug={...uy,Promise};function ub(e,t={}){return uE(e,t,uP)}async function uv(e,t={}){return uD(e,t,uP)}function u_(e,t={}){return uE(e,t,uC)}function uw(e,t={}){return uD(e,t,uC)}function ux(e,t={}){return uE(e,t,uk)}function uS(e,t={}){return uD(e,t,uk)}function uE(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=uA(t,uy),o=uj("string"==typeof e?up(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function uD(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=uA(t,ug);return Promise.resolve(uj("string"==typeof e?up(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function uO(e){return up(e)}function uP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function uC(e){return"boolean"==typeof e}function uk(e){return"number"==typeof e}function uj(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,l,u,c,d,f,p,h,m=e,y=t;let g=uj(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return uj(b.left,v)&&uj(b.right,v);case"||":return uj(b.left,v)||uj(b.right,v);case"??":return uj(b.left,v)??uj(b.right,v)}let w=uj(b.left,v),x=uj(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,uj(r.test,n)?uj(r.consequent,n):uj(r.alternate,n);case"CallExpression":return u$(uR(e,t));case"ArrowFunctionExpression":let S;return o=e,i=t,S=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<S.length)throw`Required argument(s) ${S.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(S.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return uj(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return u$(uM(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(uL(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(uL(u)))[E.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(uL(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(uF(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let P,C;return f=e,p=t,P=f.expressions?.map(uL(p))??[],(C=f.quasis?.map(uL(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function uT(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return uT(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function uR(e,t){let r=uI(e.callee,t);if(r===uN||e.optional&&null==r)return uN;let n=e.arguments?.map(uL(t));if(r){if("function"!=typeof r)throw`${uU(e.callee)} is not a function`}else throw`No function named ${uU(e.callee)} is defined in this context`;return r(...n)}function uM(e,t){let r=uI(e.object,t);if(r===uN||e.optional&&null==r)return uN;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${uV(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=uT(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${uV(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(uj(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);uF(n),function(e,t){if(uB.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function uA(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}up.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:um,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=um,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),up.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),up.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,i,a;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,i=u,95===o||i.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),up.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),up.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),up.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),up.addBinaryOp("in",7),up.addBinaryOp("??",1);let uN=Symbol("optional chain short-circuited");function uI(e,t){switch(e.type){case"MemberExpression":return uM(e,t);case"CallExpression":return uR(e,t);default:return uj(e,t)}}function u$(e){return e===uN?void 0:e}function uL(e){return function(t){return null===t?null:uj(t,e)}}function uF(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let uB=new Set(["toString","valueOf","hasOwnProperty"]);function uV(e,t){try{return uT(e,t)}catch{return"<computed>"}}function uU(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function uW(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...ug},isLocalExpression:!1,variables:new Set};return uK("string"==typeof e?up(e):e,t),[...t.variables]}function uK(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,uK(n.argument,o);case"BinaryExpression":return i=e,a=t,[uK(i.left,a),uK(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[uK(s.consequent,l),uK(s.test,l),uK(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=uK(u.callee,c),u.arguments?.map(uH(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,l,u,c,d,f,p,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let S=v.params?.map(uH(x))??[],E=uK(v.body,x)??[];if(E&&Array.isArray(E))for(let e of E)S.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(uK(D.object,O),D.computed)return void uK(D.property,O);let P={...O};P.isLocalExpression=!0,uK(D.property,P);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(uH(f));case"SequenceExpression":return p=e,h=t,void p.expressions?.map(uH(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(uH(y));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,k=t;if(!(C.name in k.globals))if(k.isLocalExpression)return C.name;else k.variables.add(C.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(uH(b)),g.quasis?.map(uH(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function uH(e){return function(t){return null===t?null:uK(t,e)}}let uz=z("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function uq(e,t,r){uz.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function uG(e){return uz.getState().flags[e].enabled}function uY(e){return!window.offlineEnabled||(e??navigator.onLine)}uz.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var uZ=ez(function(e,t,r){eN(e,t,r)});function uJ(e,t=!0,r=!1){return!!(e?t:r)}let uQ=K("extensionsInternal",{slots:{},extensions:{}}),uX=K("extensionRenderings",{renderings:new Map}),u0=()=>z("extensionsInternal",{slots:{},extensions:{}});function u1(e){let t=uQ.getState(),r=e(t);r!==t&&uQ.setState(r)}let u3=null,u4=null;function u2(){let e=uX.getState();return u3&&e===u4||(u3=new Map(e.renderings),u4=e,function(e){for(let t of(u9.clear(),e.values()))ce(t,1);u7=!0}(u3)),u3}function u6(e){u4={renderings:e},uX.setState(u4,!0)}let u5=()=>z("extensions",{slots:{}});function u8(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}let u9=new Map,u7=!1;function ce(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=u9.get(r);if(!n){if(t<0)return;u9.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),u7=!0;return}n.count+=t,n.count<1&&(u9.delete(r),u7=!0)}function ct(){var e,t;if(u2(),!u7)return;u7=!1;let r=Array.from(u9.values(),({record:e})=>e);r.sort(cr),e=tv.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===cr(e,t[r]))||tv.setState({mountedExtensions:r})}function cr(e,t){return cn(e.slotName,t.slotName)||cn(e.extensionId,t.extensionId)||cn(e.slotModuleName,t.slotModuleName)||cn(e.extensionModuleName,t.extensionModuleName)}function cn(e,t){return e===t?0:e<t?-1:1}ct(),uX.subscribe(()=>u8(ct));let co=u0(),ci=u5(),ca=tw(),cs=tx(),cl=new Set,cu=!1;function cc(e){if(null===e)cl=null;else if(null!==cl)for(let t of e)cl.add(t);u8(cd)}function cd(){if(!cu){cu=!0;try{for(let e=1;;e++){let t=cl;if(null!==t&&0===t.size)return;cl=new Set;try{!function(e,t,r,n,o,i=null){let a=ci.getState().slots,s={},l=!1,u=uY(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,f]of Object.entries(e.slots)){var d;let p=a[n];if(p&&i&&!i.has(n)){s[n]=p;continue}let{config:h}=(d=f.name,t.slots[d]??{loaded:!1,config:{}}),m=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=co.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>cw(e,o,i[cm(e)]?.order,t)-cw(r,o,i[cm(r)]?.order,t))}(r,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=tS(n,e,u),c=r.configure?.[u]??null,d=c?uZ({},s,c):s,f=cm(u),p=t.extensions[f];if(p){let e=d?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!oN(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag)||window.offlineEnabled&&!uJ(i,p.online,p.offline))continue;l.push({id:u,name:f,moduleName:p.moduleName,config:d,featureFlag:p.featureFlag,meta:p.meta,online:d?.["Display conditions"]?.online??p.online??!0,offline:d?.["Display conditions"]?.offline??p.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||p.displayExpression})}}return l}(n,e,h,r,c,u,o.session);p&&p.moduleName===f.moduleName&&(0,eG.A)(p.candidateExtensions,m)?s[n]=p:(s[n]={moduleName:f.moduleName,candidateExtensions:m},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&ci.setState({slots:s})}(co.getState(),ca.getState(),cs.getState(),uz.getState(),oC.getState(),t)}catch(e){throw cl=null===t||null===cl?null:new Set([...t,...cl]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{cu=!1}}}function cf(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function cp(){cc(null)}function ch(e,t){return{moduleName:t,name:e,attachedIds:[]}}function cm(e){let[t]=e.split("#");return t}function cy(e){var t;let r;return t=co.getState(),r=cm(e),t.extensions[r]}co.subscribe((e,t)=>{cc(e.extensions!==t.extensions?null:cf(e.slots,t.slots))}),ca.subscribe((e,t)=>{cc(cf(e.slots,t.slots))}),cs.subscribe((e,t)=>{cc(cf(e.configs,t.configs))}),uz.subscribe(()=>cc(null)),oC.subscribe(()=>cc(null)),cp(),g(cp);let cg=e=>u1(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function cb(e,t){u1(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...ch(e),attachedIds:[t]}}}})}function cv(e,t){u1(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function c_(e){u1(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function cw(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function cx(e,t){var r;return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!u_(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}((r=e,ci.getState().slots[r]?.candidateExtensions??[]),t,oC.getState().session,e)}let cS=(e,t)=>co.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=ch(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),cE=K("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function cD({name:e,basePath:t,mode:r,componentContext:n,state:o}){cE.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function cO(e){cE.getState().slotName===e&&cE.setState(cE.getInitialState(),!0)}let cP=0,cC=null,ck={bootstrap:15e3,mount:15e3,unmount:15e3};function cj(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(ck).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=ck[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function cT(e,t){var r,n;let o,i,a,s,l,u=await (cC??(cC=new Promise((e,t)=>{rz({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),rz))),cC),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>cj(e,r)):cj(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function cR(e,t){let r,n=cT(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cM(e,t,r,n,o=e=>e,i={}){let a=cm(n),s=cy(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:c,moduleName:d,online:f,offline:p,load:h}=s;if(function(e=!0,t=!1){return uJ(uY(),e,t)}(f,p)){let s,f=cP++,p=`${t}/${n}-${f}`;e.dataset.extensionRenderingId=p;let m=e=>{try{let e,t;(t=(e=u2()).get(p))&&(e.delete(p),ce(t,-1),u6(e))}catch(t){console.error(e,t)}};try{var u;let e;u={renderingId:p,extensionName:a,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r},(e=u2()).has(u.renderingId)||(e.set(u.renderingId,u),ce(u,1),u6(e))}catch(e){throw m(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await h()}catch(e){throw m(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await cT(o({...s,name:`${t}/${a}-${f}`}),{...i,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw m(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),m(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>m(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),m(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}function cA(){return{current:"unavailable",notAvailable:!0,active:!1}}let cN="x-omrs-offline-response-body",cI="x-omrs-offline-response-status",c$="x-omrs-offline-caching-strategy",cL="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cF=new Uint8Array(16),cB=[];for(let e=0;e<256;++e)cB.push((e+256).toString(16).slice(1));let cV=function(e,t,r){if(cL&&!t&&!e)return cL();let n=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(cF)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return cB[e[t+0]]+cB[e[t+1]]+cB[e[t+2]]+cB[e[t+3]]+"-"+cB[e[t+4]]+cB[e[t+5]]+"-"+cB[e[t+6]]+cB[e[t+7]]+"-"+cB[e[t+8]]+cB[e[t+9]]+"-"+cB[e[t+10]]+cB[e[t+11]]+cB[e[t+12]]+cB[e[t+13]]+cB[e[t+14]]+cB[e[t+15]]}(n)},cU="OFFLINE+";function cW(){return cU+cV()}function cK(e){return e.startsWith(cU)}var cH=r(47499),cz=r.n(cH);function cq({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cH.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cz().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),oy({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:oh(e,t),...o},n)}let cG=K("modalRegistry",{modals:{}}),cY=K("workspaceRegistrations",{workspaces:{}}),cZ=K("workspaceGroups",{workspaceGroups:{}}),cJ=new Set;function cQ(e){let t=cY.getState().workspaces;if(t[e])return t[e];{let t=cy(e);if(t){var r;let n;return cJ.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),cJ.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?of(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}let cX=K("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function c0(e){let{openedWindows:t}=cX.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}let c1=(0,cH.createContext)({moduleName:"",featureName:""});function c3(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let c4=e=>e;function c2(e,t=c4,r){let n=(0,cH.useCallback)(t=>e.subscribe(t),[e]),o=(0,cH.useCallback)(()=>t(e.getState()),[e,t]),i=(0,cH.useSyncExternalStore)(n,o,o),a=(0,cH.useMemo)(()=>r?c3(e,r):null,[e,r]);return(0,cH.useMemo)(()=>a?{...i,...a}:i,[i,a])}function c6(e,t){return c2(e,c4,t)}function c5(e){return function(t){let r=(0,cH.useCallback)(t=>e.subscribe(t),[]),n=(0,cH.useCallback)(()=>e.getState(),[]),o=(0,cH.useSyncExternalStore)(r,n,n),i=(0,cH.useMemo)(()=>t?c3(e,t):null,[t]);return(0,cH.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let c8=[];Object.freeze(c8);let c9={candidateExtensions:c8};Object.freeze(c9);let c7=e=>{let t=(0,cH.useCallback)(t=>t.slots?.[e]??c9,[e]);return c2(u5(),t)},de=e=>e.session;function dt(e,t){let r,{candidateExtensions:n}=c7(e),o=c2(oC,de),i=(A((r=(0,cH.useRef)(t)).current,t)||(r.current=t),r.current);return(0,cH.useMemo)(()=>cx(e,i),[e,i,o,n])}function dr(e,t){let{moduleName:r}=(0,cH.useContext)(c1);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cH.useEffect)(()=>{cS(r,e)},[r,e]),{extensions:dt(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function dn(e){return e}function di({name:e,extensionSlotName:t,select:r=dn,children:n,state:o,style:i,...a}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,cH.useRef)(null),{extensions:u,extensionSlotModuleName:c}=dr(s,o),d=(0,cH.useMemo)(()=>r(u),[r,u]),f=(0,cH.useMemo)(()=>{if("function"==typeof n&&!cz().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cz().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>cz().createElement(c1.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},f?.[t]??("function"!=typeof n?n:null)??cz().createElement(fT,{state:o}))))}var da=r(5338);function ds(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ds(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ds(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function du(e){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e){return(dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dd(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(dc(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(dc(e)));return e}}var df=null;try{df=require("react").createContext()}catch(e){}var dp={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function dh(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function dm(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,i=dv(e,t,function(){r(this)}),a=dd(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:db(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function dy(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():db(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function dg(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=dv(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=dd(e,t)();db(e).render(n,i)}})}function db(e){return e.ReactDOMClient||e.ReactDOM}function dv(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=df?e.React.createElement(df.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,dl(dl({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var d_=r(58779),dw=r(73391),dx=r.n(dw),dS=r(25952);let dE={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},dD=new Map;(0,dS.initCache)(dD);let dO={errorRetryCount:3,fetcher:oD,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof oP){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>dD};function dP(e,t){return function(e){if("object"!==du(e))throw Error("single-spa-react requires a configuration object");var t,r=dl(dl({},dp),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!df&&r.React.createContext&&(df=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:dh.bind(null,r),mount:dm.bind(null,r),unmount:dy.bind(null,r)};return r.parcelCanUpdate&&(n.update=dg.bind(null,r)),n}({React:cz(),ReactDOMClient:da,rootComponent:(function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},dE,e),r={...dO,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=cz().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cz().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cz().createElement(cH.Suspense,{fallback:null},cz().createElement(dw.SWRConfig,{value:r},cz().createElement(c1.Provider,{value:this.state.config},t.disableTranslations?cz().createElement(e,this.props):cz().createElement(d_.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},cz().createElement(e,this.props)))));return t.strictMode&&cz().StrictMode?cz().createElement(cz().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}})(t)(e)})}function dC(e,t){return()=>e().then(({default:e})=>dP(e,t))}function dk(e,t){return()=>Promise.resolve(dP(e,t))}let dj=dC,dT=new Map;function dR(e,t){let r=(0,cH.useRef)(t??{}),n=(0,cH.useRef)(t=>oG(e,t)),o=(0,cH.useRef)(Symbol());return(0,cH.useEffect)(()=>{let r=t??{},n=o.current;return null===oq(e)?oH(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),oG(e,()=>r)),dT.set(e,n),()=>{dT.get(e)===n&&(oz(e),dT.delete(e))}},[e]),(0,cH.useEffect)(()=>{let n=t??{};A(r.current,n)||(oG(e,()=>n),r.current=n)},[t]),n.current}function dM({namespace:e,value:t}){return dR(e,t),null}let dA=({children:e,value:t,fallback:r})=>t?cz().createElement(cz().Fragment,null,e):r?cz().createElement(cz().Fragment,null,r):null;function dN(){let e=(0,cH.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cH.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function dI(e,t=e=>e??{}){let[r,n]=(0,cH.useState)(()=>{if(d$(e))return;let r=oq(e);if(null!==r)return t?t(r):r});return(0,cH.useEffect)(()=>{if(d$(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cH.useEffect)(()=>oY(e,e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>A(e,r)?e:r)}),[e,t]),r}function d$(e){return"string"!=typeof e||0===e.trim().length}function dL(e){let t=dt(e);return(0,cH.useMemo)(()=>t.map(e=>e.id),[t])}function dF(e,t,r){let{data:n,error:o,mutate:i,isLoading:a,isValidating:s}=dx()(e?o7(e,t,r):null,oD);return(0,cH.useMemo)(()=>({isLoading:a,data:n?.data.results??[],error:o,mutate:i,isValidating:s}),[n,o,a,s,i])}function dB(e){(0,cH.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dV={},dU=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
- Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dW(e){let{moduleName:t,extension:r}=(0,cH.useContext)(c1),n=e?.externalModuleName??t;if(!n&&!r)throw Error(dU);let o=function(e){let t=(0,cH.useMemo)(()=>t_(e),[e]),r=function(e){let[t,r]=(0,cH.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cH.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dV[e]||(dV[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),dV[e];return r}(n),i=function(e){let t=(0,cH.useMemo)(tx,[]),r=function(e,t){let[r,n]=(0,cH.useState)(t?()=>{let r=tS(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cH.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=tS(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,eG.A)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!dV[r]&&t&&(dV[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=tS(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),dV[r]}return r||{}}(r);return(0,cH.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let dK=dt;function dH(){let[e,t]=(0,cH.useState)(uY());return(0,cH.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function dz(e,t=300){let[r,n]=(0,cH.useState)(e);return(0,cH.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dq=r(66148),dG=r.n(dq);let dY=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function dZ(){let e=`${ow}/emrapi/configuration?v=${dY}`,t=dG()(e,oD);return(0,cH.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dJ(){return(0,cH.useContext)(c1).extension}function dQ(e){let t=dt(e);return(0,cH.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}c5(u0());let dX=c5(u5());function d0(e){let{flags:t}=c2(uz);return t[e]?.enabled??!1}function d1(){let[,e]=(0,cH.useState)(0);return(0,cH.useCallback)(()=>{e(e=>e+1)},[])}function d3(e,t,r={}){return d2(e,t,d4,r)}let d4={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oE(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function d2(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??oD,[d,f]=(0,cH.useState)(1),p=(0,cH.useRef)(NaN),h=(0,cH.useRef)(NaN),m=(0,cH.useRef)(d),y=(0,cH.useRef)(!1),g=(0,cH.useRef)(!1),b=e?.toString()??"",[v,w]=(0,cH.useState)(b);b!==v&&(w(b),f(1),m.current=1,p.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,S=(0,cH.useMemo)(()=>o(e,t,x),[e,t,x]),{data:E,...D}=(l?dG():dx())(S,c,u);E?.data&&(p.current=i(E?.data),h.current=a(E?.data),y.current=!0);let O=Math.ceil(p.current/t),P=(0,cH.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cH.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(p.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,f(e))},[d,t,b,E]);let C=(0,cH.useCallback)(()=>{P(m.current+1)},[P]),k=(0,cH.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(E?.data),totalPages:O,totalCount:p.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:C,goToPrevious:k,...D}}function d6(e,t,r={}){return d2(e,t,d5(),r)}function d5(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oE(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var d8=r(12786),d9=r.n(d8);function d7(e,t={}){return fe(e,d4,t)}function fe(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=r.fetcher??oD,u=(0,cH.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=d9()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{f((c?.length??0)+1)},nextUri:h,...p}}function ft(e,t={}){return fr(e,d4,t)}function fr(e,t,r={}){let n=fe(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cH.useEffect)(()=>{o&&!i&&s()},[o,u]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:l||o}}function fn(e,t={}){return fr(e,d5(),t)}function fo(e,t={}){return fe(e,d5(),t)}function fi(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function fa(){let[e,t]=(0,cH.useState)(fi);return(0,cH.useEffect)(()=>{let e=()=>{t(fi())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let fs=e=>"small-desktop"===e||"large-desktop"===e;function fl(e){let t=(0,cH.useContext)(c1);(0,cH.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),cD(e),()=>{cO(e.name)}),[t,e])}function fu(){return c2(cE)}function fc(e=null,t=null){let[r,n]=(0,cH.useState)([]);return(0,cH.useEffect)(()=>{let r=ud(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function fd(e,t=!0){let r=(0,cH.useRef)(null);return(0,cH.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function ff(e){let t=(0,cH.useRef)();return(0,cH.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function fp(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=dN(),s=(0,cH.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),l=(0,cH.useCallback)(e=>oD(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return dx()(e,l,i)}function fh(e=[],t=10){let[r,n]=(0,cH.useState)(1),o=(0,cH.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,cH.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,cH.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cH.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cH.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cH.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function fm(e,t,r,n){return{pageSizes:(0,cH.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cH.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function fy(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function fg(e){let[t,r]=(0,cH.useState)(e??fy()),{data:n,error:o,isValidating:i}=dx()(t?["patient",t]:null,()=>l2(t,{}));return(0,cH.useEffect)(()=>{let e=()=>{let e=fy();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cH.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function fb(){let e=`${ow}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=dx()(e,oD);return(0,cH.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function fv(e){let{extensions:t,extensionSlotModuleName:r}=dr(e);return e?t.map(t=>({state:n})=>cz().createElement(c1.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cz().createElement(fT,{state:n}))):[]}function f_(){let e=(0,cH.useRef)(),[t,r]=(0,cH.useState)(null),n=null;if(!t){if(s){let e=oT().getState();e.loaded&&(n=e.session)}else s=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(oT().getState()),n||(e.current=oT().subscribe(r))});if(n)r(n);else throw s}(0,cH.useEffect)(()=>(e.current||(e.current=oT().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let fw=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cH.useState)(null);return((0,cH.useEffect)(()=>{let e=oj({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&oN(e,n))?cz().createElement(cz().Fragment,null,r):t?cz().createElement(cz().Fragment,null,t):null};var fx=r(74353),fS=r.n(fx),fE=r(47581);let fD=new Map;function fO(){for(let e of Array.from(fD.values()))e()}let fP={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function fC(e){let t=(0,cH.useId)();return(0,cH.useEffect)(()=>{if(e)return fD.set(t,e),()=>{fD.delete(t)}},[t,e]),{...c6(ut(),fP),mutateVisit:fO}}function fk(e,t=l7){let r=(0,cH.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=fC((0,cH.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:f}=dx()(e?`${ow}/visit${s}`:null,oD),{data:p,error:h,mutate:m,isValidating:y}=dx()(e&&a?`${ow}/visit${l}`:null,oD),g=(0,cH.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,cH.useMemo)(()=>a&&p?p.data:null,[p,a]),v=(0,cH.useRef)(null);(0,cH.useEffect)(()=>{!f&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,f,y,n]);let w=(0,cH.useCallback)(()=>{d(),m()},[d,m]);(0,cH.useEffect)(()=>{r.current=w},[w]);let x=!!(!u||a&&!p),S=!!(a?h:c);return{error:c||h,mutate:w,isValidating:f||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!S}}function fj(){let[e,t]=(0,cH.useState)([]);return(0,cH.useEffect)(()=>{let e=uu().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}fx.extend(fE);let fT=({state:e,children:t,...r})=>{let{extension:n}=(0,cH.useContext)(c1),o=(0,cH.useRef)(null),i=(0,cH.useRef)(Promise.resolve()),a=(0,cH.useRef)(!1),s=(0,cH.useRef)(!1),l=(0,cH.useRef)(e),u=(0,cH.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cH.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cH.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cM(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cH.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,cH.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cz().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};var fR=r(74848),fM=r(46942),fA=r.n(fM);function fN({title:e,children:t}){let r="tablet"===fa();return(0,fR.jsxs)("div",{className:fA()({"-esm-form-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-form-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,fR.jsx)("h4",{children:e}),t]})}var fI=r(68108);let f$="-esm-form-builder__custom-overflow-menu-module__container___lY3iq",fL="-esm-form-builder__custom-overflow-menu-module__menu___dReHr",fF="-esm-form-builder__custom-overflow-menu-module__show___48R0e",fB="-esm-form-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fV=(0,cH.createContext)(null);function fU(){let e=(0,cH.useContext)(fV);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fW({menuTitle:e,children:t}){let[r,n]=cz().useState(!1),o=fd(()=>n(!1),r),i="tablet"===fa(),a=(0,cH.useCallback)(()=>n(e=>!e),[]),s=(0,cH.useRef)(null),l=(0,cH.useRef)(null),u=(0,cH.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cH.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cH.useMemo)(()=>({closeMenu:f}),[f]),h=(0,cH.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=cH.Children.toArray(t);(0,cH.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,cH.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,cH.isValidElement)(e)?(0,cH.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,fR.jsxs)("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",f$),ref:o,children:[(0,fR.jsx)("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},fB),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,fR.jsxs)("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fL,{[fF]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,fR.jsx)("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,fR.jsx)(fV.Provider,{value:p,children:g})}),(0,fR.jsx)("span",{})]})]})}function fK(e){let t=(0,cH.useContext)(fV);return(0,fR.jsx)(fI.XSD,{...e,closeMenu:t?.closeMenu})}let fH={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fz=e=>(0,fR.jsx)(fI.GGC,{translateWithId:(e,t)=>{let r=fH[e];return r?op(r,e,t):e},...e});var fq=r(47767),fG=r(84976);let fY=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],fZ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fJ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fQ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fX=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),f0=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),f1=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),f3=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),f4=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),f2=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),f6=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),f5=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),f8=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f9=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f7=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),pe=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),pt=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),pr=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),pn=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),po=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),pi=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),pa=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),ps=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pl=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pc=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pd=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-document",iconProps:e})})),pf=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pp=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-download",iconProps:e})})),ph=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),pm=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),py=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pg=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pb=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pv=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),p_=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pw=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),px=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),pS=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-group",iconProps:e})})),pE=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),pD=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pO=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pP=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pC=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),pk=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),pj=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),pT=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),pR=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pM=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pA=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pN=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pI=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),p$=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pL=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pF=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pB=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pV=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),pU=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),pW=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pK=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pH=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pz=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pq=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pG=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pY=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pZ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pJ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pQ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pX=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-report",iconProps:e})})),p0=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),p1=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-save",iconProps:e})})),p3=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-search",iconProps:e})})),p4=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),p2=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),p6=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),p5=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),p8=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p9=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p7=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),he=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-table",iconProps:e})})),ht=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-time",iconProps:e})})),hr=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),hn=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),ho=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),hi=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),ha=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),hs=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),hl=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),hu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),hc=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user",iconProps:e})})),hd=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),hf=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-view",iconProps:e})})),hp=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),hh=hp,hm=pf,hy=pR,hg=pO,hb=p5,hv=(0,cH.memo)((0,cH.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cH.useRef)(e?document.getElementById(e):void 0);return(0,cH.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fR.jsx)(dA,{value:o.current,fallback:t,children:(0,fR.jsx)(h_,{ref:n,icon:e,iconProps:r})})})),h_=(0,cH.memo)((0,cH.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,cH.useRef)(null);return(0,cH.useImperativeHandle)(r,()=>a.current),(0,cH.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fR.jsx)("svg",{ref:a,className:fA()("omrs-icon","-esm-form-builder__icons-module__icon___sq7Qp",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,fR.jsx)("use",{href:`#${e}`})})})),hw=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,d_.useTranslation)(),i=(0,fq.zy)(),a=(0,cH.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,fR.jsx)("div",{children:(0,fR.jsx)(cq,{className:fA()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,fR.jsxs)("span",{className:"-esm-form-builder__dashboard-module__menu___Lg1M+",children:[(0,fR.jsx)(hv,{icon:n,className:"-esm-form-builder__dashboard-module__icon___Y2DxK",size:16}),(0,fR.jsx)("span",{children:o(t)})]})})},e)};function hx(e){return function({basePath:t}){return(0,fR.jsx)(fG.Kd,{children:(0,fR.jsx)(hw,{basePath:t,...e})})}}function hS(e){let t=(0,cH.useRef)(null),r=(0,cH.useRef)(void 0),n=(0,cH.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,cH.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function hE(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=hD(e,t);return r||="function"==typeof n,n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():hD(e[r],null)})}}}function hD(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hO(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let hP="u">typeof document?cz().useLayoutEffect:()=>{},hC={prefix:String(Math.round(1e10*Math.random())),current:0},hk=cz().createContext(hC),hj=cz().createContext(!1),hT=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),hR="function"==typeof cz().useId?function(e){let t=cz().useId(),[r]=(0,cH.useState)(hI()),n=r?"react-aria":`react-aria${hC.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cH.useContext)(hk),r=function(e=!1){let t=(0,cH.useContext)(hk),r=(0,cH.useRef)(null);if(null===r.current&&!e){let e=cz().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let r=hT.get(e);null==r?hT.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,hT.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function hM(){return!1}function hA(){return!0}function hN(e){return()=>{}}function hI(){return"function"==typeof cz().useSyncExternalStore?cz().useSyncExternalStore(hN,hM,hA):(0,cH.useContext)(hj)}let h$=!!("u">typeof window&&window.document&&window.document.createElement),hL=new Map;function hF(e){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(null),o=hR(t),i=(0,cH.useRef)(null);if(l&&l.register(i,o),h$){let e=hL.get(o);e&&!e.includes(n)?e.push(n):hL.set(o,[n])}return hP(()=>()=>{l&&l.unregister(i),hL.delete(o)},[o]),(0,cH.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function hB(e=[]){let t=hF(),[r,n]=function(e){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(t),o=(0,cH.useRef)(null),i=(0,cH.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}n.current===e.value?i.current():r(e.value)});return hP(()=>{n.current=t,o.current&&i.current()}),[t,(0,cH.useCallback)(e=>{o.current=e(n.current),i.current()},[i])]}(t),o=(0,cH.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return hP(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{hL.delete(e)}));let hV=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function hU(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=hO(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=hV(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=hL.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=hL.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):"ref"===e&&r&&o?t.ref=hE(r,o):t[e]=void 0!==o?o:r}}return t}let hW=Symbol("default");function hK({values:e,children:t}){for(let[r,n]of e)t=cz().createElement(r.Provider,{value:n},t);return t}function hH(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,cH.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function hz(e,t){let r=(0,cH.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||hW;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function hq(e,t,r){let{ref:n,...o}=hz(r,e.slot)||{},i=hS((0,cH.useMemo)(()=>hE(t,n),[t,n])),a=hU(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function hG(e=!0){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(!1),o=(0,cH.useCallback)(e=>{n.current=!0,r(!!e)},[]);return hP(()=>{n.current||r(!1)},[]),[o,t]}function hY(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let hZ=(0,cH.createContext)(null),hJ=null;function hQ(e,t="assertive",r=7e3){hJ?hJ.announce(e,t,r):(hJ=new hX,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?hJ.announce(e,t,r):setTimeout(()=>{(null==hJ?void 0:hJ.isAttached())&&(null==hJ||hJ.announce(e,t,r))},100))}class hX{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let h0=new Set(["id"]),h1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),h3=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),h4=new Set(["dir","lang","hidden","inert","translate"]),h2=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),h6=/^(data-.*)$/;function h5(e,t={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(h0.has(t)||r&&h1.has(t)||n&&h3.has(t)||o&&h4.has(t)||i&&(h2.has(t)||t.endsWith("Capture")&&h2.has(t.slice(0,-7)))||a?.has(t)||h6.test(t))&&(s[t]=e[t]);return s}function h8(e){if(function(){if(null==h9){h9=!1;try{document.createElement("div").focus({get preventScroll(){return h9=!0,!0}})}catch{}}return h9}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let h9=null,h7=e=>e?.ownerDocument??document,me=e=>e&&"window"in e&&e.window===e?e:h7(e).defaultView||window;function mt(e,t){return!!t&&!!e&&e.contains(t)}function mr(e){return e.target}function mn(e){if(!e)return!1;let t=e.getRootNode(),r=me(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return null!=n&&e.contains(n)}let mo="u">typeof Element&&"checkVisibility"in Element.prototype;function mi(e,t){return mo?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=me(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||mi(e.parentElement,e))}let ma=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],ms=ma.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ma.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let ml=ma.join(':not([hidden]):not([tabindex="-1"]),');function mu(e,t){return e.matches(ms)&&!md(e)&&(t?.skipVisibilityCheck||mi(e))}function mc(e){return e.matches(ml)&&mi(e)&&!md(e)}function md(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function mf(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function mp(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function mh(e){let t=(0,cH.useRef)({isFocused:!1,observer:null});return hP(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,cH.useCallback)(r=>{let n=mr(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=mf(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let mm=!1;function my(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function mg(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function mb(e){let t=null;return()=>(null==t&&(t=e()),t)}let mv=mb(function(){return mg(/^Mac/i)}),m_=mb(function(){return mg(/^iPhone/i)}),mw=mb(function(){return mg(/^iPad/i)||mv()&&navigator.maxTouchPoints>1}),mx=mb(function(){return m_()||mw()});mb(function(){return mv()||mx()});let mS=mb(function(){return my(/AppleWebKit/i)&&!mE()}),mE=mb(function(){return my(/Chrome/i)}),mD=mb(function(){return my(/Android/i)}),mO=mb(function(){return my(/Firefox/i)});function mP(e){return""===e.pointerType&&!!e.isTrusted||(mD()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function mC(e,t,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}=t;mO()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(mv()?n=!0:o=!0);let s=mS()&&mv()&&!mw()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});mC.isOpening=r,h8(e),e.dispatchEvent(s),mC.isOpening=!1}mC.isOpening=!1;let mk=null,mj=new Set,mT=new Map,mR=!1,mM=!1,mA={Tab:!0,Escape:!0};function mN(e,t){for(let r of mj)r(e,t)}function mI(e){mR=!0,mC.isOpening||e.metaKey||!mv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(mk="keyboard",mN("keyboard",e))}function m$(e){mk="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(mR=!0,mN("pointer",e))}function mL(e){!mC.isOpening&&mP(e)&&(mR=!0,mk="virtual")}function mF(e){let t=me(mr(e)),r=h7(mr(e));mr(e)!==t&&mr(e)!==r&&!mm&&e.isTrusted&&(mR||mM||(mk="virtual",mN("virtual",e)),mR=!1,mM=!1)}function mB(){mm||(mR=!1,mM=!0)}function mV(e){if("u"<typeof window||"u"<typeof document)return;let t=me(e),r=h7(e);if(mT.get(t))return;let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){mR=!0,n.apply(this,arguments)},r.addEventListener("keydown",mI,!0),r.addEventListener("keyup",mI,!0),r.addEventListener("click",mL,!0),t.addEventListener("focus",mF,!0),t.addEventListener("blur",mB,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",m$,!0),r.addEventListener("pointermove",m$,!0),r.addEventListener("pointerup",m$,!0)),t.addEventListener("beforeunload",()=>{mU(e)},{once:!0}),mT.set(t,{focus:n})}let mU=(e,t)=>{let r=me(e),n=h7(e);t&&n.removeEventListener("DOMContentLoaded",t),mT.has(r)&&(r.HTMLElement.prototype.focus=mT.get(r).focus,n.removeEventListener("keydown",mI,!0),n.removeEventListener("keyup",mI,!0),n.removeEventListener("click",mL,!0),r.removeEventListener("focus",mF,!0),r.removeEventListener("blur",mB,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",m$,!0),n.removeEventListener("pointermove",m$,!0),n.removeEventListener("pointerup",m$,!0)),mT.delete(r))};function mW(){return"pointer"!==mk}"u">typeof document&&("loading"!==(p=h7(void 0)).readyState?mV(void 0):p.addEventListener("DOMContentLoaded",()=>{mV(void 0)}));let mK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),mH=new Map,mz=new Set;function mq(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=mr(r);if(!e(r)||!n)return;let o=mH.get(n);if(o&&(o.delete(r.propertyName),0===o.size&&(n.removeEventListener("transitioncancel",t),mH.delete(n)),0===mH.size)){for(let e of mz)e();mz.clear()}};document.body.addEventListener("transitionrun",r=>{let n=mr(r);if(!e(r)||!n)return;let o=mH.get(n);o||(o=new Set,mH.set(n,o),n.addEventListener("transitioncancel",t,{once:!0})),o.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function mG(e){requestAnimationFrame(()=>{for(let[e]of mH)"isConnected"in e&&!e.isConnected&&mH.delete(e);0===mH.size?e():mz.add(e)})}function mY(e){if(!e.isConnected)return;let t=h7(e);if("virtual"===mk){let r=((e=document)=>e.activeElement)(t);mG(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&h8(e)})}else h8(e)}function mZ(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,cH.useCallback)(e=>{if(mr(e)===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=mh(i),s=(0,cH.useCallback)(e=>{let t=mr(e),n=h7(t),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function mJ(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}function mQ(e,t){hP(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?mq():document.addEventListener("DOMContentLoaded",mq));let mX=cz().createContext(null);function m0(e,t){let{focusProps:r}=mZ(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:mJ(e.onKeyDown),onKeyUp:mJ(e.onKeyUp)}},o=hU(r,n),i=function(e){let t=(0,cH.useContext)(mX)||{};mQ(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,cH.useRef)(e.autoFocus);(0,cH.useEffect)(()=>{s.current&&t.current&&mY(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:hU({...o,tabIndex:l},a)}}cz().forwardRef(function(e,t){let{children:r,...n}=e,o=hS(t),i={...n,ref:o};return cz().createElement(mX.Provider,{value:i},r)});let m1="default",m3="",m4=new WeakMap;function m2(e){if(mx())"disabled"===m1&&(m1="restoring",setTimeout(()=>{mG(()=>{if("restoring"===m1){let t=h7(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=m3||""),m3="",m1="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&m4.has(e)){let t=m4.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),m4.delete(e)}}function m6(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let m5=new WeakMap;function m8(e){let t=e??("u">typeof document?document:void 0);if(!t)return m6(t);if(m5.has(t))return m5.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof me(r).HTMLMetaElement&&(r.nonce||r.content)||m6(t)||void 0;return void 0!==n&&m5.set(t,n),n}let m9=cz().createContext({register:()=>{}});m9.displayName="PressResponderContext";let m7=cz().useInsertionEffect??hP;function ye(e){let t=(0,cH.useRef)(null);return m7(()=>{t.current=e},[e]),(0,cH.useCallback)((...e)=>{let r=t.current;return r?.(...e)},[])}function yt(){let e=(0,cH.useRef)(new Map),t=(0,cH.useCallback)((t,r,n,o)=>{let i=o?.once?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,cH.useCallback)((t,r,n,o)=>{let i=e.current.get(n)?.fn||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cH.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cH.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var yr=r(54575),yn=r.n(yr);class yo{#e;constructor(e,t,r,n){this.#e=!0;let o=n?.target??r.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,l,u=null;null!=r.clientX&&null!=r.clientY&&(l=r.clientX,u=r.clientY),i&&(null!=l&&null!=u?(a=l-i.left,s=u-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=s,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let yi=Symbol("linkClicked"),ya="react-aria-pressable-style",ys="data-react-aria-pressable";function yl(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cH.useContext)(m9);if(t){let{register:r,ref:n,...o}=t;e=hU(o,e),r()}return mQ(t,e.ref),e}(e),[h,m]=(0,cH.useState)(!1),y=(0,cH.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=yt(),v=(0,cH.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new yo("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,n,r]),w=(0,cH.useCallback)((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new yo("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new yo("press",n,e);t(r),l&&=r.shouldStopPropagation}return a.isTriggeringEvent=!1,l},[s,o,r,t]),x=ye(w),S=ye((0,cH.useCallback)((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new yo("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[s,i])),E=(0,cH.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(yd(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||m2(t.target),t.disposables))r();t.disposables=[]}},[d,b,w]),D=ye(E),O=(0,cH.useCallback)(e=>{c&&E(e)},[c,E]),P=(0,cH.useCallback)(e=>{s||a?.(e)},[s,a]),C=(0,cH.useCallback)((e,t)=>{if(!s&&a){let r=new MouseEvent("click",e);mp(r,t),a(mf(r))}},[s,a]),k=(0,cH.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(yc(t.nativeEvent,t.currentTarget)&&mt(t.currentTarget,mr(t))){yf(mr(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",n=v(t,"keyboard"));let o=t.currentTarget;g(h7(t.currentTarget),"keyup",hO(t=>{yc(t,o)&&!t.repeat&&mt(o,mr(t))&&e.target&&S(yd(e.target,t),"keyboard")},r),!0),n&&t.stopPropagation(),t.metaKey&&mv()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mt(t.currentTarget,mr(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!mC.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||mP(t.nativeEvent))){let e=v(t,"virtual"),n=S(t,"virtual"),o=x(t,"virtual");P(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",o=S(yd(t.currentTarget,t),n),i=x(yd(t.currentTarget,t),n,!0);r=o&&i,e.isOverTarget=!1,P(t),D(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{if(e.isPressed&&e.target&&yc(t,e.target)){yf(mr(t),t.key)&&t.preventDefault();let r=mr(t),n=mt(e.target,r);x(yd(e.target,t),"keyboard",n),n&&C(t,e.target),b(),"Enter"!==t.key&&yu(e.target)&&mt(e.target,r)&&!t[yi]&&(t[yi]=!0,mC(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!mt(t.currentTarget,mr(t)))return;if(o=t.nativeEvent,!mD()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(mx()){if("default"===m1){let t=h7(e);m3=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}m1="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";m4.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=mr(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(h7(t.currentTarget),"pointerup",r,!1),g(h7(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(mt(t.currentTarget,mr(t))&&0===t.button){if(u){let r=function(e){for(;e&&!mu(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=me(e),r=t.document.activeElement;if(!r||r===e)return;mm=!0;let n=!1,o=e=>{(mr(e)===r||n)&&e.stopImmediatePropagation()},i=t=>{(mr(t)===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,h8(r),l()))},a=t=>{(mr(t)===e||n)&&t.stopImmediatePropagation()},s=t=>{(mr(t)===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,h8(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),mm=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{mt(t.currentTarget,mr(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(yd(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(yd(e.target,t),e.pointerType,!1),O(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(mt(e.target,mr(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?D(t):(h8(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else D(t);e.isOverTarget=!1}},n=e=>{D(e)};t.onDragStart=e=>{mt(e.currentTarget,mr(e))&&D(e)}}return t},[g,s,u,b,d,O,v,P,C]);return(0,cH.useEffect)(()=>{if(!f)return;let e=h7(f.current);if(!e||!e.head||e.getElementById(ya))return;let t=e.createElement("style");t.id=ya;let r=m8(e);r&&(t.nonce=r),t.textContent=`
15
+ ${this.stack}`}}let oC=K("session",{loaded:!1,session:null}),ok=0;function oT(e={includeAuthStatus:!0}){return(ok<Date.now()-6e4||!oC.getState().loaded)&&oM(),new ea.Observable(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(oC.getState()),oC.subscribe(r)})}function oj(){return(ok<Date.now()-6e4||!oC.getState().loaded)&&oM(),oC}function oR(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function oM(e,t){ok=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),oB(oD(oS,{headers:r}))}function oA(){oC.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oN(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!Y(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!Y(n.privileges.find(t=>e===t.display))):(Y(r)||console.error(`Could not understand privileges "${r}"`),!0))||!Y(t.roles.find(e=>"System Developer"===e.display))}function oI(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(oC.getState()),e||(t=oC.subscribe(n))})}function o$(){return new Promise((e,t)=>{oT().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function oL(e,t){return oB(oD(oS,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function oF(e,t,r){return r||(r=new AbortController),await oD(`${ow}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),oM()}function oB(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},oC.setState(n),t(n)):(n={loaded:!1,session:null},oC.setState(n),r(n))}).catch(e=>{j(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};oC.setState(t),r(t)})})}function oV(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oC.subscribe(e=>{e.loaded&&e.session&&oR(e.session)});let oU={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"},oW=L()(()=>({}));H("openmrs-app-context",oW);let oK={};function oH(e,t=oK){oW.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===oK?{}:t})})}function oz(e){oW.setState(t=>(e in t&&delete t[e],t))}function oG(e,t=e=>e){let r=oW.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function oq(e,t){oW.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function oY(e,t){let r=oG(e);return t(oZ(r)),oW.subscribe(n=>{let o=e in n?n[e]:null;o!==r&&(r=o,t(oZ(o)))})}function oZ(e){return null===e?null:Object.freeze(Object.assign({},e))}let oJ=null;async function oQ(){return oJ??(oJ=oX().then(({map:e,complete:t})=>(t||(oJ=null),e))),oJ}async function oX(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:function(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}(t),complete:r}}async function o0(){return await oQ()}function o1(e){return e.replace(/[\/\-@]/g,"_")}async function o3(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([o4(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),i&&clearTimeout(i);let s=o1(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(r.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function o4(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=o1(e);if(!window[r]){let r=t??await o2();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in{};try{return await function(e){var t;let r=(t=window)[o6]??(t[o6]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let i=new Promise((t,n)=>{let i=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",l)}function s(){a(),t()}function l(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",l),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&O({kind:"error",title:op("scriptLoadingFailed","Error: Script failed to load"),description:op("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:op("resetOverrides","Reset overrides"),onActionButtonClick(){console.warn("[Security] Import map overrides are disabled in production mode."),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function o2(){return o0()}let o6=Symbol.for("__openmrs_script_loading"),o5=`${ow}/attachment`;function o8(e,t){return oD(`${o5}/${e}`,{signal:t.signal})}function o9(e,t,r,n){return oD(o7(e,t,n),{signal:r.signal})}function o7(e,t,r){return r?`${o5}?patient=${e}&encounter=${r}`:`${o5}?patient=${e}&includeEncounterless=${t}`}async function ie(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),oD(`${o5}`,{method:"POST",body:n})}function it(e,t){return oD(`${o5}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ir(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function io(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var ia=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function is(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var il=function(e,t){this.type=e,Object.assign(this,t)};function iu(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function ic(){}var id={type:"SKIP_WAITING"};function ip(e,t){if(!t)return e&&e.then?e.then(ic):Promise.resolve()}async function ih(e){let t=await (f??Promise.resolve(void 0));return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}!function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new ia,n.en=new ia,n.on=new ia,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!is(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new il(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new il("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new il("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return iu(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new il("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n=t.prototype;n.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return ip(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),iu(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&is(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new il("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},n.update=function(){try{return this.fn?ip(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},n.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},n.messageSW=function(e){try{return iu(this.getSW(),function(t){return ir(t,e)})}catch(e){return Promise.reject(e)}},n.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ir(this.fn.waiting,id)},n.pn=function(){var e=navigator.serviceWorker.controller;return e&&is(e.scriptURL,this.sn.toString())?e:void 0},n.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return iu(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},io(t.prototype,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}]),r&&io(t,r)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return ii(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ii(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());let im="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iy=Object.keys,ig=Array.isArray;function ib(e,t){return"object"!=typeof t||iy(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||im.Promise||(im.Promise=Promise);let iv=Object.getPrototypeOf,i_={}.hasOwnProperty;function iw(e,t){return i_.call(e,t)}function ix(e,t){"function"==typeof t&&(t=t(iv(e))),("u"<typeof Reflect?iy:Reflect.ownKeys)(t).forEach(r=>{iE(e,r,t[r])})}let iS=Object.defineProperty;function iE(e,t,r,n){iS(e,t,ib(r&&iw(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function iD(e){return{from:function(t){return e.prototype=Object.create(t.prototype),iE(e.prototype,"constructor",e),{extend:ix.bind(null,e.prototype)}}}}let iO=Object.getOwnPropertyDescriptor;function iP(e,t){let r;return iO(e,t)||(r=iv(e))&&iP(r,t)}let iC=[].slice;function ik(e,t,r){return iC.call(e,t,r)}function iT(e,t){return t(e)}function ij(e){if(!e)throw Error("Assertion Failed")}function iR(e){im.setImmediate?setImmediate(e):setTimeout(e,0)}function iM(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function iA(e,t){if("string"==typeof t&&iw(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=iA(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:iA(s,t.substr(a+1))}}function iN(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){ij("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)iN(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?ig(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&iw(e,a)||(l=e[a]={}),iN(l,s,r)}}else void 0===r?ig(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function iI(e){var t={};for(var r in e)iw(e,r)&&(t[r]=e[r]);return t}let i$=[].concat;function iL(e){return i$.apply([],e)}let iF="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(iL([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>im[e]),iB=iF.map(e=>im[e]);iM(iF,e=>[e,!0]);let iV=null;function iU(e){iV="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=iV&&iV.get(t);if(r)return r;if(ig(t)){r=[],iV&&iV.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(iB.indexOf(t.constructor)>=0)r=t;else{let n=iv(t);for(var i in r=n===Object.prototype?{}:Object.create(n),iV&&iV.set(t,r),t)iw(t,i)&&(r[i]=e(t[i]))}return r}(e);return iV=null,t}let{toString:iW}={};function iK(e){return iW.call(e).slice(8,-1)}let iH="u">typeof Symbol?Symbol.iterator:"@@iterator",iz="symbol"==typeof iH?function(e){var t;return null!=e&&(t=e[iH])&&t.apply(e)}:function(){return null},iG={};function iq(e){var t,r,n,o;if(1==arguments.length){if(ig(e))return e.slice();if(this===iG&&"string"==typeof e)return[e];if(o=iz(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let iY="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var iZ="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),iJ=()=>!0;let iQ=!Error("").stack;function iX(){if(iQ)try{throw iX.arguments,Error()}catch(e){return e}return Error()}function i0(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(iJ).map(e=>"\n"+e).join("")):""}var i1=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],i3=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(i1),i4={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 i2(e,t){this._e=iX(),this.name=e,this.message=t}function i6(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function i5(e,t,r,n){this._e=iX(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=i6(e,t)}function i8(e,t){this._e=iX(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=i6(e,t)}iD(i2).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+i0(this._e,2))}},toString:function(){return this.name+": "+this.message}}),iD(i5).from(i2),iD(i8).from(i2);var i9=i3.reduce((e,t)=>(e[t]=t+"Error",e),{}),i7=i3.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=iX(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=i4[t]||r,this.inner=null)}return iD(n).from(i2),e[t]=n,e},{});i7.Syntax=SyntaxError,i7.Type=TypeError,i7.Range=RangeError;var ae=i1.reduce((e,t)=>(e[t+"Error"]=i7[t],e),{}),at=i3.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=i7[t]),e),{});function ar(){}function an(e){return e}function ao(e,t){return null==e||e===an?t:function(r){return t(e(r))}}function ai(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function aa(e,t){return e===ar?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?ai(n,this.onsuccess):n),o&&(this.onerror=this.onerror?ai(o,this.onerror):o),void 0!==i?i:r}}function as(e,t){return e===ar?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?ai(r,this.onsuccess):r),n&&(this.onerror=this.onerror?ai(n,this.onerror):n)}}function al(e,t){return e===ar?t:function(r){var n=e.apply(this,arguments);ib(r,n);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?ai(o,this.onsuccess):o),i&&(this.onerror=this.onerror?ai(i,this.onerror):i),void 0===n?void 0===a?void 0:a:ib(n,a)}}function au(e,t){return e===ar?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function ac(e,t){return e===ar?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}at.ModifyError=i5,at.DexieError=i2,at.BulkError=i8;var ad={};let[af,ap,ah]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iv(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,iv(t),e]})(),am=ap&&ap.then,ay=af&&af.constructor,ag=!!ah;var ab=!1,av=ah?()=>{ah.then(aB)}:im.setImmediate?setImmediate.bind(null,aB):im.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{aB(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(aB,0)},a_=function(e,t){ak.push([e,t]),ax&&(av(),ax=!1)},aw=!0,ax=!0,aS=[],aE=[],aD=null,aO=an,aP={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:se,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{se(e[0],e[1])}catch(e){}})}},aC=aP,ak=[],aT=0,aj=[];function aR(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ar,this._lib=!1;var t=this._PSD=aC;if(iZ&&(this._stackHolder=iX(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ad)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&aN(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&aV();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof aR?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,aI(t)),n&&aU()}},aN.bind(null,t))}catch(e){aN(t,e)}}(this,e)}let aM={get:function(){var e=aC,t=aZ;function r(r,n){var o=!e.global&&(e!==aC||t!==aZ);let i=o&&!a0();var a=new aR((t,a)=>{a$(this,new aA(a8(r,e,o,i),a8(n,e,o,i),t,a,e))});return iZ&&aF(a,this),a}return r.prototype=ad,r},set:function(e){iE(this,"then",e&&e.prototype===ad?aM:{get:function(){return e},set:aM.set})}};function aA(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function aN(e,t){if(aE.push(t),null===e._state){var r=e._lib&&aV();t=aO(t),e._state=!1,e._value=t,iZ&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=iP(t,"stack");t._promise=e,iE(t,"stack",{get:()=>ab?r&&(r.get?r.get.apply(t):r.value):e.stack})}),aS.some(t=>t._value===e._value)||aS.push(e),aI(e),r&&aU()}}function aI(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)a$(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===aT&&(++aT,a_(()=>{0==--aT&&aW()},[]))}function a$(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++aT,a_(aL,[r,e,t])}else e._listeners.push(t)}function aL(e,t,r){try{aD=t;var n,o=t._value;t._state?n=e(o):(aE.length&&(aE=[]),n=e(o),-1===aE.indexOf(o)&&function(e){for(var t=aS.length;t;)if(aS[--t]._value===e._value)return void aS.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{aD=null,0==--aT&&aW(),--r.psd.ref||r.psd.finalize()}}function aF(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function aB(){aV()&&aU()}function aV(){var e=aw;return aw=!1,ax=!1,e}function aU(){var e,t,r;do for(;ak.length>0;)for(e=ak,ak=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(ak.length>0);aw=!0,ax=!0}function aW(){var e=aS;aS=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=aj.slice(0),r=t.length;r;)t[--r]()}function aK(e){return new aR(ad,!1,e)}function aH(e,t){var r=aC;return function(){var n=aV(),o=aC;try{return a2(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{a2(o,!1),n&&aU()}}}ix(aR.prototype,{then:aM,_then:function(e,t){a$(this,new aA(null,null,e,t,aC))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):aK(e)):this.then(null,e=>e&&e.name===t?r(e):aK(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),aK(t)))},stack:{get:function(){if(this._stack)return this._stack;try{ab=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=i0(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return iZ&&((o=i0(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{ab=!1}}},timeout:function(e,t){return e<1/0?new aR((r,n)=>{var o=setTimeout(()=>n(new i7.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iE(aR.prototype,Symbol.toStringTag,"Dexie.Promise"),aP.env=a6(),ix(aR,{all:function(){var e=iq.apply(null,arguments).map(a1);return new aR(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>aR.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof aR)return e;if(e&&"function"==typeof e.then)return new aR((t,r)=>{e.then(t,r)});var t=new aR(ad,!0,e);return aF(t,aD),t},reject:aK,race:function(){var e=iq.apply(null,arguments).map(a1);return new aR((t,r)=>{e.map(e=>aR.resolve(e).then(t,r))})},PSD:{get:()=>aC,set:e=>aC=e},totalEchoes:{get:()=>aZ},newPSD:aQ,usePSD:a5,scheduler:{get:()=>a_,set:e=>{a_=e}},rejectionMapper:{get:()=>aO,set:e=>{aO=e}},follow:(e,t)=>new aR((r,n)=>aQ((t,r)=>{var n=aC;n.unhandleds=[],n.onunhandled=r,n.finalize=ai(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},aj.push(function t(){e(),aj.splice(aj.indexOf(t),1)}),++aT,a_(()=>{0==--aT&&aW()},[])},n.finalize),e()},t,r,n))}),ay&&(ay.allSettled&&iE(aR,"allSettled",function(){let e=iq.apply(null,arguments).map(a1);return new aR(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>aR.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),ay.any&&"u">typeof AggregateError&&iE(aR,"any",function(){let e=iq.apply(null,arguments).map(a1);return new aR((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>aR.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let az={awaits:0,echoes:0,id:0};var aG=0,aq=[],aY=0,aZ=0,aJ=0;function aQ(e,t,r,n){var o=aC,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++aJ;var a=aP.env;i.env=ag?{Promise:aR,PromiseProp:{value:aR,configurable:!0,writable:!0},all:aR.all,race:aR.race,allSettled:aR.allSettled,any:aR.any,resolve:aR.resolve,reject:aR.reject,nthen:a9(a.nthen,i),gthen:a9(a.gthen,i)}:{},t&&ib(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=a5(i,e,r,n);return 0===i.ref&&i.finalize(),s}function aX(){return az.id||(az.id=++aG),++az.awaits,az.echoes+=100,az.id}function a0(){return!!az.awaits&&(0==--az.awaits&&(az.id=0),az.echoes=100*az.awaits,!0)}function a1(e){return az.echoes&&e&&e.constructor===ay?(aX(),e.then(e=>(a0(),e),e=>(a0(),st(e)))):e}function a3(e){++aZ,az.echoes&&0!=--az.echoes||(az.echoes=az.id=0),aq.push(aC),a2(e,!0)}function a4(){var e=aq[aq.length-1];aq.pop(),a2(e,!1)}function a2(e,t){var r,n=aC;if((t?!az.echoes||aY++&&e===aC:!aY||--aY&&e===aC)||(r=t?a3.bind(null,e):a4,am.call(af,r)),e!==aC&&(aC=e,n===aP&&(aP.env=a6()),ag)){var o=aP.env.Promise,i=e.env;ap.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(im,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function a6(){var e=im.Promise;return ag?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(im,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ap.then,gthen:e.prototype.then}:{}}function a5(e,t,r,n,o){var i=aC;try{return a2(e,!0),t(r,n,o)}finally{a2(i,!1)}}function a8(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=aC;r&&aX(),a2(t,!0);try{return e.apply(this,arguments)}finally{a2(i,!1),n&&(o=a0,am.call(af,o))}}}function a9(e,t){return function(r,n){return e.call(this,a8(r,t),a8(n,t))}}-1===(""+am).indexOf("[native code]")&&(aX=a0=ar);let a7="unhandledrejection";function se(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(im.document&&document.createEvent?((n=document.createEvent("Event")).initEvent(a7,!0,!0),ib(n,o)):im.CustomEvent&&ib(n=new CustomEvent(a7,{detail:o}),o),n&&im.dispatchEvent&&(dispatchEvent(n),!im.PromiseRejectionEvent&&im.onunhandledrejection))try{im.onunhandledrejection(n)}catch(e){}iZ&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var st=aR.reject;let sr="3.2.7",sn=String.fromCharCode(65535),so=-1/0,si="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",sa="String expected.",ss=[],sl="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),su=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),sc="__dbnames",sd="readonly",sf="readwrite";function sp(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let sh={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function sm(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=iU(t))[e],t)}class sy{_trans(e,t,r){let n=this._tx||aC.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new i7.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=aV();try{return n&&n.db===this.db?n===aC.trans?n._promise(e,i,r):aQ(()=>n._promise(e,i,r),{trans:n,transless:aC.transless||aC}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||aC.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===i9.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):st(i)}return i._promise(r,(e,t)=>aQ(()=>(aC.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return st(new i7.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return st(new i7.DatabaseClosed);t.open().catch(ar)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&aU()}}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(ig(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=iy(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(r&&this.db._maxKey!==sn){let n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map(t=>e[t]))}!r&&iZ&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?sp(r,a&&a.multi?e=>{let t=iA(e,o);return ig(t)&&t.some(e=>i(s,e))}:e=>i(s,iA(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?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,ig(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(iw(t,n))try{r[n]=t[n]}catch(e){}return r};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){ib(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sm(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?aR.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{iN(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||ig(e))return this.where(":id").equals(e).modify(t);{let r=iA(e,this.schema.primKey.keyPath);if(void 0===r)return st(new i7.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?iy(t).forEach(r=>{iN(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sm(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?aR.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{iN(e,n,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?aR.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:sh})).then(e=>e.numFailures?aR.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,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new i7.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new i7.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sm(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new i8(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new i7.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new i7.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sm(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new i8(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new i8(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function sg(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"!=typeof e){n||(n=au),o||(o=ar);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=n(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(n,o)}};return t[e]=r[e]=a,a}iy(e).forEach(function(t){var r=e[t];if(ig(r))i(t,e[t][0],e[t][1]);else{if("asap"!==r)throw new i7.InvalidArgument("Invalid event config");var n=i(t,an,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){iR(function(){e.apply(null,t)})})})}})}}function sb(e,t){return iD(t).from({prototype:e}),t}function sv(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function s_(e,t){e.filter=sp(e.filter,t)}function sw(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>sp(n(),t()):t,e.justLimit=r&&!n}function sx(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new i7.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function sS(e,t,r){let n=sx(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function sE(e,t,r,n){let o=e.replayFilter?sp(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),iw(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),sD(sS(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return sD(sS(e,n,r),sp(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function sD(e,t,r,n){var o=aH(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=ar},t=>{e.fail(t),r=ar})||o(e.value,e,e=>r=e),r()})})}function sO(e,t){try{let r=sP(e),n=sP(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(sC(e),sC(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=sO(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function sP(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=iK(e);return"ArrayBuffer"===r?"binary":r}function sC(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class sk{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,st.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,st.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=sp(t.algorithm,e)}_iterate(e,t){return sE(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&ib(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>sE(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(sv(t,!0))return r.count({trans:e,query:{index:sx(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return sE(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?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&&sv(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=sx(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return sE(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,sv(t)?sw(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):sw(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),sw(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return s_(this._ctx,function(r,n,o){return!e(r.value)||(n(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;return s_(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=sp(t.isMatch,e),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,r){e(r.key,r)})}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,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&sv(t,!0)&&t.limit>0)return this._read(e=>{var r=sx(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).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 r={};return s_(this._ctx,function(e){var t=e.primaryKey.toString(),n=iw(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=iy(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];iA(t,a)!==s&&(iN(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:l}=a.schema.primaryKey,u=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,iy(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(u,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=f[e],r={value:iU(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===sO(l(t),l(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=sv(t)&&t.limit===1/0&&("function"!=typeof e||e===sT)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(g.length>0||b&&e===sT)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>p(g.length,e))).then(()=>o.length>c+d&&i(c+u))})};return i(0).then(()=>{if(c.length>0)throw new i5("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return sv(e)&&(e.isPrimKey&&!sl||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new i5("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(sT)}}let sT=(e,t)=>t.value=null;function sj(e,t){return e<t?-1:+(e!==t)}function sR(e,t){return e>t?-1:+(e!==t)}function sM(e,t,r){var n=e instanceof sL?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function sA(e){return new e.Collection(e,()=>s$("")).limit(0)}function sN(e,t,r,n){var o,i,a,s,l,u,c,d=r.length;if(!r.every(e=>"string"==typeof e))return sM(e,sa);function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?sj:sR;var t=r.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}),l=t.map(function(e){return e.lower}),u=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>sI(s[0],l[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,l,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var u=t[l];if(u!==n[l])return 0>o(e[l],r[l])?e.substr(0,l)+r[l]+r.substr(l+1):0>o(e[l],n[l])?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[l],u)&&(s=l)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],l[m],a,u);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function sI(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function s$(e){return{type:1,lower:e,upper:e}}class sL{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?sA(this):new this.Collection(this,()=>sI(e,t,!r,!n))}catch(e){return sM(this,si)}}equals(e){return null==e?sM(this,si):new this.Collection(this,()=>s$(e))}above(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(e,void 0,!0))}aboveOrEqual(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(e,void 0,!1))}below(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(void 0,e,!1,!0))}belowOrEqual(e){return null==e?sM(this,si):new this.Collection(this,()=>sI(void 0,e))}startsWith(e){return"string"!=typeof e?sM(this,sa):this.between(e,e+sn,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):sN(this,(e,t)=>0===e.indexOf(t[0]),[e],sn)}equalsIgnoreCase(e){return sN(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=iq.apply(iG,arguments);return 0===e.length?sA(this):sN(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=iq.apply(iG,arguments);return 0===e.length?sA(this):sN(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,sn)}anyOf(){let e=iq.apply(iG,arguments),t=this._cmp;try{e.sort(t)}catch(e){return sM(this,si)}if(0===e.length)return sA(this);let r=new this.Collection(this,()=>sI(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[so,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=iq.apply(iG,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return sM(this,si)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[so,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return sA(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return sM(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",i7.InvalidArgument);let s=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,u,c=n;function d(e,t){return c(e[0],t[0])}try{(u=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return sM(this,si)}let f=0,p=l?e=>n(e,u[f][1])>0:e=>n(e,u[f][1])>=0,h=s?e=>o(e,u[f][0])>0:e=>o(e,u[f][0])>=0,m=p,y=new this.Collection(this,()=>sI(u[0][0],u[u.length-1][1],!s,!l));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),u.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===u.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,u[f][1])||0===this._cmp(o,u[f][0])||t(()=>{c===n?e.continue(u[f][0]):e.continue(u[f][1])}),!1)}),y}startsWithAnyOf(){let e=iq.apply(iG,arguments);return e.every(e=>"string"==typeof e)?0===e.length?sA(this):this.inAnyRange(e.map(e=>[e,e+sn])):sM(this,"startsWithAnyOf() only works with strings")}}function sF(e){return aH(function(t){return sB(t),e(t.target.error),!1})}function sB(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let sV="storagemutated",sU="x-storagemutated-1",sW=sg(null,sV);class sK{_lock(){return ij(!aC.global),++this._reculock,1!==this._reculock||aC.global||(aC.lockOwnerFor=this),this}_unlock(){if(ij(!aC.global),0==--this._reculock)for(aC.global||(aC.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{a5(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&aC.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(ij(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new i7.DatabaseClosed(r);case"MissingAPIError":throw new i7.MissingAPI(r.message,r);default:throw new i7.OpenFailed(r)}if(!this.active)throw new i7.TransactionInactive;return ij(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=aH(t=>{sB(t),this._reject(e.error)}),e.onabort=aH(t=>{sB(t),this.active&&this._reject(new i7.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=aH(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&sW.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return st(new i7.ReadOnly("Transaction is readonly"));if(!this.active)return st(new i7.TransactionInactive);if(this._locked())return new aR((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},aC])});if(r)return aQ(()=>{var e=new aR((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new aR((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=aR.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new aR((e,n)=>{r.then(r=>t._waitingQueue.push(aH(e.bind(null,r))),e=>t._waitingQueue.push(aH(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new i7.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(iw(t,e))return t[e];let r=this.schema[e];if(!r)throw new i7.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function sH(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+sz(t)}}function sz(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function sG(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:iM(r,e=>[e.name,e])}}let sq=e=>{try{return e.only([[]]),sq=()=>[[]],[[]]}catch(e){return sq=()=>sn,sn}};function sY(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>iA(t,e):t=>iA(t,e)}function sZ(e){return[].slice.call(e)}let sJ=0;function sQ(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function sX({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=sZ(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=ig(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:sY(t)},indexes:sZ(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:ig(o),keyPath:o,unique:r,multiEntry:n,extractKey:sY(o)};return i[sQ(o)]=a,a}),getIndexByKeyPath:e=>i[sQ(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[sQ(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,l)=>{let u;s=aH(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,sB(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(u=c.clear()):h.push(u=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(u=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),u.onerror=g;else for(let t=0;t<p;++t)h.push(u=c[r](e[t])),u.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};u.onerror=e=>{g(e),b(e)},u.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=aH(n);let i=e.objectStore(t),a=r.length,s=Array(a),l,u=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===u&&n(s)},f=sF(o);for(let e=0;e<a;++e)null!=r[e]&&((l=i.get(r[e]))._pos=e,l.onsuccess=d,l.onerror=f,++u);0===u&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=aH(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=sF(o)}),query:e=>new Promise((r,n)=>{r=aH(r);let{trans:i,values:s,limit:l,query:u}=e,c=l===1/0?void 0:l,{index:d,range:f}=u,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===l)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=sF(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===l?r({result:o}):void i.continue()):r({result:o})},t.onerror=sF(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,l)=>{s=aH(s);let{index:u,range:c}=n,d=e.objectStore(t),f=u.isPrimaryKey?d:d.index(u.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=sF(l),h.onsuccess=aH(t=>{let r=h.result;if(!r)return void s(null);r.___id=++sJ,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=aH(l),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=aH(e),h.onerror=sF(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=aH(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},l)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),l=n.isPrimaryKey?s:s.index(n.name),u=o(i),c=u?l.count(u):l.count();c.onsuccess=aH(t=>e(t.target.result)),c.onerror=sF(a)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:sq(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function s0({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=iP(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?iE(t,r,{get(){return this.table(r)},set(e){iS(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function s1({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function s3(e,t){return e._cfg.version-t._cfg.version}function s4(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||sl)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];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 e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function s2(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>s6(o,e)),o}function s6(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function s5(e,t,r){let n={};return ik(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=sH(sz(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=sH(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=sG(e,i,a)}),n}function s8({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+ik(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&im.WorkerGlobalScope&&im instanceof im.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class s9{_parseStoresSpec(e,t){iy(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return sH(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),ig(n),0===t)}),o=n.shift();if(o.multi)throw new i7.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new i7.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new i7.Schema("Index must have a name and cannot be an empty string")}),t[r]=sG(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?ib(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{ib(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,s1(t,[t._allTables,t,t.Transaction.prototype]),s0(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],iy(o),o),t._storeNames=iy(o),this}upgrade(e){return this._cfg.contentUpgrade=ac(this._cfg.contentUpgrade||ar,e),this}}function s7(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new lb(sc,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function le(e){return e&&"function"==typeof e.databases}function lt(e){return aQ(function(){return aC.letThrough=!0,e()})}function lr(e){var t=t=>e.next(t),r=o(t),n=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(r,n):ig(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function ln(e,t,r){var n=arguments.length;if(n<2)throw new i7.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,iL(o),r]}function lo(e,t,r){let n=ig(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let li={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=sQ(e),s=o[n]=o[n]||[],l=null==e?0:"string"==typeof e?1:e.length,u=t>0,c={...r,isVirtual:u,keyTail:t,keyLength:l,extractKey:sY(e),unique:!u&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),l>1&&a(2===l?e[0]:e.slice(0,l-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function l(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:lo(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:lo(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[sQ(e)];return t&&t[0]}},count:e=>r.count(l(e)),query:e=>r.query(l(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(l(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(lo(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(lo(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function la(e,t,r,n){return r=r||{},n=n||"",iy(e).forEach(o=>{if(iw(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=iK(i);e!==iK(a)?r[n+o]=t[o]:"Object"===e?la(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),iy(t).forEach(o=>{iw(e,o)||(r[n+o]=t[o])}),r}let ls={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=aC.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(a.fire===ar&&s.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(i.fire===ar)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(i.fire===ar)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>l({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function l(e){var t,o;let l=aC.trans,u=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:u}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:u,cache:"immutable"})).then(t=>{let o=u.map((r,o)=>{let u=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,u,l);else if("add"===e.type||void 0===u){let t=a.fire.call(c,r,e.values[o],l);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||iN(e.values[o],n.keyPath,r))}else{let t=la(u,e.values[o]),n=s.fire.call(c,t,r,u,l);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{iw(t,e)?t[e]=n[e]:iN(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<u.length;++i){let a=n?n[i]:u[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function ll(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===sO(t.keys[o],e[i])&&(n.push(r?iU(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let lu={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=ll(e.keys,e.trans._cache,"clone"===e.cache);return t?aR.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?iU(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function lc(e){return!("from"in e)}let ld=function(e,t){if(!this){let t=new ld;return e&&"d"in e&&ib(t,e),t}ib(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function lf(e,t,r){let n=sO(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(lc(e))return ib(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>sO(r,e.from))return o?lf(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},lm(e);if(sO(t,e.to)>0)return i?lf(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},lm(e);0>sO(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),sO(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&lp(e,o),i&&a&&lp(e,i)}function lp(e,t){lc(t)||function e(t,{from:r,to:n,l:o,r:i}){lf(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function lh(e){let t=lc(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>sO(e,t.n.from);)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,!r||0>=sO(e,t.n.to))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 lm(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=ly(r)}e.d=ly(e)}function ly({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}ix(ld.prototype,{add(e){return lp(this,e),this},addKey(e){return lf(this,e,e),this},addKeys(e){return e.forEach(e=>lf(this,e,e)),this},[iH](){return lh(this)}});let lg={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new ld(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,u={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),l=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new ld)},u=l(""),c=l(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(ig(f)){"delete"!==d&&(f=e.results),u.addKeys(f);let t=ll(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=l(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&ig(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==sO(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),u.add(e)}else u.add(r),c.add(r),i.indexes.forEach(e=>l(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new ld(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new ld(e.key)],getMany:e=>[a,(new ld).addKeys(e.keys)],count:c,query:c,openCursor:c};return iy(d).forEach(e=>{u[e]=function(i){let{subscr:a}=aC;if(a){let u=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new ld)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(l&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),u}}}};class lb{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=lb.dependencies;this._options=t={addons:lb.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ar,dbReadyPromise:null,cancelOpen:ar,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new aR(e=>{i.dbReadyResolve=e}),i.openCanceller=new aR((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=sg(this,"populate","blocked","versionchange","close",{ready:[ac,ar]}),this.on.ready.subscribe=iT(this.on.ready.subscribe,e=>(t,r)=>{lb.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||aR.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,sb(sk.prototype,function(e,t){this.db=r;let n=sh,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.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:o,or:i.or,valueMapper:s!==an?s:null}})),this.Table=function(e){return sb(sy.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:sg(null,{creating:[aa,ar],reading:[ao,an],updating:[al,ar],deleting:[as,ar]})})}(this),this.Transaction=function(e){return sb(sK.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=sg(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 aR((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(),st(e)})})}(this),this.Version=function(e){return sb(s9.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return sb(sL.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new i7.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)=>0>o.cmp(e,t)?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=sq(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),ss.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(li),this.use(ls),this.use(lg),this.use(lu),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new i7.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new i7.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(s3),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||aC.letThrough||this._vip)?e():new aR((e,t)=>{if(this._state.openComplete)return t(new i7.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new i7.DatabaseClosed);this.open().catch(ar)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?st(r.dbOpenError):e);iZ&&(r.openCanceller._stackHolder=iX()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new i7.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,l=!1,u=()=>new aR((t,o)=>{if(i(),!n)throw new i7.MissingAPI;let a=e.name,u=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!u)throw new i7.MissingAPI;u.onerror=sF(o),u.onblocked=aH(e._fireOnBlocked),u.onupgradeneeded=aH(t=>{if(s=u.transaction,r.autoSchema&&!e._options.allowEmptyDB){u.onerror=sB,s.abort(),u.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=aH(()=>{o(new i7.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=sF(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;l=d<1,e._novip.idbdb=u.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=aC.transless||aC,aQ(()=>{aC.trans=n,aC.transless=f,0===i?(iy(r).forEach(e=>{s2(c,e,r[e].primKey,r[e].indexes)}),sX(e,c),aR.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=s5(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,l=i._cfg.dbschema;s8(e,o,n),s8(e,l,n),a=e._dbSchema=l;let u=s4(o,l);u.add.forEach(e=>{s2(n,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new i7.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>s6(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),s6(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;sX(e,n),r._memoizedTables={},s=!0;let i=iI(l);u.del.forEach(e=>{i[e]=o[e]}),s1(e,[e.Transaction.prototype]),s0(e,[e.Transaction.prototype],iy(i),i),r.schema=i;let a=iY(c);a&&aX();let d=aR.follow(()=>{if((t=c(r))&&a){var e=a0.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?aR.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&sl||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),s1(e,[e.Transaction.prototype]),s0(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?aR.resolve(o.shift()(r.idbtrans)).then(e):aR.resolve()})().then(()=>{var e;iy(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||s2(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),u.onsuccess=aH(()=>{s=null;let n=e._novip.idbdb=u.result,o=ik(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=s5(0,t,r);e._storeNames=ik(t.objectStoreNames,0),s0(e,[e._allTables],iy(n),n)}(e,n,i):(s8(e,e._dbSchema,i),((t=s4(s5(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),sX(e,i)}catch(e){}ss.push(e),n.onversionchange=aH(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=aH(t=>{e.on("close").fire(t)}),l&&function({indexedDB:e,IDBKeyRange:t},r){le(e)||r===sc||s7(e,t).put({name:r}).catch(ar)}(e._deps,a),t()},o)}).catch(e=>e&&"UnknownError"===e.name&&r.PR1398_maxLoop>0?(r.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u()):aR.reject(e));return aR.race([o,("u"<typeof navigator?aR.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(u)]).then(()=>(i(),r.onReadyBeingFired=[],aR.resolve(lt(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(ac,ar);return r.onReadyBeingFired=[],aR.resolve(lt(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),st(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=ss.indexOf(this);if(t>=0&&ss.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new aR(t=>{e.dbReadyResolve=t}),e.openCanceller=new aR((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new i7.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new aR((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=aH(()=>{!function({indexedDB:e,IDBKeyRange:t},r){le(e)||r===sc||s7(e,t).delete(r).catch(ar)}(this._deps,this.name),r()}),e.onerror=sF(n),e.onblocked=this._fireOnBlocked};if(e)throw new i7.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return iy(this._allTables).map(e=>this._allTables[e])}transaction(){let e=ln.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=aC.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===sd)n=sd;else{if("rw"!=e&&e!=sf)throw new i7.InvalidArgument("Invalid transaction mode: "+e);n=sf}if(i){if(i.mode===sd&&n===sf){if(!a)throw new i7.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new i7.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):st(e)}let s=(function e(t,r,n,o,i){return aR.resolve().then(()=>{let a,s=aC.transless||aC,l=t._createTransaction(r,n,t._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===i9.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):st(o)}let u=iY(i);u&&aX();let c=aR.follow(()=>{if(a=i.call(l,l))if(u){var e=a0.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=lr(a))},{trans:l,transless:s});return(a&&"function"==typeof a.then?aR.resolve(a).then(e=>l.active?e:st(new i7.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),st(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):aC.trans?a5(aC.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!iw(this._allTables,e))throw new i7.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let lv="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class l_{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[lv](){return this}}function lw(e,t){return iy(t).forEach(r=>{lp(e[r]||(e[r]=new ld),t[r])}),e}try{i={indexedDB:im.indexedDB||im.mozIndexedDB||im.webkitIndexedDB||im.msIndexedDB,IDBKeyRange:im.IDBKeyRange||im.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function lx(e){let t=lS;try{lS=!0,sW.storagemutated.fire(e)}finally{lS=t}}ix(lb,{...at,delete:e=>new lb(e,{addons:[]}).delete(),exists:e=>new lb(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return le(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==sc)):s7(e,t).toCollection().primaryKeys()})(lb.dependencies).then(e)}catch(e){return st(new i7.MissingAPI)}},defineClass:()=>function(e){ib(this,e)},ignoreTransaction:e=>aC.trans?a5(aC.transless,e):e(),vip:lt,async:function(e){return function(){try{var t=lr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:aR.resolve(t)}catch(e){return st(e)}}},spawn:function(e,t,r){try{var n=lr(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:aR.resolve(n)}catch(e){return st(e)}},currentTransaction:{get:()=>aC.trans||null},waitFor:function(e,t){let r=aR.resolve("function"==typeof e?lb.ignoreTransaction(e):e).timeout(t||6e4);return aC.trans?aC.trans.waitFor(r):r},Promise:aR,debug:{get:()=>iZ,set:e=>{iZ=e,iJ="dexie"===e?()=>!0:su}},derive:iD,extend:ib,props:ix,override:iT,Events:sg,on:sW,liveQuery:function(e){let t,r=!1,n=new l_(n=>{let o=iY(e),i=!1,a={},s={},l={get closed(){return i},unsubscribe:()=>{i=!0,sW.storagemutated.unsubscribe(f)}};n.start&&n.start(l);let u=!1,c=!1;function d(){return iy(s).some(e=>a[e]&&function(e,t){let r=lh(t),n=r.next();if(n.done)return!1;let o=n.value,i=lh(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=sO(s.from,o.to)&&sO(s.to,o.from)>=0)return!0;0>sO(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(a[e],s[e]))}let f=e=>{lw(a,e),d()&&p()},p=()=>{let h,m;if(u||i)return;a={};let y={},g=(o&&aX(),h=()=>aQ(e,{subscr:y,trans:null}),m=aC.trans?a5(aC.transless,h):h(),o&&m.then(a0,a0),m);c||(sW(sV,f),c=!0),u=!0,Promise.resolve(g).then(e=>{r=!0,t=e,u=!1,i||(d()?p():(a={},s=y,n.next&&n.next(e)))},e=>{u=!1,r=!1,n.error&&n.error(e),l.unsubscribe()})};return p(),l});return n.hasValue=()=>r,n.getValue=()=>t,n},extendObservabilitySet:lw,getByKeyPath:iA,setByKeyPath:iN,delByKeyPath:function(e,t){"string"==typeof t?iN(e,t,void 0):"length"in t&&[].map.call(t,function(t){iN(e,t,void 0)})},shallowClone:iI,deepClone:iU,getObjectDiff:la,cmp:sO,asap:iR,minKey:so,addons:[],connections:ss,errnames:i9,dependencies:i,semVer:sr,version:sr.split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),lb.maxKey=sq(lb.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(sW(sV,e=>{if(!lS){let t;sl?(t=document.createEvent("CustomEvent")).initCustomEvent(sU,!0,!0,e):t=new CustomEvent(sU,{detail:e}),lS=!0,dispatchEvent(t),lS=!1}}),addEventListener(sU,({detail:e})=>{lS||lx(e)}));let lS=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(sU);"function"==typeof e.unref&&e.unref(),sW(sV,t=>{lS||e.postMessage(t)}),e.onmessage=e=>{e.data&&lx(e.data)}}else if("u">typeof self&&"u">typeof navigator){sW(sV,e=>{try{lS||("u">typeof localStorage&&localStorage.setItem(sU,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:sU,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===sU){let t=JSON.parse(e.newValue);t&&lx(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===sU&&lx(e.changedParts)})}function lE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}aR.rejectionMapper=function(e,t){if(!e||e instanceof i2||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ae[e.name])return e;var r=new ae[e.name](t||e.message,e);return"stack"in e&&iE(r,"stack",{get:function(){return this.inner.stack}}),r},iJ=su;class lD extends lb{constructor(){super("EsmOffline"),lE(this,"syncQueue",void 0),lE(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function lO(){return new lD}let lP=new lD,lC={};async function lk(){let e=await oI();return e?.uuid||"*"}async function lT(e,t,r,n){let o=n&&n.id;return void 0!==o&&await lP.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(lb.errnames.DatabaseClosed),await lP.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(lb.errnames.DatabaseClosed,()=>-1)}async function lj(e,t,r){let n=await lk();return await lT(n,e,t,r)}async function lR(e,t){return(await lM(e,t)).map(e=>e.content)}async function lM(e,t){return await lP.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(lb.errnames.DatabaseClosed,()=>[])}async function lA(e){let t=await lk();return await lR(t,e)}async function lN(e){let t=await lk();return await lM(t,e)}async function lI(e){return await lP.syncQueue.get(e).catch(lb.errnames.DatabaseClosed,()=>void 0)}function l$(e){return!!lC[e]?.options.onBeginEditSyncItem}async function lL(e){let t=await lI(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=lC[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function lF(e){await lP.syncQueue.delete(e).catch(lb.errnames.DatabaseClosed)}function lB(e,t,r,n={}){lC[e]={type:e,dependsOn:t,process:r,options:n}}K("offline-synchronization",{});let lV={};function lU(){return Object.values(lV)}function lW(e){lV[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),lV[e.id]=e}async function lK(e){let t=await lQ();return await lH(t,e)}async function lH(e,t){let r=new lD;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(lb.errnames.DatabaseClosed,()=>[])}async function lz(e,t){let r=await lQ();return await lG(r,e,t)}async function lG(e,t,r){let n=new lD,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(lb.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(lb.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(lb.errnames.DatabaseClosed)}async function lq(e,t){let r=await lQ();return await lY(r,e,t)}async function lY(e,t,r){let n=new lD,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(lb.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(lb.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(lb.errnames.DatabaseClosed))}async function lZ(e,t){let r=await lK(e);await Promise.all(r.map(async e=>lJ(e.type,e.identifier,t)))}async function lJ(e,t,r){await lz(e,t);let n=new lD,o=await lQ(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(lb.errnames.DatabaseClosed,()=>void 0),a=lU().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),l=s.filter(e=>!e.error).map(e=>e.id),u=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:u,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(lb.errnames.DatabaseClosed)}async function lQ(){let e=(await oI()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let lX=K("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function l0(){return l4(),lX}function l1(e,t){l4(),lW({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function l3(e){l4(),await lJ("patient",e)}function l4(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function l2(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([oD(`${ox}/Patient/${e}`,t).catch(e=>n=e),r?l6(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function l6(e){let t=(await lA("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function l5(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var l8=((er={}).NEWVISIT="startVisit",er.EDITVISIT="editVisit",er.LOADING="loadingVisit",er),l9=((en={}).NOTSTARTED="notStarted",en.ONGOING="ongoing",en);let l7="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",ue=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function ut(){return z("visit",ue)}function ur(e,t){ut().setState({patientUuid:e,manuallySetVisitUuid:t})}function un(e,t){return oD(`${ow}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function uo(e,t,r){return oD(`${ow}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function ui(e,t,r){return oD(`${ow}/visit?patient=${e}&v=${r??l7}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}ut().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let ua=new ea.BehaviorSubject(null);var us=r(56170);function ul(e){return{uuid:e.uuid,display:e.display,name:e.name}}function uu(){return oO(`${ow}/visittype`).pipe((0,us.map)(e=>e.data.results.map(ul))).pipe((0,us.take)(1))}function uc(e){return{uuid:e.uuid,display:e.display}}function ud(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return oO(`${ow}/location${n?"?"+n:""}`).pipe((0,us.map)(e=>e.data.results.map(uc))).pipe((0,us.take)(1))}class uf{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+uf.version}static addUnaryOp(e){return uf.max_unop_len=Math.max(e.length,uf.max_unop_len),uf.unary_ops[e]=1,uf}static addBinaryOp(e,t,r){return uf.max_binop_len=Math.max(e.length,uf.max_binop_len),uf.binary_ops[e]=t,r?uf.right_associative.add(e):uf.right_associative.delete(e),uf}static addIdentifierChar(e){return uf.additional_identifier_chars.add(e),uf}static addLiteral(e,t){return uf.literals[e]=t,uf}static removeUnaryOp(e){return delete uf.unary_ops[e],e.length===uf.max_unop_len&&(uf.max_unop_len=uf.getMaxKeyLen(uf.unary_ops)),uf}static removeAllUnaryOps(){return uf.unary_ops={},uf.max_unop_len=0,uf}static removeIdentifierChar(e){return uf.additional_identifier_chars.delete(e),uf}static removeBinaryOp(e){return delete uf.binary_ops[e],e.length===uf.max_binop_len&&(uf.max_binop_len=uf.getMaxKeyLen(uf.binary_ops)),uf.right_associative.delete(e),uf}static removeAllBinaryOps(){return uf.binary_ops={},uf.max_binop_len=0,uf}static removeLiteral(e){return delete uf.literals[e],uf}static removeAllLiterals(){return uf.literals={},uf}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new uf(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return uf.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!uf.binary_ops[String.fromCharCode(e)]||uf.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return uf.isIdentifierStart(e)||uf.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(uf.hooks[e]){let r={context:this,node:t};return uf.hooks.run(e,r),r.node}return t}searchHook(e){if(uf.hooks[e]){let t={context:this};return uf.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===uf.SPACE_CODE||e===uf.TAB_CODE||e===uf.LF_CODE||e===uf.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:uf.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===uf.SEMCOL_CODE||r===uf.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,uf.max_binop_len),t=e.length;for(;t>0;){if(uf.binary_ops.hasOwnProperty(e)&&(!uf.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!uf.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,i,a,s,l;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:uf.binaryPrecedence(t),right_a:uf.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=uf.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:uf.right_associative.has(t)},l=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:uf.BINARY_EXP,operator:t,left:i,right:a},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:uf.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,uf.isDecimalDigit(e)||e===uf.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===uf.SQUOTE_CODE||e===uf.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===uf.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,uf.max_unop_len)).length;r>0;){if(uf.unary_ops.hasOwnProperty(t)&&(!uf.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!uf.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:uf.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}uf.isIdentifierStart(e)?(n=this.gobbleIdentifier(),uf.literals.hasOwnProperty(n.name)?n={type:uf.LITERAL,value:uf.literals[n.name],raw:n.name}:n.name===uf.this_str&&(n={type:uf.THIS_EXP})):e===uf.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===uf.PERIOD_CODE||t===uf.OBRACK_CODE||t===uf.OPAREN_CODE||t===uf.QUMARK_CODE;){let r;if(t===uf.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==uf.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===uf.OBRACK_CODE?((e={type:uf.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==uf.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===uf.OPAREN_CODE?e={type:uf.CALL_EXP,arguments:this.gobbleArguments(uf.CPAREN_CODE),callee:e}:(t===uf.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:uf.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===uf.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));uf.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);uf.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,uf.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===uf.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===uf.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:uf.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:uf.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(uf.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,uf.isIdentifierPart(e))this.index++;else break;return{type:uf.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===uf.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===uf.COMMA_CODE){if(this.index++,++n!==t.length){if(e===uf.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===uf.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==uf.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(uf.CPAREN_CODE);if(this.code===uf.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:uf.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:uf.ARRAY_EXP,elements:this.gobbleArguments(uf.CBRACK_CODE)}}}Object.assign(uf,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(uf),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),uf.max_unop_len=uf.getMaxKeyLen(uf.unary_ops),uf.max_binop_len=uf.getMaxKeyLen(uf.binary_ops);let up=e=>new uf(e).parse(),uh=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(uf).filter(e=>!uh.includes(e)&&void 0===up[e]).forEach(e=>{up[e]=uf[e]}),up.Jsep=uf,up.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let um="ArrowFunctionExpression",uy={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},ug={...uy,Promise};function ub(e,t={}){return uE(e,t,uP)}async function uv(e,t={}){return uD(e,t,uP)}function u_(e,t={}){return uE(e,t,uC)}function uw(e,t={}){return uD(e,t,uC)}function ux(e,t={}){return uE(e,t,uk)}function uS(e,t={}){return uD(e,t,uk)}function uE(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=uA(t,uy),o=uT("string"==typeof e?up(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function uD(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=uA(t,ug);return Promise.resolve(uT("string"==typeof e?up(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function uO(e){return up(e)}function uP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function uC(e){return"boolean"==typeof e}function uk(e){return"number"==typeof e}function uT(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,l,u,c,d,f,p,h,m=e,y=t;let g=uT(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return uT(b.left,v)&&uT(b.right,v);case"||":return uT(b.left,v)||uT(b.right,v);case"??":return uT(b.left,v)??uT(b.right,v)}let w=uT(b.left,v),x=uT(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,uT(r.test,n)?uT(r.consequent,n):uT(r.alternate,n);case"CallExpression":return u$(uR(e,t));case"ArrowFunctionExpression":let S;return o=e,i=t,S=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<S.length)throw`Required argument(s) ${S.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(S.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return uT(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return u$(uM(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(uL(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(uL(u)))[E.length-1];case"NewExpression":var D=e,O=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(uL(O));switch(D.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${D.callee.name}`}}if(D.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(uF(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let P,C;return f=e,p=t,P=f.expressions?.map(uL(p))??[],(C=f.quasis?.map(uL(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function uj(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return uj(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function uR(e,t){let r=uI(e.callee,t);if(r===uN||e.optional&&null==r)return uN;let n=e.arguments?.map(uL(t));if(r){if("function"!=typeof r)throw`${uU(e.callee)} is not a function`}else throw`No function named ${uU(e.callee)} is defined in this context`;return r(...n)}function uM(e,t){let r=uI(e.object,t);if(r===uN||e.optional&&null==r)return uN;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${uV(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=uj(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${uV(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(uT(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);uF(n),function(e,t){if(uB.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function uA(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}up.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:um,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=um,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),up.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),up.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,i,a;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;o=this.code,i=u,95===o||i.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=l)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),up.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),up.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),up.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),up.addBinaryOp("in",7),up.addBinaryOp("??",1);let uN=Symbol("optional chain short-circuited");function uI(e,t){switch(e.type){case"MemberExpression":return uM(e,t);case"CallExpression":return uR(e,t);default:return uT(e,t)}}function u$(e){return e===uN?void 0:e}function uL(e){return function(t){return null===t?null:uT(t,e)}}function uF(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let uB=new Set(["toString","valueOf","hasOwnProperty"]);function uV(e,t){try{return uj(e,t)}catch{return"<computed>"}}function uU(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function uW(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...ug},isLocalExpression:!1,variables:new Set};return uK("string"==typeof e?up(e):e,t),[...t.variables]}function uK(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,uK(n.argument,o);case"BinaryExpression":return i=e,a=t,[uK(i.left,a),uK(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[uK(s.consequent,l),uK(s.test,l),uK(s.alternate,l)].filter(Boolean);case"CallExpression":let r;return u=e,c=t,r=uK(u.callee,c),u.arguments?.map(uH(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,l,u,c,d,f,p,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let S=v.params?.map(uH(x))??[],E=uK(v.body,x)??[];if(E&&Array.isArray(E))for(let e of E)S.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,O=t;if(uK(D.object,O),D.computed)return void uK(D.property,O);let P={...O};P.isLocalExpression=!0,uK(D.property,P);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(uH(f));case"SequenceExpression":return p=e,h=t,void p.expressions?.map(uH(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(uH(y));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,k=t;if(!(C.name in k.globals))if(k.isLocalExpression)return C.name;else k.variables.add(C.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(uH(b)),g.quasis?.map(uH(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function uH(e){return function(t){return null===t?null:uK(t,e)}}let uz=z("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function uG(e,t,r){uz.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function uq(e){return uz.getState().flags[e].enabled}function uY(e){return!window.offlineEnabled||(e??navigator.onLine)}uz.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});var uZ=ez(function(e,t,r){eN(e,t,r)});function uJ(e,t=!0,r=!1){return!!(e?t:r)}let uQ=K("extensionsInternal",{slots:{},extensions:{}}),uX=K("extensionRenderings",{renderings:new Map}),u0=()=>z("extensionsInternal",{slots:{},extensions:{}});function u1(e){let t=uQ.getState(),r=e(t);r!==t&&uQ.setState(r)}let u3=null,u4=null;function u2(){let e=uX.getState();return u3&&e===u4||(u3=new Map(e.renderings),u4=e,function(e){for(let t of(u9.clear(),e.values()))ce(t,1);u7=!0}(u3)),u3}function u6(e){u4={renderings:e},uX.setState(u4,!0)}let u5=()=>z("extensions",{slots:{}});function u8(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}let u9=new Map,u7=!1;function ce(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=u9.get(r);if(!n){if(t<0)return;u9.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),u7=!0;return}n.count+=t,n.count<1&&(u9.delete(r),u7=!0)}function ct(){var e,t;if(u2(),!u7)return;u7=!1;let r=Array.from(u9.values(),({record:e})=>e);r.sort(cr),e=tv.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===cr(e,t[r]))||tv.setState({mountedExtensions:r})}function cr(e,t){return cn(e.slotName,t.slotName)||cn(e.extensionId,t.extensionId)||cn(e.slotModuleName,t.slotModuleName)||cn(e.extensionModuleName,t.extensionModuleName)}function cn(e,t){return e===t?0:e<t?-1:1}ct(),uX.subscribe(()=>u8(ct));let co=u0(),ci=u5(),ca=tw(),cs=tx(),cl=new Set,cu=!1;function cc(e){if(null===e)cl=null;else if(null!==cl)for(let t of e)cl.add(t);u8(cd)}function cd(){if(!cu){cu=!0;try{for(let e=1;;e++){let t=cl;if(null!==t&&0===t.size)return;cl=new Set;try{!function(e,t,r,n,o,i=null){let a=ci.getState().slots,s={},l=!1,u=uY(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,f]of Object.entries(e.slots)){var d;let p=a[n];if(p&&i&&!i.has(n)){s[n]=p;continue}let{config:h}=(d=f.name,t.slots[d]??{loaded:!1,config:{}}),m=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=co.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>cw(e,o,i[cm(e)]?.order,t)-cw(r,o,i[cm(r)]?.order,t))}(r,t.slots[e].attachedIds),l=[];for(let u of s){let{config:s}=tS(n,e,u),c=r.configure?.[u]??null,d=c?uZ({},s,c):s,f=cm(u),p=t.extensions[f];if(p){let e=d?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!oN(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag)||window.offlineEnabled&&!uJ(i,p.online,p.offline))continue;l.push({id:u,name:f,moduleName:p.moduleName,config:d,featureFlag:p.featureFlag,meta:p.meta,online:d?.["Display conditions"]?.online??p.online??!0,offline:d?.["Display conditions"]?.offline??p.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||p.displayExpression})}}return l}(n,e,h,r,c,u,o.session);p&&p.moduleName===f.moduleName&&(0,eq.A)(p.candidateExtensions,m)?s[n]=p:(s[n]={moduleName:f.moduleName,candidateExtensions:m},l=!0)}(l||Object.keys(a).length!==Object.keys(s).length)&&ci.setState({slots:s})}(co.getState(),ca.getState(),cs.getState(),uz.getState(),oC.getState(),t)}catch(e){throw cl=null===t||null===cl?null:new Set([...t,...cl]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{cu=!1}}}function cf(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function cp(){cc(null)}function ch(e,t){return{moduleName:t,name:e,attachedIds:[]}}function cm(e){let[t]=e.split("#");return t}function cy(e){var t;let r;return t=co.getState(),r=cm(e),t.extensions[r]}co.subscribe((e,t)=>{cc(e.extensions!==t.extensions?null:cf(e.slots,t.slots))}),ca.subscribe((e,t)=>{cc(cf(e.slots,t.slots))}),cs.subscribe((e,t)=>{cc(cf(e.configs,t.configs))}),uz.subscribe(()=>cc(null)),oC.subscribe(()=>cc(null)),cp(),g(cp);let cg=e=>u1(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function cb(e,t){u1(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...ch(e),attachedIds:[t]}}}})}function cv(e,t){u1(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function c_(e){u1(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function cw(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function cx(e,t){var r;return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!u_(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}((r=e,ci.getState().slots[r]?.candidateExtensions??[]),t,oC.getState().session,e)}let cS=(e,t)=>co.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=ch(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),cE=K("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function cD({name:e,basePath:t,mode:r,componentContext:n,state:o}){cE.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function cO(e){cE.getState().slotName===e&&cE.setState(cE.getInitialState(),!0)}let cP=0,cC=null,ck={bootstrap:15e3,mount:15e3,unmount:15e3};function cT(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(ck).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=ck[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function cj(e,t){var r,n;let o,i,a,s,l,u=await (cC??(cC=new Promise((e,t)=>{rz({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),rz))),cC),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=u((r=d.onSettled,"function"==typeof e?()=>e().then(e=>cT(e,r)):cT(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),l=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function cR(e,t){let r,n=cj(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function cM(e,t,r,n,o=e=>e,i={}){let a=cm(n),s=cy(n),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:c,moduleName:d,online:f,offline:p,load:h}=s;if(function(e=!0,t=!1){return uJ(uY(),e,t)}(f,p)){let s,f=cP++,p=`${t}/${n}-${f}`;e.dataset.extensionRenderingId=p;let m=e=>{try{let e,t;(t=(e=u2()).get(p))&&(e.delete(p),ce(t,-1),u6(e))}catch(t){console.error(e,t)}};try{var u;let e;u={renderingId:p,extensionName:a,extensionModuleName:d,extensionId:n,slotName:t,slotModuleName:r},(e=u2()).has(u.renderingId)||(e.set(u.renderingId,u),ce(u,1),u6(e))}catch(e){throw m(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await h()}catch(e){throw m(`Recomputing configuration after '${n}' failed to load also failed`),e}try{l=await cj(o({...s,name:`${t}/${a}-${f}`}),{...i,_meta:c,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw m(`Recomputing configuration after '${n}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),m(`Recomputing configuration after '${n}' failed to mount also failed`)}),l.unmountPromise.then(()=>m(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),m(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return l}function cA(){return{current:"unavailable",notAvailable:!0,active:!1}}let cN="x-omrs-offline-response-body",cI="x-omrs-offline-response-status",c$="x-omrs-offline-caching-strategy",cL="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cF=new Uint8Array(16),cB=[];for(let e=0;e<256;++e)cB.push((e+256).toString(16).slice(1));let cV=function(e,t,r){if(cL&&!t&&!e)return cL();let n=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(cF)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return cB[e[t+0]]+cB[e[t+1]]+cB[e[t+2]]+cB[e[t+3]]+"-"+cB[e[t+4]]+cB[e[t+5]]+"-"+cB[e[t+6]]+cB[e[t+7]]+"-"+cB[e[t+8]]+cB[e[t+9]]+"-"+cB[e[t+10]]+cB[e[t+11]]+cB[e[t+12]]+cB[e[t+13]]+cB[e[t+14]]+cB[e[t+15]]}(n)},cU="OFFLINE+";function cW(){return cU+cV()}function cK(e){return e.startsWith(cU)}var cH=r(47499),cz=r.n(cH);function cG({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,cH.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cz().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),oy({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:oh(e,t),...o},n)}let cq=K("modalRegistry",{modals:{}}),cY=K("workspaceRegistrations",{workspaces:{}}),cZ=K("workspaceGroups",{workspaceGroups:{}}),cJ=new Set;function cQ(e){let t=cY.getState().workspaces;if(t[e])return t[e];{let t=cy(e);if(t){var r;let n;return cJ.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),cJ.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?of(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}let cX=K("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function c0(e){let{openedWindows:t}=cX.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}let c1=(0,cH.createContext)({moduleName:"",featureName:""});function c3(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let c4=e=>e;function c2(e,t=c4,r){let n=(0,cH.useCallback)(t=>e.subscribe(t),[e]),o=(0,cH.useCallback)(()=>t(e.getState()),[e,t]),i=(0,cH.useSyncExternalStore)(n,o,o),a=(0,cH.useMemo)(()=>r?c3(e,r):null,[e,r]);return(0,cH.useMemo)(()=>a?{...i,...a}:i,[i,a])}function c6(e,t){return c2(e,c4,t)}function c5(e){return function(t){let r=(0,cH.useCallback)(t=>e.subscribe(t),[]),n=(0,cH.useCallback)(()=>e.getState(),[]),o=(0,cH.useSyncExternalStore)(r,n,n),i=(0,cH.useMemo)(()=>t?c3(e,t):null,[t]);return(0,cH.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let c8=[];Object.freeze(c8);let c9={candidateExtensions:c8};Object.freeze(c9);let c7=e=>{let t=(0,cH.useCallback)(t=>t.slots?.[e]??c9,[e]);return c2(u5(),t)},de=e=>e.session;function dt(e,t){let r,{candidateExtensions:n}=c7(e),o=c2(oC,de),i=(A((r=(0,cH.useRef)(t)).current,t)||(r.current=t),r.current);return(0,cH.useMemo)(()=>cx(e,i),[e,i,o,n])}function dr(e,t){let{moduleName:r}=(0,cH.useContext)(c1);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,cH.useEffect)(()=>{cS(r,e)},[r,e]),{extensions:dt(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function dn(e){return e}function di({name:e,extensionSlotName:t,select:r=dn,children:n,state:o,style:i,...a}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,cH.useRef)(null),{extensions:u,extensionSlotModuleName:c}=dr(s,o),d=(0,cH.useMemo)(()=>r(u),[r,u]),f=(0,cH.useMemo)(()=>{if("function"==typeof n&&!cz().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return cz().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>cz().createElement(c1.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},f?.[t]??("function"!=typeof n?n:null)??cz().createElement(fj,{state:o}))))}var da=r(5338);function ds(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ds(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ds(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function du(e){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e){return(dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dd(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(dc(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(dc(e)));return e}}var df=null;try{df=require("react").createContext()}catch(e){}var dp={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function dh(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function dm(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,i=dv(e,t,function(){r(this)}),a=dd(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:db(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function dy(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():db(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function dg(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=dv(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=dd(e,t)();db(e).render(n,i)}})}function db(e){return e.ReactDOMClient||e.ReactDOM}function dv(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=df?e.React.createElement(df.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,dl(dl({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var d_=r(58779),dw=r(73391),dx=r.n(dw),dS=r(25952);let dE={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},dD=new Map;(0,dS.initCache)(dD);let dO={errorRetryCount:3,fetcher:oD,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof oP){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>dD};function dP(e,t){return function(e){if("object"!==du(e))throw Error("single-spa-react requires a configuration object");var t,r=dl(dl({},dp),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!df&&r.React.createContext&&(df=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:dh.bind(null,r),mount:dm.bind(null,r),unmount:dy.bind(null,r)};return r.parcelCanUpdate&&(n.update=dg.bind(null,r)),n}({React:cz(),ReactDOMClient:da,rootComponent:(function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},dE,e),r={...dO,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=cz().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return cz().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=cz().createElement(cH.Suspense,{fallback:null},cz().createElement(dw.SWRConfig,{value:r},cz().createElement(c1.Provider,{value:this.state.config},t.disableTranslations?cz().createElement(e,this.props):cz().createElement(d_.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},cz().createElement(e,this.props)))));return t.strictMode&&cz().StrictMode?cz().createElement(cz().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}})(t)(e)})}function dC(e,t){return()=>e().then(({default:e})=>dP(e,t))}function dk(e,t){return()=>Promise.resolve(dP(e,t))}let dT=dC,dj=new Map;function dR(e,t){let r=(0,cH.useRef)(t??{}),n=(0,cH.useRef)(t=>oq(e,t)),o=(0,cH.useRef)(Symbol());return(0,cH.useEffect)(()=>{let r=t??{},n=o.current;return null===oG(e)?oH(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),oq(e,()=>r)),dj.set(e,n),()=>{dj.get(e)===n&&(oz(e),dj.delete(e))}},[e]),(0,cH.useEffect)(()=>{let n=t??{};A(r.current,n)||(oq(e,()=>n),r.current=n)},[t]),n.current}function dM({namespace:e,value:t}){return dR(e,t),null}let dA=({children:e,value:t,fallback:r})=>t?cz().createElement(cz().Fragment,null,e):r?cz().createElement(cz().Fragment,null,r):null;function dN(){let e=(0,cH.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,cH.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function dI(e,t=e=>e??{}){let[r,n]=(0,cH.useState)(()=>{if(d$(e))return;let r=oG(e);if(null!==r)return t?t(r):r});return(0,cH.useEffect)(()=>{if(d$(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,cH.useEffect)(()=>oY(e,e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>A(e,r)?e:r)}),[e,t]),r}function d$(e){return"string"!=typeof e||0===e.trim().length}function dL(e){let t=dt(e);return(0,cH.useMemo)(()=>t.map(e=>e.id),[t])}function dF(e,t,r){let{data:n,error:o,mutate:i,isLoading:a,isValidating:s}=dx()(e?o7(e,t,r):null,oD);return(0,cH.useMemo)(()=>({isLoading:a,data:n?.data.results??[],error:o,mutate:i,isValidating:s}),[n,o,a,s,i])}function dB(e){(0,cH.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dV={},dU=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dW(e){let{moduleName:t,extension:r}=(0,cH.useContext)(c1),n=e?.externalModuleName??t;if(!n&&!r)throw Error(dU);let o=function(e){let t=(0,cH.useMemo)(()=>t_(e),[e]),r=function(e){let[t,r]=(0,cH.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,cH.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw dV[e]||(dV[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),dV[e];return r}(n),i=function(e){let t=(0,cH.useMemo)(tx,[]),r=function(e,t){let[r,n]=(0,cH.useState)(t?()=>{let r=tS(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,cH.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=tS(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,eq.A)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!dV[r]&&t&&(dV[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=tS(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),dV[r]}return r||{}}(r);return(0,cH.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let dK=dt;function dH(){let[e,t]=(0,cH.useState)(uY());return(0,cH.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function dz(e,t=300){let[r,n]=(0,cH.useState)(e);return(0,cH.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var dG=r(66148),dq=r.n(dG);let dY=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function dZ(){let e=`${ow}/emrapi/configuration?v=${dY}`,t=dq()(e,oD);return(0,cH.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dJ(){return(0,cH.useContext)(c1).extension}function dQ(e){let t=dt(e);return(0,cH.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}c5(u0());let dX=c5(u5());function d0(e){let{flags:t}=c2(uz);return t[e]?.enabled??!1}function d1(){let[,e]=(0,cH.useState)(0);return(0,cH.useCallback)(()=>{e(e=>e+1)},[])}function d3(e,t,r={}){return d2(e,t,d4,r)}let d4={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oE(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function d2(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:l,swrConfig:u}=n,c=n.fetcher??oD,[d,f]=(0,cH.useState)(1),p=(0,cH.useRef)(NaN),h=(0,cH.useRef)(NaN),m=(0,cH.useRef)(d),y=(0,cH.useRef)(!1),g=(0,cH.useRef)(!1),b=e?.toString()??"",[v,w]=(0,cH.useState)(b);b!==v&&(w(b),f(1),m.current=1,p.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,S=(0,cH.useMemo)(()=>o(e,t,x),[e,t,x]),{data:E,...D}=(l?dq():dx())(S,c,u);E?.data&&(p.current=i(E?.data),h.current=a(E?.data),y.current=!0);let O=Math.ceil(p.current/t),P=(0,cH.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,cH.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(p.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,f(e))},[d,t,b,E]);let C=(0,cH.useCallback)(()=>{P(m.current+1)},[P]),k=(0,cH.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(E?.data),totalPages:O,totalCount:p.current,currentPage:d,currentPageSize:h.current,paginated:O>1,showNextButton:d<O,showPreviousButton:d>1,goTo:P,goToNext:C,goToPrevious:k,...D}}function d6(e,t,r={}){return d2(e,t,d5(),r)}function d5(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(oE(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var d8=r(12786),d9=r.n(d8);function d7(e,t={}){return fe(e,d4,t)}function fe(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,l=r.fetcher??oD,u=(0,cH.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=d9()(u,l,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{f((c?.length??0)+1)},nextUri:h,...p}}function ft(e,t={}){return fr(e,d4,t)}function fr(e,t,r={}){let n=fe(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:l,nextUri:u}=n;return((0,cH.useEffect)(()=>{o&&!i&&s()},[o,u]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:l||o}}function fn(e,t={}){return fr(e,d5(),t)}function fo(e,t={}){return fe(e,d5(),t)}function fi(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function fa(){let[e,t]=(0,cH.useState)(fi);return(0,cH.useEffect)(()=>{let e=()=>{t(fi())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let fs=e=>"small-desktop"===e||"large-desktop"===e;function fl(e){let t=(0,cH.useContext)(c1);(0,cH.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),cD(e),()=>{cO(e.name)}),[t,e])}function fu(){return c2(cE)}function fc(e=null,t=null){let[r,n]=(0,cH.useState)([]);return(0,cH.useEffect)(()=>{let r=ud(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function fd(e,t=!0){let r=(0,cH.useRef)(null);return(0,cH.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function ff(e){let t=(0,cH.useRef)();return(0,cH.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function fp(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=dN(),s=(0,cH.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),l=(0,cH.useCallback)(e=>oD(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return dx()(e,l,i)}function fh(e=[],t=10){let[r,n]=(0,cH.useState)(1),o=(0,cH.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,cH.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,cH.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),l=(0,cH.useCallback)(()=>{n(e=>e+1)},[]),u=(0,cH.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,cH.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:l,goToPrevious:u}),[a,o,e.length,t,i,s,l,u])}function fm(e,t,r,n){return{pageSizes:(0,cH.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,cH.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function fy(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function fg(e){let[t,r]=(0,cH.useState)(e??fy()),{data:n,error:o,isValidating:i}=dx()(t?["patient",t]:null,()=>l2(t,{}));return(0,cH.useEffect)(()=>{let e=()=>{let e=fy();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,cH.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function fb(){let e=`${ow}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=dx()(e,oD);return(0,cH.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function fv(e){let{extensions:t,extensionSlotModuleName:r}=dr(e);return e?t.map(t=>({state:n})=>cz().createElement(c1.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r,extensionMeta:t.meta}}},cz().createElement(fj,{state:n}))):[]}function f_(){let e=(0,cH.useRef)(),[t,r]=(0,cH.useState)(null),n=null;if(!t){if(s){let e=oj().getState();e.loaded&&(n=e.session)}else s=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(oj().getState()),n||(e.current=oj().subscribe(r))});if(n)r(n);else throw s}(0,cH.useEffect)(()=>(e.current||(e.current=oj().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(s)throw console.warn("useSession is in an unexpected state. Attempting to recover."),s;else throw Error("useSession is in an invalid state.");return o}let fw=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,cH.useState)(null);return((0,cH.useEffect)(()=>{let e=oT({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&oN(e,n))?cz().createElement(cz().Fragment,null,r):t?cz().createElement(cz().Fragment,null,t):null};var fx=r(74353),fS=r.n(fx),fE=r(47581);let fD=new Map;function fO(){for(let e of Array.from(fD.values()))e()}let fP={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function fC(e){let t=(0,cH.useId)();return(0,cH.useEffect)(()=>{if(e)return fD.set(t,e),()=>{fD.delete(t)}},[t,e]),{...c6(ut(),fP),mutateVisit:fO}}function fk(e,t=l7){let r=(0,cH.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=fC((0,cH.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${a}?v=${t}`,{data:u,error:c,mutate:d,isValidating:f}=dx()(e?`${ow}/visit${s}`:null,oD),{data:p,error:h,mutate:m,isValidating:y}=dx()(e&&a?`${ow}/visit${l}`:null,oD),g=(0,cH.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),b=(0,cH.useMemo)(()=>a&&p?p.data:null,[p,a]),v=(0,cH.useRef)(null);(0,cH.useEffect)(()=>{!f&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,f,y,n]);let w=(0,cH.useCallback)(()=>{d(),m()},[d,m]);(0,cH.useEffect)(()=>{r.current=w},[w]);let x=!!(!u||a&&!p),S=!!(a?h:c);return{error:c||h,mutate:w,isValidating:f||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!S}}function fT(){let[e,t]=(0,cH.useState)([]);return(0,cH.useEffect)(()=>{let e=uu().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}fx.extend(fE);let fj=({state:e,children:t,...r})=>{let{extension:n}=(0,cH.useContext)(c1),o=(0,cH.useRef)(null),i=(0,cH.useRef)(Promise.resolve()),a=(0,cH.useRef)(!1),s=(0,cH.useRef)(!1),l=(0,cH.useRef)(e),u=(0,cH.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,cH.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,cH.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,cM(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,cH.useEffect)(()=>(a.current=!1,()=>{a.current=!0,u(o.current)}),[]),(0,cH.useEffect)(()=>{l.current=e,o.current&&c(o.current,e)},[e]),n?cz().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};var fR=r(74848),fM=r(46942),fA=r.n(fM);function fN({title:e,children:t}){let r="tablet"===fa();return(0,fR.jsxs)("div",{className:fA()({"-esm-form-builder__card-header-module__tabletHeader___rUYi0":r,"-esm-form-builder__card-header-module__desktopHeader___CDa37":!r}),children:[(0,fR.jsx)("h4",{children:e}),t]})}var fI=r(14968);let f$="-esm-form-builder__custom-overflow-menu-module__container___lY3iq",fL="-esm-form-builder__custom-overflow-menu-module__menu___dReHr",fF="-esm-form-builder__custom-overflow-menu-module__show___48R0e",fB="-esm-form-builder__custom-overflow-menu-module__overflowMenuButton___tsY8r",fV=(0,cH.createContext)(null);function fU(){let e=(0,cH.useContext)(fV);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function fW({menuTitle:e,children:t}){let[r,n]=cz().useState(!1),o=fd(()=>n(!1),r),i="tablet"===fa(),a=(0,cH.useCallback)(()=>n(e=>!e),[]),s=(0,cH.useRef)(null),l=(0,cH.useRef)(null),u=(0,cH.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,f=(0,cH.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,cH.useMemo)(()=>({closeMenu:f}),[f]),h=(0,cH.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=cH.Children.toArray(t);(0,cH.useEffect)(()=>{if(r&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,cH.useCallback)(({currentIndex:e,direction:t})=>{let r=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,cH.isValidElement)(e)?(0,cH.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,fR.jsxs)("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",f$),ref:o,children:[(0,fR.jsx)("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},fB),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,fR.jsxs)("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fL,{[fF]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,fR.jsx)("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,fR.jsx)(fV.Provider,{value:p,children:g})}),(0,fR.jsx)("span",{})]})]})}function fK(e){let t=(0,cH.useContext)(fV);return(0,fR.jsx)(fI.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}let fH={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},fz=e=>(0,fR.jsx)(fI.TableBatchActions,{translateWithId:(e,t)=>{let r=fH[e];return r?op(r,e,t):e},...e});var fG=r(47767),fq=r(84976);let fY=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],fZ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),fJ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-add",iconProps:e})})),fQ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),fX=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),f0=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),f1=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),f3=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),f4=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),f2=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),f6=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),f5=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),f8=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),f9=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),f7=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),pe=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),pt=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),pr=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),pn=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),po=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),pi=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),pa=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),ps=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pl=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pc=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pd=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-document",iconProps:e})})),pf=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),pp=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-download",iconProps:e})})),ph=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),pm=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),py=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),pg=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-events",iconProps:e})})),pb=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),pv=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),p_=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),pw=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),px=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),pS=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-group",iconProps:e})})),pE=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),pD=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),pO=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),pP=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information",iconProps:e})})),pC=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),pk=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),pT=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),pj=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),pR=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),pM=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-location",iconProps:e})})),pA=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),pN=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),pI=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),p$=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),pL=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),pF=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),pB=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-money",iconProps:e})})),pV=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),pU=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),pW=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pK=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),pH=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-password",iconProps:e})})),pz=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),pG=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),pq=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),pY=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),pZ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),pJ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),pQ=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),pX=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-report",iconProps:e})})),p0=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),p1=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-save",iconProps:e})})),p3=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-search",iconProps:e})})),p4=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),p2=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),p6=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),p5=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),p8=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),p9=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),p7=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),he=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-table",iconProps:e})})),ht=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-time",iconProps:e})})),hr=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),hn=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),ho=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),hi=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),ha=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),hs=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),hl=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),hu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),hc=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-user",iconProps:e})})),hd=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),hf=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-view",iconProps:e})})),hp=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(h_,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),hh=hp,hm=pf,hy=pR,hg=pO,hb=p5,hv=(0,cH.memo)((0,cH.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,cH.useRef)(e?document.getElementById(e):void 0);return(0,cH.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fR.jsx)(dA,{value:o.current,fallback:t,children:(0,fR.jsx)(h_,{ref:n,icon:e,iconProps:r})})})),h_=(0,cH.memo)((0,cH.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,cH.useRef)(null);return(0,cH.useImperativeHandle)(r,()=>a.current),(0,cH.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fR.jsx)("svg",{ref:a,className:fA()("omrs-icon","-esm-form-builder__icons-module__icon___sq7Qp",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,fR.jsx)("use",{href:`#${e}`})})})),hw=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,d_.useTranslation)(),i=(0,fG.zy)(),a=(0,cH.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,fR.jsx)("div",{children:(0,fR.jsx)(cG,{className:fA()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,fR.jsxs)("span",{className:"-esm-form-builder__dashboard-module__menu___Lg1M+",children:[(0,fR.jsx)(hv,{icon:n,className:"-esm-form-builder__dashboard-module__icon___Y2DxK",size:16}),(0,fR.jsx)("span",{children:o(t)})]})})},e)};function hx(e){return function({basePath:t}){return(0,fR.jsx)(fq.Kd,{children:(0,fR.jsx)(hw,{basePath:t,...e})})}}function hS(e){let t=(0,cH.useRef)(null),r=(0,cH.useRef)(void 0),n=(0,cH.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,cH.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function hE(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=hD(e,t);return r||="function"==typeof n,n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():hD(e[r],null)})}}}function hD(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hO(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let hP="u">typeof document?cz().useLayoutEffect:()=>{},hC={prefix:String(Math.round(1e10*Math.random())),current:0},hk=cz().createContext(hC),hT=cz().createContext(!1),hj=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),hR="function"==typeof cz().useId?function(e){let t=cz().useId(),[r]=(0,cH.useState)(hI()),n=r?"react-aria":`react-aria${hC.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,cH.useContext)(hk),r=function(e=!1){let t=(0,cH.useContext)(hk),r=(0,cH.useRef)(null);if(null===r.current&&!e){let e=cz().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let r=hj.get(e);null==r?hj.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,hj.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function hM(){return!1}function hA(){return!0}function hN(e){return()=>{}}function hI(){return"function"==typeof cz().useSyncExternalStore?cz().useSyncExternalStore(hN,hM,hA):(0,cH.useContext)(hT)}let h$=!!("u">typeof window&&window.document&&window.document.createElement),hL=new Map;function hF(e){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(null),o=hR(t),i=(0,cH.useRef)(null);if(l&&l.register(i,o),h$){let e=hL.get(o);e&&!e.includes(n)?e.push(n):hL.set(o,[n])}return hP(()=>()=>{l&&l.unregister(i),hL.delete(o)},[o]),(0,cH.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function hB(e=[]){let t=hF(),[r,n]=function(e){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(t),o=(0,cH.useRef)(null),i=(0,cH.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}n.current===e.value?i.current():r(e.value)});return hP(()=>{n.current=t,o.current&&i.current()}),[t,(0,cH.useCallback)(e=>{o.current=e(n.current),i.current()},[i])]}(t),o=(0,cH.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return hP(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(l=new FinalizationRegistry(e=>{hL.delete(e)}));let hV=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function hU(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=hO(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=hV(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=hL.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=hL.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):"ref"===e&&r&&o?t.ref=hE(r,o):t[e]=void 0!==o?o:r}}return t}let hW=Symbol("default");function hK({values:e,children:t}){for(let[r,n]of e)t=cz().createElement(r.Provider,{value:n},t);return t}function hH(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,cH.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:l||a?{...a,...l}:void 0,children:null!=u?u:i,"data-rac":""}},[t,r,n,o,i,a,s])}function hz(e,t){let r=(0,cH.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||hW;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function hG(e,t,r){let{ref:n,...o}=hz(r,e.slot)||{},i=hS((0,cH.useMemo)(()=>hE(t,n),[t,n])),a=hU(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function hq(e=!0){let[t,r]=(0,cH.useState)(e),n=(0,cH.useRef)(!1),o=(0,cH.useCallback)(e=>{n.current=!0,r(!!e)},[]);return hP(()=>{n.current||r(!1)},[]),[o,t]}function hY(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let hZ=(0,cH.createContext)(null),hJ=null;function hQ(e,t="assertive",r=7e3){hJ?hJ.announce(e,t,r):(hJ=new hX,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?hJ.announce(e,t,r):setTimeout(()=>{(null==hJ?void 0:hJ.isAttached())&&(null==hJ||hJ.announce(e,t,r))},100))}class hX{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let h0=new Set(["id"]),h1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),h3=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),h4=new Set(["dir","lang","hidden","inert","translate"]),h2=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),h6=/^(data-.*)$/;function h5(e,t={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(h0.has(t)||r&&h1.has(t)||n&&h3.has(t)||o&&h4.has(t)||i&&(h2.has(t)||t.endsWith("Capture")&&h2.has(t.slice(0,-7)))||a?.has(t)||h6.test(t))&&(s[t]=e[t]);return s}function h8(e){if(function(){if(null==h9){h9=!1;try{document.createElement("div").focus({get preventScroll(){return h9=!0,!0}})}catch{}}return h9}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let h9=null,h7=e=>e?.ownerDocument??document,me=e=>e&&"window"in e&&e.window===e?e:h7(e).defaultView||window;function mt(e,t){return!!t&&!!e&&e.contains(t)}function mr(e){return e.target}function mn(e){if(!e)return!1;let t=e.getRootNode(),r=me(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return null!=n&&e.contains(n)}let mo="u">typeof Element&&"checkVisibility"in Element.prototype;function mi(e,t){return mo?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=me(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||mi(e.parentElement,e))}let ma=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],ms=ma.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ma.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let ml=ma.join(':not([hidden]):not([tabindex="-1"]),');function mu(e,t){return e.matches(ms)&&!md(e)&&(t?.skipVisibilityCheck||mi(e))}function mc(e){return e.matches(ml)&&mi(e)&&!md(e)}function md(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function mf(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function mp(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function mh(e){let t=(0,cH.useRef)({isFocused:!1,observer:null});return hP(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,cH.useCallback)(r=>{let n=mr(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=mf(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let mm=!1;function my(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function mg(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function mb(e){let t=null;return()=>(null==t&&(t=e()),t)}let mv=mb(function(){return mg(/^Mac/i)}),m_=mb(function(){return mg(/^iPhone/i)}),mw=mb(function(){return mg(/^iPad/i)||mv()&&navigator.maxTouchPoints>1}),mx=mb(function(){return m_()||mw()});mb(function(){return mv()||mx()});let mS=mb(function(){return my(/AppleWebKit/i)&&!mE()}),mE=mb(function(){return my(/Chrome/i)}),mD=mb(function(){return my(/Android/i)}),mO=mb(function(){return my(/Firefox/i)});function mP(e){return""===e.pointerType&&!!e.isTrusted||(mD()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function mC(e,t,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}=t;mO()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(mv()?n=!0:o=!0);let s=mS()&&mv()&&!mw()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});mC.isOpening=r,h8(e),e.dispatchEvent(s),mC.isOpening=!1}mC.isOpening=!1;let mk=null,mT=new Set,mj=new Map,mR=!1,mM=!1,mA={Tab:!0,Escape:!0};function mN(e,t){for(let r of mT)r(e,t)}function mI(e){mR=!0,mC.isOpening||e.metaKey||!mv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(mk="keyboard",mN("keyboard",e))}function m$(e){mk="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(mR=!0,mN("pointer",e))}function mL(e){!mC.isOpening&&mP(e)&&(mR=!0,mk="virtual")}function mF(e){let t=me(mr(e)),r=h7(mr(e));mr(e)!==t&&mr(e)!==r&&!mm&&e.isTrusted&&(mR||mM||(mk="virtual",mN("virtual",e)),mR=!1,mM=!1)}function mB(){mm||(mR=!1,mM=!0)}function mV(e){if("u"<typeof window||"u"<typeof document)return;let t=me(e),r=h7(e);if(mj.get(t))return;let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){mR=!0,n.apply(this,arguments)},r.addEventListener("keydown",mI,!0),r.addEventListener("keyup",mI,!0),r.addEventListener("click",mL,!0),t.addEventListener("focus",mF,!0),t.addEventListener("blur",mB,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",m$,!0),r.addEventListener("pointermove",m$,!0),r.addEventListener("pointerup",m$,!0)),t.addEventListener("beforeunload",()=>{mU(e)},{once:!0}),mj.set(t,{focus:n})}let mU=(e,t)=>{let r=me(e),n=h7(e);t&&n.removeEventListener("DOMContentLoaded",t),mj.has(r)&&(r.HTMLElement.prototype.focus=mj.get(r).focus,n.removeEventListener("keydown",mI,!0),n.removeEventListener("keyup",mI,!0),n.removeEventListener("click",mL,!0),r.removeEventListener("focus",mF,!0),r.removeEventListener("blur",mB,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",m$,!0),n.removeEventListener("pointermove",m$,!0),n.removeEventListener("pointerup",m$,!0)),mj.delete(r))};function mW(){return"pointer"!==mk}"u">typeof document&&("loading"!==(p=h7(void 0)).readyState?mV(void 0):p.addEventListener("DOMContentLoaded",()=>{mV(void 0)}));let mK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),mH=new Map,mz=new Set;function mG(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=mr(r);if(!e(r)||!n)return;let o=mH.get(n);if(o&&(o.delete(r.propertyName),0===o.size&&(n.removeEventListener("transitioncancel",t),mH.delete(n)),0===mH.size)){for(let e of mz)e();mz.clear()}};document.body.addEventListener("transitionrun",r=>{let n=mr(r);if(!e(r)||!n)return;let o=mH.get(n);o||(o=new Set,mH.set(n,o),n.addEventListener("transitioncancel",t,{once:!0})),o.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function mq(e){requestAnimationFrame(()=>{for(let[e]of mH)"isConnected"in e&&!e.isConnected&&mH.delete(e);0===mH.size?e():mz.add(e)})}function mY(e){if(!e.isConnected)return;let t=h7(e);if("virtual"===mk){let r=((e=document)=>e.activeElement)(t);mq(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&h8(e)})}else h8(e)}function mZ(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,cH.useCallback)(e=>{if(mr(e)===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=mh(i),s=(0,cH.useCallback)(e=>{let t=mr(e),n=h7(t),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function mJ(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}function mQ(e,t){hP(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?mG():document.addEventListener("DOMContentLoaded",mG));let mX=cz().createContext(null);function m0(e,t){let{focusProps:r}=mZ(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:mJ(e.onKeyDown),onKeyUp:mJ(e.onKeyUp)}},o=hU(r,n),i=function(e){let t=(0,cH.useContext)(mX)||{};mQ(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,cH.useRef)(e.autoFocus);(0,cH.useEffect)(()=>{s.current&&t.current&&mY(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:hU({...o,tabIndex:l},a)}}cz().forwardRef(function(e,t){let{children:r,...n}=e,o=hS(t),i={...n,ref:o};return cz().createElement(mX.Provider,{value:i},r)});let m1="default",m3="",m4=new WeakMap;function m2(e){if(mx())"disabled"===m1&&(m1="restoring",setTimeout(()=>{mq(()=>{if("restoring"===m1){let t=h7(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=m3||""),m3="",m1="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&m4.has(e)){let t=m4.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),m4.delete(e)}}function m6(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let m5=new WeakMap;function m8(e){let t=e??("u">typeof document?document:void 0);if(!t)return m6(t);if(m5.has(t))return m5.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof me(r).HTMLMetaElement&&(r.nonce||r.content)||m6(t)||void 0;return void 0!==n&&m5.set(t,n),n}let m9=cz().createContext({register:()=>{}});m9.displayName="PressResponderContext";let m7=cz().useInsertionEffect??hP;function ye(e){let t=(0,cH.useRef)(null);return m7(()=>{t.current=e},[e]),(0,cH.useCallback)((...e)=>{let r=t.current;return r?.(...e)},[])}function yt(){let e=(0,cH.useRef)(new Map),t=(0,cH.useCallback)((t,r,n,o)=>{let i=o?.once?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,cH.useCallback)((t,r,n,o)=>{let i=e.current.get(n)?.fn||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,cH.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,cH.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var yr=r(54575),yn=r.n(yr);class yo{#e;constructor(e,t,r,n){this.#e=!0;let o=n?.target??r.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,l,u=null;null!=r.clientX&&null!=r.clientY&&(l=r.clientX,u=r.clientY),i&&(null!=l&&null!=u?(a=l-i.left,s=u-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=s,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let yi=Symbol("linkClicked"),ya="react-aria-pressable-style",ys="data-react-aria-pressable";function yl(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,cH.useContext)(m9);if(t){let{register:r,ref:n,...o}=t;e=hU(o,e),r()}return mQ(t,e.ref),e}(e),[h,m]=(0,cH.useState)(!1),y=(0,cH.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=yt(),v=(0,cH.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new yo("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,n,r]),w=(0,cH.useCallback)((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let l=!0;if(o){let t=new yo("pressend",n,e);o(t),l=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new yo("press",n,e);t(r),l&&=r.shouldStopPropagation}return a.isTriggeringEvent=!1,l},[s,o,r,t]),x=ye(w),S=ye((0,cH.useCallback)((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new yo("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[s,i])),E=(0,cH.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(yd(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||m2(t.target),t.disposables))r();t.disposables=[]}},[d,b,w]),D=ye(E),O=(0,cH.useCallback)(e=>{c&&E(e)},[c,E]),P=(0,cH.useCallback)(e=>{s||a?.(e)},[s,a]),C=(0,cH.useCallback)((e,t)=>{if(!s&&a){let r=new MouseEvent("click",e);mp(r,t),a(mf(r))}},[s,a]),k=(0,cH.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(yc(t.nativeEvent,t.currentTarget)&&mt(t.currentTarget,mr(t))){yf(mr(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",n=v(t,"keyboard"));let o=t.currentTarget;g(h7(t.currentTarget),"keyup",hO(t=>{yc(t,o)&&!t.repeat&&mt(o,mr(t))&&e.target&&S(yd(e.target,t),"keyboard")},r),!0),n&&t.stopPropagation(),t.metaKey&&mv()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mt(t.currentTarget,mr(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!mC.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||mP(t.nativeEvent))){let e=v(t,"virtual"),n=S(t,"virtual"),o=x(t,"virtual");P(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",o=S(yd(t.currentTarget,t),n),i=x(yd(t.currentTarget,t),n,!0);r=o&&i,e.isOverTarget=!1,P(t),D(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{if(e.isPressed&&e.target&&yc(t,e.target)){yf(mr(t),t.key)&&t.preventDefault();let r=mr(t),n=mt(e.target,r);x(yd(e.target,t),"keyboard",n),n&&C(t,e.target),b(),"Enter"!==t.key&&yu(e.target)&&mt(e.target,r)&&!t[yi]&&(t[yi]=!0,mC(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!mt(t.currentTarget,mr(t)))return;if(o=t.nativeEvent,!mD()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(mx()){if("default"===m1){let t=h7(e);m3=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}m1="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";m4.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=mr(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(h7(t.currentTarget),"pointerup",r,!1),g(h7(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(mt(t.currentTarget,mr(t))&&0===t.button){if(u){let r=function(e){for(;e&&!mu(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=me(e),r=t.document.activeElement;if(!r||r===e)return;mm=!0;let n=!1,o=e=>{(mr(e)===r||n)&&e.stopImmediatePropagation()},i=t=>{(mr(t)===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,h8(r),l()))},a=t=>{(mr(t)===e||n)&&t.stopImmediatePropagation()},s=t=>{(mr(t)===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,h8(r),l()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),mm=!1,n=!1},u=requestAnimationFrame(l);return l}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{mt(t.currentTarget,mr(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||S(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(yd(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(yd(e.target,t),e.pointerType,!1),O(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(mt(e.target,mr(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?D(t):(h8(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else D(t);e.isOverTarget=!1}},n=e=>{D(e)};t.onDragStart=e=>{mt(e.currentTarget,mr(e))&&D(e)}}return t},[g,s,u,b,d,O,v,P,C]);return(0,cH.useEffect)(()=>{if(!f)return;let e=h7(f.current);if(!e||!e.head||e.getElementById(ya))return;let t=e.createElement("style");t.id=ya;let r=m8(e);r&&(t.nonce=r),t.textContent=`
17
17
  @layer {
18
18
  [${ys}] {
19
19
  touch-action: pan-x pan-y pinch-zoom;
20
20
  }
21
21
  }
22
- `.trim(),e.head.prepend(t)},[f]),(0,cH.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||m2(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:hU(p,k,{[ys]:!0})}}function yu(e){return"A"===e.tagName&&e.hasAttribute("href")}function yc(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof me(t).HTMLInputElement&&!yh(t,r)||t instanceof me(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&yu(t))&&"Enter"!==r)}function yd(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function yf(e,t){return e instanceof HTMLInputElement?!yh(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!yu(e))}let yp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yh(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:yp.has(e.type)}function ym(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,cH.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=yt(),l=(0,cH.useCallback)(e=>{mt(e.currentTarget,mr(e))&&i.current.isFocusWithin&&!mt(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=mh(l),c=(0,cH.useCallback)(e=>{if(!mt(e.currentTarget,mr(e)))return;let t=mr(e),r=h7(t),s=((e=document)=>e.activeElement)(r);if(!i.current.isFocusWithin&&s===t){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(r,"focus",e=>{let n=mr(e);if(i.current.isFocusWithin&&!mt(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});mp(e,t),l(mf(e))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function yy(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,cH.useRef)({isFocused:!1,isFocusVisible:r||mW()}),[a,s]=(0,cH.useState)(!1),[l,u]=(0,cH.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,cH.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,cH.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=mW(),s(e),c()},[c]);t={enabled:a,isTextInput:n},mV(),(0,cH.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,r)=>{var n;let o,a,s,l,u,d,f,p;n=!!t?.isTextInput,a=h7(o=r?mr(r):void 0),l=void 0!==(s=me(o))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,f=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(a),(n=n||p instanceof l&&!mK.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&r instanceof f&&!mA[r.key]||(e=>{i.current.isFocusVisible=e,c()})(mW())};return mj.add(e),()=>{mj.delete(e)}},[n,a]);let{focusProps:f}=mZ({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=ym({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?p:f}}let yg=!1,yb=0;function yv(e){"touch"===e.pointerType&&(yg=!0,setTimeout(()=>{yg=!1},500))}function y_(){let e=h7(null);if(void 0!==e)return 0===yb&&"u">typeof PointerEvent&&e.addEventListener("pointerup",yv),yb++,()=>{!(--yb>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",yv)}}function yw(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,cH.useState)(!1),s=(0,cH.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cH.useEffect)(y_,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=yt(),{hoverProps:c,triggerHoverEnd:d}=(0,cH.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{yg&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!mt(n.currentTarget,mr(n)))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(h7(mr(n)),"pointerover",t=>{s.isHovered&&s.target&&!mt(s.target,mr(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&mt(t.currentTarget,mr(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cH.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let yx=(0,cH.createContext)(!1);function yS(e){let t=(t,r)=>(0,cH.useContext)(yx)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cH.forwardRef)(t)}let yE=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),yD=(0,cH.createContext)({}),yO=yS(function(e,t){var r;[e,t]=hq(e,t,yD);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=yl({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=m0(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=hU(v,g,h5(e,{labelable:!0}));return{isPressed:b,buttonProps:hU(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=yy(e),{hoverProps:c,isHovered:d}=yw({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=hH({...e,values:f,defaultClassName:"react-aria-Button"}),h=hF(i.id),m=hF(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,cH.useRef)(o);return(0,cH.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?hQ(e,"assertive"):g.current&&l&&!o&&hQ(e,"assertive"),g.current=o},[o,l,y,h]),cz().createElement("button",{...h5(e,{propNames:yE}),...hU(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cz().createElement(hZ.Provider,{value:{id:m}},p.children))});(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null);let yP=(0,cH.createContext)({}),yC=(0,cH.createContext)({}),yk=(0,cH.forwardRef)(function(e,t){[e,t]=hq(e,t,yC);let{elementType:r="span",...n}=e;return cz().createElement(r,{className:"react-aria-Text",...n,ref:t})}),yj=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),yT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yR(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return yj.has(t.script)}let t=e.split("-")[0];return yT.has(t)}let yM=Symbol.for("react-aria.i18n.locale");function yA(){let e="u">typeof window&&window[yM]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:yR(e)?"rtl":"ltr"}}let yN=yA(),yI=new Set;function y$(){for(let e of(yN=yA(),yI))e(yN)}function yL(){let e=hI(),[t,r]=(0,cH.useState)(yN);return((0,cH.useEffect)(()=>(0===yI.size&&window.addEventListener("languagechange",y$),yI.add(r),()=>{yI.delete(r),0===yI.size&&window.removeEventListener("languagechange",y$)}),[]),e)?{locale:"u">typeof window&&window[yM]||"en-US",direction:"ltr"}:t}let yF=cz().createContext(null);function yB(e){let{locale:t,children:r}=e,n=cz().useMemo(()=>({locale:t,direction:yR(t)?"rtl":"ltr"}),[t]);return cz().createElement(yF.Provider,{value:n},r)}function yV(e){let{children:t}=e,r=yL();return cz().createElement(yF.Provider,{value:r},t)}function yU(e){let{locale:t,children:r}=e;return t?cz().createElement(yB,{locale:t,children:r}):cz().createElement(yV,{children:r})}function yW(){let e=yL();return(0,cH.useContext)(yF)||e}let yK=null;function yH(e,t="assertive",r=7e3){yK?yK.announce(e,t,r):(yK=new yz,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yK.announce(e,t,r):setTimeout(()=>{yK?.isAttached()&&yK?.announce(e,t,r)},100))}class yz{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){if(!this.node)return;let n=document.createElement("div");"object"==typeof e?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(n):this.politeLog?.appendChild(n),""!==e&&setTimeout(()=>{n.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var yq={};function yG(e,t){let r=(0,cH.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}yq={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let yY=new Map;class yZ{constructor(e,t={}){this.formatter=yQ(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==y0&&(y0="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),y0&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yQ(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let yJ={true:{ja:"h11"},false:{}};function yQ(e,t={}){if("boolean"==typeof t.hour12&&(null==yX&&(yX="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yX)){let r=yJ[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=r??n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yY.has(r))return yY.get(r);let n=new Intl.DateTimeFormat(e,t);return yY.set(r,n),n}let yX=null,y0=null;function y1(e){e=yG(e??{},y3);let{locale:t}=yW();return(0,cH.useMemo)(()=>new yZ(t,e),[t,e])}function y3(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}let y4=Symbol.for("react-aria.i18n.locale"),y2=Symbol.for("react-aria.i18n.strings");class y6{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[y4];if(void 0===h){let e=window[y2];if(!e)return null;for(let r in h={},e)h[r]=new y6({[t]:e[r]},t)}let r=h?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}let y5=new Map,y8=new Map;class y9{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=y5.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),y5.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=y8.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),y8.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}}let y7=new WeakMap;function ge(e,t){let r;return t&&y6.getGlobalDictionaryForPackage(t)||((r=y7.get(e))||(r=new y6(e),y7.set(e,r)),r)}function gt(e,t){let{locale:r}=yW(),n=ge(e,t);return(0,cH.useMemo)(()=>new y9(r,n),[r,n])}function gr(e,t){return e-t*Math.floor(e/t)}function gn(e,t,r,n){let o=(t=gi(e,t))-1,i=-2;return r<=2?i=0:go(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function go(e){return e%4==0&&(e%100!=0||e%400==0)}function gi(e,t){return"BC"===e?1-t:t}function ga(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let gs={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class gl{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gr(t,146097),o=Math.floor(n/36524),i=gr(n,36524),a=Math.floor(i/1461),s=Math.floor(gr(i,1461)/365),[l,u]=ga(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-gn(l,u,1,1),d=2;e<gn(l,u,3,1)?d=0:go(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gn(l,u,f,1)+1;return new gk(l,u,f,p)}toJulianDay(e){return gn(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gs[go(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return go(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function gu(e,t){let r=e.copy(),n="hour"in r?gv(r,t):0;gc(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gd(r),gf(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gd(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gd(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){let e=r.calendar.isInverseEra?.(r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gc(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function gd(e){for(;e.month<1;)gc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gc(e,1)}function gf(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function gp(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gf(e)}function gh(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gm(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gp(r),r}function gy(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gg(r),r}function gg(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function gb(e,t){let r=e%t;return r<0&&(r+=t),r}function gv(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gb(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gb(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gb(e.minute,60),r=Math.floor(e.hour/24),e.hour=gb(e.hour,24),r}function g_(e,t){let r=e.copy();return gv(r,t),r}function gw(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=gS(i,r,0,t.length-1,n?.round),o.era=t[i],gp(o);break}case"year":o.calendar.isInverseEra?.(o)&&(r=-r),o.year=gS(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gS(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=gS(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gp(o),o}function gx(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=gS(t,r,i,a,n?.round);break}case"minute":o.minute=gS(e.minute,r,0,59,n?.round);break;case"second":o.second=gS(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=gS(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return o}function gS(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gE(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?gL(gu(gU(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gM(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),gW(gB(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gD(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function gO(e){let t,r=gW(e,new gl);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gP(e){return`${gO(e)}T${gD(e)}`}function gC(e){let t,r="object"==typeof e[0]?e.shift():new gl;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class gk{#t;constructor(...e){let[t,r,n,o,i]=gC(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,gp(this)}copy(){return this.era?new gk(this.calendar,this.era,this.year,this.month,this.day):new gk(this.calendar,this.year,this.month,this.day)}add(e){return gu(this,e)}subtract(e){return gu(this,gh(e))}set(e){return gm(this,e)}cycle(e,t,r){return gw(this,e,t,r)}toDate(e){return gF(this,e)}toString(){return gO(this)}compare(e){return gQ(this,e)}}class gj{#t;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gg(this)}copy(){return new gj(this.hour,this.minute,this.second,this.millisecond)}add(e){return g_(this,e)}subtract(e){return g_(this,gh(e))}set(e){return gy(this,e)}cycle(e,t,r){return gx(this,e,t,r)}toString(){return gD(this)}compare(e){var t,r;return t=this,r=e,gX(t)-gX(r)}}class gT{#t;constructor(...e){let[t,r,n,o,i]=gC(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gp(this)}copy(){return this.era?new gT(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gT(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gu(this,e)}subtract(e){return gu(this,gh(e))}set(e){return gm(gy(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gw(this,e,t,r);default:return gx(this,e,t,r)}}toDate(e,t){return gF(this,e,t)}toString(){return gP(this)}compare(e){var t,r;let n=gQ(this,e);return 0===n?(t=this,r=gU(e),gX(t)-gX(r)):n}}class gR{#t;constructor(...e){let[t,r,n,o,i]=gC(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gp(this)}copy(){return this.era?new gR(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new gR(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gE(this,e)}subtract(e){return gE(this,gh(e))}set(e,t){let r,n;return 0===(n=gy(gm(r=gU(this),e),e)).compare(r)?this:gW(gB(gL(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=gU(e),a=gW(gy(i,{hour:t}),new gl),s=[gL(a,e.timeZone,"earlier"),gL(a,e.timeZone,"later")].filter(t=>gB(t,e.timeZone).day===a.day)[0],l=gW(gy(i,{hour:o}),new gl),u=[gL(l,e.timeZone,"earlier"),gL(l,e.timeZone,"later")].filter(t=>gB(t,e.timeZone).day===l.day).pop(),c=gM(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return gW(gB(c=36e5*gS(d,r,Math.floor(s/36e5),Math.floor(u/36e5),n?.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gx(e,t,r,n);case"era":case"year":case"month":case"day":return gW(gB(gL(gw(gU(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(gM(e)-e.offset)}toString(){var e;let t,r,n,o,i;return`${gP(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof gR){var r,n;return e.timeZone===t?e:(r=e,n=t,gW(gB(gM(r)-r.offset,n),r.calendar))}return gB(gL(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function gM(e){return gA(gi((e=gW(e,new gl)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gA(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function gN(e,t){if("UTC"===t)return 0;if(e>0&&t===g1())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=g$(e,t);return gA(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let gI=new Map;function g$(e,t){let r=gI.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gI.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function gL(e,t,r="compatible"){var n,o,i;let a=gU(e);if("UTC"===t)return gM(a);if(t===g1()&&"compatible"===r){a=gW(a,new gl);let e=new Date,t=gi(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=gM(a),l=gN(s-864e5,t),u=gN(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=g$(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function gF(e,t,r="compatible"){return new Date(gL(e,t,r))}function gB(e,t){let r=gN(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new gR(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function gV(e){return new gk(e.calendar,e.era,e.year,e.month,e.day)}function gU(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new gT(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function gW(e,t){if(gq(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gp(n),n}let gK={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function gH(e,t){return t=gW(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function gz(e,t){return gq(e.calendar,t.calendar)&&gH(e,t)}function gq(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let gG={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function gY(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?gG[r]:function(e){let t=g5.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return g5.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=g6.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&g6.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&gK[r]||0};g5.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function gZ(e){return gB(Date.now(),e)}function gJ(e){return gV(gZ(e))}function gQ(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function gX(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let g0=null;function g1(){return null==g0&&(g0=new Intl.DateTimeFormat().resolvedOptions().timeZone),g0}function g3(e){return e.subtract({days:e.day-1})}function g4(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function g2(e,t,r){let n=gY(e,t,r);return e.subtract({days:n})}let g6=new Map,g5=new Map;function g8(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((gY(g3(e),t,r)+n)/7)}function g9(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function g7(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function be(e){return e&&e.__esModule?e.default:e}let bt=new WeakMap;function br(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function bn(e,t,r,n){let o=gt(be(yq),"@react-aria/calendar"),i=br(e)||br(t),a=y1({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=y1({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,cH.useMemo)(()=>{if(gH(e,g3(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),gH(t,g4(e)))return a.format(i.toDate(r));if(gH(t,g4(t)))return n?bo(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?bo(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function bo(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function bi(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=hF(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function ba(e,t){let r=(0,cH.useRef)(!0),n=(0,cH.useRef)(null),o=ye(e);(0,cH.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cH.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||t.some((t,r)=>!Object.is(t,e[r])))&&o(),n.current=t},t)}function bs(e,t){var r;let n,o,i,a,s,l=gt((r=yq)&&r.__esModule?r.default:r,"@react-aria/calendar"),u=h5(e),c=bn(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=bn(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);ba(()=>{t.isFocused||yH(d)},[d]);let f=(i=gt(be(yq),"@react-aria/calendar"),"highlightedRange"in t?{start:n,end:o}=t.highlightedRange||{}:n=o=t.value??void 0,a=y1({weekday:"long",month:"long",year:"numeric",day:"numeric",era:br(n)||br(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,cH.useMemo)(()=>{if(!s&&n&&o)if(gH(n,o)){let e=a.format(n.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=bo(a,i,n,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[n,o,s,t.timeZone,i,a]));ba(()=>{f&&yH(f,"polite",4e3)},[f]);let p=hB([!!e.errorMessage,e.isInvalid,e.validationState]);bt.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:f});let[h,m]=(0,cH.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,cH.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:hU(u,bi({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:p},title:c}}let bl={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function bu(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cH.useState)(!1),{focusWithinProps:i}=ym({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,cH.useMemo)(()=>n?t:t?{...bl,...t}:bl,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return cz().createElement(r,hU(i,a),t)}function bc(e,t,r,n){let o=ye(r),i=null==r;(0,cH.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i])}function bd(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&"hidden"!==r.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function bf(e,t){let r=e;for(bd(r,t)&&(r=r.parentElement);r&&!bd(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function bp(e,t){let r=[],n=document.scrollingElement||document.documentElement;do bd(e,t)&&r.push(e),e=e.parentElement;while(e&&e!==n);return r}function bh(e,t,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d?0:l.top,p=e===d?e.clientHeight:l.bottom,h=e===d?0:l.left,m=e===d?e.clientWidth:l.right,y=parseInt(u.scrollMarginTop,10)||0,g=parseInt(u.scrollMarginBottom,10)||0,b=parseInt(u.scrollMarginLeft,10)||0,v=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,S=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,D=parseInt(c.borderTopWidth,10)||0,O=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,C=parseInt(c.borderRightWidth,10)||0,k=s.top-y,j=s.bottom+g,T=s.left-b,R=s.right+v,M=e===d?0:P+C,A=e===d?0:D+O,N=e.offsetWidth-e.clientWidth-M,I=e.offsetHeight-e.clientHeight-A,$=f+D+w,L=p-O-x-I,F=h+P+S,B=m-C-E;"rtl"!==c.direction||mx()?B-=N:F+=N;let V=k<$||j>L,U=T<F||R>B;if(V&&"start"===n)i+=k-$;else if(V&&"center"===n)i+=(k+j)/2-($+L)/2;else if(V&&"end"===n)i+=j-L;else if(V&&"nearest"===n){let e=k-$,t=j-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=T-F;else if(U&&"center"===o)a+=(T+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=T-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function bm(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:n}=e.getBoundingClientRect(),o=bp(e,!0);for(let t of o)bh(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(n-a)>1)for(let e of o=r?bp(r,!0):[])bh(e,r,{block:"center",inline:"center"})}else{let{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(n-i)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let by=0,bg=new Map;function bb(e){let[t,r]=(0,cH.useState)();return hP(()=>{if(!e)return;let t=bg.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${by++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},bg.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),bg.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class bv extends gl{fromJulianDay(e){let t=super.fromJulianDay(e);return new gk(this,gi(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(b_(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(b_(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function b_(e){let[t,r]=ga(e.year+-543);return new gk(t,r,e.month,e.day)}function bw(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function bx(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-bw(e,r,1,1))/30),o=t+1-bw(e,r,n,1);return[r,n,o]}function bS(e){return Math.floor(e%4/3)}function bE(e,t){return t%13!=0?30:bS(e)+5}class bD{fromJulianDay(e){let[t,r,n]=bx(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new gk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),bw(1723856,t,e.month,e.day)}getDaysInMonth(e){return bE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+bS(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class bO extends bD{fromJulianDay(e){let[t,r,n]=bx(1723856,e);return new gk(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class bP extends bD{fromJulianDay(e){let[t,r,n]=bx(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new gk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),bw(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),bE(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let bC=765433;function bk(e){return 7>gr(7*e+1,19)}function bj(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gr(3*(r+1),7)&&(r+=1),r}function bT(e){let t,r;return bj(e)+(t=bj(e-1),r=bj(e),bj(e+1)-r==356?2:+(r-t==382))}function bR(e){return bT(e+1)-bT(e)}function bM(e,t){if(t>=6&&!bk(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=bR(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!bk(e):30}class bA{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/bC*19+234)/235)+1,n=bT(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=bT(--r)));let i=1,a=0;for(;a<o;)a+=bM(r,i),i++;let s=o-(a-=bM(r,--i));return new gk(this,r,i,s)}toJulianDay(e){let t=bT(e.year);for(let r=1;r<e.month;r++)t+=bM(e.year,r);return t+e.day+347997}getDaysInMonth(e){return bM(e.year,e.month)}getMonthsInYear(e){return bk(e.year)?13:12}getDaysInYear(e){return bR(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(bk(t.year)&&!bk(e.year)&&t.month>6?e.month--:!bk(t.year)&&bk(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class bN extends gl{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-gn(o.era,o.year,1,1);if(a<80?(i--,a+=(t=go(o.year-1)?31:30)+155+90+10):(t=go(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new gk(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=ga(e.year+78);return(go(o)?(t=31,r=gn(n,o,3,21)):(t=30,r=gn(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&go(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function bI(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function b$(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+bI(t,n,1,1)))/29.5)+1),i=r-bI(t,n,o,1)+1;return new gk(e,n,o,i)}function bL(e){return(14+11*e)%30<11}class bF{fromJulianDay(e){return b$(this,1948440,e)}toJulianDay(e){return bI(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&bL(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return bL(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bB extends bF{fromJulianDay(e){return b$(this,1948439,e)}toJulianDay(e){return bI(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function bV(e){return 460322+c[e-1300]}function bU(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function bW(e,t){let r=bV(e);for(let n=1;n<t;n++)r+=bU(e,n);return r}function bK(e){return c[e+1-1300]-c[e-1300]}class bH extends bF{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let r=1;r<=12;r++)e+=bU(t,r)}}}fromJulianDay(e){let t=e-1948440,r=bV(1300),n=bV(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-bV(++e)+1;let o=bK(e);if(n===o){r=12;break}if(n<o){let t=bU(e,r);for(r=1;n>t;)n-=t,t=bU(e,++r);break}}return new gk(this,e,r,t-bW(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+bW(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):bU(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):bK(e.year)}}let bz=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],bq=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],bG=[1867,1911,1925,1988,2018],bY=["meiji","taisho","showa","heisei","reiwa"];function bZ(e){let t=bz.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?bz.length-1:0===t?0:t-1}function bJ(e){let t=bG[bY.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gk(e.year+t,e.month,e.day)}class bQ extends gl{fromJulianDay(e){let t=super.fromJulianDay(e),r=bZ(t);return new gk(this,bY[r],t.year-bG[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(bJ(e))}balanceDate(e){let t=bJ(e),r=bZ(t);bY[r]!==e.era&&(e.era=bY[r],e.year=t.year-bG[r]),this.constrainDate(e)}constrainDate(e){let t=bY.indexOf(e.era),r=bq[t];if(null!=r){let[n,o,i]=r,a=n-bG[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=bz[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return bY}getYearsInEra(e){let t=bY.indexOf(e.era),r=bz[t],n=bz[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(bJ(e))}getMinimumMonthInYear(e){let t=bX(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=bX(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function bX(e){if(1===e.year)return bz[bY.indexOf(e.era)]}let b0=[0,31,62,93,124,155,186,216,246,276,306,336];class b1{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-b0[o]+1;return new gk(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=b0[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gr(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function b3(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function b4(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class b2 extends gl{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=b4(gi(t.era,t.year));return new gk(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(b6(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=b4(b3(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(b6(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function b6(e){let[t,r]=ga(b3(e));return new gk(t,r,e.month,e.day)}function b5(e){switch(e){case"buddhist":return new bv;case"ethiopic":return new bD;case"ethioaa":return new bO;case"coptic":return new bP;case"hebrew":return new bA;case"indian":return new bN;case"islamic-civil":return new bF;case"islamic-tbla":return new bB;case"islamic-umalqura":return new bH;case"japanese":return new bQ;case"persian":return new b1;case"roc":return new b2;default:return new gl}}function b8(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function b9(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=b7(e,t,r).subtract(i);return vt(e,a,t,r,n,o)}function b7(e,t,r,n,o){let i=e;if(t.years)i=g3(e.subtract({months:e.month-1}));else t.months?i=g3(e):t.weeks&&(i=g2(e,r));return vt(e,i,t,r,n,o)}function ve(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=b7(e,t,r).subtract(i);return vt(e,a,t,r,n,o)}function vt(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=g7(t,b7(gV(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=g9(t,ve(gV(i),r,n));e&&(t=e)}return t}function vr(e,t,r){if(t){let r=g7(e,gV(t));r&&(e=r)}if(r){let t=g9(e,gV(r));t&&(e=t)}return e}function vn(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let vo="u">typeof document?cz().useInsertionEffect??cz().useLayoutEffect:()=>{};function vi(e,t,r){let[n,o]=(0,cH.useState)(e||t),i=(0,cH.useRef)(n),a=(0,cH.useRef)(void 0!==e),s=void 0!==e;(0,cH.useEffect)(()=>{a.current,a.current=s},[s]);let l=s?e:n;vo(()=>{i.current=l});let[,u]=(0,cH.useReducer)(()=>({}),{});return[l,(0,cH.useCallback)((e,...t)=>{let n="function"==typeof e?e(i.current):e;Object.is(i.current,n)||(i.current=n,o(n),u(),r?.(n,...t))},[r])]}function va(e){let t=(0,cH.useMemo)(()=>new yZ(e.locale),[e.locale]),r=(0,cH.useMemo)(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,f=(0,cH.useMemo)(()=>o(r.calendar),[o,r.calendar]),[p,h]=vi(e.value,e.defaultValue??null,e.onChange),m=(0,cH.useMemo)(()=>p?gW(gV(p),f):null,[p,f]),y=(0,cH.useMemo)(()=>p&&"timeZone"in p?p.timeZone:r.timeZone,[p,r.timeZone]),[g,b]=vi((0,cH.useMemo)(()=>e.focusedValue?vr(gW(gV(e.focusedValue),f),a,s):void 0,[e.focusedValue,f,a,s]),(0,cH.useMemo)(()=>vr(e.defaultFocusedValue?gW(gV(e.defaultFocusedValue),f):m||gW(gJ(y),f),a,s),[e.defaultFocusedValue,m,y,f,a,s]),e.onFocusChange),[v,w]=(0,cH.useState)(()=>{switch(l){case"start":return b7(g,i,n,a,s);case"end":return ve(g,i,n,a,s);default:return b9(g,i,n,a,s)}}),[x,S]=(0,cH.useState)(e.autoFocus||!1),E=(0,cH.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[D,O]=(0,cH.useState)(f);if(!gq(f,D)){let e=gW(g,f);w(b9(e,i,n,a,s)),b(e),O(f)}function P(e){b(e=vr(e,a,s))}function C(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=vn(e=vr(e,a,s),v,u))&&(e=gW(e,p?.calendar||new gl),p&&"hour"in p?h(p.set(e)):h(e))}}b8(g,a,s)?b(vr(g,a,s)):0>g.compare(v)?w(ve(g,i,n,a,s)):g.compare(E)>0&&w(b7(g,i,n,a,s));let k=(0,cH.useMemo)(()=>!!m&&(!!(u&&u(m))||b8(m,a,s)),[m,u,a,s]),j=e.isInvalid||"invalid"===e.validationState||k,T=(0,cH.useMemo)(()=>"visible"===c?i:vs(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:C,visibleRange:{start:v,end:E},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:j?"invalid":null,isValueInvalid:j,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(T);b(vr(g.add(T),a,s)),w(b7(vt(g,e,T,n,a,s),T,n))},focusPreviousPage(){let e=v.subtract(T);b(vr(g.subtract(T),a,s)),w(b7(vt(g,e,T,n,a,s),T,n))},focusSectionStart(){i.days?P(v):i.weeks?P(g2(g,n)):(i.months||i.years)&&P(g3(g))},focusSectionEnd(){i.days?P(E):i.weeks?P(g2(g,n,void 0).add({days:6})):(i.months||i.years)&&P(g4(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(vs(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(vs(i)))},selectFocusedDate(){u&&u(g)||C(g)},selectDate(e){C(e)},isFocused:x,setFocused:S,isInvalid:e=>b8(e,a,s),isSelected(e){return null!=m&&gH(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&gH(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return gH(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return gH(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=v){let r=t.add({weeks:e}),o=[],i=gY(r=g2(r,n,d),n,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(r);let e=r.add({days:1});if(gH(r,e))break;r=e}for(;o.length<7;)o.push(null);return o}}}function vs(e){let t={...e};for(let r in e)t[r]=1;return t}function vl(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:gV(e),end:gV(t)}):null}function vu(e,t){return(e=gW(e,t?.calendar||new gl),t&&"hour"in t)?t.set(e):e}function vc(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vd=(0,cH.createContext)(null),vf=(0,cH.createContext)(null),vp=(0,cH.createContext)(null),vh=(0,cH.createContext)(null),vm=(0,cH.forwardRef)(function(e,t){[e,t]=hq(e,t,vd);let{locale:r}=yW(),n=va({...e,locale:r,createCalendar:b5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=bs(e,n),u=hH({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cz().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cz().createElement(hK,{values:[[yD,{slots:{previous:i,next:a}}],[yP,{"aria-hidden":!0,level:2,children:l}],[vp,n],[vd,e],[yC,{slots:{errorMessage:s}}]]},cz().createElement(bu,null,cz().createElement("h2",null,o["aria-label"])),u.children,cz().createElement(bu,null,cz().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),vy=(0,cH.forwardRef)(function(e,t){[e,t]=hq(e,t,vf);let{locale:r}=yW(),n=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vi(t,r||null,n),[f,p]=(0,cH.useState)(null),h="center";if(c&&c.start&&c.end){let e=b9(gV(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,cH.useRef)(null),[y,g]=(0,cH.useState)(null),b=(0,cH.useMemo)(()=>g7(s,y?.start),[s,y]),v=(0,cH.useMemo)(()=>g9(l,y?.end),[l,y]),w=va({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:vc(t,w,-1),end:vc(t,w,1)},g(m.current)):(m.current=null,g(null))},[S,E]=(0,cH.useState)(w.visibleRange);gz(w.visibleRange.start,S.start)&&gz(w.visibleRange.end,S.end)||(x(f),E(w.visibleRange));let D=e=>{e?(p(e),x(e)):(p(null),x(null))},O=f?vl(f,w.focusedDate):c&&vl(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=vn(vr(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vl(f,r);e&&d({start:vu(e.start,c?.start),end:vu(e.end,c?.end)}),D(null)}else D(r)},[C,k]=(0,cH.useState)(!1),{isDateUnavailable:j}=e,T=(0,cH.useMemo)(()=>!!c&&!f&&(!!(j&&(j(c.start)||j(c.end)))||b8(c.start,s,l)||b8(c.end,s,l)),[j,c,f,s,l]),R=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||b8(e,m.current?.start,m.current?.end),isDragging:C,setDragging:k,clearSelection(){D(null),d(null)}}}({...e,locale:r,createCalendar:b5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=function(e,t,r){let{commitBehavior:n="select",...o}=e,i=bs(o,t),a=(0,cH.useRef)(!1),s=(0,cH.useRef)("u">typeof window?window:null);bc(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return bc(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;r.current&&mn(r.current)&&(!mt(r.current,o)||!o.closest('button, [role="button"]'))&&l[n]()}),i.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&mt(r.current,e.relatedTarget)||!t.anchorDate||l[n]())},bc(r,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,n,t),u=hH({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cz().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cz().createElement(hK,{values:[[yD,{slots:{previous:i,next:a}}],[yP,{"aria-hidden":!0,level:2,children:l}],[vh,n],[vf,e],[yC,{slots:{errorMessage:s}}]]},cz().createElement(bu,null,cz().createElement("h2",null,o["aria-label"])),u.children,cz().createElement(bu,null,cz().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),vg=(0,cH.createContext)(null),vb=(0,cH.forwardRef)(function(e,t){var r,n;let o=(0,cH.useContext)(vp),i=(0,cH.useContext)(vh),a=hz(vd),s=hz(vf),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p}=function(e,t){let{startDate:r=t.visibleRange.start,endDate:n=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=yW(),a=bn(r,n,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=bt.get(t),u=bi({"aria-label":[s,a].filter(Boolean).join(", "),"aria-labelledby":l}),c=y1({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=yW(),f=(0,cH.useMemo)(()=>{let e=g2(gJ(t.timeZone),d,o);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return c.format(n)})},[d,t.timeZone,c,o]),p=g8(r,d,o);return{gridProps:hU(u,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:p}}({startDate:u,endDate:g4(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cz().createElement(vg.Provider,{value:{headerProps:f,weekDays:p,startDate:u,firstDayOfWeek:c}},cz().createElement("table",{...h5(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cz().createElement(cz().Fragment,null,cz().createElement(vv,null,e=>cz().createElement(v_,null,e)),cz().createElement(vw,null,e.children))))}),vv=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,cH.useContext)(vg);return cz().createElement("thead",{...h5(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cz().createElement("tr",null,a.map((e,t)=>cz().cloneElement(r(e),{key:t}))))}),v_=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cz().createElement("th",{...h5(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),vw=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,cH.useContext)(vp),a=(0,cH.useContext)(vh),s=null!=i?i:a,{startDate:l,firstDayOfWeek:u}=(0,cH.useContext)(vg),{locale:c}=yW(),d=g8(l,c,u);return cz().createElement("tbody",{...h5(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>cz().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cz().cloneElement(r(e),{key:t}):cz().createElement("td",{key:t})))))}),vx=(0,cH.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,cH.useContext)(vp),s=(0,cH.useContext)(vh),l=null!=a?a:s,{startDate:u}=null!=(n=(0,cH.useContext)(vg))?n:{startDate:l.visibleRange.start},c=(0,cH.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=bt.get(t),u=gt((n=yq)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=y1({weekday:"long",day:"numeric",month:"long",year:"numeric",era:br(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&gH(t.value,i));m&&(d=!0),i=yG(i,gz);let y=(0,cH.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=gH(i,gJ(t.timeZone)),b=(0,cH.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(gH(i,t.value.start)||gH(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&gH(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&gH(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=bb(v),x=(0,cH.useRef)(!1),S=(0,cH.useRef)(!1),E=(0,cH.useRef)(void 0),{pressProps:D,isPressed:O}=yl({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(gH(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}else if(gH(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}}let r=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(r,200):r()}},onPressEnd(){S.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(S.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=gH(i,t.focusedDate)?0:-1),(0,cH.useEffect)(()=>{f&&r.current&&(h8(r.current),"pointer"!==mk&&((e=document)=>e.activeElement)()===r.current&&bm(r.current,{containingElement:bf(r.current)}))},[f,r]);let P=y1({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),C=(0,cH.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:hU(D,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=mr(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:C}}({date:e},l,c),{hoverProps:h,isHovered:m}=yw({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:g}=yy();g&&(g=p.isFocused);let b=(o=u,i=gW(i=e,o.calendar),o=g3(o),i=g3(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=gH(e,l.highlightedRange.start),w=gH(e,l.highlightedRange.end));let x=hH({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...p}}),S={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return cz().createElement("td",{...d,ref:r},cz().createElement("div",{...hU(h5(t),f,y,h,S,x),ref:c}))}),vS=(0,cH.createContext)({}),vE=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hq(e,t,vS);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=yw({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=yy({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=hH({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return cz().createElement("div",{...hU(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),vD=(0,cH.createContext)({}),vO=yS(function(e,t){[e,t]=hq(e,t,vD);let{hoverProps:r,isHovered:n}=yw(e),{isFocused:o,isFocusVisible:i,focusProps:a}=yy({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=hH({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cz().createElement("input",{...hU((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function vP(e,t,r,n){return e.createTreeWalker(t,r,n)}let vC=cz().createContext(null),vk="react-aria-focus-scope-restore",vj=null;function vT(e){var t,r,n,o,i,a,s,l,u,c;let d,f,p,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,cH.useRef)(null),w=(0,cH.useRef)(null),x=(0,cH.useRef)([]),{parentNode:S}=(0,cH.useContext)(vC)||{},E=(0,cH.useMemo)(()=>new vz({scopeRef:x}),[x]);hP(()=>{let e=S||vq.root;if(vq.getTreeNode(e.scopeRef)&&vj&&!vI(vj,e.scopeRef)){let t=vq.getTreeNode(vj);t&&(e=t)}e.addChild(E),vq.addNode(E)},[E,S]),hP(()=>{let e=vq.getTreeNode(x);e&&(e.contain=!!y)},[y]),hP(()=>{let e=v.current?.nextSibling,t=[],r=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(vk,r),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(vk,r)}},[m]),hP(()=>{if(r||n)return;let e=t.current,o=h7(e?e[0]:void 0),i=e=>{let r=mr(e);vA(r,t.current)?vj=t:vN(r)||(vj=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,cH.useRef)(void 0),f=(0,cH.useRef)(void 0),hP(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=h7(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!vM(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!vA(r,n))return;let i=vU(vR(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(v$(a,!0),a instanceof me(a).HTMLInputElement&&a.select())},n=e=>{(!vj||vI(vj,o))&&vA(mr(e),o.current)?(vj=o,d.current=mr(e)):vM(o)&&!vN(mr(e),o)?d.current?d.current.focus():vj&&vj.current&&vF(vj.current):vM(o)&&(d.current=mr(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=mk,n=("virtual"===r||null===r)&&mD()&&mE(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&vM(o)&&!vN(i,o)){vj=o;let t=mr(e);t&&t.isConnected?(d.current=t,d.current?.focus()):vj.current&&vF(vj.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),hP(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=g,l=y,p=(0,cH.useRef)("u">typeof document?((e=document)=>e.activeElement)(h7(a.current?a.current[0]:void 0)):null),hP(()=>{let e=a.current,t=h7(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!vj||vI(vj,a))&&vA(((e=document)=>e.activeElement)(t),a.current)&&(vj=a)};return t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,l]),hP(()=>{let e=h7(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!vM(a)||t.isComposing)return;let r=e.activeElement;if(!vN(r,a)||!vB(a))return;let n=vq.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=vU(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!vN(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(vN(s,a));(t.preventDefault(),t.stopPropagation(),s)?v$(s,!0):vN(o)?v$(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),hP(()=>{let e=h7(a.current?a.current[0]:void 0);if(!s)return;let t=vq.getTreeNode(a);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=vq.getTreeNode(a);if(!t)return;let r=t.nodeToRestore,n=((e=document)=>e.activeElement)(e);if(s&&r&&(n&&vN(n,a)||n===e.body&&vB(a))){let t=vq.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void vV(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&vq.getTreeNode(e.scopeRef))return void vV(vL(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),u=x,c=b,h=cz().useRef(c),(0,cH.useEffect)(()=>{h.current&&(vj=u,!vA(((e=document)=>e.activeElement)(h7(u.current?u.current[0]:void 0)),vj.current)&&u.current&&vF(u.current)),h.current=!1},[u]),(0,cH.useEffect)(()=>{let e=((e=document)=>e.activeElement)(h7(x.current?x.current[0]:void 0)),t=null;if(vA(e,x.current)){for(let r of vq.traverse())r.scopeRef&&vA(e,r.scopeRef.current)&&(t=r);t===vq.getTreeNode(x)&&(vj=t.scopeRef)}},[x]),hP(()=>()=>{let e=vq.getTreeNode(x)?.parent?.scopeRef??null;(x===vj||vI(x,vj))&&(!e||vq.getTreeNode(e))&&(vj=e),vq.removeTreeNode(x)},[x]);let D=(0,cH.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(h7(r[0]??void 0)),l=r[0].previousElementSibling,u=vU(vR(r),{tabbable:o,accept:a},r);u.currentNode=vA(s,r)?s:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&v$(c,!0),c},focusPrevious(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(h7(r[0]??void 0)),l=r[r.length-1].nextElementSibling,u=vU(vR(r),{tabbable:o,accept:a},r);u.currentNode=vA(s,r)?s:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&v$(c,!0),c},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=vU(vR(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&v$(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=vU(vR(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&v$(a,!0),a}}},[]),O=(0,cH.useMemo)(()=>({focusManager:D,parentNode:E}),[E,D]);return cz().createElement(vC.Provider,{value:O},cz().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,cz().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function vR(e){return e[0].parentElement}function vM(e){let t=vq.getTreeNode(vj);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function vA(e,t){return!!e&&!!t&&t.some(t=>mt(t,e))}function vN(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of vq.traverse(vq.getTreeNode(t)))if(r&&vA(e,r.current))return!0;return!1}function vI(e,t){let r=vq.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function v$(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{mY(e)}catch{}}function vL(e,t=!0){let r=e[0].previousElementSibling,n=vR(e),o=vU(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=vU(n=vR(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function vF(e,t=!0){v$(vL(e,t))}function vB(e){let t=vq.getTreeNode(vj);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function vV(e){e.dispatchEvent(new CustomEvent(vk,{bubbles:!0,cancelable:!0}))&&v$(e)}function vU(e,t,r){let n=t?.tabbable?mc:mu,o=h7(e?.nodeType===Node.ELEMENT_NODE?e:null),i=vP(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mt(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(h7(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),r=me(e);return t instanceof r.RadioNodeList?Array.from(t).filter(e=>e instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:n(e)&&(!r||vA(e,r))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function vW(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(h7(n)),u=vU(n,{tabbable:i,accept:s});mt(n,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&v$(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(h7(n)),u=vU(n,{tabbable:i,accept:s});if(mt(n,l))u.currentNode=l;else{let e=vK(u);return e&&v$(e,!0),e??null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=vK(u);if(!e)return null;c=e}return c&&v$(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=vU(n,{tabbable:o,accept:i}).nextNode();return a&&v$(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=vK(vU(n,{tabbable:o,accept:i}));return a&&v$(a,!0),a??null}}}function vK(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class vH{constructor(){this.fastMap=new Map,this.root=new vz({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(t??null);if(!n)return;let o=new vz({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&vA(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new vH;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class vz{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let vq=new vH;var vG={};function vY(e,t,r){let{direction:n}=yW(),o=(0,cH.useMemo)(()=>vW(t),[t]),i=()=>{if(!t.current)return;let e=window.event?mr(window.event):null,r=vU(t.current,{tabbable:!0});if(e&&(r.currentNode=e,e=r.previousNode()),!e){let t;do(t=r.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=r.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=yl({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return hU(a,{onKeyDown:i=>{if(mt(i.currentTarget,mr(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=mr(i),r=vZ(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=mr(i),r=vZ(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function vZ(e,t,r){let n=vU(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function vJ(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=hF(t);let a=hF(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:bi({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=hB([!!t,!!r,n,o]),l=hB([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=hU(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function vQ(e,t,r){let n=ye(e=>{r&&!e.defaultPrevented&&r(t)});(0,cH.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",n),()=>{t?.removeEventListener("reset",n)}},[e])}function vX(e,t,r){let{validationBehavior:n,focus:o}=e;hP(()=>{if("native"===n&&r?.current&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,cH.useRef)(!1),a=ye(()=>{i.current||t.resetValidation()}),s=ye(e=>{t.displayValidation.isInvalid||t.commitValidation();let n=r?.current?.form;!e.defaultPrevented&&r&&n&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}(n)===r.current&&(o?o():r.current?.focus(),mk="keyboard",mN("keyboard",null));e.preventDefault()}),l=ye(()=>{t.commitValidation()});(0,cH.useEffect)(()=>{let e=r?.current;if(!e)return;let t=e.form,n=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&mr(window.event)instanceof MessagePort,n?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",a),t&&(t.reset=n)}},[r,n])}vG={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let v0=new WeakMap,v1="__reactAriaDateFieldRole",v3="__reactAriaDateFieldFocusManager";function v4(e,t,r){var n;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=vJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=(0,cH.useRef)(null),{focusWithinProps:p}=ym({...e,onFocusWithin(r){f.current=t.value,e.onFocus?.(r)},onBlurWithin:r=>{t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),e.onBlur?.(r)},onFocusWithinChange:e.onFocusChange}),h=gt((n=vG)&&n.__esModule?n.default:n,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=bb(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[v1]?u["aria-describedby"]:[g["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[v3],w=(0,cH.useMemo)(()=>v||vW(r),[v,r]),x=vY(t,r,"presentation"===e[v1]);v0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let S=(0,cH.useRef)(e.autoFocus);o="presentation"===e[v1]?{role:"presentation"}:hU(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cH.useEffect)(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),vQ(e.inputRef,t.defaultValue,t.setValue),vX({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let D=h5(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:hU(D,o,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var v2={};v2={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let v6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},v5={...v6,customError:!0,valid:!1},v8={isInvalid:!1,validationDetails:v6,validationErrors:[]},v9=(0,cH.createContext)({}),v7="__reactAriaFormValidationState";function _e(e){if(e[v7]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[v7];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||="invalid"===r);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:v5}:null,u=(0,cH.useMemo)(()=>a&&null!=o?_r(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return _t(r)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,cH.useContext)(v9),d=(0,cH.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>_t(c[e])):_t(c[n]):[],[c,n]),[f,p]=(0,cH.useState)(c),[h,m]=(0,cH.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,cH.useMemo)(()=>_r(h?[]:d),[h,d]),g=(0,cH.useRef)(v8),[b,v]=(0,cH.useState)(v8),w=(0,cH.useRef)(v8),[x,S]=(0,cH.useState)(!1);return(0,cH.useEffect)(()=>{if(!x)return;S(!1);let e=u||i||g.current;_n(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||v8,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||_n(b,e)?g.current=e:v(e)},resetValidation(){_n(v8,w.current)||(w.current=v8,v(v8)),"native"===s&&S(!1),m(!0)},commitValidation(){"native"===s&&S(!0),m(!0)}}}(e)}function _t(e){return e?Array.isArray(e)?e:[e]:[]}function _r(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:v5}:null}function _n(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function _o(...e){let t=new Set,r=!1,n={...v6};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||=o.isInvalid,n)n[e]||=o.validationDetails[e]}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let _i=new y6((eo=v2)&&eo.__esModule?eo.default:eo);function _a(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function _s(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&n?.(e)||!1,l=i||a||s,u=[];if(l){let e=_a(),n=new y9(e,y6.getGlobalDictionaryForPackage("@react-stately/datepicker")||_i),l=new yZ(e,_c({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let _l={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},_u={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function _c(e,t){e={...t.shouldForceLeadingZeros?_u:_l,...e};let r=t.granularity||"minute",n=Object.keys(e),o=n.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=n.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=n.slice(o,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function _d(e){return e&&"hour"in e?e:new gj}function _f(e,t){return null===e?null:e?gW(e,t):void 0}function _p(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,cH.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let _h=new y6({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class _m{constructor(e,t,r){if(this.era=r?.era??null,this.calendar=e,this.year=r?.year??null,this.month=r?.month??null,this.day=r?.day??null,this.hour=r?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=r?.minute??null,this.second=r?.second??null,this.millisecond=r?.millisecond??null,this.offset="offset"in(r??{})?r.offset:null,null!=this.hour){let[e,r]=_g(this.hour,t);this.dayPeriod=e,this.hour=r}}copy(){let e=new _m(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,r]=_g(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===r}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,r){let n=this.copy();return n[e]=t,"hour"===e&&null==n.dayPeriod&&"hour"in r&&(n.dayPeriod=_g(r.hour,this.hourCycle)[0]),"year"===e&&null==n.era&&(n.era=r.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(n.offset=null),n}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,r,n){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in r){let[e,t]=_g(r.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=r[e];return"year"===e&&null==o.era&&(o.era=r.era),o}switch(e){case"era":{let e=this.calendar.getEras(),r=e.indexOf(o.era);r=_y(r,t,0,e.length-1),o.era=e[r];break}case"year":{let n=new gk(this.calendar,this.era??r.era,this.year??r.year,this.month??1,this.day??1);o.era=(n=n.cycle(e,t,{round:"year"===e})).era,o.year=n.year;break}case"month":o.month=_y(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=_y(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=n.some(e=>["year","month","day"].includes(e));if("timeZone"in r&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(r),[n,i]=_g((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=n,o.offset=e.offset}else{let e=o.hour??0,n=this.getSegmentLimits("hour");o.hour=_y(e,t,n.minValue,n.maxValue),null==o.dayPeriod&&"hour"in r&&(o.dayPeriod=_g(r.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=_y(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=_y(o.minute??0,t,0,59,!0);break;case"second":o.second=_y(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,r){switch(r){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let r=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in r&&null!=this.offset&&r.offset!==this.offset&&(r=r.add({milliseconds:r.offset-this.offset})),r}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function _y(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function _g(e,t){let r=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}var _b=r(59381);let _v={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},__={year:5,month:2,day:7,hour:2,minute:15,second:15},_w={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function _x(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=_p(c,e.granularity),p=f||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,cH.useMemo)(()=>{let n=new yZ(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[r(n.calendar),n.hourCycle]},[t,e.hourCycle,r]),[y,g]=vi(e.value,e.defaultValue??null,e.onChange),[b]=(0,cH.useState)(y),v=(0,cH.useMemo)(()=>_f(y,h)??null,[y,h]),[w,x]=(0,cH.useState)(()=>new _m(h,m,v)),S="gregory"===h.identifier&&"BC"===w.era,E=(0,cH.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:f,hideTimeZone:n,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,n,S]),D=(0,cH.useMemo)(()=>_c({},E),[E]),O=(0,cH.useMemo)(()=>new yZ(t,D),[t,D]),P=(0,cH.useMemo)(()=>O.resolvedOptions(),[O]),C=(0,cH.useMemo)(()=>(function(e,t,r,n){if(e)return _f(e,r);let o=gW(gZ(n??g1()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?gV(o):n?o:gU(o)})(e.placeholderValue,d,h,f),[e.placeholderValue,d,h,f]),k=(0,cH.useMemo)(()=>{let t="h11"===m||"h12"===m,r=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],n=r.indexOf(e.maxGranularity||"era"),o=r.indexOf("hour"===d&&t?"dayPeriod":d);return r.slice(n,o+1)},[e.maxGranularity,d,m]),[j,T]=(0,cH.useState)(v),[R,M]=(0,cH.useState)(h),[A,N]=(0,cH.useState)(m);v===j&&m===A&&gq(h,R)||(w=new _m(h,m,v),T(v),M(h),N(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof _m&&t.isCleared(k))x(new _m(h,m,v)),g(null);else if(t instanceof _m){if(t.isComplete(k)){let e=t.toValue(v??C);if(t.validate(e,k)){let t=gW(e,c?.calendar||new gl);if(!y||0!==t.compare(y)){x(new _m(h,m,v)),g(t);return}}}x(t)}else t=gW(t,c?.calendar||new gl),x(new _m(h,m,v)),g(t)},$=(0,cH.useMemo)(()=>w.toValue(v??C).toDate(p),[w,p,v,C]),L=(0,cH.useMemo)(()=>(function(e,t,r,n,o,i,a){let s=["hour","minute","second"],l=r.formatToParts(e),u=new(0,_b.K)(i,{useGrouping:!1}),c=new(0,_b.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let r=t[e.type]??0;"2-digit"===n[e.type]?e.value=c.format(r):e.value=u.format(r)}let d=[];for(let e of l){var f;let r=_w[e.type]||e.type,n=_v[r];"era"===r&&1===o.getEras().length&&(n=!1);let l=_v[r]&&null==t[e.type],u=_v[r]?(f=e.value,"era"===r||"dayPeriod"===r?f:"year"===r||"month"===r||"day"===r?_h.getStringForLocale(r,i):"––"):null,c={type:r,text:l?u:e.value,...t.getSegmentLimits(r),isPlaceholder:l,placeholder:u,isEditable:n};"hour"===r?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),r===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(r)&&r===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,O,P,h,t,d),[$,O,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,C,k))},B=(0,cH.useMemo)(()=>_s(y,s,l,u,E),[y,s,l,u,E]),V=_e({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:O,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,__[e]||1)},decrementPage(e){F(e,-(__[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,C))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,C))},setSegment(e,t){I(w.set(e,t,C))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(k)){let e=gW(w.toValue(v??C),c?.calendar||new gl);y&&0===e.compare(y)||g(e),x(new _m(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new yZ(t,_c(e,E)).format($):"",getDateFormatter:(e,t)=>new yZ(e,_c({},{...E,...t}))}}let _S=(0,cH.createContext)(null),_E=(0,cH.createContext)(null),_D=(0,cH.createContext)(null),_O=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(_E),n=(0,cH.useContext)(_D);return r||n?cz().createElement(_C,{...e,ref:t}):cz().createElement(_P,{...e,ref:t})}),_P=(0,cH.forwardRef)((e,t)=>{let[r,n]=hq({slot:e.slot},t,_S),{locale:o}=yW(),i=_x({...r,locale:o,createCalendar:b5}),a=(0,cH.useRef)(null),{fieldProps:s,inputProps:l}=v4({...r,inputRef:a},i,n);return cz().createElement(hK,{values:[[_E,i],[vD,{...l,ref:a}],[vS,{...s,ref:n,isInvalid:i.isInvalid}]]},cz().createElement(_C,e))}),_C=(0,cH.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cH.useContext)(_E),i=(0,cH.useContext)(_D),a=null!=o?o:i;return cz().createElement(cz().Fragment,null,cz().createElement(vE,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid},a.segments.map((e,t)=>(0,cH.cloneElement)(n(e),{key:t}))),cz().createElement(vO,null))});function _k({children:e}){let t=(0,cH.useMemo)(()=>({register:()=>{}}),[]);return cz().createElement(m9.Provider,{value:t},e)}cz().forwardRef(({children:e,...t},r)=>{let n=(0,cH.useRef)(!1),o=(0,cH.useContext)(m9),i=hU(o||{},{...t,register(){n.current=!0,o&&o.register()}});return i.ref=hS(r||o?.ref),mQ(o,i.ref),(0,cH.useEffect)(()=>{n.current||(n.current=!0)},[]),cz().createElement(m9.Provider,{value:i},e)});let _j=(0,cH.createContext)({}),_T=cz().createContext(null);function _R(e){let t=hI(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,i]=(0,cH.useState)(!1),a=(0,cH.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,cH.useContext)(_j)??{};if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cz().createElement(vT,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cz().createElement(_T.Provider,{value:a},cz().createElement(_k,null,l)),yn().createPortal(l,r)}let _M=(0,cH.createContext)(null),_A=(0,cH.createContext)(null),_N=(0,cH.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=hq(e,t,_M);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=hB();i=e["aria-label"]?void 0:i;let a=(0,cH.useRef)(!1);return(0,cH.useEffect)(()=>{if(t.current&&!mn(t.current)){mY(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),mY(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),r=(0,cH.useContext)(_T),hP(()=>{n?.(!0)},[n=r?.setContain]),(0,cH.useRef)(!1),(0,cH.useEffect)(()=>{}),{dialogProps:{...h5(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,cH.useContext)(_A);n["aria-label"]||n["aria-labelledby"]||(e["aria-labelledby"]?n["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=hH({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return cz().createElement("section",{...h5(e),...n,...a,ref:t,slot:e.slot||void 0},cz().createElement(hK,{values:[[yP,{slots:{[hW]:{},title:{...o,level:2}}}],[yD,{slots:{[hW]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),_I=(0,cH.createContext)(null),_$=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(_I);return(null==r?void 0:r.isInvalid)?cz().createElement(_L,{...e,ref:t}):null}),_L=(0,cH.forwardRef)((e,t)=>{let r=(0,cH.useContext)(_I),n=h5(e),o=hH({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cz().createElement(yk,{slot:"errorMessage",...n,...o,ref:t})}),_F=(0,cH.createContext)(null),_B=(0,cH.createContext)({}),_V=yS(function(e,t){[e,t]=hq(e,t,_B);let{elementType:r="label",...n}=e;return cz().createElement(r,{className:"react-aria-Label",...n,ref:t})}),_U=(0,cH.createContext)({placement:"bottom"}),_W="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,_K=new WeakMap,_H=[];function _z(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function _q(e,t){let r=e,n=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)n=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(n=o.length-e)}if(n>0){let e=Math.pow(10,n);r=Math.round(r*e)/e}return r}function _G(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=_q(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(_q(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(_q((r-t)/n,n))*n),i=_q(i,n)}let _Y={top:"top",bottom:"top",left:"left",right:"left"},_Z={top:"bottom",bottom:"top",left:"right",right:"left"},_J={top:"left",left:"top"},_Q={top:"height",left:"width"},_X={width:"totalWidth",height:"totalHeight"},_0={};function _1(e,t){let r=0,n=0,o=0,i=0,a=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;o=u.clientWidth,i=u.clientHeight,r=t?.width??o,n=t?.height??i,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:a,left:s}=_8(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,o=r,i=n;return mS()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:l,top:a,left:s}}function _3(e,t,r,n,o,i,a){let s=o.scroll[e]??0,l=n[_Q[e]],u=a[e]+n.scroll[_Y[e]]+i,c=a[e]+n.scroll[_Y[e]]+l-i,d=t-s+n.scroll[_Y[e]]+a[e]-n[_Y[e]],f=t-s+r+n.scroll[_Y[e]]+a[e]-n[_Y[e]];return d<u?u-d:f>c?Math.max(c-f,u-d):0}function _4(e){if(_0[e])return _0[e];let[t,r]=e.split(" "),n=_Y[t]||"right",o=_J[n];_Y[r]||(r="center");let i=_Q[n],a=_Q[o];return _0[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},_0[e]}function _2(e,t,r,n,o,i,a,s,l,u,c){let{placement:d,crossPlacement:f,axis:p,crossAxis:h,size:m,crossSize:y}=n,g={};g[h]=e[h]??0,"center"===f?g[h]+=((e[y]??0)-(r[y]??0))/2:f!==h&&(g[h]+=(e[y]??0)-(r[y]??0)),g[h]+=i;let b=e[h]-r[y]+l+u,v=e[h]+e[y]-l-u;if(g[h]=_z(g[h],b,v),d===p){let t=s?c[m]:c[_X[m]];g[_Z[p]]=Math.floor(t-e[p]+o)}else g[p]=Math.floor(e[p]+e[m]+o);return g}function _6(e,t,r,n,o,i,a,s){let{placement:l,axis:u,size:c}=i;return l===u?Math.max(0,r[u]-(a.scroll[u]??0)-(e[u]+(s?t[u]:0))-(n[u]??0)-n[_Z[u]]-o):Math.max(0,e[c]+e[u]+(s?t[u]:0)-r[u]-r[c]+(a.scroll[u]??0)-(n[u]??0)-n[_Z[u]]-o)}function _5(e,t){let{top:r,left:n,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:r,left:n,width:o,height:i}}function _8(e,t){let{top:r,left:n,width:o,height:i}=_5(e,t),{scrollTop:a,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:r+a-l,left:n+s-u,width:o,height:i}}function _9(e,t,r){let n,o=window.getComputedStyle(e);if("fixed"===o.position)n=_5(e,r);else{n=_8(e,r);let o=_8(t,r),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(o.marginTop,10)||0,n.left-=parseInt(o.marginLeft,10)||0,n}function _7(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let we=new WeakMap;function wt(e){let{ref:t,box:r,onResize:n}=e,o=ye(n);(0,cH.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[t,r])}let wr="u">typeof document?window.visualViewport:null;function wn(e,t){if(e.button>0)return!1;let r=mr(e);if(r){let e=r.ownerDocument;if(!e||!mt(e.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wo=[],wi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wa(e){return e instanceof HTMLInputElement&&!wi.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let ws="u">typeof document&&window.visualViewport,wl=0;function wu(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wc(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wd(e,t){t||!ws?wf(e):ws.addEventListener("resize",()=>wf(e),{once:!0})}function wf(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=bf(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect(),n=r.getBoundingClientRect();if(n.top<t.top||n.bottom>t.top+r.clientHeight){let r=t.bottom;ws&&(r=Math.min(r,ws.offsetTop+ws.height));let o=n.top-t.top-((r-t.top)/2-n.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}r=e.parentElement}}var wp={};function wh(e){var t;let{onDismiss:r,...n}=e,o=bi(n,gt((t=wp)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cz().createElement(bu,null,cz().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wm(e,t,r){hP(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{n||(0,yr.flushSync)(()=>{r()})}),()=>{n=!0}}},[e,t,r])}wp={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let wy=null,wg=new Set,wb=new Map,wv=!1,w_=!1;function ww(e,t){for(let r of wg)r(e,t)}function wx(e){wv=!0,e.metaKey||!mv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(wy="keyboard",ww("keyboard",e))}function wS(e){wy="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(wv=!0,ww("pointer",e))}function wE(e){mP(e)&&(wv=!0,wy="virtual")}function wD(e){e.target!==window&&e.target!==document&&e.isTrusted&&(wv||w_||(wy="virtual",ww("virtual",e)),wv=!1,w_=!1)}function wO(){wv=!1,w_=!0}function wP(e){if("u"<typeof window||wb.get(me(e)))return;let t=me(e),r=h7(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){wv=!0,n.apply(this,arguments)},r.addEventListener("keydown",wx,!0),r.addEventListener("keyup",wx,!0),r.addEventListener("click",wE,!0),t.addEventListener("focus",wD,!0),t.addEventListener("blur",wO,!1),"u">typeof PointerEvent?(r.addEventListener("pointerdown",wS,!0),r.addEventListener("pointermove",wS,!0),r.addEventListener("pointerup",wS,!0)):(r.addEventListener("mousedown",wS,!0),r.addEventListener("mousemove",wS,!0),r.addEventListener("mouseup",wS,!0)),t.addEventListener("beforeunload",()=>{wC(e)},{once:!0}),wb.set(t,{focus:n})}let wC=(e,t)=>{let r=me(e),n=h7(e);t&&n.removeEventListener("DOMContentLoaded",t),wb.has(r)&&(r.HTMLElement.prototype.focus=wb.get(r).focus,n.removeEventListener("keydown",wx,!0),n.removeEventListener("keyup",wx,!0),n.removeEventListener("click",wE,!0),r.removeEventListener("focus",wD,!0),r.removeEventListener("blur",wO,!1),"u">typeof PointerEvent?(n.removeEventListener("pointerdown",wS,!0),n.removeEventListener("pointermove",wS,!0),n.removeEventListener("pointerup",wS,!0)):(n.removeEventListener("mousedown",wS,!0),n.removeEventListener("mousemove",wS,!0),n.removeEventListener("mouseup",wS,!0)),wb.delete(r))};function wk(e){let[t,r]=vi(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cH.useCallback)(()=>{r(!0)},[r]),o=(0,cH.useCallback)(()=>{r(!1)},[r]),i=(0,cH.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}"u">typeof document&&("loading"!==(m=h7(void 0)).readyState?wP(void 0):m.addEventListener("DOMContentLoaded",()=>{wP(void 0)}));let wj=(0,cH.createContext)(null),wT=(0,cH.createContext)(null),wR=(0,cH.forwardRef)(function(e,t){[e,t]=hq(e,t,wj);let r=(0,cH.useContext)(_A),n=wk(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,cH.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return wm(e,o,(0,cH.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,cH.useContext)(yx),{direction:s}=yW();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cz().createElement(cz().Fragment,null,t)}return!o||o.isOpen||i?cz().createElement(wM,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function wM({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,cH.useRef)(null),[s,l]=(0,cH.useState)(0),u=(0,cH.useRef)(null),c=(0,cH.useContext)(wT),f=c&&"SubmenuTrigger"===n.trigger;hP(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,l=(0,cH.useRef)(void 0);(0,cH.useEffect)(()=>{if(o&&!wo.includes(t))return wo.push(t),()=>{let e=wo.indexOf(t);e>=0&&wo.splice(e,1)}},[o,t]);let u=()=>{wo[wo.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,cH.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=ye(e=>{r&&wn(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=ye(e=>{r&&r(e)});(0,cH.useEffect)(()=>{let e=i.current;if(n)return;let r=h7(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wn(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("click",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("click",n,!0)}}},[t,n])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(mr(e)))&&(wo[wo.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let r=wo[wo.length-1];l.current=r,(!s||s(mr(e)))&&r===t&&e.stopPropagation()}});let{focusWithinProps:c}=ym({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||vN(e.relatedTarget,vj))&&(!s||s(e.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:r}=yW(),{arrowSize:n,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,cH.useState)(null),x=[h,l,i.current,o.current,a?.current,s.current,u,c,d,f,p,m,r,g,b,n],S=(0,cH.useRef)(wr?.scale);(0,cH.useEffect)(()=>{m&&(S.current=wr?.scale)},[m]);let E=(0,cH.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||wr?.scale!==S.current)return;let t=null;if(s.current&&mn(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),r=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-r.top}).offset>r.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-r.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,r,{placement:n,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:f,arrowSize:p=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!_7(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!_7(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?_8(o,!1):_9(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=_8(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let S=_1(u,m),E=_1(y,m);if("BODY"!==u.tagName&&"HTML"!==u.tagName||g)r=("BODY"===u.tagName||"HTML"===u.tagName)&&g?{top:0,left:0,width:0,height:0}:_9(u,y,!1);else{let e=_5(y,!1);r={top:-(e.top-S.top),left:-(e.left-S.left),width:0,height:0}}return function(e,t,r,n,o,i,a,s,l,u,c,d,f,p,h,m,y){var g,b,v;let w,x,S,E=_4(e),{size:D,crossAxis:O,crossSize:P,placement:C,crossPlacement:k}=E,j=_2(t,a,r,E,u,c,l,d,p,h,s),T=u,R=_6(a,l,t,n,o+u,E,s,m);if(i&&r[D]>R){let e=_4(`${_Z[C]} ${k}`),i=_2(t,a,r,e,u,c,l,d,p,h,s);_6(a,l,t,n,o+u,e,s,m)>R&&(E=e,j=i,T=u)}let M="bottom";"top"===E.axis?"top"===E.placement?M="top":"bottom"===E.placement&&(M="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?M="bottom":"bottom"===E.crossPlacement&&(M="top"));let A=_3(O,j[O],r[P],a,s,o,l);j[O]+=A;let N=(g=j,b=r.height,v=M,w=(null!=g.top?g.top:s[_X.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?l.top:0,S={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,S.bottom-w-((n.top??0)+(n.bottom??0)+o)):Math.max(0,w+b-S.top-((n.top??0)+(n.bottom??0)+o)));f&&f<N&&(N=f),r.height=Math.min(r.height,N),A=_3(O,(j=_2(t,a,r,E,T,c,l,d,p,h,s))[O],r[P],a,s,o,l),j[O]+=A;let I={},$=t[O]-j[O]-n[_Y[O]],L=$+.5*t[P],F=p/2+h,B="left"===_Y[O]?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),V=r[P]-B-p/2-h,U=_z(L,t[O]+p/2-(j[O]+n[_Y[O]]),t[O]+t[P]-p/2-(j[O]+n[_Y[O]]));I[O]=_z(U,F,V),({placement:C,crossPlacement:k}=E),p?$=I[O]:"right"===k?$+=t[P]:"center"===k&&($+=t[P]/2);let W="left"===C||"top"===C?r[D]:0,K={x:"top"===C||"bottom"===C?$:W,y:"left"===C||"right"===C?$:W};return{position:j,maxHeight:N,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:C,triggerAnchorPoint:K}}(n,v,w,x,s,l,S,E,r,c,d,!!b&&"static"!==b,f,p,h,mt(u,y),m)}({placement:(e=l,"rtl"===r?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:n??(a?.current?_5(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),r=s.current.getBoundingClientRect(),n=e[t.type]-r[t.type];s.current.scrollTop+=n-t.offset}w(v)},x);hP(E,x),hP(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),wt({ref:i,onResize:E}),wt({ref:o,onResize:E});let D=(0,cH.useRef)(!1);hP(()=>{let e,t=()=>{D.current=!0,clearTimeout(e),e=setTimeout(()=>{D.current=!1},500),E()},r=()=>{D.current&&t()};return wr?.addEventListener("resize",t),wr?.addEventListener("scroll",r),()=>{wr?.removeEventListener("resize",t),wr?.removeEventListener("scroll",r)}},[E]);let O=(0,cH.useCallback)(()=>{D.current||y?.()},[y,D]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cH.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=mr(e);if(!t.current||r instanceof Node&&!mt(r,t.current)||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return;let o=n||we.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:o,isOpen:m,onClose:y&&O}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;hP(()=>{if(!t){let e,t,r,n,o,i,a,s;return 1==++wl&&(d=mx()?(t=wu(document.documentElement,"overflow","hidden"),r=!1,n=document.createElement("style"),(o=m8())&&(n.nonce=o),n.textContent=`
22
+ `.trim(),e.head.prepend(t)},[f]),(0,cH.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||m2(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||h,pressProps:hU(p,k,{[ys]:!0})}}function yu(e){return"A"===e.tagName&&e.hasAttribute("href")}function yc(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof me(t).HTMLInputElement&&!yh(t,r)||t instanceof me(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&yu(t))&&"Enter"!==r)}function yd(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function yf(e,t){return e instanceof HTMLInputElement?!yh(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!yu(e))}let yp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yh(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:yp.has(e.type)}function ym(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,cH.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=yt(),l=(0,cH.useCallback)(e=>{mt(e.currentTarget,mr(e))&&i.current.isFocusWithin&&!mt(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),u=mh(l),c=(0,cH.useCallback)(e=>{if(!mt(e.currentTarget,mr(e)))return;let t=mr(e),r=h7(t),s=((e=document)=>e.activeElement)(r);if(!i.current.isFocusWithin&&s===t){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,u(e);let t=e.currentTarget;a(r,"focus",e=>{let n=mr(e);if(i.current.isFocusWithin&&!mt(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});mp(e,t),l(mf(e))}},{capture:!0})}},[n,o,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function yy(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,cH.useRef)({isFocused:!1,isFocusVisible:r||mW()}),[a,s]=(0,cH.useState)(!1),[l,u]=(0,cH.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,cH.useCallback)(()=>u(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,cH.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=mW(),s(e),c()},[c]);t={enabled:a,isTextInput:n},mV(),(0,cH.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,r)=>{var n;let o,a,s,l,u,d,f,p;n=!!t?.isTextInput,a=h7(o=r?mr(r):void 0),l=void 0!==(s=me(o))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,f=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(a),(n=n||p instanceof l&&!mK.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&r instanceof f&&!mA[r.key]||(e=>{i.current.isFocusVisible=e,c()})(mW())};return mT.add(e),()=>{mT.delete(e)}},[n,a]);let{focusProps:f}=mZ({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=ym({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?p:f}}let yg=!1,yb=0;function yv(e){"touch"===e.pointerType&&(yg=!0,setTimeout(()=>{yg=!1},500))}function y_(){let e=h7(null);if(void 0!==e)return 0===yb&&"u">typeof PointerEvent&&e.addEventListener("pointerup",yv),yb++,()=>{!(--yb>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",yv)}}function yw(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,cH.useState)(!1),s=(0,cH.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,cH.useEffect)(y_,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=yt(),{hoverProps:c,triggerHoverEnd:d}=(0,cH.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{yg&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!mt(n.currentTarget,mr(n)))return;s.isHovered=!0;let u=n.currentTarget;s.target=u,l(h7(mr(n)),"pointerover",t=>{s.isHovered&&s.target&&!mt(s.target,mr(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&mt(t.currentTarget,mr(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,l,u]);return(0,cH.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let yx=(0,cH.createContext)(!1);function yS(e){let t=(t,r)=>(0,cH.useContext)(yx)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,cH.forwardRef)(t)}let yE=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),yD=(0,cH.createContext)({}),yO=yS(function(e,t){var r;[e,t]=hG(e,t,yD);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=yl({onPressStart:a,onPressEnd:s,onPressChange:u,onPress:i,onPressUp:l,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=m0(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=hU(v,g,h5(e,{labelable:!0}));return{isPressed:b,buttonProps:hU(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=yy(e),{hoverProps:c,isHovered:d}=yw({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=hH({...e,values:f,defaultClassName:"react-aria-Button"}),h=hF(i.id),m=hF(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,cH.useRef)(o);return(0,cH.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&l&&o?hQ(e,"assertive"):g.current&&l&&!o&&hQ(e,"assertive"),g.current=o},[o,l,y,h]),cz().createElement("button",{...h5(e,{propNames:yE}),...hU(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},cz().createElement(hZ.Provider,{value:{id:m}},p.children))});(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null),(0,cH.createContext)(null);let yP=(0,cH.createContext)({}),yC=(0,cH.createContext)({}),yk=(0,cH.forwardRef)(function(e,t){[e,t]=hG(e,t,yC);let{elementType:r="span",...n}=e;return cz().createElement(r,{className:"react-aria-Text",...n,ref:t})}),yT=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),yj=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yR(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return yT.has(t.script)}let t=e.split("-")[0];return yj.has(t)}let yM=Symbol.for("react-aria.i18n.locale");function yA(){let e="u">typeof window&&window[yM]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:yR(e)?"rtl":"ltr"}}let yN=yA(),yI=new Set;function y$(){for(let e of(yN=yA(),yI))e(yN)}function yL(){let e=hI(),[t,r]=(0,cH.useState)(yN);return((0,cH.useEffect)(()=>(0===yI.size&&window.addEventListener("languagechange",y$),yI.add(r),()=>{yI.delete(r),0===yI.size&&window.removeEventListener("languagechange",y$)}),[]),e)?{locale:"u">typeof window&&window[yM]||"en-US",direction:"ltr"}:t}let yF=cz().createContext(null);function yB(e){let{locale:t,children:r}=e,n=cz().useMemo(()=>({locale:t,direction:yR(t)?"rtl":"ltr"}),[t]);return cz().createElement(yF.Provider,{value:n},r)}function yV(e){let{children:t}=e,r=yL();return cz().createElement(yF.Provider,{value:r},t)}function yU(e){let{locale:t,children:r}=e;return t?cz().createElement(yB,{locale:t,children:r}):cz().createElement(yV,{children:r})}function yW(){let e=yL();return(0,cH.useContext)(yF)||e}let yK=null;function yH(e,t="assertive",r=7e3){yK?yK.announce(e,t,r):(yK=new yz,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?yK.announce(e,t,r):setTimeout(()=>{yK?.isAttached()&&yK?.announce(e,t,r)},100))}class yz{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){if(!this.node)return;let n=document.createElement("div");"object"==typeof e?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(n):this.politeLog?.appendChild(n),""!==e&&setTimeout(()=>{n.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var yG={};function yq(e,t){let r=(0,cH.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}yG={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let yY=new Map;class yZ{constructor(e,t={}){this.formatter=yQ(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==y0&&(y0="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),y0&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=yQ(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let yJ={true:{ja:"h11"},false:{}};function yQ(e,t={}){if("boolean"==typeof t.hour12&&(null==yX&&(yX="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yX)){let r=yJ[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=r??n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yY.has(r))return yY.get(r);let n=new Intl.DateTimeFormat(e,t);return yY.set(r,n),n}let yX=null,y0=null;function y1(e){e=yq(e??{},y3);let{locale:t}=yW();return(0,cH.useMemo)(()=>new yZ(t,e),[t,e])}function y3(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}let y4=Symbol.for("react-aria.i18n.locale"),y2=Symbol.for("react-aria.i18n.strings");class y6{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[y4];if(void 0===h){let e=window[y2];if(!e)return null;for(let r in h={},e)h[r]=new y6({[t]:e[r]},t)}let r=h?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}let y5=new Map,y8=new Map;class y9{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=y5.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),y5.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=y8.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),y8.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}}let y7=new WeakMap;function ge(e,t){let r;return t&&y6.getGlobalDictionaryForPackage(t)||((r=y7.get(e))||(r=new y6(e),y7.set(e,r)),r)}function gt(e,t){let{locale:r}=yW(),n=ge(e,t);return(0,cH.useMemo)(()=>new y9(r,n),[r,n])}function gr(e,t){return e-t*Math.floor(e/t)}function gn(e,t,r,n){let o=(t=gi(e,t))-1,i=-2;return r<=2?i=0:go(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function go(e){return e%4==0&&(e%100!=0||e%400==0)}function gi(e,t){return"BC"===e?1-t:t}function ga(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let gs={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class gl{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=gr(t,146097),o=Math.floor(n/36524),i=gr(n,36524),a=Math.floor(i/1461),s=Math.floor(gr(i,1461)/365),[l,u]=ga(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-gn(l,u,1,1),d=2;e<gn(l,u,3,1)?d=0:go(u)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-gn(l,u,f,1)+1;return new gk(l,u,f,p)}toJulianDay(e){return gn(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gs[go(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return go(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function gu(e,t){let r=e.copy(),n="hour"in r?gv(r,t):0;gc(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,gd(r),gf(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,gd(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gd(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){let e=r.calendar.isInverseEra?.(r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function gc(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function gd(e){for(;e.month<1;)gc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gc(e,1)}function gf(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function gp(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gf(e)}function gh(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function gm(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),gp(r),r}function gy(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),gg(r),r}function gg(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function gb(e,t){let r=e%t;return r<0&&(r+=t),r}function gv(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=gb(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gb(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gb(e.minute,60),r=Math.floor(e.hour/24),e.hour=gb(e.hour,24),r}function g_(e,t){let r=e.copy();return gv(r,t),r}function gw(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=gS(i,r,0,t.length-1,n?.round),o.era=t[i],gp(o);break}case"year":o.calendar.isInverseEra?.(o)&&(r=-r),o.year=gS(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=gS(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=gS(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),gp(o),o}function gx(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=gS(t,r,i,a,n?.round);break}case"minute":o.minute=gS(e.minute,r,0,59,n?.round);break;case"second":o.second=gS(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=gS(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return o}function gS(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function gE(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?gL(gu(gU(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gM(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),gW(gB(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gD(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function gO(e){let t,r=gW(e,new gl);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function gP(e){return`${gO(e)}T${gD(e)}`}function gC(e){let t,r="object"==typeof e[0]?e.shift():new gl;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class gk{#t;constructor(...e){let[t,r,n,o,i]=gC(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,gp(this)}copy(){return this.era?new gk(this.calendar,this.era,this.year,this.month,this.day):new gk(this.calendar,this.year,this.month,this.day)}add(e){return gu(this,e)}subtract(e){return gu(this,gh(e))}set(e){return gm(this,e)}cycle(e,t,r){return gw(this,e,t,r)}toDate(e){return gF(this,e)}toString(){return gO(this)}compare(e){return gQ(this,e)}}class gT{#t;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,gg(this)}copy(){return new gT(this.hour,this.minute,this.second,this.millisecond)}add(e){return g_(this,e)}subtract(e){return g_(this,gh(e))}set(e){return gy(this,e)}cycle(e,t,r){return gx(this,e,t,r)}toString(){return gD(this)}compare(e){var t,r;return t=this,r=e,gX(t)-gX(r)}}class gj{#t;constructor(...e){let[t,r,n,o,i]=gC(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gp(this)}copy(){return this.era?new gj(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gj(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gu(this,e)}subtract(e){return gu(this,gh(e))}set(e){return gm(gy(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return gw(this,e,t,r);default:return gx(this,e,t,r)}}toDate(e,t){return gF(this,e,t)}toString(){return gP(this)}compare(e){var t,r;let n=gQ(this,e);return 0===n?(t=this,r=gU(e),gX(t)-gX(r)):n}}class gR{#t;constructor(...e){let[t,r,n,o,i]=gC(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gp(this)}copy(){return this.era?new gR(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new gR(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gE(this,e)}subtract(e){return gE(this,gh(e))}set(e,t){let r,n;return 0===(n=gy(gm(r=gU(this),e),e)).compare(r)?this:gW(gB(gL(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=gU(e),a=gW(gy(i,{hour:t}),new gl),s=[gL(a,e.timeZone,"earlier"),gL(a,e.timeZone,"later")].filter(t=>gB(t,e.timeZone).day===a.day)[0],l=gW(gy(i,{hour:o}),new gl),u=[gL(l,e.timeZone,"earlier"),gL(l,e.timeZone,"later")].filter(t=>gB(t,e.timeZone).day===l.day).pop(),c=gM(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return gW(gB(c=36e5*gS(d,r,Math.floor(s/36e5),Math.floor(u/36e5),n?.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gx(e,t,r,n);case"era":case"year":case"month":case"day":return gW(gB(gL(gw(gU(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(gM(e)-e.offset)}toString(){var e;let t,r,n,o,i;return`${gP(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof gR){var r,n;return e.timeZone===t?e:(r=e,n=t,gW(gB(gM(r)-r.offset,n),r.calendar))}return gB(gL(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function gM(e){return gA(gi((e=gW(e,new gl)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gA(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function gN(e,t){if("UTC"===t)return 0;if(e>0&&t===g1())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=g$(e,t);return gA(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let gI=new Map;function g$(e,t){let r=gI.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gI.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function gL(e,t,r="compatible"){var n,o,i;let a=gU(e);if("UTC"===t)return gM(a);if(t===g1()&&"compatible"===r){a=gW(a,new gl);let e=new Date,t=gi(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=gM(a),l=gN(s-864e5,t),u=gN(s+864e5,t),c=(n=a,((o=s-l)==(i=s-u)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=g$(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function gF(e,t,r="compatible"){return new Date(gL(e,t,r))}function gB(e,t){let r=gN(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new gR(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function gV(e){return new gk(e.calendar,e.era,e.year,e.month,e.day)}function gU(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new gj(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function gW(e,t){if(gG(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,gp(n),n}let gK={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function gH(e,t){return t=gW(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function gz(e,t){return gG(e.calendar,t.calendar)&&gH(e,t)}function gG(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let gq={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function gY(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?gq[r]:function(e){let t=g5.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return g5.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=g6.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&g6.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&gK[r]||0};g5.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function gZ(e){return gB(Date.now(),e)}function gJ(e){return gV(gZ(e))}function gQ(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function gX(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let g0=null;function g1(){return null==g0&&(g0=new Intl.DateTimeFormat().resolvedOptions().timeZone),g0}function g3(e){return e.subtract({days:e.day-1})}function g4(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function g2(e,t,r){let n=gY(e,t,r);return e.subtract({days:n})}let g6=new Map,g5=new Map;function g8(e,t,r){let n=e.calendar.getDaysInMonth(e);return Math.ceil((gY(g3(e),t,r)+n)/7)}function g9(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function g7(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function be(e){return e&&e.__esModule?e.default:e}let bt=new WeakMap;function br(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function bn(e,t,r,n){let o=gt(be(yG),"@react-aria/calendar"),i=br(e)||br(t),a=y1({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=y1({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,cH.useMemo)(()=>{if(gH(e,g3(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),gH(t,g4(e)))return a.format(i.toDate(r));if(gH(t,g4(t)))return n?bo(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?bo(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function bo(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(l+=i[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function bi(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=hF(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function ba(e,t){let r=(0,cH.useRef)(!0),n=(0,cH.useRef)(null),o=ye(e);(0,cH.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,cH.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||t.some((t,r)=>!Object.is(t,e[r])))&&o(),n.current=t},t)}function bs(e,t){var r;let n,o,i,a,s,l=gt((r=yG)&&r.__esModule?r.default:r,"@react-aria/calendar"),u=h5(e),c=bn(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=bn(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);ba(()=>{t.isFocused||yH(d)},[d]);let f=(i=gt(be(yG),"@react-aria/calendar"),"highlightedRange"in t?{start:n,end:o}=t.highlightedRange||{}:n=o=t.value??void 0,a=y1({weekday:"long",month:"long",year:"numeric",day:"numeric",era:br(n)||br(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,cH.useMemo)(()=>{if(!s&&n&&o)if(gH(n,o)){let e=a.format(n.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=bo(a,i,n,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[n,o,s,t.timeZone,i,a]));ba(()=>{f&&yH(f,"polite",4e3)},[f]);let p=hB([!!e.errorMessage,e.isInvalid,e.validationState]);bt.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:f});let[h,m]=(0,cH.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,cH.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:hU(u,bi({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:p},title:c}}let bl={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function bu(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,cH.useState)(!1),{focusWithinProps:i}=ym({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,cH.useMemo)(()=>n?t:t?{...bl,...t}:bl,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return cz().createElement(r,hU(i,a),t)}function bc(e,t,r,n){let o=ye(r),i=null==r;(0,cH.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i])}function bd(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&"hidden"!==r.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function bf(e,t){let r=e;for(bd(r,t)&&(r=r.parentElement);r&&!bd(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function bp(e,t){let r=[],n=document.scrollingElement||document.documentElement;do bd(e,t)&&r.push(e),e=e.parentElement;while(e&&e!==n);return r}function bh(e,t,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d?0:l.top,p=e===d?e.clientHeight:l.bottom,h=e===d?0:l.left,m=e===d?e.clientWidth:l.right,y=parseInt(u.scrollMarginTop,10)||0,g=parseInt(u.scrollMarginBottom,10)||0,b=parseInt(u.scrollMarginLeft,10)||0,v=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,S=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,D=parseInt(c.borderTopWidth,10)||0,O=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,C=parseInt(c.borderRightWidth,10)||0,k=s.top-y,T=s.bottom+g,j=s.left-b,R=s.right+v,M=e===d?0:P+C,A=e===d?0:D+O,N=e.offsetWidth-e.clientWidth-M,I=e.offsetHeight-e.clientHeight-A,$=f+D+w,L=p-O-x-I,F=h+P+S,B=m-C-E;"rtl"!==c.direction||mx()?B-=N:F+=N;let V=k<$||T>L,U=j<F||R>B;if(V&&"start"===n)i+=k-$;else if(V&&"center"===n)i+=(k+T)/2-($+L)/2;else if(V&&"end"===n)i+=T-L;else if(V&&"nearest"===n){let e=k-$,t=T-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=j-F;else if(U&&"center"===o)a+=(j+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=j-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function bm(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:n}=e.getBoundingClientRect(),o=bp(e,!0);for(let t of o)bh(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(n-a)>1)for(let e of o=r?bp(r,!0):[])bh(e,r,{block:"center",inline:"center"})}else{let{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(n-i)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let by=0,bg=new Map;function bb(e){let[t,r]=(0,cH.useState)();return hP(()=>{if(!e)return;let t=bg.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${by++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},bg.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),bg.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class bv extends gl{fromJulianDay(e){let t=super.fromJulianDay(e);return new gk(this,gi(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(b_(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(b_(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function b_(e){let[t,r]=ga(e.year+-543);return new gk(t,r,e.month,e.day)}function bw(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function bx(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-bw(e,r,1,1))/30),o=t+1-bw(e,r,n,1);return[r,n,o]}function bS(e){return Math.floor(e%4/3)}function bE(e,t){return t%13!=0?30:bS(e)+5}class bD{fromJulianDay(e){let[t,r,n]=bx(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new gk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),bw(1723856,t,e.month,e.day)}getDaysInMonth(e){return bE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+bS(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class bO extends bD{fromJulianDay(e){let[t,r,n]=bx(1723856,e);return new gk(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class bP extends bD{fromJulianDay(e){let[t,r,n]=bx(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new gk(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),bw(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),bE(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let bC=765433;function bk(e){return 7>gr(7*e+1,19)}function bT(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>gr(3*(r+1),7)&&(r+=1),r}function bj(e){let t,r;return bT(e)+(t=bT(e-1),r=bT(e),bT(e+1)-r==356?2:+(r-t==382))}function bR(e){return bj(e+1)-bj(e)}function bM(e,t){if(t>=6&&!bk(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=bR(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!bk(e):30}class bA{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/bC*19+234)/235)+1,n=bj(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=bj(--r)));let i=1,a=0;for(;a<o;)a+=bM(r,i),i++;let s=o-(a-=bM(r,--i));return new gk(this,r,i,s)}toJulianDay(e){let t=bj(e.year);for(let r=1;r<e.month;r++)t+=bM(e.year,r);return t+e.day+347997}getDaysInMonth(e){return bM(e.year,e.month)}getMonthsInYear(e){return bk(e.year)?13:12}getDaysInYear(e){return bR(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(bk(t.year)&&!bk(e.year)&&t.month>6?e.month--:!bk(t.year)&&bk(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class bN extends gl{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-gn(o.era,o.year,1,1);if(a<80?(i--,a+=(t=go(o.year-1)?31:30)+155+90+10):(t=go(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new gk(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=ga(e.year+78);return(go(o)?(t=31,r=gn(n,o,3,21)):(t=30,r=gn(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&go(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function bI(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function b$(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+bI(t,n,1,1)))/29.5)+1),i=r-bI(t,n,o,1)+1;return new gk(e,n,o,i)}function bL(e){return(14+11*e)%30<11}class bF{fromJulianDay(e){return b$(this,1948440,e)}toJulianDay(e){return bI(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&bL(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return bL(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bB extends bF{fromJulianDay(e){return b$(this,1948439,e)}toJulianDay(e){return bI(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function bV(e){return 460322+c[e-1300]}function bU(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function bW(e,t){let r=bV(e);for(let n=1;n<t;n++)r+=bU(e,n);return r}function bK(e){return c[e+1-1300]-c[e-1300]}class bH extends bF{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){c[t-1300]=e;for(let r=1;r<=12;r++)e+=bU(t,r)}}}fromJulianDay(e){let t=e-1948440,r=bV(1300),n=bV(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-bV(++e)+1;let o=bK(e);if(n===o){r=12;break}if(n<o){let t=bU(e,r);for(r=1;n>t;)n-=t,t=bU(e,++r);break}}return new gk(this,e,r,t-bW(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+bW(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):bU(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):bK(e.year)}}let bz=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],bG=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],bq=[1867,1911,1925,1988,2018],bY=["meiji","taisho","showa","heisei","reiwa"];function bZ(e){let t=bz.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?bz.length-1:0===t?0:t-1}function bJ(e){let t=bq[bY.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gk(e.year+t,e.month,e.day)}class bQ extends gl{fromJulianDay(e){let t=super.fromJulianDay(e),r=bZ(t);return new gk(this,bY[r],t.year-bq[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(bJ(e))}balanceDate(e){let t=bJ(e),r=bZ(t);bY[r]!==e.era&&(e.era=bY[r],e.year=t.year-bq[r]),this.constrainDate(e)}constrainDate(e){let t=bY.indexOf(e.era),r=bG[t];if(null!=r){let[n,o,i]=r,a=n-bq[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=bz[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return bY}getYearsInEra(e){let t=bY.indexOf(e.era),r=bz[t],n=bz[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(bJ(e))}getMinimumMonthInYear(e){let t=bX(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=bX(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function bX(e){if(1===e.year)return bz[bY.indexOf(e.era)]}let b0=[0,31,62,93,124,155,186,216,246,276,306,336];class b1{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-b0[o]+1;return new gk(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=b0[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gr(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function b3(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function b4(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class b2 extends gl{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=b4(gi(t.era,t.year));return new gk(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(b6(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=b4(b3(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(b6(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function b6(e){let[t,r]=ga(b3(e));return new gk(t,r,e.month,e.day)}function b5(e){switch(e){case"buddhist":return new bv;case"ethiopic":return new bD;case"ethioaa":return new bO;case"coptic":return new bP;case"hebrew":return new bA;case"indian":return new bN;case"islamic-civil":return new bF;case"islamic-tbla":return new bB;case"islamic-umalqura":return new bH;case"japanese":return new bQ;case"persian":return new b1;case"roc":return new b2;default:return new gl}}function b8(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function b9(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=b7(e,t,r).subtract(i);return vt(e,a,t,r,n,o)}function b7(e,t,r,n,o){let i=e;if(t.years)i=g3(e.subtract({months:e.month-1}));else t.months?i=g3(e):t.weeks&&(i=g2(e,r));return vt(e,i,t,r,n,o)}function ve(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=b7(e,t,r).subtract(i);return vt(e,a,t,r,n,o)}function vt(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=g7(t,b7(gV(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=g9(t,ve(gV(i),r,n));e&&(t=e)}return t}function vr(e,t,r){if(t){let r=g7(e,gV(t));r&&(e=r)}if(r){let t=g9(e,gV(r));t&&(e=t)}return e}function vn(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let vo="u">typeof document?cz().useInsertionEffect??cz().useLayoutEffect:()=>{};function vi(e,t,r){let[n,o]=(0,cH.useState)(e||t),i=(0,cH.useRef)(n),a=(0,cH.useRef)(void 0!==e),s=void 0!==e;(0,cH.useEffect)(()=>{a.current,a.current=s},[s]);let l=s?e:n;vo(()=>{i.current=l});let[,u]=(0,cH.useReducer)(()=>({}),{});return[l,(0,cH.useCallback)((e,...t)=>{let n="function"==typeof e?e(i.current):e;Object.is(i.current,n)||(i.current=n,o(n),u(),r?.(n,...t))},[r])]}function va(e){let t=(0,cH.useMemo)(()=>new yZ(e.locale),[e.locale]),r=(0,cH.useMemo)(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,f=(0,cH.useMemo)(()=>o(r.calendar),[o,r.calendar]),[p,h]=vi(e.value,e.defaultValue??null,e.onChange),m=(0,cH.useMemo)(()=>p?gW(gV(p),f):null,[p,f]),y=(0,cH.useMemo)(()=>p&&"timeZone"in p?p.timeZone:r.timeZone,[p,r.timeZone]),[g,b]=vi((0,cH.useMemo)(()=>e.focusedValue?vr(gW(gV(e.focusedValue),f),a,s):void 0,[e.focusedValue,f,a,s]),(0,cH.useMemo)(()=>vr(e.defaultFocusedValue?gW(gV(e.defaultFocusedValue),f):m||gW(gJ(y),f),a,s),[e.defaultFocusedValue,m,y,f,a,s]),e.onFocusChange),[v,w]=(0,cH.useState)(()=>{switch(l){case"start":return b7(g,i,n,a,s);case"end":return ve(g,i,n,a,s);default:return b9(g,i,n,a,s)}}),[x,S]=(0,cH.useState)(e.autoFocus||!1),E=(0,cH.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[D,O]=(0,cH.useState)(f);if(!gG(f,D)){let e=gW(g,f);w(b9(e,i,n,a,s)),b(e),O(f)}function P(e){b(e=vr(e,a,s))}function C(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=vn(e=vr(e,a,s),v,u))&&(e=gW(e,p?.calendar||new gl),p&&"hour"in p?h(p.set(e)):h(e))}}b8(g,a,s)?b(vr(g,a,s)):0>g.compare(v)?w(ve(g,i,n,a,s)):g.compare(E)>0&&w(b7(g,i,n,a,s));let k=(0,cH.useMemo)(()=>!!m&&(!!(u&&u(m))||b8(m,a,s)),[m,u,a,s]),T=e.isInvalid||"invalid"===e.validationState||k,j=(0,cH.useMemo)(()=>"visible"===c?i:vs(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:C,visibleRange:{start:v,end:E},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(j);b(vr(g.add(j),a,s)),w(b7(vt(g,e,j,n,a,s),j,n))},focusPreviousPage(){let e=v.subtract(j);b(vr(g.subtract(j),a,s)),w(b7(vt(g,e,j,n,a,s),j,n))},focusSectionStart(){i.days?P(v):i.weeks?P(g2(g,n)):(i.months||i.years)&&P(g3(g))},focusSectionEnd(){i.days?P(E):i.weeks?P(g2(g,n,void 0).add({days:6})):(i.months||i.years)&&P(g4(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(vs(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(vs(i)))},selectFocusedDate(){u&&u(g)||C(g)},selectDate(e){C(e)},isFocused:x,setFocused:S,isInvalid:e=>b8(e,a,s),isSelected(e){return null!=m&&gH(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&gH(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return gH(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return gH(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=v){let r=t.add({weeks:e}),o=[],i=gY(r=g2(r,n,d),n,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(r);let e=r.add({days:1});if(gH(r,e))break;r=e}for(;o.length<7;)o.push(null);return o}}}function vs(e){let t={...e};for(let r in e)t[r]=1;return t}function vl(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:gV(e),end:gV(t)}):null}function vu(e,t){return(e=gW(e,t?.calendar||new gl),t&&"hour"in t)?t.set(e):e}function vc(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let vd=(0,cH.createContext)(null),vf=(0,cH.createContext)(null),vp=(0,cH.createContext)(null),vh=(0,cH.createContext)(null),vm=(0,cH.forwardRef)(function(e,t){[e,t]=hG(e,t,vd);let{locale:r}=yW(),n=va({...e,locale:r,createCalendar:b5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=bs(e,n),u=hH({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cz().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cz().createElement(hK,{values:[[yD,{slots:{previous:i,next:a}}],[yP,{"aria-hidden":!0,level:2,children:l}],[vp,n],[vd,e],[yC,{slots:{errorMessage:s}}]]},cz().createElement(bu,null,cz().createElement("h2",null,o["aria-label"])),u.children,cz().createElement(bu,null,cz().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),vy=(0,cH.forwardRef)(function(e,t){[e,t]=hG(e,t,vf);let{locale:r}=yW(),n=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=vi(t,r||null,n),[f,p]=(0,cH.useState)(null),h="center";if(c&&c.start&&c.end){let e=b9(gV(c.start),a,i,s,l).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,cH.useRef)(null),[y,g]=(0,cH.useState)(null),b=(0,cH.useMemo)(()=>g7(s,y?.start),[s,y]),v=(0,cH.useMemo)(()=>g9(l,y?.end),[l,y]),w=va({...u,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:vc(t,w,-1),end:vc(t,w,1)},g(m.current)):(m.current=null,g(null))},[S,E]=(0,cH.useState)(w.visibleRange);gz(w.visibleRange.start,S.start)&&gz(w.visibleRange.end,S.end)||(x(f),E(w.visibleRange));let D=e=>{e?(p(e),x(e)):(p(null),x(null))},O=f?vl(f,w.focusedDate):c&&vl(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=vn(vr(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=vl(f,r);e&&d({start:vu(e.start,c?.start),end:vu(e.end,c?.end)}),D(null)}else D(r)},[C,k]=(0,cH.useState)(!1),{isDateUnavailable:T}=e,j=(0,cH.useMemo)(()=>!!c&&!f&&(!!(T&&(T(c.start)||T(c.end)))||b8(c.start,s,l)||b8(c.end,s,l)),[T,c,f,s,l]),R=e.isInvalid||"invalid"===e.validationState||j;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:D,highlightedRange:O,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(O&&e.compare(O.start)>=0&&0>=e.compare(O.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||b8(e,m.current?.start,m.current?.end),isDragging:C,setDragging:k,clearSelection(){D(null),d(null)}}}({...e,locale:r,createCalendar:b5}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:l}=function(e,t,r){let{commitBehavior:n="select",...o}=e,i=bs(o,t),a=(0,cH.useRef)(!1),s=(0,cH.useRef)("u">typeof window?window:null);bc(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return bc(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;r.current&&mn(r.current)&&(!mt(r.current,o)||!o.closest('button, [role="button"]'))&&l[n]()}),i.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&mt(r.current,e.relatedTarget)||!t.anchorDate||l[n]())},bc(r,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,n,t),u=hH({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cz().createElement("div",{...u,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},cz().createElement(hK,{values:[[yD,{slots:{previous:i,next:a}}],[yP,{"aria-hidden":!0,level:2,children:l}],[vh,n],[vf,e],[yC,{slots:{errorMessage:s}}]]},cz().createElement(bu,null,cz().createElement("h2",null,o["aria-label"])),u.children,cz().createElement(bu,null,cz().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),vg=(0,cH.createContext)(null),vb=(0,cH.forwardRef)(function(e,t){var r,n;let o=(0,cH.useContext)(vp),i=(0,cH.useContext)(vh),a=hz(vd),s=hz(vf),l=null!=o?o:i,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p}=function(e,t){let{startDate:r=t.visibleRange.start,endDate:n=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=yW(),a=bn(r,n,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=bt.get(t),u=bi({"aria-label":[s,a].filter(Boolean).join(", "),"aria-labelledby":l}),c=y1({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=yW(),f=(0,cH.useMemo)(()=>{let e=g2(gJ(t.timeZone),d,o);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return c.format(n)})},[d,t.timeZone,c,o]),p=g8(r,d,o);return{gridProps:hU(u,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:p}}({startDate:u,endDate:g4(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cz().createElement(vg.Provider,{value:{headerProps:f,weekDays:p,startDate:u,firstDayOfWeek:c}},cz().createElement("table",{...h5(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cz().createElement(cz().Fragment,null,cz().createElement(vv,null,e=>cz().createElement(v_,null,e)),cz().createElement(vw,null,e.children))))}),vv=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,cH.useContext)(vg);return cz().createElement("thead",{...h5(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},cz().createElement("tr",null,a.map((e,t)=>cz().cloneElement(r(e),{key:t}))))}),v_=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return cz().createElement("th",{...h5(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),vw=(0,cH.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,cH.useContext)(vp),a=(0,cH.useContext)(vh),s=null!=i?i:a,{startDate:l,firstDayOfWeek:u}=(0,cH.useContext)(vg),{locale:c}=yW(),d=g8(l,c,u);return cz().createElement("tbody",{...h5(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>cz().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cz().cloneElement(r(e),{key:t}):cz().createElement("td",{key:t})))))}),vx=(0,cH.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,cH.useContext)(vp),s=(0,cH.useContext)(vh),l=null!=a?a:s,{startDate:u}=null!=(n=(0,cH.useContext)(vg))?n:{startDate:l.visibleRange.start},c=(0,cH.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:l}=bt.get(t),u=gt((n=yG)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=y1({weekday:"long",day:"numeric",month:"long",year:"numeric",era:br(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&gH(t.value,i));m&&(d=!0),i=yq(i,gz);let y=(0,cH.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=gH(i,gJ(t.timeZone)),b=(0,cH.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(gH(i,t.value.start)||gH(i,t.value.end))&&(e=l+", "),e+=c.format(y),g?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&gH(i,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&gH(i,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,y,u,d,g,i,t,l]),v="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(v=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=bb(v),x=(0,cH.useRef)(!1),S=(0,cH.useRef)(!1),E=(0,cH.useRef)(void 0),{pressProps:D,isPressed:O}=yl({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(gH(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}else if(gH(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),S.current=!0;return}}let r=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(r,200):r()}},onPressEnd(){S.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(S.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=gH(i,t.focusedDate)?0:-1),(0,cH.useEffect)(()=>{f&&r.current&&(h8(r.current),"pointer"!==mk&&((e=document)=>e.activeElement)()===r.current&&bm(r.current,{containingElement:bf(r.current)}))},[f,r]);let P=y1({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),C=(0,cH.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:hU(D,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=mr(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:O,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:C}}({date:e},l,c),{hoverProps:h,isHovered:m}=yw({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:g}=yy();g&&(g=p.isFocused);let b=(o=u,i=gW(i=e,o.calendar),o=g3(o),i=g3(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(v=gH(e,l.highlightedRange.start),w=gH(e,l.highlightedRange.end));let x=hH({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...p}}),S={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return cz().createElement("td",{...d,ref:r},cz().createElement("div",{...hU(h5(t),f,y,h,S,x),ref:c}))}),vS=(0,cH.createContext)({}),vE=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hG(e,t,vS);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=yw({onHoverStart:a,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=yy({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=hH({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return cz().createElement("div",{...hU(u,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),vD=(0,cH.createContext)({}),vO=yS(function(e,t){[e,t]=hG(e,t,vD);let{hoverProps:r,isHovered:n}=yw(e),{isFocused:o,isFocusVisible:i,focusProps:a}=yy({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=hH({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cz().createElement("input",{...hU((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...l,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function vP(e,t,r,n){return e.createTreeWalker(t,r,n)}let vC=cz().createContext(null),vk="react-aria-focus-scope-restore",vT=null;function vj(e){var t,r,n,o,i,a,s,l,u,c;let d,f,p,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,cH.useRef)(null),w=(0,cH.useRef)(null),x=(0,cH.useRef)([]),{parentNode:S}=(0,cH.useContext)(vC)||{},E=(0,cH.useMemo)(()=>new vz({scopeRef:x}),[x]);hP(()=>{let e=S||vG.root;if(vG.getTreeNode(e.scopeRef)&&vT&&!vI(vT,e.scopeRef)){let t=vG.getTreeNode(vT);t&&(e=t)}e.addChild(E),vG.addNode(E)},[E,S]),hP(()=>{let e=vG.getTreeNode(x);e&&(e.contain=!!y)},[y]),hP(()=>{let e=v.current?.nextSibling,t=[],r=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(vk,r),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(vk,r)}},[m]),hP(()=>{if(r||n)return;let e=t.current,o=h7(e?e[0]:void 0),i=e=>{let r=mr(e);vA(r,t.current)?vT=t:vN(r)||(vT=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,cH.useRef)(void 0),f=(0,cH.useRef)(void 0),hP(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=h7(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!vM(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!vA(r,n))return;let i=vU(vR(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(v$(a,!0),a instanceof me(a).HTMLInputElement&&a.select())},n=e=>{(!vT||vI(vT,o))&&vA(mr(e),o.current)?(vT=o,d.current=mr(e)):vM(o)&&!vN(mr(e),o)?d.current?d.current.focus():vT&&vT.current&&vF(vT.current):vM(o)&&(d.current=mr(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=mk,n=("virtual"===r||null===r)&&mD()&&mE(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&vM(o)&&!vN(i,o)){vT=o;let t=mr(e);t&&t.isConnected?(d.current=t,d.current?.focus()):vT.current&&vF(vT.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),hP(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=g,l=y,p=(0,cH.useRef)("u">typeof document?((e=document)=>e.activeElement)(h7(a.current?a.current[0]:void 0)):null),hP(()=>{let e=a.current,t=h7(e?e[0]:void 0);if(!s||l)return;let r=()=>{(!vT||vI(vT,a))&&vA(((e=document)=>e.activeElement)(t),a.current)&&(vT=a)};return t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,l]),hP(()=>{let e=h7(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!vM(a)||t.isComposing)return;let r=e.activeElement;if(!vN(r,a)||!vB(a))return;let n=vG.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=vU(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!vN(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(vN(s,a));(t.preventDefault(),t.stopPropagation(),s)?v$(s,!0):vN(o)?v$(o,!0):r.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[a,s,l]),hP(()=>{let e=h7(a.current?a.current[0]:void 0);if(!s)return;let t=vG.getTreeNode(a);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=vG.getTreeNode(a);if(!t)return;let r=t.nodeToRestore,n=((e=document)=>e.activeElement)(e);if(s&&r&&(n&&vN(n,a)||n===e.body&&vB(a))){let t=vG.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void vV(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&vG.getTreeNode(e.scopeRef))return void vV(vL(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),u=x,c=b,h=cz().useRef(c),(0,cH.useEffect)(()=>{h.current&&(vT=u,!vA(((e=document)=>e.activeElement)(h7(u.current?u.current[0]:void 0)),vT.current)&&u.current&&vF(u.current)),h.current=!1},[u]),(0,cH.useEffect)(()=>{let e=((e=document)=>e.activeElement)(h7(x.current?x.current[0]:void 0)),t=null;if(vA(e,x.current)){for(let r of vG.traverse())r.scopeRef&&vA(e,r.scopeRef.current)&&(t=r);t===vG.getTreeNode(x)&&(vT=t.scopeRef)}},[x]),hP(()=>()=>{let e=vG.getTreeNode(x)?.parent?.scopeRef??null;(x===vT||vI(x,vT))&&(!e||vG.getTreeNode(e))&&(vT=e),vG.removeTreeNode(x)},[x]);let D=(0,cH.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(h7(r[0]??void 0)),l=r[0].previousElementSibling,u=vU(vR(r),{tabbable:o,accept:a},r);u.currentNode=vA(s,r)?s:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&v$(c,!0),c},focusPrevious(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(h7(r[0]??void 0)),l=r[r.length-1].nextElementSibling,u=vU(vR(r),{tabbable:o,accept:a},r);u.currentNode=vA(s,r)?s:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&v$(c,!0),c},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=vU(vR(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&v$(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=vU(vR(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&v$(a,!0),a}}},[]),O=(0,cH.useMemo)(()=>({focusManager:D,parentNode:E}),[E,D]);return cz().createElement(vC.Provider,{value:O},cz().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,cz().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function vR(e){return e[0].parentElement}function vM(e){let t=vG.getTreeNode(vT);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function vA(e,t){return!!e&&!!t&&t.some(t=>mt(t,e))}function vN(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of vG.traverse(vG.getTreeNode(t)))if(r&&vA(e,r.current))return!0;return!1}function vI(e,t){let r=vG.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function v$(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{mY(e)}catch{}}function vL(e,t=!0){let r=e[0].previousElementSibling,n=vR(e),o=vU(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=vU(n=vR(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function vF(e,t=!0){v$(vL(e,t))}function vB(e){let t=vG.getTreeNode(vT);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function vV(e){e.dispatchEvent(new CustomEvent(vk,{bubbles:!0,cancelable:!0}))&&v$(e)}function vU(e,t,r){let n=t?.tabbable?mc:mu,o=h7(e?.nodeType===Node.ELEMENT_NODE?e:null),i=vP(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mt(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(h7(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),r=me(e);return t instanceof r.RadioNodeList?Array.from(t).filter(e=>e instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:n(e)&&(!r||vA(e,r))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function vW(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(h7(n)),u=vU(n,{tabbable:i,accept:s});mt(n,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&a&&(u.currentNode=n,c=u.nextNode()),c&&v$(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,l=o||((e=document)=>e.activeElement)(h7(n)),u=vU(n,{tabbable:i,accept:s});if(mt(n,l))u.currentNode=l;else{let e=vK(u);return e&&v$(e,!0),e??null}let c=u.previousNode();if(!c&&a){u.currentNode=n;let e=vK(u);if(!e)return null;c=e}return c&&v$(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=vU(n,{tabbable:o,accept:i}).nextNode();return a&&v$(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=vK(vU(n,{tabbable:o,accept:i}));return a&&v$(a,!0),a??null}}}function vK(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class vH{constructor(){this.fastMap=new Map,this.root=new vz({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(t??null);if(!n)return;let o=new vz({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&vA(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new vH;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class vz{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let vG=new vH;var vq={};function vY(e,t,r){let{direction:n}=yW(),o=(0,cH.useMemo)(()=>vW(t),[t]),i=()=>{if(!t.current)return;let e=window.event?mr(window.event):null,r=vU(t.current,{tabbable:!0});if(e&&(r.currentNode=e,e=r.previousNode()),!e){let t;do(t=r.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=r.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=yl({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return hU(a,{onKeyDown:i=>{if(mt(i.currentTarget,mr(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=mr(i),r=vZ(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=mr(i),r=vZ(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function vZ(e,t,r){let n=vU(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function vJ(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=hF(t);let a=hF(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:bi({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=hB([!!t,!!r,n,o]),l=hB([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=hU(a,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function vQ(e,t,r){let n=ye(e=>{r&&!e.defaultPrevented&&r(t)});(0,cH.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",n),()=>{t?.removeEventListener("reset",n)}},[e])}function vX(e,t,r){let{validationBehavior:n,focus:o}=e;hP(()=>{if("native"===n&&r?.current&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,cH.useRef)(!1),a=ye(()=>{i.current||t.resetValidation()}),s=ye(e=>{t.displayValidation.isInvalid||t.commitValidation();let n=r?.current?.form;!e.defaultPrevented&&r&&n&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}(n)===r.current&&(o?o():r.current?.focus(),mk="keyboard",mN("keyboard",null));e.preventDefault()}),l=ye(()=>{t.commitValidation()});(0,cH.useEffect)(()=>{let e=r?.current;if(!e)return;let t=e.form,n=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&mr(window.event)instanceof MessagePort,n?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",a),t&&(t.reset=n)}},[r,n])}vq={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let v0=new WeakMap,v1="__reactAriaDateFieldRole",v3="__reactAriaDateFieldFocusManager";function v4(e,t,r){var n;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=vJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=(0,cH.useRef)(null),{focusWithinProps:p}=ym({...e,onFocusWithin(r){f.current=t.value,e.onFocus?.(r)},onBlurWithin:r=>{t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),e.onBlur?.(r)},onFocusWithinChange:e.onFocusChange}),h=gt((n=vq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=bb(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[v1]?u["aria-describedby"]:[g["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[v3],w=(0,cH.useMemo)(()=>v||vW(r),[v,r]),x=vY(t,r,"presentation"===e[v1]);v0.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let S=(0,cH.useRef)(e.autoFocus);o="presentation"===e[v1]?{role:"presentation"}:hU(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,cH.useEffect)(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),vQ(e.inputRef,t.defaultValue,t.setValue),vX({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let D=h5(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:hU(D,o,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var v2={};v2={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let v6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},v5={...v6,customError:!0,valid:!1},v8={isInvalid:!1,validationDetails:v6,validationErrors:[]},v9=(0,cH.createContext)({}),v7="__reactAriaFormValidationState";function _e(e){if(e[v7]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[v7];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||="invalid"===r);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:v5}:null,u=(0,cH.useMemo)(()=>a&&null!=o?_r(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return _t(r)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,cH.useContext)(v9),d=(0,cH.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>_t(c[e])):_t(c[n]):[],[c,n]),[f,p]=(0,cH.useState)(c),[h,m]=(0,cH.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,cH.useMemo)(()=>_r(h?[]:d),[h,d]),g=(0,cH.useRef)(v8),[b,v]=(0,cH.useState)(v8),w=(0,cH.useRef)(v8),[x,S]=(0,cH.useState)(!1);return(0,cH.useEffect)(()=>{if(!x)return;S(!1);let e=u||i||g.current;_n(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:l||y||u||i||v8,displayValidation:"native"===s?l||y||b:l||y||u||i||b,updateValidation(e){"aria"!==s||_n(b,e)?g.current=e:v(e)},resetValidation(){_n(v8,w.current)||(w.current=v8,v(v8)),"native"===s&&S(!1),m(!0)},commitValidation(){"native"===s&&S(!0),m(!0)}}}(e)}function _t(e){return e?Array.isArray(e)?e:[e]:[]}function _r(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:v5}:null}function _n(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function _o(...e){let t=new Set,r=!1,n={...v6};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||=o.isInvalid,n)n[e]||=o.validationDetails[e]}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let _i=new y6((eo=v2)&&eo.__esModule?eo.default:eo);function _a(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function _s(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&n?.(e)||!1,l=i||a||s,u=[];if(l){let e=_a(),n=new y9(e,y6.getGlobalDictionaryForPackage("@react-stately/datepicker")||_i),l=new yZ(e,_c({},o)),c=l.resolvedOptions().timeZone;a&&null!=t&&u.push(n.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),i&&null!=r&&u.push(n.format("rangeOverflow",{maxValue:l.format(r.toDate(c))})),s&&u.push(n.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let _l={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},_u={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function _c(e,t){e={...t.shouldForceLeadingZeros?_u:_l,...e};let r=t.granularity||"minute",n=Object.keys(e),o=n.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=n.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=n.slice(o,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function _d(e){return e&&"hour"in e?e:new gT}function _f(e,t){return null===e?null:e?gW(e,t):void 0}function _p(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,cH.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let _h=new y6({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class _m{constructor(e,t,r){if(this.era=r?.era??null,this.calendar=e,this.year=r?.year??null,this.month=r?.month??null,this.day=r?.day??null,this.hour=r?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=r?.minute??null,this.second=r?.second??null,this.millisecond=r?.millisecond??null,this.offset="offset"in(r??{})?r.offset:null,null!=this.hour){let[e,r]=_g(this.hour,t);this.dayPeriod=e,this.hour=r}}copy(){let e=new _m(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,r]=_g(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===r}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,r){let n=this.copy();return n[e]=t,"hour"===e&&null==n.dayPeriod&&"hour"in r&&(n.dayPeriod=_g(r.hour,this.hourCycle)[0]),"year"===e&&null==n.era&&(n.era=r.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(n.offset=null),n}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,r,n){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in r){let[e,t]=_g(r.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=r[e];return"year"===e&&null==o.era&&(o.era=r.era),o}switch(e){case"era":{let e=this.calendar.getEras(),r=e.indexOf(o.era);r=_y(r,t,0,e.length-1),o.era=e[r];break}case"year":{let n=new gk(this.calendar,this.era??r.era,this.year??r.year,this.month??1,this.day??1);o.era=(n=n.cycle(e,t,{round:"year"===e})).era,o.year=n.year;break}case"month":o.month=_y(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=_y(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=n.some(e=>["year","month","day"].includes(e));if("timeZone"in r&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(r),[n,i]=_g((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=n,o.offset=e.offset}else{let e=o.hour??0,n=this.getSegmentLimits("hour");o.hour=_y(e,t,n.minValue,n.maxValue),null==o.dayPeriod&&"hour"in r&&(o.dayPeriod=_g(r.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=_y(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=_y(o.minute??0,t,0,59,!0);break;case"second":o.second=_y(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,r){switch(r){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let r=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in r&&null!=this.offset&&r.offset!==this.offset&&(r=r.add({milliseconds:r.offset-this.offset})),r}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function _y(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function _g(e,t){let r=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}var _b=r(59381);let _v={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},__={year:5,month:2,day:7,hour:2,minute:15,second:15},_w={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function _x(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=_p(c,e.granularity),p=f||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,cH.useMemo)(()=>{let n=new yZ(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[r(n.calendar),n.hourCycle]},[t,e.hourCycle,r]),[y,g]=vi(e.value,e.defaultValue??null,e.onChange),[b]=(0,cH.useState)(y),v=(0,cH.useMemo)(()=>_f(y,h)??null,[y,h]),[w,x]=(0,cH.useState)(()=>new _m(h,m,v)),S="gregory"===h.identifier&&"BC"===w.era,E=(0,cH.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:f,hideTimeZone:n,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,n,S]),D=(0,cH.useMemo)(()=>_c({},E),[E]),O=(0,cH.useMemo)(()=>new yZ(t,D),[t,D]),P=(0,cH.useMemo)(()=>O.resolvedOptions(),[O]),C=(0,cH.useMemo)(()=>(function(e,t,r,n){if(e)return _f(e,r);let o=gW(gZ(n??g1()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?gV(o):n?o:gU(o)})(e.placeholderValue,d,h,f),[e.placeholderValue,d,h,f]),k=(0,cH.useMemo)(()=>{let t="h11"===m||"h12"===m,r=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],n=r.indexOf(e.maxGranularity||"era"),o=r.indexOf("hour"===d&&t?"dayPeriod":d);return r.slice(n,o+1)},[e.maxGranularity,d,m]),[T,j]=(0,cH.useState)(v),[R,M]=(0,cH.useState)(h),[A,N]=(0,cH.useState)(m);v===T&&m===A&&gG(h,R)||(w=new _m(h,m,v),j(v),M(h),N(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof _m&&t.isCleared(k))x(new _m(h,m,v)),g(null);else if(t instanceof _m){if(t.isComplete(k)){let e=t.toValue(v??C);if(t.validate(e,k)){let t=gW(e,c?.calendar||new gl);if(!y||0!==t.compare(y)){x(new _m(h,m,v)),g(t);return}}}x(t)}else t=gW(t,c?.calendar||new gl),x(new _m(h,m,v)),g(t)},$=(0,cH.useMemo)(()=>w.toValue(v??C).toDate(p),[w,p,v,C]),L=(0,cH.useMemo)(()=>(function(e,t,r,n,o,i,a){let s=["hour","minute","second"],l=r.formatToParts(e),u=new(0,_b.K)(i,{useGrouping:!1}),c=new(0,_b.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let r=t[e.type]??0;"2-digit"===n[e.type]?e.value=c.format(r):e.value=u.format(r)}let d=[];for(let e of l){var f;let r=_w[e.type]||e.type,n=_v[r];"era"===r&&1===o.getEras().length&&(n=!1);let l=_v[r]&&null==t[e.type],u=_v[r]?(f=e.value,"era"===r||"dayPeriod"===r?f:"year"===r||"month"===r||"day"===r?_h.getStringForLocale(r,i):"––"):null,c={type:r,text:l?u:e.value,...t.getSegmentLimits(r),isPlaceholder:l,placeholder:u,isEditable:n};"hour"===r?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),r===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(r)&&r===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,O,P,h,t,d),[$,O,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,C,k))},B=(0,cH.useMemo)(()=>_s(y,s,l,u,E),[y,s,l,u,E]),V=_e({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:O,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,__[e]||1)},decrementPage(e){F(e,-(__[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,C))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,C))},setSegment(e,t){I(w.set(e,t,C))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(k)){let e=gW(w.toValue(v??C),c?.calendar||new gl);y&&0===e.compare(y)||g(e),x(new _m(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new yZ(t,_c(e,E)).format($):"",getDateFormatter:(e,t)=>new yZ(e,_c({},{...E,...t}))}}let _S=(0,cH.createContext)(null),_E=(0,cH.createContext)(null),_D=(0,cH.createContext)(null),_O=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(_E),n=(0,cH.useContext)(_D);return r||n?cz().createElement(_C,{...e,ref:t}):cz().createElement(_P,{...e,ref:t})}),_P=(0,cH.forwardRef)((e,t)=>{let[r,n]=hG({slot:e.slot},t,_S),{locale:o}=yW(),i=_x({...r,locale:o,createCalendar:b5}),a=(0,cH.useRef)(null),{fieldProps:s,inputProps:l}=v4({...r,inputRef:a},i,n);return cz().createElement(hK,{values:[[_E,i],[vD,{...l,ref:a}],[vS,{...s,ref:n,isInvalid:i.isInvalid}]]},cz().createElement(_C,e))}),_C=(0,cH.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,cH.useContext)(_E),i=(0,cH.useContext)(_D),a=null!=o?o:i;return cz().createElement(cz().Fragment,null,cz().createElement(vE,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid},a.segments.map((e,t)=>(0,cH.cloneElement)(n(e),{key:t}))),cz().createElement(vO,null))});function _k({children:e}){let t=(0,cH.useMemo)(()=>({register:()=>{}}),[]);return cz().createElement(m9.Provider,{value:t},e)}cz().forwardRef(({children:e,...t},r)=>{let n=(0,cH.useRef)(!1),o=(0,cH.useContext)(m9),i=hU(o||{},{...t,register(){n.current=!0,o&&o.register()}});return i.ref=hS(r||o?.ref),mQ(o,i.ref),(0,cH.useEffect)(()=>{n.current||(n.current=!0)},[]),cz().createElement(m9.Provider,{value:i},e)});let _T=(0,cH.createContext)({}),_j=cz().createContext(null);function _R(e){let t=hI(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,i]=(0,cH.useState)(!1),a=(0,cH.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,cH.useContext)(_T)??{};if(!e.portalContainer&&s&&(r=s()),!r)return null;let l=e.children;return e.disableFocusManagement||(l=cz().createElement(vj,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},l)),l=cz().createElement(_j.Provider,{value:a},cz().createElement(_k,null,l)),yn().createPortal(l,r)}let _M=(0,cH.createContext)(null),_A=(0,cH.createContext)(null),_N=(0,cH.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=hG(e,t,_M);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=hB();i=e["aria-label"]?void 0:i;let a=(0,cH.useRef)(!1);return(0,cH.useEffect)(()=>{if(t.current&&!mn(t.current)){mY(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),mY(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),r=(0,cH.useContext)(_j),hP(()=>{n?.(!0)},[n=r?.setContain]),(0,cH.useRef)(!1),(0,cH.useEffect)(()=>{}),{dialogProps:{...h5(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,cH.useContext)(_A);n["aria-label"]||n["aria-labelledby"]||(e["aria-labelledby"]?n["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=hH({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return cz().createElement("section",{...h5(e),...n,...a,ref:t,slot:e.slot||void 0},cz().createElement(hK,{values:[[yP,{slots:{[hW]:{},title:{...o,level:2}}}],[yD,{slots:{[hW]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),_I=(0,cH.createContext)(null),_$=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(_I);return(null==r?void 0:r.isInvalid)?cz().createElement(_L,{...e,ref:t}):null}),_L=(0,cH.forwardRef)((e,t)=>{let r=(0,cH.useContext)(_I),n=h5(e),o=hH({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:cz().createElement(yk,{slot:"errorMessage",...n,...o,ref:t})}),_F=(0,cH.createContext)(null),_B=(0,cH.createContext)({}),_V=yS(function(e,t){[e,t]=hG(e,t,_B);let{elementType:r="label",...n}=e;return cz().createElement(r,{className:"react-aria-Label",...n,ref:t})}),_U=(0,cH.createContext)({placement:"bottom"}),_W="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,_K=new WeakMap,_H=[];function _z(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function _G(e,t){let r=e,n=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)n=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(n=o.length-e)}if(n>0){let e=Math.pow(10,n);r=Math.round(r*e)/e}return r}function _q(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=_G(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(_G(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(_G((r-t)/n,n))*n),i=_G(i,n)}let _Y={top:"top",bottom:"top",left:"left",right:"left"},_Z={top:"bottom",bottom:"top",left:"right",right:"left"},_J={top:"left",left:"top"},_Q={top:"height",left:"width"},_X={width:"totalWidth",height:"totalHeight"},_0={};function _1(e,t){let r=0,n=0,o=0,i=0,a=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;o=u.clientWidth,i=u.clientHeight,r=t?.width??o,n=t?.height??i,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:a,left:s}=_8(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,o=r,i=n;return mS()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:l,top:a,left:s}}function _3(e,t,r,n,o,i,a){let s=o.scroll[e]??0,l=n[_Q[e]],u=a[e]+n.scroll[_Y[e]]+i,c=a[e]+n.scroll[_Y[e]]+l-i,d=t-s+n.scroll[_Y[e]]+a[e]-n[_Y[e]],f=t-s+r+n.scroll[_Y[e]]+a[e]-n[_Y[e]];return d<u?u-d:f>c?Math.max(c-f,u-d):0}function _4(e){if(_0[e])return _0[e];let[t,r]=e.split(" "),n=_Y[t]||"right",o=_J[n];_Y[r]||(r="center");let i=_Q[n],a=_Q[o];return _0[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},_0[e]}function _2(e,t,r,n,o,i,a,s,l,u,c){let{placement:d,crossPlacement:f,axis:p,crossAxis:h,size:m,crossSize:y}=n,g={};g[h]=e[h]??0,"center"===f?g[h]+=((e[y]??0)-(r[y]??0))/2:f!==h&&(g[h]+=(e[y]??0)-(r[y]??0)),g[h]+=i;let b=e[h]-r[y]+l+u,v=e[h]+e[y]-l-u;if(g[h]=_z(g[h],b,v),d===p){let t=s?c[m]:c[_X[m]];g[_Z[p]]=Math.floor(t-e[p]+o)}else g[p]=Math.floor(e[p]+e[m]+o);return g}function _6(e,t,r,n,o,i,a,s){let{placement:l,axis:u,size:c}=i;return l===u?Math.max(0,r[u]-(a.scroll[u]??0)-(e[u]+(s?t[u]:0))-(n[u]??0)-n[_Z[u]]-o):Math.max(0,e[c]+e[u]+(s?t[u]:0)-r[u]-r[c]+(a.scroll[u]??0)-(n[u]??0)-n[_Z[u]]-o)}function _5(e,t){let{top:r,left:n,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:r,left:n,width:o,height:i}}function _8(e,t){let{top:r,left:n,width:o,height:i}=_5(e,t),{scrollTop:a,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:r+a-l,left:n+s-u,width:o,height:i}}function _9(e,t,r){let n,o=window.getComputedStyle(e);if("fixed"===o.position)n=_5(e,r);else{n=_8(e,r);let o=_8(t,r),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(o.marginTop,10)||0,n.left-=parseInt(o.marginLeft,10)||0,n}function _7(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let we=new WeakMap;function wt(e){let{ref:t,box:r,onResize:n}=e,o=ye(n);(0,cH.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[t,r])}let wr="u">typeof document?window.visualViewport:null;function wn(e,t){if(e.button>0)return!1;let r=mr(e);if(r){let e=r.ownerDocument;if(!e||!mt(e.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wo=[],wi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wa(e){return e instanceof HTMLInputElement&&!wi.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let ws="u">typeof document&&window.visualViewport,wl=0;function wu(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function wc(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function wd(e,t){t||!ws?wf(e):ws.addEventListener("resize",()=>wf(e),{once:!0})}function wf(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=bf(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect(),n=r.getBoundingClientRect();if(n.top<t.top||n.bottom>t.top+r.clientHeight){let r=t.bottom;ws&&(r=Math.min(r,ws.offsetTop+ws.height));let o=n.top-t.top-((r-t.top)/2-n.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}r=e.parentElement}}var wp={};function wh(e){var t;let{onDismiss:r,...n}=e,o=bi(n,gt((t=wp)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cz().createElement(bu,null,cz().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function wm(e,t,r){hP(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{n||(0,yr.flushSync)(()=>{r()})}),()=>{n=!0}}},[e,t,r])}wp={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let wy=null,wg=new Set,wb=new Map,wv=!1,w_=!1;function ww(e,t){for(let r of wg)r(e,t)}function wx(e){wv=!0,e.metaKey||!mv()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(wy="keyboard",ww("keyboard",e))}function wS(e){wy="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(wv=!0,ww("pointer",e))}function wE(e){mP(e)&&(wv=!0,wy="virtual")}function wD(e){e.target!==window&&e.target!==document&&e.isTrusted&&(wv||w_||(wy="virtual",ww("virtual",e)),wv=!1,w_=!1)}function wO(){wv=!1,w_=!0}function wP(e){if("u"<typeof window||wb.get(me(e)))return;let t=me(e),r=h7(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){wv=!0,n.apply(this,arguments)},r.addEventListener("keydown",wx,!0),r.addEventListener("keyup",wx,!0),r.addEventListener("click",wE,!0),t.addEventListener("focus",wD,!0),t.addEventListener("blur",wO,!1),"u">typeof PointerEvent?(r.addEventListener("pointerdown",wS,!0),r.addEventListener("pointermove",wS,!0),r.addEventListener("pointerup",wS,!0)):(r.addEventListener("mousedown",wS,!0),r.addEventListener("mousemove",wS,!0),r.addEventListener("mouseup",wS,!0)),t.addEventListener("beforeunload",()=>{wC(e)},{once:!0}),wb.set(t,{focus:n})}let wC=(e,t)=>{let r=me(e),n=h7(e);t&&n.removeEventListener("DOMContentLoaded",t),wb.has(r)&&(r.HTMLElement.prototype.focus=wb.get(r).focus,n.removeEventListener("keydown",wx,!0),n.removeEventListener("keyup",wx,!0),n.removeEventListener("click",wE,!0),r.removeEventListener("focus",wD,!0),r.removeEventListener("blur",wO,!1),"u">typeof PointerEvent?(n.removeEventListener("pointerdown",wS,!0),n.removeEventListener("pointermove",wS,!0),n.removeEventListener("pointerup",wS,!0)):(n.removeEventListener("mousedown",wS,!0),n.removeEventListener("mousemove",wS,!0),n.removeEventListener("mouseup",wS,!0)),wb.delete(r))};function wk(e){let[t,r]=vi(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,cH.useCallback)(()=>{r(!0)},[r]),o=(0,cH.useCallback)(()=>{r(!1)},[r]),i=(0,cH.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}"u">typeof document&&("loading"!==(m=h7(void 0)).readyState?wP(void 0):m.addEventListener("DOMContentLoaded",()=>{wP(void 0)}));let wT=(0,cH.createContext)(null),wj=(0,cH.createContext)(null),wR=(0,cH.forwardRef)(function(e,t){[e,t]=hG(e,t,wT);let r=(0,cH.useContext)(_A),n=wk(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,cH.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return wm(e,o,(0,cH.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,cH.useContext)(yx),{direction:s}=yW();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cz().createElement(cz().Fragment,null,t)}return!o||o.isOpen||i?cz().createElement(wM,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function wM({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,cH.useRef)(null),[s,l]=(0,cH.useState)(0),u=(0,cH.useRef)(null),c=(0,cH.useContext)(wj),f=c&&"SubmenuTrigger"===n.trigger;hP(()=>{a.current&&e.isOpen&&l(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:c,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,l=(0,cH.useRef)(void 0);(0,cH.useEffect)(()=>{if(o&&!wo.includes(t))return wo.push(t),()=>{let e=wo.indexOf(t);e>=0&&wo.splice(e,1)}},[o,t]);let u=()=>{wo[wo.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,cH.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=ye(e=>{r&&wn(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=ye(e=>{r&&r(e)});(0,cH.useEffect)(()=>{let e=i.current;if(n)return;let r=h7(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&wn(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("click",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("click",n,!0)}}},[t,n])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(mr(e)))&&(wo[wo.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let r=wo[wo.length-1];l.current=r,(!s||s(mr(e)))&&r===t&&e.stopPropagation()}});let{focusWithinProps:c}=ym({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||vN(e.relatedTarget,vT))&&(!s||s(e.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:r}=yW(),{arrowSize:n,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,cH.useState)(null),x=[h,l,i.current,o.current,a?.current,s.current,u,c,d,f,p,m,r,g,b,n],S=(0,cH.useRef)(wr?.scale);(0,cH.useEffect)(()=>{m&&(S.current=wr?.scale)},[m]);let E=(0,cH.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||wr?.scale!==S.current)return;let t=null;if(s.current&&mn(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),r=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-r.top}).offset>r.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-r.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,r,{placement:n,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:f,arrowSize:p=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!_7(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!_7(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?_8(o,!1):_9(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=_8(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let S=_1(u,m),E=_1(y,m);if("BODY"!==u.tagName&&"HTML"!==u.tagName||g)r=("BODY"===u.tagName||"HTML"===u.tagName)&&g?{top:0,left:0,width:0,height:0}:_9(u,y,!1);else{let e=_5(y,!1);r={top:-(e.top-S.top),left:-(e.left-S.left),width:0,height:0}}return function(e,t,r,n,o,i,a,s,l,u,c,d,f,p,h,m,y){var g,b,v;let w,x,S,E=_4(e),{size:D,crossAxis:O,crossSize:P,placement:C,crossPlacement:k}=E,T=_2(t,a,r,E,u,c,l,d,p,h,s),j=u,R=_6(a,l,t,n,o+u,E,s,m);if(i&&r[D]>R){let e=_4(`${_Z[C]} ${k}`),i=_2(t,a,r,e,u,c,l,d,p,h,s);_6(a,l,t,n,o+u,e,s,m)>R&&(E=e,T=i,j=u)}let M="bottom";"top"===E.axis?"top"===E.placement?M="top":"bottom"===E.placement&&(M="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?M="bottom":"bottom"===E.crossPlacement&&(M="top"));let A=_3(O,T[O],r[P],a,s,o,l);T[O]+=A;let N=(g=T,b=r.height,v=M,w=(null!=g.top?g.top:s[_X.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?l.top:0,S={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,S.bottom-w-((n.top??0)+(n.bottom??0)+o)):Math.max(0,w+b-S.top-((n.top??0)+(n.bottom??0)+o)));f&&f<N&&(N=f),r.height=Math.min(r.height,N),A=_3(O,(T=_2(t,a,r,E,j,c,l,d,p,h,s))[O],r[P],a,s,o,l),T[O]+=A;let I={},$=t[O]-T[O]-n[_Y[O]],L=$+.5*t[P],F=p/2+h,B="left"===_Y[O]?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),V=r[P]-B-p/2-h,U=_z(L,t[O]+p/2-(T[O]+n[_Y[O]]),t[O]+t[P]-p/2-(T[O]+n[_Y[O]]));I[O]=_z(U,F,V),({placement:C,crossPlacement:k}=E),p?$=I[O]:"right"===k?$+=t[P]:"center"===k&&($+=t[P]/2);let W="left"===C||"top"===C?r[D]:0,K={x:"top"===C||"bottom"===C?$:W,y:"left"===C||"right"===C?$:W};return{position:T,maxHeight:N,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:C,triggerAnchorPoint:K}}(n,v,w,x,s,l,S,E,r,c,d,!!b&&"static"!==b,f,p,h,mt(u,y),m)}({placement:(e=l,"rtl"===r?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:u,shouldFlip:c,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:n??(a?.current?_5(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),r=s.current.getBoundingClientRect(),n=e[t.type]-r[t.type];s.current.scrollTop+=n-t.offset}w(v)},x);hP(E,x),hP(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),wt({ref:i,onResize:E}),wt({ref:o,onResize:E});let D=(0,cH.useRef)(!1);hP(()=>{let e,t=()=>{D.current=!0,clearTimeout(e),e=setTimeout(()=>{D.current=!1},500),E()},r=()=>{D.current&&t()};return wr?.addEventListener("resize",t),wr?.addEventListener("scroll",r),()=>{wr?.removeEventListener("resize",t),wr?.removeEventListener("scroll",r)}},[E]);let O=(0,cH.useCallback)(()=>{D.current||y?.()},[y,D]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,cH.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=mr(e);if(!t.current||r instanceof Node&&!mt(r,t.current)||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return;let o=n||we.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:o,isOpen:m,onClose:y&&O}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;hP(()=>{if(!t){let e,t,r,n,o,i,a,s;return 1==++wl&&(d=mx()?(t=wu(document.documentElement,"overflow","hidden"),r=!1,n=document.createElement("style"),(o=m8())&&(n.nonce=o),n.textContent=`
23
23
  @layer {
24
24
  * {
25
25
  overscroll-behavior: contain;
26
26
  }
27
- }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&wa(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||wd(this,r)},a=hO(wc(document,"touchstart",t=>{let n=mr(t);e=bd(n)?n:bf(n,!0),r=!1;let o=n.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(n,!0)&&(r=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(r=!0),"selectionStart"in n&&"selectionEnd"in n&&n.selectionStart<n.selectionEnd&&n.ownerDocument.activeElement===n&&(r=!0)},{passive:!1,capture:!0}),wc(document,"touchmove",t=>{if(2!==t.touches.length&&!r){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),wc(document,"blur",e=>{let t=mr(e),r=e.relatedTarget;if(r&&wa(r))r.focus({preventScroll:!0}),wd(r,wa(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),HTMLElement.prototype.focus=i}):hO((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?wu(document.documentElement,"scrollbarGutter","stable"):wu(document.documentElement,"paddingRight",`${s}px`)),wu(document.documentElement,"overflow","hidden"))),()=>{0==--wl&&d()}}},[t])}({isDisabled:i||!t.isOpen}),(0,cH.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=_H[_H.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,f,p,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=me(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&_W,l=new Set(e),u=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(mt(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=vP(h7(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&f(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)f(e),e=r.nextNode()}},f=e=>{let r=_K.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),u.add(e),_K.set(e,r+1))},_H.length&&_H[_H.length-1].disconnect(),d(a),(p=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...l,...u].some(e=>mt(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){p.observe(a,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},_H.push(h),()=>{for(let e of(p.disconnect(),u)){let t=_K.get(e);null!=t&&(1===t?(c(e,!1),_K.delete(e)):_K.set(e,t-1))}h===_H[_H.length-1]?(_H.pop(),_H.length&&_H[_H.length-1].observe()):_H.splice(_H.indexOf(h),1)}}},[i,t.isOpen,n,o]),{popoverProps:hU(c,p),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:y}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?c:u},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,cH.useState)(!0),o=r&&t;return hP(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),wm(e,o,(0,cH.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=hH({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,S]=(0,cH.useState)(!1);hP(()=>{g.current&&S(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,cH.useEffect)(()=>{var e;let t,r;x&&g.current&&!g.current.contains(document.activeElement)&&(r=((e=document)=>e.activeElement)(t=h7(e=g.current)),"virtual"===wy?mG(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&h8(e)}):h8(e))},[x,g]);let E={...p.style,...v.style},D=cz().createElement("div",{...hU(h5(n),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:E,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&cz().createElement(wh,{onDismiss:e.close}),cz().createElement(_U.Provider,{value:{...m,placement:y,ref:a}},v.children),cz().createElement(wh,{onDismiss:e.close}));return f?cz().createElement(_R,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==c?void 0:c.current)?i:void 0},D):cz().createElement(_R,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cz().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),cz().createElement("div",{ref:u,style:{display:"contents"}},cz().createElement(wT.Provider,{value:u},D)))}function wA(e){return e?.start!=null&&null!=e.end}let wN=(0,cH.createContext)(null),wI=(0,cH.createContext)(null),w$=(0,cH.createContext)(null),wL=(0,cH.createContext)(null),wF=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hq(e,t,wN);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=wk(e),[r,n]=vi(e.value,e.defaultValue||null,e.onChange),[o]=(0,cH.useState)(r),i=r||e.placeholderValue||null,[a,s]=_p(i,e.granularity),l=null!=r?r.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,f]=(0,cH.useState)(null),[p,h]=(0,cH.useState)(null);if(r&&(d=r,"hour"in r&&(p=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=r?.calendar.identifier==="gregory"&&"BC"===r.era,y=(0,cH.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,cH.useMemo)(()=>_s(r,g,b,v,y),[r,g,b,v,y]),x=_e({...e,value:r,builtinValidation:w}),S=x.displayValidation.isInvalid,E=e.validationState||(S?"invalid":null),D=(e,t)=>{n("timeZone"in t?t.set(gV(e)):gU(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:p,setDateValue:r=>{let o="function"==typeof c?c():c;u?p||o?D(r,p||_d(e.defaultValue||e.placeholderValue)):f(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(n){!n&&!r&&d&&u&&D(d,p||_d(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:E,isInvalid:S,formatValue:(e,t)=>l?new yZ(e,_c(t,y)).format(l):"",getDateFormatter:(e,t)=>new yZ(e,_c({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,cH.useRef)(null),[l,u]=hG(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=hF(),i=hF(),a=hF(),s=gt((n=vG)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=vJ({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=vY(t,r),y=f["aria-labelledby"]||f.id,{locale:g}=yW(),b=t.formatValue(g,{month:"long"}),v=bb(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=h5(e),S=(0,cH.useMemo)(()=>vW(r),[r]),E=(0,cH.useRef)(!1),{focusWithinProps:D}=ym({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mt(document.getElementById(i),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:hU(x,m,f,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{S.focusFirst()}},fieldProps:{...f,id:a,[v1]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[v7]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...hY(e),label:u,validationBehavior:i},a,s),[v,w]=(0,cH.useState)(null),x=(0,cH.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wt({ref:s,onResize:x});let{focusProps:S,isFocused:E,isFocusVisible:D}=yy({within:!0}),O=hH({...e,values:{state:a,isFocusWithin:E,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=h5(e);return delete P.id,cz().createElement(hK,{values:[[w$,a],[vS,{...c,ref:s,isInvalid:a.isInvalid}],[_S,f],[yD,{...p,isPressed:a.isOpen}],[_B,{...d,ref:l,elementType:"span"}],[vd,m],[_A,a],[wj,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[_M,h],[yC,{slots:{description:y,errorMessage:g}}],[_I,b]]},cz().createElement("div",{...S,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),wB=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hq(e,t,wI);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=wk(e),[r,n]=vi(e.value,e.defaultValue||null,e.onChange),[o]=(0,cH.useState)(r),[i,a]=(0,cH.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,l=e=>{a(s=e||{start:null,end:null}),wA(s)?n(s):n(null)},[u,c]=_p(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,f=e.shouldCloseOnSelect??!0,[p,h]=(0,cH.useState)(null),[m,y]=(0,cH.useState)(null);s&&wA(s)&&(p=s,"hour"in s.start&&(m=s));let g=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(gV(e.start)):gU(e.start,t.start),end:"timeZone"in t.end?t.end.set(gV(e.end)):gU(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=r=>{let n="function"==typeof f?f():f;d?wA(r)&&(n||m?.start&&m?.end)?g(r,{start:m?.start||_d(e.placeholderValue),end:m?.end||_d(e.placeholderValue)}):h(r):wA(r)?(l(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{wA(p)&&wA(e)?g(p,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,cH.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:S,maxValue:E,isDateUnavailable:D}=e,O=(0,cH.useMemo)(()=>{var e;let t;return e=s,t=_o(_s(e?.start??null,S,E,D,x),_s(e?.end??null,S,E,D,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=_o(t,{isInvalid:!0,validationErrors:[(y6.getGlobalDictionaryForPackage("@react-stately/datepicker")||_i).getStringForLocale("rangeReversed",_a())],validationDetails:{...v6,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,S,E,D,x]),P=_e({...e,value:r,name:(0,cH.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),C=P.displayValidation.isInvalid,k=e.validationState||(C?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:p,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:p?.end??null}):b({start:p?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&wA(p)&&d&&g(p,{start:m?.start||_d(e.placeholderValue),end:m?.end||_d(e.placeholderValue)}),t.setOpen(r)},validationState:k,isInvalid:C,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=_c(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),f=new yZ(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yZ(t,_c(r,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yZ(e,_c({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,cH.useRef)(null),[l,u]=hG(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n;let o=gt((n=vG)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=vJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=u["aria-labelledby"]||u.id,{locale:p}=yW(),h=t.formatValue(p,{month:"long"}),m=bb(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":f},g={"aria-label":o.format("endDate"),"aria-labelledby":f},b=hF(),v=hF(),w=vY(t,r),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,cH.useMemo)(()=>vW(r,{accept:e=>e.id!==b}),[r,b]),E={[v3]:S,[v1]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=h5(e),O=(0,cH.useRef)(!1),{focusWithinProps:P}=ym({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mt(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,cH.useRef)(v8),k=(0,cH.useRef)(v8);return{groupProps:hU(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...l,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${f}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${f}`},startFieldProps:{...y,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[v7]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(_o(e,k.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[v7]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(_o(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...hY(e),label:u,validationBehavior:i},a,s),[w,x]=(0,cH.useState)(null),S=(0,cH.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);wt({ref:s,onResize:S});let{focusProps:E,isFocused:D,isFocusVisible:O}=yy({within:!0}),P=hH({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=h5(e);return delete C.id,cz().createElement(hK,{values:[[wL,a],[vS,{...c,ref:s,isInvalid:a.isInvalid}],[yD,{...h,isPressed:a.isOpen}],[_B,{...d,ref:l,elementType:"span"}],[vf,y],[_A,a],[wj,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[_M,m],[_S,{slots:{start:f,end:p}}],[yC,{slots:{description:g,errorMessage:b}}],[_I,v]]},cz().createElement("div",{...E,...C,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function wV(e){return cz().createElement(yU,e)}function wU(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof gk||e instanceof gT||e instanceof gR)return t?gW(e,t):e;{let r=fS()(e).toDate(),n=new gk(r.getFullYear(),r.getMonth()+1,r.getDate());return t?gW(n,t):n}}function wW(e){if(e)return e.toDate(g1())}function wK(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function wH(e){let t=e??"",r=wK(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function wz(){let e=window.i18next.language,t=wK(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var wq=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ei||"en-US"),wG=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},wY={};for(let e=1;e<100;e++)wY[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var wZ={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},wJ="[1234567890一二三四五六七八九〇\\d]",wQ={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},wX={},w0={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},w1={zone:w0,year:wY,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},w3={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(w0).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},w4={...w3,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},w2={},w6=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=wq){return w2[t.toLowerCase()]||(w2[t.toLowerCase()]=new e(t)),w2[t.toLowerCase()]}constructor(e=wq){this.locale=e,this.lookups={...w1},this.vars={...w3};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=wQ:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(wX[e])return wX[e];if("fullwide"===e||"hanidec"===e)return{group:wJ,lookup:{...wQ}};let t=wZ[e];if(!t)return{group:"\\d",lookup:{...wQ}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return wX[e]={group:`[${r}-${n}]`,lookup:o},wX[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,w4)w4.hasOwnProperty(r)&&(this.vars[r]=w4[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},w5=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],w8={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},w9=()=>new Date;function w7(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var xe=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},xt=["year","month","day","hour","minute","second","millisecond","offset"],xr={};function xn(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var xo=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],xi={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...xo],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:xo,id:xo,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function xa(e,t=wq){let r=function(e){if(!xr[e]){var t,r;let n,o,i=w6.factory(e);xr[e]=new xe({doneChecker:xn,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${wJ}{2,4})\\s*\u5E74\\s*(${wJ}{1,2})\\s*\u6708\\s*(${wJ}{1,2})\\s*\u65E5$`),handler:w7(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:w7(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:w7(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=w9(),r=e[1].toLowerCase();switch(r){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let n={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===r&&(n.hour=t.getUTCHours(),n.minute=t.getUTCMinutes(),n.second=t.getUTCSeconds(),n.millisecond=t.getUTCMilliseconds()),console.log("today=>",r,n),n}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?w8[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=w9();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:w7(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:w7(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:w7(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:w7(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:w7(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:w7(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:w7(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:w7(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:w7(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:w7(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:w7(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:w7(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:w7(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:w7(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:w7(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:w7(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:w7(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:w7(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:w7(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:w7(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:w7(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:w7(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:w7(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:w7(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:w7(["zone"])}],o=i.baseName.slice(0,5),w5.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(xt.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=wY[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return xr[e]}(t),n=function(e,t){let r=xi[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function xs(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new wG(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new wG(t.valueOf()-60*e.offset*1e3):t}function xl(e,t=wq){let r=xa(e,t),n=r.invalid?new wG(NaN):xs(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function xu(e,t=wq){return e instanceof Date?new wG(e.valueOf()):"number"==typeof e?new wG(e):xl(e,t)}Date.fromString=wG.fromString=xl,Date.fromAny=wG.fromAny=xu,"u">typeof window&&(window.anyDateParser={fromString:xl,fromAny:xu,fromObject:xs,attempt:xa});var xc=r(5238),xd=r(83826);let xf=function(e){return null==e};function xp(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}fx.extend(fE),fx.extend(xd),fx.extend(xc);let xh="YYYY-MM-DDTHH:mm:ss.SSSZZ";function xm(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fx(e,xh).isValid()}function xy(e){return fx(e).isToday()}function xg(e){return xm(e)?fx(e,xh).toDate():null}function xb(e,t=!1){let r=fx(e);return t&&(r=r.utc()),r.format(xh)}function xv(e){return fx(e).toDate()}var x_=new WeakMap;let xw=new class{register(e,t){xp(this,x_).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(xp(this,x_).has(t))return xp(this,x_).get(t)}if(e.language&&xp(this,x_).has(e.language))return xp(this,x_).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return xp(this,x_).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,x_,{writable:!0,value:new Map})}};function xx(e,t){xw.register(e,t)}function xS(e){let t=e??wz();return xw.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let xE={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function xD(e,t={}){let r=xa(e,wz());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!xf(r.day)&&xf(r.month)&&(r=Object.assign({},ts(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},ts(r,"day"),{date:r.day}));let n=fx().set(r).toDate();return xf(r.year)&&(t.year=!1),xf(r.month)&&(t.month=!1),xf(r.date)&&(t.day=!1),xO(n,t)}function xO(e,t){let r,n=t?.locale??wz(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...xE,...{noToday:"am"===o.language},...t},p={calendar:i??xS(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},h=fx(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(xP("-"))),"wide"==a&&(t=t.map(xP(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${xC(e)}`),r}let xP=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function xC(e){return e.toLocaleTimeString(wz(),{hour:"2-digit",minute:"2-digit"})}function xk(e,t){return xO(e,{...t,time:!0})}function xj(e,t){let r=xS("string"==typeof t?new Intl.Locale(t):t);return r?gW(e,b5(r)):e}function xT(e,t){return new Intl.DurationFormat(wz(),t).format(e)}function xR(e,t){if(null==e)return null;if("string"==typeof e){let r=xa(e,wz());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...ts(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...ts(r,"day"),...{date:r.day}}),fx(t).set(r))}return fx(e)}let xM=["years","months","days","hours","minutes","seconds"],xA={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},xN={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xI(e,t=fx(),r){let n,o=fx(t),i=xR(e,o);if(null==i)return null;if("string"==typeof r){let e=xA[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?xA[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=xM.indexOf(r);for(let o=0;o<xM.length;o++){let i=xM[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):xA[s]??s,function(e,t,r,n){let o=xM.indexOf(r),i=xM.indexOf(n),a=xM.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...xN};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[xA[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let x$={style:"short",localeMatcher:"lookup"};function xL(e,t=fx(),r){let n=xI(e,t,r);return null==n?null:xT(n,"object"==typeof r&&r.formatOptions?{...x$,...r.formatOptions}:x$)}let xF=(0,cH.createContext)(null);function xB(){let e=dW({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cH.useMemo)(()=>{let t=wz();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cH.useMemo)(()=>{let e=xS(t);return void 0!==e?b5(e):void 0},[t]),n=(0,cH.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cH.useMemo)(()=>r?gW(gJ(g1()),r):gJ(g1()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xV=new gk(1793,1,1);var xU={};function xW(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function xK(e={}){let{locale:t}=yW();return(0,cH.useMemo)(()=>new(0,_b.K)(t,e),[t,e])}xU={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xH={};xH={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let xz=()=>{};function xq(e){var t;let r=(0,cH.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=gt((t=xH)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,cH.useRef)(!1),b=(0,cH.useCallback)(()=>{clearTimeout(r.current),g.current=!1},[]),v=ye(()=>{b()});(0,cH.useEffect)(()=>()=>v(),[]);let w=(0,cH.useRef)(!1),x=()=>{w.current=!0},S=()=>{w.current=!1},E=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,cH.useEffect)(()=>{w.current&&(yK&&yK.clear("assertive"),yH(E,"assertive"))},[E]);let D=(0,cH.useCallback)(()=>{b()},[b]),O=ye(c??xz),P=ye(f??xz),C=ye(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(O(),k(60))}),k=ye(e=>{v(),g.current=!0,r.current=window.setTimeout(C,e)}),j=ye(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(P(),T(60))}),T=ye(e=>{v(),g.current=!0,r.current=window.setTimeout(j,e)}),R=e=>{e.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:A}=yt(),N=(0,cH.useRef)(!1),[I,$]=(0,cH.useState)(null);(0,cH.useEffect)(()=>{"touch"===I?k(600):I&&k(400)},[I]);let[L,F]=(0,cH.useState)(null);return(0,cH.useEffect)(()=>{"touch"===L?T(600):L&&T(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":E,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(M(window,"pointercancel",D,{capture:!0}),N.current=!1,$("touch")),M(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(N.current=!0),A(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&N.current&&c?.(),N.current=!1,$(null)},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(f?.(),F("mouse")):(M(window,"pointercancel",D,{capture:!0}),N.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(N.current=!0),A(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&N.current&&f?.(),N.current=!1,F(null)},onFocus:x,onBlur:S}}}let xG=null;var xY=r(66284);function xZ(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let xJ=(0,cH.createContext)(null),xQ=(0,cH.createContext)(null),xX=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hq(e,t,xJ);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=yW(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let f=(0,cH.useCallback)(e=>void 0===n||isNaN(n)?_z(e,t,r):_G(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=f(i)),isNaN(a)||"snap"!==d||(a=f(a));let[p,h]=vi(i,isNaN(a)?NaN:a,s),[m]=(0,cH.useState)(p),[y,g]=(0,cH.useState)(()=>isNaN(p)?"":new(0,_b.K)(l,o).format(p)),b=(0,cH.useMemo)(()=>new(0,xY.d)(l,o),[l,o]),v=(0,cH.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,cH.useMemo)(()=>new(0,_b.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,cH.useMemo)(()=>w.resolvedOptions(),[w]),S=(0,cH.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=_e({...e,value:p}),D=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(D=.01);let[O,P]=(0,cH.useState)(p),[C,k]=(0,cH.useState)(l),[j,T]=(0,cH.useState)(o);Object.is(p,O)&&l===C&&o===j||(g(S(p)),P(p),k(l),T(o));let R=(0,cH.useMemo)(()=>b.parse(y),[b,y]),M=(e,n=0)=>{if(isNaN(R))return _G(isNaN(n)?0:n,t,r,D);{let n=_G(R,t,r,D);return"+"===e&&n>R||"-"===e&&n<R?n:_G(xZ(e,R,D),t,r,D)}},A=(0,cH.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===r||isNaN(r)||_G(R,t,r,D)>R||xZ("+",R,D)<=r),[u,c,t,r,D,R]),N=(0,cH.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||_G(R,t,r,D)<R||xZ("-",R,D)>=t),[u,c,t,r,D,R]);return{...E,validate:e=>b.isValidPartialNumber(e,t,r),increment:()=>{let e=M("+",t);e===p&&g(S(e)),h(e),E.commitValidation()},incrementToMax:()=>{null!=r&&(h(_G(r,t,r,D)),E.commitValidation())},decrement:()=>{let e=M("-",r);e===p&&g(S(e)),h(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),E.commitValidation())},canIncrement:A,canDecrement:N,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":S(p));return}if(isNaN(r))return void g(S(p));let n="snap"===d?f(r):r,o=(n=b.parse(S(n)))!==p;h(n),g(S(void 0===i?n:p)),o&&E.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,cH.useRef)(null),[u,c]=hG(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,l,u,c,d;let f,{id:p,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:S,formatOptions:E,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:C,onKeyUp:k,description:j,errorMessage:T,isWheelDisabled:R,...M}=e,{increment:A,incrementToMax:N,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=gt((n=xU)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,cH.useCallback)(()=>{let e=r.current?.value??"";(0,yr.flushSync)(()=>{B()}),r.current?.value!==e&&yH(r.current?.value??"","assertive")},[B,r]),K=hF(p),{focusProps:H}=mZ({onBlur(){W()}}),z=xK(E),q=(0,cH.useMemo)(()=>z.resolvedOptions(),[z]),G=xK({...E,currencySign:void 0}),Y=(0,cH.useMemo)(()=>isNaN(L)?"":G.format(L),[G,L]),{spinButtonProps:Z,incrementButtonProps:J,decrementButtonProps:Q}=xq({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:A,onIncrementToMax:N,onDecrement:I,onDecrementToMin:$,value:L,textValue:Y}),[X,ee]=(0,cH.useState)(!1),{focusWithinProps:et}=ym({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cH.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);bc(t,"wheel",n?void 0:o)}({onScroll:(0,cH.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?A():e.deltaY<0&&I())},[I,A]),isDisabled:R||y||g||!X},r);let er=(q.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";m_()?en?eo="text":er&&(eo="decimal"):mD()&&(en?eo="numeric":er&&(eo="decimal"));let ei=h5(e),ea=(0,cH.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,yr.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ef,errorMessageProps:ep}=function(e,t,r){let n=ye(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cH.useEffect)(()=>{if(!xW()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=xW()?null:e=>{let r=mr(e).value.slice(0,mr(e).selectionStart)+e.data+mr(e).value.slice(mr(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=vi(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=m0(e,t),d=_e({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=vJ({...e,isInvalid:f,errorMessage:e.errorMessage||p}),v=h5(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,cH.useState)(l);return vQ(t,e.defaultValue??x,u),vX(e,d,t),{labelProps:m,inputProps:hU(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(mr(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cz().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,cH.useRef)(null);return{inputProps:hU(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...M,...ei,name:void 0,form:void 0,label:S,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[v7]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:K,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onKeyDown:(0,cH.useMemo)(()=>hO(ea,C),[ea,C]),onKeyUp:k,onPaste:t=>{e.onPaste?.(t);let r=mr(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,r);vQ(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,hP(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!xG&&"u">typeof document&&((xG=document.createElement("input")).type="number"),!xG))return;xG.min=null==l||isNaN(l)?"":String(l),xG.max=null==u||isNaN(u)?"":String(u),xG.step=null==c||isNaN(c)?"":String(c),xG.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&xG.validity.valid,r=e.validationMessage||xG.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:xG.validity.rangeOverflow,rangeUnderflow:xG.validity.rangeUnderflow,stepMismatch:xG.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(n),"native"!==i||xG.validity.valid||e.setCustomValidity(xG.validationMessage)});let eh=hU(Z,H,ed,{role:null,"aria-roledescription":mx()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(f=null!=e.label?ec.id:e["aria-labelledby"]);let eg=hF(),eb=hF(),ev=hU(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:f&&!m?eg:null,"aria-labelledby":f&&!m?`${eg} ${f}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),e_=hU(Q,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:f&&!h?eb:null,"aria-labelledby":f&&!h?`${eb} ${f}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:e_,errorMessageProps:ep,descriptionProps:ef,isInvalid:es,validationErrors:el,validationDetails:eu}}({...hY(e),label:c,validationBehavior:i},s,l),v=hH({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=h5(e);return delete w.id,cz().createElement(hK,{values:[[xQ,s],[vS,f],[vD,{...p,ref:l}],[_B,{...d,ref:u}],[yD,{slots:{increment:h,decrement:m}}],[yC,{slots:{description:y,errorMessage:g}}],[_I,b]]},cz().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&cz().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function x0(e,t){return Number.parseInt(xO(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let x1=(0,cH.forwardRef)(function(e,t){let{className:r}=e,n=(0,cH.useContext)(vp),o=(0,cH.useContext)(vh),i=n??o,a=(0,cH.useContext)(xF),s=g1(),l=xO(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=x0(i.visibleRange.start.toDate(s),a),c=i.maxValue?x0(i.maxValue.toDate(s),a):void 0,d=i.minValue?x0(i.minValue.toDate(s),a):void 0,f=(0,cH.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,fR.jsxs)("span",{ref:t,className:r,children:[(0,fR.jsx)("span",{children:l}),(0,fR.jsxs)(xX,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,fR.jsx)(vO,{}),(0,fR.jsxs)(vE,{children:[(0,fR.jsx)(yO,{slot:"increment",children:(0,fR.jsx)(f9,{size:8})}),(0,fR.jsx)(yO,{slot:"decrement",children:(0,fR.jsx)(f6,{size:8})})]})]})]})}),x3="-esm-form-builder__datepicker-module__inputGroup___-wpzr",x4="-esm-form-builder__datepicker-module__inputSegment___ocu7L",x2="-esm-form-builder__datepicker-module__dateInputWrapper___909Km",x6="-esm-form-builder__datepicker-module__invalidText___oHJHi",x5="-esm-form-builder__datepicker-module__flatButton___i9LDo",x8="-esm-form-builder__datepicker-module__flatButtonMd___VZMkc",x9="-esm-form-builder__datepicker-module__flatButtonSm___VA5wy",x7="-esm-form-builder__datepicker-module__flatButtonLg___MnYLl";function Se({children:e}){let t=(0,cH.useContext)(w$),r=(0,cH.useContext)(wL),n=t??r,o=fd(()=>n?.close());return(0,fR.jsx)(_N,{className:"-esm-form-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let St=(0,cH.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,fR.jsx)(wR,{ref:o,className:"-esm-form-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,fR.jsx)(Se,{children:(0,fR.jsxs)(i?vy:vm,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,fR.jsxs)("header",{className:"-esm-form-builder__datepicker-module__header___+fi16",children:[(0,fR.jsx)(yO,{className:fA()(x5,x8),slot:"previous",children:(0,fR.jsx)(pi,{size:16})}),(0,fR.jsx)(x1,{className:"-esm-form-builder__datepicker-module__monthYear___mGhot"}),(0,fR.jsx)(yO,{className:fA()(x5,x8),slot:"next",children:(0,fR.jsx)(pa,{size:16})})]}),(0,fR.jsx)(vb,{className:"-esm-form-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,fR.jsx)(vx,{className:fA()("cds--date-picker__day",{"-esm-form-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),Sr=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(w$),[n,o]=hq({slot:e.slot},t,_S),{locale:i}=yW(),a=_x({...n,locale:i,createCalendar:b5}),s=(0,cH.useRef)(null),{fieldProps:l,inputProps:u}=v4({...n,inputRef:s},a,o),c=(0,cH.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,fR.jsxs)(hK,{values:[[_E,a],[vD,{...u,ref:s}],[vS,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,fR.jsx)(vE,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,cH.cloneElement)(e.children(t),{key:r}))}),(0,fR.jsx)(vO,{})]})}),Sn=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(w$),n=(0,cH.useContext)(wL);return(r??n).isInvalid?(0,fR.jsx)(hp,{ref:t,size:16,...e}):(0,fR.jsx)(f2,{ref:t,size:16,...e})});class So{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Si=new Map,Sa=(0,cH.forwardRef)(function({segment:e,...t},r){let n=(0,cH.useContext)(_E),o=hS(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,cH.useRef)(""),{locale:l,direction:u}=yW(),c=function(){var e;let{locale:t}=yW(),r=ge((e=vG)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cH.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new So(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=v0.get(t),m=e.isPlaceholder?"":e.text,y=(0,cH.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=y1({month:"long",timeZone:y.timeZone}),b=y1({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=xq({value:e.value??void 0,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,cH.useMemo)(()=>new(0,xY.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:S}=(n=function(e){let{locale:t}=yW(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Si.has(r))return Si.get(r);let n=new Intl.Collator(t,e);return Si.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cH.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,cH.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,cH.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,cH.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),E=y1({hour:"numeric",hour12:!0}),D=(0,cH.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),O=(0,cH.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),P=y1({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,cH.useMemo)(()=>{if("era"!==e.type)return[];let r=gW(new gk(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),k=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(S(D,r))t.setSegment("dayPeriod",0);else if(S(O,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=C.find(e=>S(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};bc((0,cH.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mt(r.current,e?.anchorNode)&&e.collapse(r.current)});let j=(0,cH.useRef)("");bc(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":j.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&k(n.data)}}),bc(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=j.current),null!=n&&(S(D,n)||S(O,n))&&k(n))}),hP(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let T=mx()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cH.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let R=hF(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),N=bi({"aria-label":`${A}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:hU(v,N,{id:R,...T,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(cz().version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(mv()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&bm(r.current,{containingElement:bf(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=yy(),{hoverProps:u,isHovered:c}=yw({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,cH.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cH.useCallback)(e=>{e.stopPropagation()},[]);return(0,fR.jsx)("span",{...hU(h5(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),Ss={short:!1,size:"md"},Sl=(0,cH.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:g,...b}={...Ss,...e},{calendar:v,intlLocale:w,today_:x}=xB(),S=(0,cH.useId)(),E=!!(u??l),D=(0,cH.useMemo)(()=>wU(n,v),[n,v]),O=(0,cH.useMemo)(()=>wU(g,v,!0),[g,v]),P=(0,cH.useMemo)(()=>wU(d,v),[d,v]),C=(0,cH.useMemo)(()=>wU(f??xV,v),[f,v]),k=(0,cH.useMemo)(()=>i||s,[i,s]),j=(0,cH.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(wW(e)))),[h,p]);return(0,fR.jsx)(wV,{locale:w.toString(),children:(0,fR.jsx)("div",{className:fA()("cds--form-item",r),children:(0,fR.jsx)(hK,{values:[[xF,w]],children:(0,fR.jsxs)(wF,{className:fA()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:k,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:j,children:[(0,fR.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,fR.jsx)(_V,{className:fA()("cds--label",{"cds--label--disabled":o}),htmlFor:S,children:u??l}),(0,fR.jsxs)(vE,{className:x3,children:[(0,fR.jsx)(Sr,{id:E?S:void 0,ref:t,className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-form-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===y,"-esm-form-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===y||!y||0===y.length,"-esm-form-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===y}),children:e=>"era"!==e.type?(0,fR.jsx)(Sa,{className:x4,segment:e}):(0,fR.jsx)(cz().Fragment,{})}),(0,fR.jsx)(yO,{className:fA()(x5,{[x9]:"sm"===y,[x8]:"md"===y||!y||0===y.length,[x7]:"lg"===y}),children:(0,fR.jsx)(Sn,{})})]}),(0,fR.jsx)(_$,{className:x6,children:a})]}),(0,fR.jsx)(St,{variant:"single",today_:x})]})})})})}),Su=(0,cH.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=xB(),w=(0,cH.useId)(),x=!!(s??a),S=(0,cH.useMemo)(()=>{if(h)return{start:wU(h[0],g,!1),end:wU(h[1],g,!1)}},[h,g]),E=(0,cH.useMemo)(()=>{if(t)return{start:wU(t[0],g,!1),end:wU(t[1],g,!1)}},[t,g]),D=(0,cH.useMemo)(()=>wU(c??xV,g,!0),[c,g]),O=(0,cH.useMemo)(()=>wU(u,g,!0),[u,g]),P=(0,cH.useMemo)(()=>r||i,[r,i]),C=(0,cH.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([wW(e.start),wW(e.end)]))),[f,d]);return(0,fR.jsx)(wV,{locale:b.toString(),children:(0,fR.jsx)("div",{className:fA()("cds--form-item",e),children:(0,fR.jsx)(hK,{values:[[xF,b]],children:(0,fR.jsx)(wB,{id:x?w:void 0,className:fA()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:S,defaultValue:E,ref:y,isDisabled:o,...m,onChange:C,children:(0,fR.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,fR.jsx)(_V,{className:fA()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,fR.jsxs)(vE,{className:x3,children:[(0,fR.jsxs)("div",{className:fA()("-esm-form-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-form-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-form-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-form-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,fR.jsx)(_O,{className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__startInput___C8vnM",x2),slot:"start",children:e=>(0,fR.jsx)(Sa,{className:x4,segment:e})}),(0,fR.jsx)("div",{className:"-esm-form-builder__datepicker-module__separator___vHLFZ",children:(0,fR.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fR.jsx)(_O,{className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__endInput___25OF9",x2),slot:"end",children:e=>(0,fR.jsx)(Sa,{className:x4,segment:e})})]}),(0,fR.jsx)(yO,{className:fA()(x5,{[x9]:"sm"===p,[x8]:"md"===p||!p||0===p.length,[x7]:"lg"===p}),children:(0,fR.jsx)(Sn,{})})]}),(0,fR.jsx)(_$,{className:x6,children:n}),(0,fR.jsx)(St,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Sc=({diagnoses:e})=>{let{diagnosisTags:t}=dW({externalModuleName:"@openmrs/esm-styleguide"});return(0,fR.jsx)("div",{className:"-esm-form-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,fR.jsx)(fI.vwO,{type:i,children:o},n)})})},Sd={action:"-esm-form-builder__empty-card-module__action___l4wUo",content:"-esm-form-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-form-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-form-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-form-builder__empty-card-module__tile___vS3Sj"},Sf=({width:e="64",height:t="64"})=>(0,fR.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,fR.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Sp=e=>{let t="tablet"===fa(),r=e.launchForm;return(0,fR.jsx)(fI.Wdr,{className:Sd.layer,children:(0,fR.jsxs)(fI.FAs,{className:Sd.tile,children:[(0,fR.jsx)("div",{className:t?Sd.tabletHeading:Sd.desktopHeading,children:(0,fR.jsx)("h4",{children:e.headerTitle})}),(0,fR.jsx)(Sf,{}),(0,fR.jsx)("p",{className:Sd.content,children:op("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fR.jsx)("p",{className:Sd.action,children:r&&(0,fR.jsx)(fI.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:op("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Sh=({error:e,headerTitle:t})=>{let r="tablet"===fa();return(0,fR.jsx)(fI.Wdr,{children:(0,fR.jsxs)(fI.FAs,{className:"-esm-form-builder__error-state-module__tile___hHM56",children:[(0,fR.jsx)("div",{className:r?"-esm-form-builder__error-state-module__tabletHeading___W7a4U":"-esm-form-builder__error-state-module__desktopHeading___VL8Rv",children:(0,fR.jsx)("h4",{children:t})}),(0,fR.jsxs)("p",{className:"-esm-form-builder__error-state-module__errorMessage___IytZy",children:[op("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fR.jsx)("p",{className:"-esm-form-builder__error-state-module__errorCopy___E1yZO",children:op("errorCopy")})]})})},Sm=Sh,Sy=cz().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=fu(),a=window.location??{pathname:""},s=dt(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,fR.jsxs)(fI.f8J,{"aria-label":op("leftNavigation","Left navigation"),className:"-esm-form-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,fR.jsx)(di,{name:"global-nav-menu-slot"}),r?(0,fR.jsx)(dA,{value:o,fallback:(0,fR.jsx)(di,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,fR.jsx)(c1.Provider,{value:o,children:(0,fR.jsx)(di,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),Sg=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,cH.useState)(""),s=(0,cH.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dG()(t,oD,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cH.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:h}=function(e,t=0,r=""){let n=dz(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=d9()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${ox}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},oD);return(0,cH.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,cH.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,cH.useCallback)(e=>{o(),a(e.trim())},[o]),g=ff((0,cH.useCallback)(()=>{!f&&d&&h(e=>e+1)},[f,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)(fI.vji,{"aria-describedby":p?`${s}-error`:void 0,labelText:op("searchForLocation"),id:s,placeholder:op("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),p&&(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,fR.jsx)(fI.jeF,{kind:"error",subtitle:op("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:op("error","Error")})}),(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__searchResults___aCL93",children:c?(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,fR.jsx)(fI.Psq,{className:"-esm-form-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__locationResultsContainer___5yuvs",children:m.length>0?(0,fR.jsx)(fI.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,fR.jsx)(fI.aaP,{className:"-esm-form-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,fR.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__emptyState___qiPqQ",children:(0,fR.jsx)("p",{className:"-esm-form-builder__location-picker-module__locationNotFound___tKDOJ",children:op("noResultsToDisplay")})})}),f&&(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__loadingIcon___PGwvc",children:(0,fR.jsx)(fI.OuH,{description:op("loading")})})]})})]})},Sb=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Sv=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];function S_(e){if(e)return"--"===e?"normal":Sb.includes(e)?e.toLowerCase():Sv.includes(e)?e:"normal"}function Sw(e,t){if(!t||null==e||""===e)return"normal";let r="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(r)?"normal":null!==t.hiAbsolute&&void 0!==t.hiAbsolute&&r>t.hiAbsolute?"off_scale_high":null!==t.hiCritical&&void 0!==t.hiCritical&&r>=t.hiCritical?"critically_high":null!==t.hiNormal&&void 0!==t.hiNormal&&r>t.hiNormal?"high":null!==t.lowAbsolute&&void 0!==t.lowAbsolute&&r<t.lowAbsolute?"off_scale_low":null!==t.lowCritical&&void 0!==t.lowCritical&&r<=t.lowCritical?"critically_low":null!==t.lowNormal&&void 0!==t.lowNormal&&r<t.lowNormal?"low":"normal"}function Sx(e,t){let r=null;e&&(r=t?`${ow}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${ow}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=dG()(r,oD),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}let SS={container:"-esm-form-builder__numeric-observation-module__container___+Kqi9",card:"-esm-form-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-form-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-form-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-form-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-form-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-form-builder__numeric-observation-module__critically-low___h9797",high:"-esm-form-builder__numeric-observation-module__high___0-YpP",low:"-esm-form-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-form-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-form-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-form-builder__numeric-observation-module__label___0DGA5",value:"-esm-form-builder__numeric-observation-module__value___ohqoh",units:"-esm-form-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-form-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-form-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-form-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-form-builder__numeric-observation-module__arrow___Agoh9"},SE=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,cH.useId)(),{referenceRange:u,isLoading:c}=Sx(o||n?void 0:i,s),d=o??u,f=(0,cH.useMemo)(()=>n?S_(n):d&&!c?Sw(e,d):"normal",[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,h="normal"!==f,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:op("notAvailable","Not available"),w=fA()({[SS["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[SS["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[SS.low]:"low"===f,[SS.high]:"high"===f,[SS["off-scale-low"]]:"off_scale_low"===f,[SS["off-scale-high"]]:"off_scale_high"===f}),x=fA()({[SS.container]:!0,[SS.card]:!0,[SS["critical-value"]]:p,[SS["abnormal-value"]]:h&&!p}),S=fA()({[SS.cell]:!0,[w]:!0});return"cell"===a?(0,fR.jsxs)("div",{className:S,children:[v,b&&t?` ${t}`:""]}):(0,fR.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,fR.jsxs)("div",{className:SS["label-container"],children:[(0,fR.jsx)("span",{id:m,className:SS.label,children:r}),h&&(0,fR.jsx)("span",{className:SS[f.replace("_","-")],title:op("abnormalValue","Abnormal value")})]}),(0,fR.jsxs)("div",{className:SS["value-container"],children:[(0,fR.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:SS.value,children:v}),b&&t&&(0,fR.jsx)("span",{id:g,className:SS.units,children:t})]})]})},SD=K("modalState",{modalContainer:null,modalStack:[]});function SO(e,t={},r=()=>{}){let n=()=>{let e=SD.getState().modalStack.find(e=>e.onClose===r);e&&function(e){if("TO_BE_DELETED"===e.state||"DELETED"===e.state)return;e.state="TO_BE_DELETED";let t=SD.getState();SD.setState({...t,modalStack:[...t.modalStack]})}(e)};if(function(e){let t=cG.getState().modals[e];if(!t){let n=cy(e);if(n){var r;t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),r=t,cG.setState(e=>(e.modals[r.name]=r,e))}}return t}(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=SD.getState()).modalStack],SD.setState({...i,modalStack:a})}else T(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}window.getComputedStyle(document.body).overflow;var SP=r(66401);let SC=new ea.Subject,Sk=0,Sj=new ea.Subject,ST=0;function SR(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,SP.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{SC.next({...e,id:Sk++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function SM(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,SP.A)(t))?setTimeout(()=>{Sj.next({...e,id:ST++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let SA="-esm-form-builder__page-header-module__pageHeader___XNJYe",SN=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,fR.jsx)("div",{className:fA()(SA,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,fR.jsx)("div",{className:fA()(SA,n),...o,children:(0,fR.jsx)(SI,{title:t,illustration:r})})}},SI=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cH.useState)(null);return(0,cH.useEffect)(()=>{tF("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fR.jsxs)("div",{className:fA()("-esm-form-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,fR.jsxs)("div",{className:"-esm-form-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,fR.jsx)("p",{children:op(n.implementationName)}),(0,fR.jsx)("p",{className:"-esm-form-builder__page-header-module__pageName___+eYMc",children:e})]})]})},S$=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=fm(t,e,n,i),u="tablet"===fa(),c=op("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fR.jsx)(fR.Fragment,{children:e>0&&(0,fR.jsxs)("div",{className:fA()({"-esm-form-builder__pagination-module__tablet___DdaYk":u,"-esm-form-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,fR.jsxs)("div",{children:[c,o&&(0,fR.jsx)(cq,{to:o,className:"-esm-form-builder__pagination-module__configurableLink___cTCLf",children:a??op("seeAll","See all")})]}),(0,fR.jsx)(fI.dKS,{className:"-esm-form-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>op("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function SL(e){return SB(SU(e,"usual","official"))}function SF(e){return SL(e)}function SB(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function SV(e){return SB(e)}function SU(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function SW(e,t=fx()){let r=fx(t),n=xR(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function SK(e,t=fx()){let r=SW(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),xT(r,n)}let SH={container:"-esm-form-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-form-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-form-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-form-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-form-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-form-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-form-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-form-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-form-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-form-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-form-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-form-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-form-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-form-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-form-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-form-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-form-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-form-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-form-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-form-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-form-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-form-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function Sz({showIdentifierLabel:e,type:t,value:r}){return(0,fR.jsx)("span",{className:SH.primaryIdentifier,children:(0,fR.jsxs)(fI.vwO,{className:SH.tag,type:"gray",children:[e&&t?.text&&(0,fR.jsxs)("span",{className:SH.label,children:[t.text,": "]}),(0,fR.jsx)("span",{className:SH.value,children:r})]})})}function Sq({showIdentifierLabel:e,type:t,value:r}){return(0,fR.jsxs)(fI.lRv,{className:SH.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,fR.jsxs)("span",{className:SH.label,children:[t?.text,": "]}),(0,fR.jsx)("span",{className:SH.value,children:r})]})}function SG({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=dW(),{primaryIdentifierCode:n}=fb(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,fR.jsx)(fR.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,fR.jsxs)(cz().Fragment,{children:[(0,fR.jsx)("span",{className:SH.identifier,children:r?.coding?.[0]?.code===n?(0,fR.jsx)(Sz,{showIdentifierLabel:t,type:r,value:e}):(0,fR.jsx)(Sq,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"})]},e)):""})}let SY={Female:pb,Male:pv,Other:p_,Unknown:pw},SZ=({gender:e})=>{let t=SY[e];return t?(0,fR.jsx)(t,{fill:"#525252"}):null},SJ={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function SQ({patient:e,renderedFrom:t}){var r;let n,o,i=SL(e),a=e?.gender&&(o=SJ[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:op(n,r),iconKey:o}),s=(0,cH.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,fR.jsxs)("div",{className:SH.patientInfo,children:[(0,fR.jsx)("div",{className:fA()(SH.row,SH.patientNameRow),children:(0,fR.jsxs)("div",{className:SH.flexRow,children:[(0,fR.jsx)("span",{className:SH.patientName,children:i}),a&&(0,fR.jsxs)("div",{className:SH.gender,children:[(0,fR.jsx)(SZ,{gender:a.iconKey}),(0,fR.jsx)("span",{children:a.displayText})]}),(0,fR.jsx)(di,{className:SH.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fR.jsxs)("div",{className:SH.demographics,children:[e.birthDate&&(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("span",{children:SK(e.birthDate)}),(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"}),(0,fR.jsx)("span",{children:xD(e.birthDate,{time:!1})}),(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"})]}),(0,fR.jsx)(SG,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fR.jsx)(di,{className:SH.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var SX=r(81673);function S0({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,cH.useState)(!1),{extensions:a}=dr(r),s="tablet"===fa(),l=fd(()=>i(!1),o),u=(0,cH.useRef)(null),c=(0,cH.useRef)(null),d=(0,cH.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,h=(0,cH.useCallback)(()=>i(e=>!e),[]),m=(0,cH.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,cH.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,cH.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,cH.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,fR.jsx)("div",{className:"-esm-form-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,fR.jsxs)("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",f$),ref:l,children:[(0,fR.jsxs)("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},fB),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:h,onKeyDown:y,ref:u,children:[(0,fR.jsx)("span",{className:"-esm-form-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:op("actions","Actions")})," ",(0,fR.jsx)(SX.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fR.jsxs)("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fL,{[fF]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,fR.jsx)("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fR.jsx)(di,{name:r,state:g},r)}),(0,fR.jsx)("span",{})]})]})})}function S1({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,fR.jsx)(fI.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?ps:po,children:e?op("showLess","Show less"):op("showMore","Show more")})}let S3={contactDetails:"-esm-form-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-form-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-form-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-form-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-form-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-form-builder__patient-banner-contact-details-module__relationship___GTTsg"},S4=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${ow}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=dx()(t,oD),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cH.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)("p",{className:S3.heading,children:[op("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,fR.jsx)(fI.OuH,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>xv(e?.startDate).getTime()-xv(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fR.jsx)("li",{children:(0,fR.jsx)(cq,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fR.jsx)("li",{children:"--"})})(),t.length>3&&(0,fR.jsx)("li",{className:S3.link,children:(0,fR.jsx)(cq,{to:`${window.spaBase}/home/patient-lists`,children:op("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},S2=({patientId:e})=>{let{patient:t,isLoading:r}=fg(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,fR.jsx)(fI.OuH,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("address","Address")}),(0,fR.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,fR.jsxs)("li",{children:[op(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,fR.jsxs)("li",{children:[op(e,e),": ",t]},`address-${e}`)):(0,fR.jsx)("li",{children:"--"})})]})},S6=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=dW({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dG()(`${ow}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,oD);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cH.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cH.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?op(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("contactDetails","Contact Details")}),t?(0,fR.jsx)(fI.OuH,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,fR.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,fR.jsx)("li",{children:"--"})})]})},S5=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${ow}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=dx()(e?t:null,oD),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("relationships","Relationships")}),r?(0,fR.jsx)(fI.OuH,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsx)("ul",{children:t&&t.length>0?(0,fR.jsx)(fR.Fragment,{children:t.map(e=>(0,fR.jsxs)("li",{className:S3.relationship,children:[(0,fR.jsx)("div",{children:(0,fR.jsx)(cq,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fR.jsx)("div",{children:e.relationshipType}),(0,fR.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?op("yearAbbreviation","yr"):op("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fR.jsx)("li",{children:"--"})})]})};function S8({patientId:e,deceased:t}){return(0,fR.jsxs)("div",{className:fA()(S3.contactDetails,{[S3.deceased]:t}),children:[(0,fR.jsxs)("div",{className:S3.row,children:[(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S2,{patientId:e})}),(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S6,{patientUuid:e})})]}),(0,fR.jsxs)("div",{className:S3.row,children:[(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S5,{patientId:e})}),(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S4,{patientUuid:e})})]})]})}var S9=r(16767),S7=r.n(S9);function Ee(e){let{patientPhotoConceptUuid:t}=dW({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${ow}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=dx()(e?r:null,oD),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Et=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,d_.useTranslation)();return(0,fR.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fR.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fR.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},Er="-esm-form-builder__patient-photo-module__avatar___R93LX";function En({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=Ee(e),[i,a]=(0,cH.useState)(null),[s,l]=(0,cH.useState)(!1),u=(0,cH.useMemo)(()=>S7().generate(e),[e]);(0,cH.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,cH.useMemo)(()=>r||(i?op("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):op("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,fR.jsx)(fI.ryE,{className:"-esm-form-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,fR.jsx)(Et,{"aria-label":op("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,fR.jsx)("div",{"aria-label":c,children:(0,fR.jsx)("img",{className:Er,src:i,alt:c,title:t})}):(0,fR.jsx)("div",{"aria-label":c,children:(0,fR.jsx)("div",{className:Er,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fR.jsx)("span",{className:"-esm-form-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Eo=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],Ei=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Ea=Ei,Es=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),El=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Eu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Ec=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Ed=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Ef=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ep=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Eh=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Em=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Ey=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Eg=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Eb=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ev=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),E_=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Ew=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Ex=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),ES=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),EE=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),ED=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),EO=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),EP=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),EC=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Ek=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Ej=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),ET=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),ER=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),EM=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),EA=Em,EN=EE,EI=(0,cH.memo)((0,cH.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cH.useRef)(document.getElementById(e));return(0,cH.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fR.jsx)(dA,{value:o.current,fallback:t,children:(0,fR.jsx)(E$,{ref:n,pictogram:e,pictogramProps:r})})})),E$=(0,cH.memo)((0,cH.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fR.jsx)("svg",{ref:r,className:fA()("-esm-form-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,fR.jsx)("use",{href:`#${e}`})})})),EL=({children:e})=>"tablet"===fa()?(0,fR.jsx)(fI.Wdr,{children:e}):(0,fR.jsx)(fR.Fragment,{children:e}),EF=new ea.Subject,EB=0;function EV(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{EF.next({...e,id:EB++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let EU=new ea.Subject,EW=0;function EK(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,SP.A)(t))?setTimeout(()=>{EU.next({...e,id:EW++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function EH(e,t=!1){if(t)return!0;let r=EZ[e];return!r||!r()}function Ez(e,t){let r=E3.getState()?.workspaceGroup,n=r?.name;n&&e===n&&E6(()=>{let n=De(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),E3.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function Eq(e,t){let{name:r,additionalProps:n}=t;cQ(r);let o=()=>{EX(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>EG(r,n),closeWorkspaceGroup:!1})};EH(e.name)?o():E8("closing-workspace-launching-new-workspace",o,e.title??e.name)}function EG(e,t){let r=cQ(e),n=E3.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Ez(n.name,()=>{EG(e,t)});let o=E3.getState().workspaceGroup?.name,i={...r,title:E9(r,t),closeWorkspace:(t={})=>EX(e,t),closeWorkspaceWithSavedChanges:t=>EX(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(EZ[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,E3.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){E3.setState(r=>{let n=[e,...t??r.openWorkspaces],o=E2(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&De(o,t);let s=E3.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===E9(t,t.additionalProps)&&{title:E9(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,E3.getState().openWorkspaces.filter(e=>e.type!=i.type)),Eq(u,{name:e,additionalProps:t})):a(i);else Eq(s[0],{name:e,additionalProps:t})}function EY({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){E0(t),EG(r,n),oy({to:e})}let EZ={};function EJ(){let e=E3.getState();E3.setState({...e,prompt:null})}let EQ={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function EX(e,t={}){t={...EQ,...t};let r=()=>{let r=E3.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=E3.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Ez(o),EZ[e]=()=>!1,E3.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:E2(n?.[0])})),t?.onWorkspaceClose?.()};return EH(e,t?.ignoreChanges)?(r(),!0):(E8("closing-workspace",r,cQ(e).title??e),!1)}function E0(e){E3.getState().context!=e&&E3.setState({context:e,openWorkspaces:[],prompt:null})}let E1={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},E3=K("workspace",E1);function E4(e){let t=E3.getState();E3.setState({...t,workspaceWindowState:e})}function E2(e){return e?.preferredWindowSize??"normal"}function E6(e=()=>{},t=()=>!0){let r=E3.getState().openWorkspaces.filter(t).every(({name:e})=>EH(e)),n=()=>{E7(),e?.()};r?n():E8("closing-all-workspaces",n)}function E5(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=c2(E3);return(0,cH.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function E8(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:op("unsavedChangesTitleText","Unsaved changes"),body:op("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:op("discard","Discard")};break;case"closing-all-workspaces":{let e=E3.getState().openWorkspaces.filter(({name:e})=>!EH(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:op("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:op("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:op("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:op("unsavedChangesTitleText","Unsaved changes"),body:op("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{E3.setState(e=>({...e,prompt:null})),t?.()},confirmText:op("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}E3.setState(e=>({...e,prompt:n}))}function E9(e,t){return t?.workspaceTitle??e.title}function E7(){E3.setState(E1)}function De(e,t={}){if(!e||"default"===e)return;let r=z(e,{});return t&&r.setState(e=>({...e,...t})),r}let Dt="-esm-form-builder__action-menu-button-module__container___Uwne-",Dr="-esm-form-builder__action-menu-button-module__elementContainer___vWkQO",Dn="-esm-form-builder__action-menu-button-module__active___D7Idw";function Do({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,fR.jsxs)(fR.Fragment,{children:[e({size:16}),t?(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button-module__countTag___XJRiM",children:r})]})}let Di=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=fa(),{workspaces:s,workspaceWindowState:l}=E5(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,fR.jsxs)(fI.$nd,{className:fA()(Dt,{[Dn]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,fR.jsx)("span",{className:Dr,children:(0,fR.jsx)(Do,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,fR.jsx)("span",{children:t})]}):(0,fR.jsx)(fI.K0,{align:"left","aria-label":r,className:fA()(Dt,{[Dn]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,fR.jsx)("div",{className:Dr,children:(0,fR.jsx)(Do,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var Da=r(54535),Ds=r(40771),Dl=/[\\^$.*+?()[\]{}|]/g,Du=RegExp(Dl.source);let Dc=function(e){return(e=(0,e5.A)(e))&&Du.test(e)?e.replace(Dl,"\\$&"):e};function Dd({contextKey:e}){let{prompt:t}=E5();return(0,cH.useEffect)(()=>{RegExp(`/${Dc(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,cH.useEffect)(()=>(E0(e),()=>{E0(null)}),[e]),(0,cH.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${Dc(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=E3.getState().openWorkspaces.every(({name:e})=>EH(e));a||(s?E7():(r?.(),E6(()=>{oy({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,fR.jsxs)(fI.KXP,{open:!0,onClose:EJ,children:[(0,fR.jsx)(fI.rQ0,{title:t.title}),(0,fR.jsx)(fI.cwr,{children:(0,fR.jsx)("p",{className:"-esm-form-builder__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,fR.jsxs)(fI.jlY,{children:[(0,fR.jsx)(fI.$nd,{kind:"secondary",onClick:EJ,children:t.cancelText??op("cancel")}),(0,fR.jsx)(fI.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??op("confirm")})]})]}):null}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(t){Dm(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Dh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dg(e,t){return(Dg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Db(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dv=function(e){var t=cH.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&Dg(a,t);var r,n,o,i=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Dy(a);e=r?Reflect.construct(t,arguments,Dy(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return Db(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),Dm(Db(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Dm(Db(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Dm(Db(t),"getParcelProps",function(){var e=Dp(Dp({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Dp({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return df&&df.Consumer?cH.createElement(df.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=df&&df.Consumer?cH.createElement(df.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cH.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Dh(a.prototype,n),o&&Dh(a,o),a}();Dm(Dv,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function D_({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,cH.useState)(),o=function(e){let[t,r]=(0,cH.useState)({}),[n,o]=(0,cH.useState)(e);return(0,cH.useEffect)(()=>{n!==e&&o(e)},[e]),(0,cH.useEffect)(()=>{let e,t=De(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,cH.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,cH.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,fR.jsx)(Dv,{config:r,mountParcel:cR,...i},e.name):(0,fR.jsx)(fI.OuH,{className:"-esm-form-builder__workspace-module__loader___v7QFg",description:`${op("loading","Loading")} ...`})}let Dw=function({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,cH.useState)(!1),i=(0,cH.useRef)(window.innerHeight),{featureName:a}=(0,cH.useContext)(c1),s=fa();(0,cH.useEffect)(()=>{let e=()=>{o(!fs(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,fR.jsx)("aside",{className:fA()("-esm-form-builder__action-menu-module__sideRail___Aa96v",{"-esm-form-builder__action-menu-module__withinWorkspace___2bJET":e,"-esm-form-builder__action-menu-module__sideRailHidden___Yb0w9":n,"-esm-form-builder__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,fR.jsx)("div",{className:"-esm-form-builder__action-menu-module__container___mzfAh",children:(0,fR.jsx)(di,{className:"-esm-form-builder__action-menu-module__chartExtensions___DiJtm",name:l,state:r})})})};function Dx({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=fa(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=E5(),u=l?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,cH.useMemo)(()=>r||u&&!d,[u,d,r]);return dB(!d&&!fs(i)),(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)("div",{className:r?"-esm-form-builder__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-form-builder__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,fR.jsx)("aside",{className:fA()(t?"-esm-form-builder__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-form-builder__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-form-builder__workspace-module__hiddenRelative___qqT-4":d,"-esm-form-builder__workspace-module__narrowWorkspace___MMI1u":"narrow"===f,"-esm-form-builder__workspace-module__widerWorkspace___be-UT":"wider"===f,"-esm-form-builder__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===f}),children:(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-form-builder__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-form-builder__workspace-module__hiddenFixed___48wS9":d}),children:a.map((e,t)=>(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-form-builder__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,fR.jsx)(cH.Suspense,{fallback:null,children:(0,fR.jsx)(d_.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fR.jsx)(DS,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,fR.jsx)(Dd,{contextKey:e})]}),p&&(0,fR.jsx)(Dw,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function DS({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,d_.useTranslation)(),n=fa(),{workspaceWindowState:o,workspaceGroup:i}=E5(),a=i?.name,s="maximized"===o;(0,cH.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,cH.useContext)(c1),u=(0,cH.useCallback)(()=>{E4(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,cH.useMemo)(()=>e??{},[e]),h=(0,cH.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)(fI.Y9Y,{"aria-label":op("workspaceHeader","Workspace Header"),className:"-esm-form-builder__workspace-module__header___nACZO",children:[!fs(n)&&!c&&(0,fR.jsx)(fI.dJ2,{"aria-label":op("close","Close"),renderMenuIcon:(0,fR.jsx)(fX,{}),onClick:()=>p()}),(0,fR.jsx)(fI.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,fR.jsx)("div",{className:"-esm-form-builder__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,fR.jsxs)(fI.wdv,{className:"-esm-form-builder__workspace-module__headerButtons___heP0Q",children:[(0,fR.jsx)(di,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,fR.jsx)(di,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,fR.jsx)(di,{name:`workspace-header-${l}-slot`,state:h}),fs(n)&&(0,fR.jsxs)(fR.Fragment,{children:[(d||s)&&(0,fR.jsx)(fI.V8d,{"aria-label":s?op("minimize","Minimize"):op("maximize","Maximize"),onClick:u,children:s?(0,fR.jsx)(Da.Xj,{}):(0,fR.jsx)(Da.hz,{})}),c&&!a?(0,fR.jsx)(fI.V8d,{"aria-label":op("hide","Hide"),onClick:()=>E4("hidden"),children:(0,fR.jsx)(f0,{})}):(0,fR.jsx)(fI.V8d,{"aria-label":op("close","Close"),onClick:()=>p?.(),children:(0,fR.jsx)(pl,{})})]}),"tablet"===n&&c&&(0,fR.jsx)(fI.V8d,{"aria-label":op("close","Close"),onClick:()=>p?.(),children:(0,fR.jsx)(Ds.d3,{})})]})]}),(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceContent___oYdxI",{"-esm-form-builder__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,fR.jsx)(D_,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function DE(e,t){let{openedGroup:r}=cX.getState();if(r){if(r.groupName===e&&DP(r.props,t))return!0;else if(!await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return cX.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function DD(e){let{openedGroup:t,openedWindows:r}=cX.getState();if(t){if(r.length>0&&!(e||await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;cX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function DO(e,t=null,r=null,n=null){let o=cX.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=function(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=cX.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=function(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=cX.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=c0(e);if(a&&(a.groupName!==l.name||!DP(a.props,n)))return!!await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(DP(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&DP(d.props,t)?((a||u!==o.openedWindows.length-1)&&cX.setState(Dk.restoreWindow(o,s)),!0):!!await DC({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[DR(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await DC({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(cX.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await DC({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function DP(e,t){return null==e||null==t||A(e,t)}function DC(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=cX.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=SO("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Dk={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=c0(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,DR(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=c0(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}},Dj=()=>(0,cH.useContext)(df),DT=()=>Object.keys(cX.getState().registeredWorkspacesByName);function DR(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:cV()}}let DM={workspaceOuterContainer:"-esm-form-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-form-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-form-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-form-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-form-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-form-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-form-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-form-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-form-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-form-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-form-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-form-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-form-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-form-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-form-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-form-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-form-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-form-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-form-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-form-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-form-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},DA=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=fa(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:h}=c6(cX,Dk),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=Dj(),v=c0(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,cH.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,cH.useEffect)(()=>{f[m]!==e&&p(m,e)},[f,m,e,p]),v<0||null==l||null==x)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[m].window,D=c[E];if(!D)throw Error(`Cannot find registered workspace window ${E}`);let{icon:O,canMaximize:P}=D,C="closable"===S.persistence,k=!!O&&!C,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),M=v<s.length-1||h;return(0,fR.jsxs)("div",{className:fA()(DM.workspaceOuterContainer,{[DM.narrowWorkspace]:"narrow"===T,[DM.widerWorkspace]:"wider"===T,[DM.extraWideWorkspace]:"extra-wide"===T,[DM.isActionMenuOpened]:R}),children:[(0,fR.jsx)("div",{className:fA()(DM.workspaceSpacer,{[DM.hidden]:M})}),(0,fR.jsx)("div",{className:fA()(DM.workspaceMiddleContainer,{[DM.maximized]:j,[DM.hidden]:M,[DM.isRootWorkspace]:y,[DM.showActionMenu]:b}),children:(0,fR.jsxs)("div",{className:fA()(DM.workspaceInnerContainer,{[DM.maximized]:j,[DM.hidden]:M,[DM.isRootWorkspace]:y}),children:[(0,fR.jsxs)(fI.Y9Y,{"aria-label":op("workspaceHeader"),className:DM.header,children:[(0,fR.jsx)(fI.bCw,{prefix:"",children:e}),(0,fR.jsx)("div",{className:DM.overlayHeaderSpacer}),(0,fR.jsx)(fI.wdv,{className:DM.headerButtons,children:fs(n)?(0,fR.jsxs)(fR.Fragment,{children:[(P||j)&&(0,fR.jsx)(fI.V8d,{"aria-label":j?op("minimize"):op("maximize"),onClick:()=>o(E,!j),children:j?(0,fR.jsx)(Da.Xj,{}):(0,fR.jsx)(Da.hz,{})}),k&&(0,fR.jsx)(fI.V8d,{"aria-label":op("hide"),onClick:()=>i(),children:(0,fR.jsx)(f0,{})}),!C&&(0,fR.jsx)(fI.V8d,{"aria-label":op("close"),onClick:()=>g({closeWindow:!0}),children:(0,fR.jsx)(pl,{})})]}):(0,fR.jsxs)(fR.Fragment,{children:[k&&(0,fR.jsx)(fI.V8d,{"aria-label":op("hide"),onClick:()=>i(),children:(0,fR.jsx)(Ds.d3,{})}),(0,fR.jsx)(fI.V8d,{"aria-label":op("close"),onClick:()=>{C?DD():g({closeWindow:!0})},children:(0,fR.jsx)(pl,{})})]})})]}),(0,fR.jsx)("div",{className:fA()(DM.workspaceContent),children:t})]})})]})},DN="-esm-form-builder__action-menu-button2-module__container___gYRoa",DI="-esm-form-builder__action-menu-button2-module__elementContainer___vBViO",D$="-esm-form-builder__action-menu-button2-module__active___uRJRA",DL="-esm-form-builder__action-menu-button2-module__focused___D4VYB";function DF({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,fR.jsxs)(fR.Fragment,{children:[e({size:16}),t?(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let DB=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=fa(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=c6(cX,Dk),{extension:c}=(0,cH.useContext)(c1),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||u),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(p)h?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;DO(e,t,r)}};return"tablet"===i||"phone"===i?(0,fR.jsxs)(fI.$nd,{className:fA()(DN,{[D$]:p&&!m,[DL]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,fR.jsx)("span",{className:DI,children:(0,fR.jsx)(DF,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,fR.jsx)("span",{children:t})]}):(0,fR.jsx)(fI.K0,{align:"left","aria-label":t,className:fA()(DN,{[D$]:p&&!m,[DL]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,fR.jsx)("div",{className:DI,children:(0,fR.jsx)(DF,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function DV(e,t,r){if(null==e)return r;let n=wK(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=wK(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function DU(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function DW(e){return!!e&&e.constructor===Object}var DK=r(99589);function DH(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Dz(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=DH(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return DH(e)}(t);return DK.satisfies(r,e,{includePrerelease:!0})}async function Dq(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await DG(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function DG(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},241(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(41917).A.Symbol},76912(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},76335(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(76912),o=r(241),i=r(20018),a=r(92049),s=o.A?o.A.isConcatSpreadable:void 0;let l=function(e){return(0,a.A)(e)||(0,i.A)(e)||!!(s&&e&&e[s])},u=function e(t,r,o,i,a){var s=-1,u=t.length;for(o||(o=l),a||(a=[]);++s<u;){var c=t[s];r>0&&o(c)?r>1?e(c,r-1,o,i,a):(0,n.A)(a,c):i||(a[a.length]=c)}return a}},18348(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(241),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n.A?n.A.toStringTag:void 0;let l=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o};var u=Object.prototype.toString,c=n.A?n.A.toStringTag:void 0;let d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?l(e):u.call(e)}},72136(e,t,r){"use strict";r.d(t,{A:()=>n});let n="object"==typeof global&&global&&global.Object===Object&&global},41917(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(72136),o="object"==typeof self&&self&&self.Object===Object&&self;let i=n.A||o||Function("return this")()},20018(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(18348),o=r(53098);let i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,n.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;let u=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},92049(e,t,r){"use strict";r.d(t,{A:()=>n});let n=Array.isArray},53098(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return null!=e&&"object"==typeof e}}}]);
27
+ }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&wa(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||wd(this,r)},a=hO(wc(document,"touchstart",t=>{let n=mr(t);e=bd(n)?n:bf(n,!0),r=!1;let o=n.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(n,!0)&&(r=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(r=!0),"selectionStart"in n&&"selectionEnd"in n&&n.selectionStart<n.selectionEnd&&n.ownerDocument.activeElement===n&&(r=!0)},{passive:!1,capture:!0}),wc(document,"touchmove",t=>{if(2!==t.touches.length&&!r){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),wc(document,"blur",e=>{let t=mr(e),r=e.relatedTarget;if(r&&wa(r))r.focus({preventScroll:!0}),wd(r,wa(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),HTMLElement.prototype.focus=i}):hO((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?wu(document.documentElement,"scrollbarGutter","stable"):wu(document.documentElement,"paddingRight",`${s}px`)),wu(document.documentElement,"overflow","hidden"))),()=>{0==--wl&&d()}}},[t])}({isDisabled:i||!t.isOpen}),(0,cH.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=_H[_H.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,f,p,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=me(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&_W,l=new Set(e),u=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(mt(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=vP(h7(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&f(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)f(e),e=r.nextNode()}},f=e=>{let r=_K.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),u.add(e),_K.set(e,r+1))},_H.length&&_H[_H.length-1].disconnect(),d(a),(p=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...l,...u].some(e=>mt(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){p.observe(a,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},_H.push(h),()=>{for(let e of(p.disconnect(),u)){let t=_K.get(e);null!=t&&(1===t?(c(e,!1),_K.delete(e)):_K.set(e,t-1))}h===_H[_H.length-1]?(_H.pop(),_H.length&&_H[_H.length-1].observe()):_H.splice(_H.indexOf(h),1)}}},[i,t.isOpen,n,o]),{popoverProps:hU(c,p),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:y}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?c:u},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,cH.useState)(!0),o=r&&t;return hP(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),wm(e,o,(0,cH.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=hH({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,S]=(0,cH.useState)(!1);hP(()=>{g.current&&S(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,cH.useEffect)(()=>{var e;let t,r;x&&g.current&&!g.current.contains(document.activeElement)&&(r=((e=document)=>e.activeElement)(t=h7(e=g.current)),"virtual"===wy?mq(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&h8(e)}):h8(e))},[x,g]);let E={...p.style,...v.style},D=cz().createElement("div",{...hU(h5(n),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:E,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&cz().createElement(wh,{onDismiss:e.close}),cz().createElement(_U.Provider,{value:{...m,placement:y,ref:a}},v.children),cz().createElement(wh,{onDismiss:e.close}));return f?cz().createElement(_R,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==c?void 0:c.current)?i:void 0},D):cz().createElement(_R,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&cz().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),cz().createElement("div",{ref:u,style:{display:"contents"}},cz().createElement(wj.Provider,{value:u},D)))}function wA(e){return e?.start!=null&&null!=e.end}let wN=(0,cH.createContext)(null),wI=(0,cH.createContext)(null),w$=(0,cH.createContext)(null),wL=(0,cH.createContext)(null),wF=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hG(e,t,wN);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=wk(e),[r,n]=vi(e.value,e.defaultValue||null,e.onChange),[o]=(0,cH.useState)(r),i=r||e.placeholderValue||null,[a,s]=_p(i,e.granularity),l=null!=r?r.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,f]=(0,cH.useState)(null),[p,h]=(0,cH.useState)(null);if(r&&(d=r,"hour"in r&&(p=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=r?.calendar.identifier==="gregory"&&"BC"===r.era,y=(0,cH.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,cH.useMemo)(()=>_s(r,g,b,v,y),[r,g,b,v,y]),x=_e({...e,value:r,builtinValidation:w}),S=x.displayValidation.isInvalid,E=e.validationState||(S?"invalid":null),D=(e,t)=>{n("timeZone"in t?t.set(gV(e)):gU(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:p,setDateValue:r=>{let o="function"==typeof c?c():c;u?p||o?D(r,p||_d(e.defaultValue||e.placeholderValue)):f(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(n){!n&&!r&&d&&u&&D(d,p||_d(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:E,isInvalid:S,formatValue:(e,t)=>l?new yZ(e,_c(t,y)).format(l):"",getDateFormatter:(e,t)=>new yZ(e,_c({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,cH.useRef)(null),[l,u]=hq(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=hF(),i=hF(),a=hF(),s=gt((n=vq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=vJ({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=vY(t,r),y=f["aria-labelledby"]||f.id,{locale:g}=yW(),b=t.formatValue(g,{month:"long"}),v=bb(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=h5(e),S=(0,cH.useMemo)(()=>vW(r),[r]),E=(0,cH.useRef)(!1),{focusWithinProps:D}=ym({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mt(document.getElementById(i),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:hU(x,m,f,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{S.focusFirst()}},fieldProps:{...f,id:a,[v1]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[v7]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...hY(e),label:u,validationBehavior:i},a,s),[v,w]=(0,cH.useState)(null),x=(0,cH.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wt({ref:s,onResize:x});let{focusProps:S,isFocused:E,isFocusVisible:D}=yy({within:!0}),O=hH({...e,values:{state:a,isFocusWithin:E,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=h5(e);return delete P.id,cz().createElement(hK,{values:[[w$,a],[vS,{...c,ref:s,isInvalid:a.isInvalid}],[_S,f],[yD,{...p,isPressed:a.isOpen}],[_B,{...d,ref:l,elementType:"span"}],[vd,m],[_A,a],[wT,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[_M,h],[yC,{slots:{description:y,errorMessage:g}}],[_I,b]]},cz().createElement("div",{...S,...P,...O,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),wB=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hG(e,t,wI);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=wk(e),[r,n]=vi(e.value,e.defaultValue||null,e.onChange),[o]=(0,cH.useState)(r),[i,a]=(0,cH.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,l=e=>{a(s=e||{start:null,end:null}),wA(s)?n(s):n(null)},[u,c]=_p(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,f=e.shouldCloseOnSelect??!0,[p,h]=(0,cH.useState)(null),[m,y]=(0,cH.useState)(null);s&&wA(s)&&(p=s,"hour"in s.start&&(m=s));let g=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(gV(e.start)):gU(e.start,t.start),end:"timeZone"in t.end?t.end.set(gV(e.end)):gU(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=r=>{let n="function"==typeof f?f():f;d?wA(r)&&(n||m?.start&&m?.end)?g(r,{start:m?.start||_d(e.placeholderValue),end:m?.end||_d(e.placeholderValue)}):h(r):wA(r)?(l(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{wA(p)&&wA(e)?g(p,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,cH.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:S,maxValue:E,isDateUnavailable:D}=e,O=(0,cH.useMemo)(()=>{var e;let t;return e=s,t=_o(_s(e?.start??null,S,E,D,x),_s(e?.end??null,S,E,D,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=_o(t,{isInvalid:!0,validationErrors:[(y6.getGlobalDictionaryForPackage("@react-stately/datepicker")||_i).getStringForLocale("rangeReversed",_a())],validationDetails:{...v6,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,S,E,D,x]),P=_e({...e,value:r,name:(0,cH.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),C=P.displayValidation.isInvalid,k=e.validationState||(C?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:p,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:p?.end??null}):b({start:p?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&wA(p)&&d&&g(p,{start:m?.start||_d(e.placeholderValue),end:m?.end||_d(e.placeholderValue)}),t.setOpen(r)},validationState:k,isInvalid:C,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=_c(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),f=new yZ(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new yZ(t,_c(r,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new yZ(e,_c({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,cH.useRef)(null),[l,u]=hq(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n;let o=gt((n=vq)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=vJ({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=u["aria-labelledby"]||u.id,{locale:p}=yW(),h=t.formatValue(p,{month:"long"}),m=bb(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":f},g={"aria-label":o.format("endDate"),"aria-labelledby":f},b=hF(),v=hF(),w=vY(t,r),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,cH.useMemo)(()=>vW(r,{accept:e=>e.id!==b}),[r,b]),E={[v3]:S,[v1]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=h5(e),O=(0,cH.useRef)(!1),{focusWithinProps:P}=ym({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mt(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,cH.useRef)(v8),k=(0,cH.useRef)(v8);return{groupProps:hU(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...l,onClick:()=>{S.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${f}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${f}`},startFieldProps:{...y,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[v7]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(_o(e,k.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[v7]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(_o(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...hY(e),label:u,validationBehavior:i},a,s),[w,x]=(0,cH.useState)(null),S=(0,cH.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);wt({ref:s,onResize:S});let{focusProps:E,isFocused:D,isFocusVisible:O}=yy({within:!0}),P=hH({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=h5(e);return delete C.id,cz().createElement(hK,{values:[[wL,a],[vS,{...c,ref:s,isInvalid:a.isInvalid}],[yD,{...h,isPressed:a.isOpen}],[_B,{...d,ref:l,elementType:"span"}],[vf,y],[_A,a],[wT,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[_M,m],[_S,{slots:{start:f,end:p}}],[yC,{slots:{description:g,errorMessage:b}}],[_I,v]]},cz().createElement("div",{...E,...C,...P,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function wV(e){return cz().createElement(yU,e)}function wU(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof gk||e instanceof gj||e instanceof gR)return t?gW(e,t):e;{let r=fS()(e).toDate(),n=new gk(r.getFullYear(),r.getMonth()+1,r.getDate());return t?gW(n,t):n}}function wW(e){if(e)return e.toDate(g1())}function wK(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function wH(e){let t=e??"",r=wK(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function wz(){let e=window.i18next.language,t=wK(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var wG=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ei||"en-US"),wq=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},wY={};for(let e=1;e<100;e++)wY[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var wZ={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},wJ="[1234567890一二三四五六七八九〇\\d]",wQ={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},wX={},w0={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},w1={zone:w0,year:wY,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},w3={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(w0).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},w4={...w3,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},w2={},w6=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=wG){return w2[t.toLowerCase()]||(w2[t.toLowerCase()]=new e(t)),w2[t.toLowerCase()]}constructor(e=wG){this.locale=e,this.lookups={...w1},this.vars={...w3};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=wQ:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(wX[e])return wX[e];if("fullwide"===e||"hanidec"===e)return{group:wJ,lookup:{...wQ}};let t=wZ[e];if(!t)return{group:"\\d",lookup:{...wQ}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return wX[e]={group:`[${r}-${n}]`,lookup:o},wX[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,w4)w4.hasOwnProperty(r)&&(this.vars[r]=w4[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},w5=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],w8={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},w9=()=>new Date;function w7(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var xe=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},xt=["year","month","day","hour","minute","second","millisecond","offset"],xr={};function xn(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var xo=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],xi={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...xo],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:xo,id:xo,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function xa(e,t=wG){let r=function(e){if(!xr[e]){var t,r;let n,o,i=w6.factory(e);xr[e]=new xe({doneChecker:xn,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:w7(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${wJ}{2,4})\\s*\u5E74\\s*(${wJ}{1,2})\\s*\u6708\\s*(${wJ}{1,2})\\s*\u65E5$`),handler:w7(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:w7(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:w7(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=w9(),r=e[1].toLowerCase();switch(r){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let n={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===r&&(n.hour=t.getUTCHours(),n.minute=t.getUTCMinutes(),n.second=t.getUTCSeconds(),n.millisecond=t.getUTCMilliseconds()),console.log("today=>",r,n),n}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?w8[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=w9();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:w7(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:w7(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:w7(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:w7(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:w7(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:w7(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:w7(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:w7(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:w7(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:w7(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:w7(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:w7(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:w7(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:w7(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:w7(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:w7(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:w7(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:w7(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:w7(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:w7(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:w7(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:w7(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:w7(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:w7(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:w7(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:w7(["zone"])}],o=i.baseName.slice(0,5),w5.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(xt.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=wY[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return xr[e]}(t),n=function(e,t){let r=xi[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function xs(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new wq(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new wq(t.valueOf()-60*e.offset*1e3):t}function xl(e,t=wG){let r=xa(e,t),n=r.invalid?new wq(NaN):xs(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function xu(e,t=wG){return e instanceof Date?new wq(e.valueOf()):"number"==typeof e?new wq(e):xl(e,t)}Date.fromString=wq.fromString=xl,Date.fromAny=wq.fromAny=xu,"u">typeof window&&(window.anyDateParser={fromString:xl,fromAny:xu,fromObject:xs,attempt:xa});var xc=r(5238),xd=r(83826);let xf=function(e){return null==e};function xp(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}fx.extend(fE),fx.extend(xd),fx.extend(xc);let xh="YYYY-MM-DDTHH:mm:ss.SSSZZ";function xm(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fx(e,xh).isValid()}function xy(e){return fx(e).isToday()}function xg(e){return xm(e)?fx(e,xh).toDate():null}function xb(e,t=!1){let r=fx(e);return t&&(r=r.utc()),r.format(xh)}function xv(e){return fx(e).toDate()}var x_=new WeakMap;let xw=new class{register(e,t){xp(this,x_).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(xp(this,x_).has(t))return xp(this,x_).get(t)}if(e.language&&xp(this,x_).has(e.language))return xp(this,x_).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return xp(this,x_).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,x_,{writable:!0,value:new Map})}};function xx(e,t){xw.register(e,t)}function xS(e){let t=e??wz();return xw.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let xE={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function xD(e,t={}){let r=xa(e,wz());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!xf(r.day)&&xf(r.month)&&(r=Object.assign({},ts(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},ts(r,"day"),{date:r.day}));let n=fx().set(r).toDate();return xf(r.year)&&(t.year=!1),xf(r.month)&&(t.month=!1),xf(r.date)&&(t.day=!1),xO(n,t)}function xO(e,t){let r,n=t?.locale??wz(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...xE,...{noToday:"am"===o.language},...t},p={calendar:i??xS(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},h=fx(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(xP("-"))),"wide"==a&&(t=t.map(xP(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${xC(e)}`),r}let xP=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function xC(e){return e.toLocaleTimeString(wz(),{hour:"2-digit",minute:"2-digit"})}function xk(e,t){return xO(e,{...t,time:!0})}function xT(e,t){let r=xS("string"==typeof t?new Intl.Locale(t):t);return r?gW(e,b5(r)):e}function xj(e,t){return new Intl.DurationFormat(wz(),t).format(e)}function xR(e,t){if(null==e)return null;if("string"==typeof e){let r=xa(e,wz());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...ts(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...ts(r,"day"),...{date:r.day}}),fx(t).set(r))}return fx(e)}let xM=["years","months","days","hours","minutes","seconds"],xA={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},xN={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function xI(e,t=fx(),r){let n,o=fx(t),i=xR(e,o);if(null==i)return null;if("string"==typeof r){let e=xA[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?xA[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=xM.indexOf(r);for(let o=0;o<xM.length;o++){let i=xM[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):xA[s]??s,function(e,t,r,n){let o=xM.indexOf(r),i=xM.indexOf(n),a=xM.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...xN};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[xA[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let x$={style:"short",localeMatcher:"lookup"};function xL(e,t=fx(),r){let n=xI(e,t,r);return null==n?null:xj(n,"object"==typeof r&&r.formatOptions?{...x$,...r.formatOptions}:x$)}let xF=(0,cH.createContext)(null);function xB(){let e=dW({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,cH.useMemo)(()=>{let t=wz();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,cH.useMemo)(()=>{let e=xS(t);return void 0!==e?b5(e):void 0},[t]),n=(0,cH.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,cH.useMemo)(()=>r?gW(gJ(g1()),r):gJ(g1()),[r]);return{calendar:r,intlLocale:n,today_:o}}let xV=new gk(1793,1,1);var xU={};function xW(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function xK(e={}){let{locale:t}=yW();return(0,cH.useMemo)(()=>new(0,_b.K)(t,e),[t,e])}xU={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var xH={};xH={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let xz=()=>{};function xG(e){var t;let r=(0,cH.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=gt((t=xH)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,cH.useRef)(!1),b=(0,cH.useCallback)(()=>{clearTimeout(r.current),g.current=!1},[]),v=ye(()=>{b()});(0,cH.useEffect)(()=>()=>v(),[]);let w=(0,cH.useRef)(!1),x=()=>{w.current=!0},S=()=>{w.current=!1},E=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,cH.useEffect)(()=>{w.current&&(yK&&yK.clear("assertive"),yH(E,"assertive"))},[E]);let D=(0,cH.useCallback)(()=>{b()},[b]),O=ye(c??xz),P=ye(f??xz),C=ye(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(O(),k(60))}),k=ye(e=>{v(),g.current=!0,r.current=window.setTimeout(C,e)}),T=ye(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(P(),j(60))}),j=ye(e=>{v(),g.current=!0,r.current=window.setTimeout(T,e)}),R=e=>{e.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:A}=yt(),N=(0,cH.useRef)(!1),[I,$]=(0,cH.useState)(null);(0,cH.useEffect)(()=>{"touch"===I?k(600):I&&k(400)},[I]);let[L,F]=(0,cH.useState)(null);return(0,cH.useEffect)(()=>{"touch"===L?j(600):L&&j(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":E,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(M(window,"pointercancel",D,{capture:!0}),N.current=!1,$("touch")),M(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(N.current=!0),A(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&N.current&&c?.(),N.current=!1,$(null)},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(f?.(),F("mouse")):(M(window,"pointercancel",D,{capture:!0}),N.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(N.current=!0),A(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&N.current&&f?.(),N.current=!1,F(null)},onFocus:x,onBlur:S}}}let xq=null;var xY=r(66284);function xZ(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let xJ=(0,cH.createContext)(null),xQ=(0,cH.createContext)(null),xX=(0,cH.forwardRef)(function(e,t){var r,n;[e,t]=hG(e,t,xJ);let{validationBehavior:o}=hz(_F)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=yW(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let f=(0,cH.useCallback)(e=>void 0===n||isNaN(n)?_z(e,t,r):_q(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=f(i)),isNaN(a)||"snap"!==d||(a=f(a));let[p,h]=vi(i,isNaN(a)?NaN:a,s),[m]=(0,cH.useState)(p),[y,g]=(0,cH.useState)(()=>isNaN(p)?"":new(0,_b.K)(l,o).format(p)),b=(0,cH.useMemo)(()=>new(0,xY.d)(l,o),[l,o]),v=(0,cH.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,cH.useMemo)(()=>new(0,_b.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,cH.useMemo)(()=>w.resolvedOptions(),[w]),S=(0,cH.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=_e({...e,value:p}),D=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(D=.01);let[O,P]=(0,cH.useState)(p),[C,k]=(0,cH.useState)(l),[T,j]=(0,cH.useState)(o);Object.is(p,O)&&l===C&&o===T||(g(S(p)),P(p),k(l),j(o));let R=(0,cH.useMemo)(()=>b.parse(y),[b,y]),M=(e,n=0)=>{if(isNaN(R))return _q(isNaN(n)?0:n,t,r,D);{let n=_q(R,t,r,D);return"+"===e&&n>R||"-"===e&&n<R?n:_q(xZ(e,R,D),t,r,D)}},A=(0,cH.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===r||isNaN(r)||_q(R,t,r,D)>R||xZ("+",R,D)<=r),[u,c,t,r,D,R]),N=(0,cH.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||_q(R,t,r,D)<R||xZ("-",R,D)>=t),[u,c,t,r,D,R]);return{...E,validate:e=>b.isValidPartialNumber(e,t,r),increment:()=>{let e=M("+",t);e===p&&g(S(e)),h(e),E.commitValidation()},incrementToMax:()=>{null!=r&&(h(_q(r,t,r,D)),E.commitValidation())},decrement:()=>{let e=M("-",r);e===p&&g(S(e)),h(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),E.commitValidation())},canIncrement:A,canDecrement:N,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":S(p));return}if(isNaN(r))return void g(S(p));let n="snap"===d?f(r):r,o=(n=b.parse(S(n)))!==p;h(n),g(S(void 0===i?n:p)),o&&E.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,cH.useRef)(null),[u,c]=hq(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,l,u,c,d;let f,{id:p,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:S,formatOptions:E,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:C,onKeyUp:k,description:T,errorMessage:j,isWheelDisabled:R,...M}=e,{increment:A,incrementToMax:N,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=gt((n=xU)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,cH.useCallback)(()=>{let e=r.current?.value??"";(0,yr.flushSync)(()=>{B()}),r.current?.value!==e&&yH(r.current?.value??"","assertive")},[B,r]),K=hF(p),{focusProps:H}=mZ({onBlur(){W()}}),z=xK(E),G=(0,cH.useMemo)(()=>z.resolvedOptions(),[z]),q=xK({...E,currencySign:void 0}),Y=(0,cH.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Z,incrementButtonProps:J,decrementButtonProps:Q}=xG({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:A,onIncrementToMax:N,onDecrement:I,onDecrementToMin:$,value:L,textValue:Y}),[X,ee]=(0,cH.useState)(!1),{focusWithinProps:et}=ym({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,cH.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);bc(t,"wheel",n?void 0:o)}({onScroll:(0,cH.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?A():e.deltaY<0&&I())},[I,A]),isDisabled:R||y||g||!X},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";m_()?en?eo="text":er&&(eo="decimal"):mD()&&(en?eo="numeric":er&&(eo="decimal"));let ei=h5(e),ea=(0,cH.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,yr.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ef,errorMessageProps:ep}=function(e,t,r){let n=ye(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,cH.useEffect)(()=>{if(!xW()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=xW()?null:e=>{let r=mr(e).value.slice(0,mr(e).selectionStart)+e.data+mr(e).value.slice(mr(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=vi(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=m0(e,t),d=_e({...e,value:l}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=vJ({...e,isInvalid:f,errorMessage:e.errorMessage||p}),v=h5(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,cH.useState)(l);return vQ(t,e.defaultValue??x,u),vX(e,d,t),{labelProps:m,inputProps:hU(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(mr(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cz().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,cH.useRef)(null);return{inputProps:hU(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...M,...ei,name:void 0,form:void 0,label:S,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[v7]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:K,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onKeyDown:(0,cH.useMemo)(()=>hO(ea,C),[ea,C]),onKeyUp:k,onPaste:t=>{e.onPaste?.(t);let r=mr(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:T,errorMessage:j},t,r);vQ(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,hP(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!xq&&"u">typeof document&&((xq=document.createElement("input")).type="number"),!xq))return;xq.min=null==l||isNaN(l)?"":String(l),xq.max=null==u||isNaN(u)?"":String(u),xq.step=null==c||isNaN(c)?"":String(c),xq.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&xq.validity.valid,r=e.validationMessage||xq.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:xq.validity.rangeOverflow,rangeUnderflow:xq.validity.rangeUnderflow,stepMismatch:xq.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(n),"native"!==i||xq.validity.valid||e.setCustomValidity(xq.validationMessage)});let eh=hU(Z,H,ed,{role:null,"aria-roledescription":mx()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(f=null!=e.label?ec.id:e["aria-labelledby"]);let eg=hF(),eb=hF(),ev=hU(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:f&&!m?eg:null,"aria-labelledby":f&&!m?`${eg} ${f}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),e_=hU(Q,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:f&&!h?eb:null,"aria-labelledby":f&&!h?`${eb} ${f}`:null,"aria-controls":K,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:e_,errorMessageProps:ep,descriptionProps:ef,isInvalid:es,validationErrors:el,validationDetails:eu}}({...hY(e),label:c,validationBehavior:i},s,l),v=hH({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=h5(e);return delete w.id,cz().createElement(hK,{values:[[xQ,s],[vS,f],[vD,{...p,ref:l}],[_B,{...d,ref:u}],[yD,{slots:{increment:h,decrement:m}}],[yC,{slots:{description:y,errorMessage:g}}],[_I,b]]},cz().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&cz().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function x0(e,t){return Number.parseInt(xO(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let x1=(0,cH.forwardRef)(function(e,t){let{className:r}=e,n=(0,cH.useContext)(vp),o=(0,cH.useContext)(vh),i=n??o,a=(0,cH.useContext)(xF),s=g1(),l=xO(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=x0(i.visibleRange.start.toDate(s),a),c=i.maxValue?x0(i.maxValue.toDate(s),a):void 0,d=i.minValue?x0(i.minValue.toDate(s),a):void 0,f=(0,cH.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,fR.jsxs)("span",{ref:t,className:r,children:[(0,fR.jsx)("span",{children:l}),(0,fR.jsxs)(xX,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,fR.jsx)(vO,{}),(0,fR.jsxs)(vE,{children:[(0,fR.jsx)(yO,{slot:"increment",children:(0,fR.jsx)(f9,{size:8})}),(0,fR.jsx)(yO,{slot:"decrement",children:(0,fR.jsx)(f6,{size:8})})]})]})]})}),x3="-esm-form-builder__datepicker-module__inputGroup___-wpzr",x4="-esm-form-builder__datepicker-module__inputSegment___ocu7L",x2="-esm-form-builder__datepicker-module__dateInputWrapper___909Km",x6="-esm-form-builder__datepicker-module__invalidText___oHJHi",x5="-esm-form-builder__datepicker-module__flatButton___i9LDo",x8="-esm-form-builder__datepicker-module__flatButtonMd___VZMkc",x9="-esm-form-builder__datepicker-module__flatButtonSm___VA5wy",x7="-esm-form-builder__datepicker-module__flatButtonLg___MnYLl";function Se({children:e}){let t=(0,cH.useContext)(w$),r=(0,cH.useContext)(wL),n=t??r,o=fd(()=>n?.close());return(0,fR.jsx)(_N,{className:"-esm-form-builder__datepicker-module__dialog___2pADb",ref:o,children:e})}let St=(0,cH.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,fR.jsx)(wR,{ref:o,className:"-esm-form-builder__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,fR.jsx)(Se,{children:(0,fR.jsxs)(i?vy:vm,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,fR.jsxs)("header",{className:"-esm-form-builder__datepicker-module__header___+fi16",children:[(0,fR.jsx)(yO,{className:fA()(x5,x8),slot:"previous",children:(0,fR.jsx)(pi,{size:16})}),(0,fR.jsx)(x1,{className:"-esm-form-builder__datepicker-module__monthYear___mGhot"}),(0,fR.jsx)(yO,{className:fA()(x5,x8),slot:"next",children:(0,fR.jsx)(pa,{size:16})})]}),(0,fR.jsx)(vb,{className:"-esm-form-builder__datepicker-module__calendarGrid___z07wV",children:e=>(0,fR.jsx)(vx,{className:fA()("cds--date-picker__day",{"-esm-form-builder__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),Sr=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(w$),[n,o]=hG({slot:e.slot},t,_S),{locale:i}=yW(),a=_x({...n,locale:i,createCalendar:b5}),s=(0,cH.useRef)(null),{fieldProps:l,inputProps:u}=v4({...n,inputRef:s},a,o),c=(0,cH.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,fR.jsxs)(hK,{values:[[_E,a],[vD,{...u,ref:s}],[vS,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,fR.jsx)(vE,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,cH.cloneElement)(e.children(t),{key:r}))}),(0,fR.jsx)(vO,{})]})}),Sn=(0,cH.forwardRef)(function(e,t){let r=(0,cH.useContext)(w$),n=(0,cH.useContext)(wL);return(r??n).isInvalid?(0,fR.jsx)(hp,{ref:t,size:16,...e}):(0,fR.jsx)(f2,{ref:t,size:16,...e})});class So{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Si=new Map,Sa=(0,cH.forwardRef)(function({segment:e,...t},r){let n=(0,cH.useContext)(_E),o=hS(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,cH.useRef)(""),{locale:l,direction:u}=yW(),c=function(){var e;let{locale:t}=yW(),r=ge((e=vq)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,cH.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new So(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=v0.get(t),m=e.isPlaceholder?"":e.text,y=(0,cH.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=y1({month:"long",timeZone:y.timeZone}),b=y1({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=xG({value:e.value??void 0,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,cH.useMemo)(()=>new(0,xY.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:S}=(n=function(e){let{locale:t}=yW(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Si.has(r))return Si.get(r);let n=new Intl.Collator(t,e);return Si.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,cH.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,cH.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,cH.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,cH.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),E=y1({hour:"numeric",hour12:!0}),D=(0,cH.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),O=(0,cH.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),P=y1({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,cH.useMemo)(()=>{if("era"!==e.type)return[];let r=gW(new gk(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),k=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(S(D,r))t.setSegment("dayPeriod",0);else if(S(O,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=C.find(e=>S(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};bc((0,cH.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mt(r.current,e?.anchorNode)&&e.collapse(r.current)});let T=(0,cH.useRef)("");bc(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&k(n.data)}}),bc(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(S(D,n)||S(O,n))&&k(n))}),hP(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let j=mx()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,cH.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let R=hF(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),N=bi({"aria-label":`${A}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:hU(v,N,{id:R,...j,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(cz().version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(mv()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&bm(r.current,{containingElement:bf(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=yy(),{hoverProps:u,isHovered:c}=yw({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,cH.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),f=(0,cH.useCallback)(e=>{e.stopPropagation()},[]);return(0,fR.jsx)("span",{...hU(h5(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:f})}),Ss={short:!1,size:"md"},Sl=(0,cH.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:g,...b}={...Ss,...e},{calendar:v,intlLocale:w,today_:x}=xB(),S=(0,cH.useId)(),E=!!(u??l),D=(0,cH.useMemo)(()=>wU(n,v),[n,v]),O=(0,cH.useMemo)(()=>wU(g,v,!0),[g,v]),P=(0,cH.useMemo)(()=>wU(d,v),[d,v]),C=(0,cH.useMemo)(()=>wU(f??xV,v),[f,v]),k=(0,cH.useMemo)(()=>i||s,[i,s]),T=(0,cH.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(wW(e)))),[h,p]);return(0,fR.jsx)(wV,{locale:w.toString(),children:(0,fR.jsx)("div",{className:fA()("cds--form-item",r),children:(0,fR.jsx)(hK,{values:[[xF,w]],children:(0,fR.jsxs)(wF,{className:fA()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:k,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:T,children:[(0,fR.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,fR.jsx)(_V,{className:fA()("cds--label",{"cds--label--disabled":o}),htmlFor:S,children:u??l}),(0,fR.jsxs)(vE,{className:x3,children:[(0,fR.jsx)(Sr,{id:E?S:void 0,ref:t,className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__inputWrapper___MHJAy",{"-esm-form-builder__datepicker-module__inputWrapperSm___esx4E":"sm"===y,"-esm-form-builder__datepicker-module__inputWrapperMd___VQbzP":"md"===y||!y||0===y.length,"-esm-form-builder__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===y}),children:e=>"era"!==e.type?(0,fR.jsx)(Sa,{className:x4,segment:e}):(0,fR.jsx)(cz().Fragment,{})}),(0,fR.jsx)(yO,{className:fA()(x5,{[x9]:"sm"===y,[x8]:"md"===y||!y||0===y.length,[x7]:"lg"===y}),children:(0,fR.jsx)(Sn,{})})]}),(0,fR.jsx)(_$,{className:x6,children:a})]}),(0,fR.jsx)(St,{variant:"single",today_:x})]})})})})}),Su=(0,cH.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=xB(),w=(0,cH.useId)(),x=!!(s??a),S=(0,cH.useMemo)(()=>{if(h)return{start:wU(h[0],g,!1),end:wU(h[1],g,!1)}},[h,g]),E=(0,cH.useMemo)(()=>{if(t)return{start:wU(t[0],g,!1),end:wU(t[1],g,!1)}},[t,g]),D=(0,cH.useMemo)(()=>wU(c??xV,g,!0),[c,g]),O=(0,cH.useMemo)(()=>wU(u,g,!0),[u,g]),P=(0,cH.useMemo)(()=>r||i,[r,i]),C=(0,cH.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([wW(e.start),wW(e.end)]))),[f,d]);return(0,fR.jsx)(wV,{locale:b.toString(),children:(0,fR.jsx)("div",{className:fA()("cds--form-item",e),children:(0,fR.jsx)(hK,{values:[[xF,b]],children:(0,fR.jsx)(wB,{id:x?w:void 0,className:fA()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:O,minValue:D,value:S,defaultValue:E,ref:y,isDisabled:o,...m,onChange:C,children:(0,fR.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,fR.jsx)(_V,{className:fA()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,fR.jsxs)(vE,{className:x3,children:[(0,fR.jsxs)("div",{className:fA()("-esm-form-builder__datepicker-module__inputsWrapper___UyGoG",{"-esm-form-builder__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-form-builder__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-form-builder__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,fR.jsx)(_O,{className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__startInput___C8vnM",x2),slot:"start",children:e=>(0,fR.jsx)(Sa,{className:x4,segment:e})}),(0,fR.jsx)("div",{className:"-esm-form-builder__datepicker-module__separator___vHLFZ",children:(0,fR.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fR.jsx)(_O,{className:fA()("cds--date-picker-input__wrapper","-esm-form-builder__datepicker-module__endInput___25OF9",x2),slot:"end",children:e=>(0,fR.jsx)(Sa,{className:x4,segment:e})})]}),(0,fR.jsx)(yO,{className:fA()(x5,{[x9]:"sm"===p,[x8]:"md"===p||!p||0===p.length,[x7]:"lg"===p}),children:(0,fR.jsx)(Sn,{})})]}),(0,fR.jsx)(_$,{className:x6,children:n}),(0,fR.jsx)(St,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Sc=({diagnoses:e})=>{let{diagnosisTags:t}=dW({externalModuleName:"@openmrs/esm-styleguide"});return(0,fR.jsx)("div",{className:"-esm-form-builder__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,fR.jsx)(fI.Tag,{type:i,children:o},n)})})},Sd={action:"-esm-form-builder__empty-card-module__action___l4wUo",content:"-esm-form-builder__empty-card-module__content___XbsSJ",desktopHeading:"-esm-form-builder__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-form-builder__empty-card-module__tabletHeading___unl1F",tile:"-esm-form-builder__empty-card-module__tile___vS3Sj"},Sf=({width:e="64",height:t="64"})=>(0,fR.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,fR.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Sp=e=>{let t="tablet"===fa(),r=e.launchForm;return(0,fR.jsx)(fI.Layer,{className:Sd.layer,children:(0,fR.jsxs)(fI.Tile,{className:Sd.tile,children:[(0,fR.jsx)("div",{className:t?Sd.tabletHeading:Sd.desktopHeading,children:(0,fR.jsx)("h4",{children:e.headerTitle})}),(0,fR.jsx)(Sf,{}),(0,fR.jsx)("p",{className:Sd.content,children:op("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fR.jsx)("p",{className:Sd.action,children:r&&(0,fR.jsx)(fI.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:op("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Sh=({error:e,headerTitle:t})=>{let r="tablet"===fa();return(0,fR.jsx)(fI.Layer,{children:(0,fR.jsxs)(fI.Tile,{className:"-esm-form-builder__error-state-module__tile___hHM56",children:[(0,fR.jsx)("div",{className:r?"-esm-form-builder__error-state-module__tabletHeading___W7a4U":"-esm-form-builder__error-state-module__desktopHeading___VL8Rv",children:(0,fR.jsx)("h4",{children:t})}),(0,fR.jsxs)("p",{className:"-esm-form-builder__error-state-module__errorMessage___IytZy",children:[op("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fR.jsx)("p",{className:"-esm-form-builder__error-state-module__errorCopy___E1yZO",children:op("errorCopy")})]})})},Sm=Sh,Sy=cz().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=fu(),a=window.location??{pathname:""},s=dt(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,fR.jsxs)(fI.SideNav,{"aria-label":op("leftNavigation","Left navigation"),className:"-esm-form-builder__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,fR.jsx)(di,{name:"global-nav-menu-slot"}),r?(0,fR.jsx)(dA,{value:o,fallback:(0,fR.jsx)(di,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,fR.jsx)(c1.Provider,{value:o,children:(0,fR.jsx)(di,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),Sg=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,cH.useState)(""),s=(0,cH.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=dq()(t,oD,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,cH.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:h}=function(e,t=0,r=""){let n=dz(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=d9()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${ox}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},oD);return(0,cH.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,cH.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,cH.useCallback)(e=>{o(),a(e.trim())},[o]),g=ff((0,cH.useCallback)(()=>{!f&&d&&h(e=>e+1)},[f,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)(fI.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:op("searchForLocation"),id:s,placeholder:op("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),p&&(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,fR.jsx)(fI.InlineNotification,{kind:"error",subtitle:op("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:op("error","Error")})}),(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__searchResults___aCL93",children:c?(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,fR.jsx)(fI.RadioButtonSkeleton,{className:"-esm-form-builder__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__locationResultsContainer___5yuvs",children:m.length>0?(0,fR.jsx)(fI.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,fR.jsx)(fI.RadioButton,{className:"-esm-form-builder__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,fR.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__emptyState___qiPqQ",children:(0,fR.jsx)("p",{className:"-esm-form-builder__location-picker-module__locationNotFound___tKDOJ",children:op("noResultsToDisplay")})})}),f&&(0,fR.jsx)("div",{className:"-esm-form-builder__location-picker-module__loadingIcon___PGwvc",children:(0,fR.jsx)(fI.InlineLoading,{description:op("loading")})})]})})]})},Sb=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Sv=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];function S_(e){if(e)return"--"===e?"normal":Sb.includes(e)?e.toLowerCase():Sv.includes(e)?e:"normal"}function Sw(e,t){if(!t||null==e||""===e)return"normal";let r="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(r)?"normal":null!==t.hiAbsolute&&void 0!==t.hiAbsolute&&r>t.hiAbsolute?"off_scale_high":null!==t.hiCritical&&void 0!==t.hiCritical&&r>=t.hiCritical?"critically_high":null!==t.hiNormal&&void 0!==t.hiNormal&&r>t.hiNormal?"high":null!==t.lowAbsolute&&void 0!==t.lowAbsolute&&r<t.lowAbsolute?"off_scale_low":null!==t.lowCritical&&void 0!==t.lowCritical&&r<=t.lowCritical?"critically_low":null!==t.lowNormal&&void 0!==t.lowNormal&&r<t.lowNormal?"low":"normal"}function Sx(e,t){let r=null;e&&(r=t?`${ow}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${ow}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=dq()(r,oD),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}let SS={container:"-esm-form-builder__numeric-observation-module__container___+Kqi9",card:"-esm-form-builder__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-form-builder__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-form-builder__numeric-observation-module__critical-value___nSKSX",cell:"-esm-form-builder__numeric-observation-module__cell___wc90e","critically-high":"-esm-form-builder__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-form-builder__numeric-observation-module__critically-low___h9797",high:"-esm-form-builder__numeric-observation-module__high___0-YpP",low:"-esm-form-builder__numeric-observation-module__low___TuqAk","label-container":"-esm-form-builder__numeric-observation-module__label-container___FtozC","value-container":"-esm-form-builder__numeric-observation-module__value-container___R9qoY",label:"-esm-form-builder__numeric-observation-module__label___0DGA5",value:"-esm-form-builder__numeric-observation-module__value___ohqoh",units:"-esm-form-builder__numeric-observation-module__units___xvMd3","pad-right":"-esm-form-builder__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-form-builder__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-form-builder__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-form-builder__numeric-observation-module__arrow___Agoh9"},SE=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,cH.useId)(),{referenceRange:u,isLoading:c}=Sx(o||n?void 0:i,s),d=o??u,f=(0,cH.useMemo)(()=>n?S_(n):d&&!c?Sw(e,d):"normal",[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,h="normal"!==f,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,g=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:op("notAvailable","Not available"),w=fA()({[SS["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[SS["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[SS.low]:"low"===f,[SS.high]:"high"===f,[SS["off-scale-low"]]:"off_scale_low"===f,[SS["off-scale-high"]]:"off_scale_high"===f}),x=fA()({[SS.container]:!0,[SS.card]:!0,[SS["critical-value"]]:p,[SS["abnormal-value"]]:h&&!p}),S=fA()({[SS.cell]:!0,[w]:!0});return"cell"===a?(0,fR.jsxs)("div",{className:S,children:[v,b&&t?` ${t}`:""]}):(0,fR.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,fR.jsxs)("div",{className:SS["label-container"],children:[(0,fR.jsx)("span",{id:m,className:SS.label,children:r}),h&&(0,fR.jsx)("span",{className:SS[f.replace("_","-")],title:op("abnormalValue","Abnormal value")})]}),(0,fR.jsxs)("div",{className:SS["value-container"],children:[(0,fR.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:SS.value,children:v}),b&&t&&(0,fR.jsx)("span",{id:g,className:SS.units,children:t})]})]})},SD=K("modalState",{modalContainer:null,modalStack:[]});function SO(e,t={},r=()=>{}){let n=()=>{let e=SD.getState().modalStack.find(e=>e.onClose===r);e&&function(e){if("TO_BE_DELETED"===e.state||"DELETED"===e.state)return;e.state="TO_BE_DELETED";let t=SD.getState();SD.setState({...t,modalStack:[...t.modalStack]})}(e)};if(function(e){let t=cq.getState().modals[e];if(!t){let n=cy(e);if(n){var r;t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),r=t,cq.setState(e=>(e.modals[r.name]=r,e))}}return t}(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=SD.getState()).modalStack],SD.setState({...i,modalStack:a})}else j(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}window.getComputedStyle(document.body).overflow;var SP=r(66401);let SC=new ea.Subject,Sk=0,ST=new ea.Subject,Sj=0;function SR(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,SP.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{SC.next({...e,id:Sk++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function SM(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,SP.A)(t))?setTimeout(()=>{ST.next({...e,id:Sj++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let SA="-esm-form-builder__page-header-module__pageHeader___XNJYe",SN=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,fR.jsx)("div",{className:fA()(SA,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,fR.jsx)("div",{className:fA()(SA,n),...o,children:(0,fR.jsx)(SI,{title:t,illustration:r})})}},SI=({title:e,illustration:t,className:r})=>{let[n,o]=(0,cH.useState)(null);return(0,cH.useEffect)(()=>{tF("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fR.jsxs)("div",{className:fA()("-esm-form-builder__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,fR.jsxs)("div",{className:"-esm-form-builder__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,fR.jsx)("p",{children:op(n.implementationName)}),(0,fR.jsx)("p",{className:"-esm-form-builder__page-header-module__pageName___+eYMc",children:e})]})]})},S$=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=fm(t,e,n,i),u="tablet"===fa(),c=op("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fR.jsx)(fR.Fragment,{children:e>0&&(0,fR.jsxs)("div",{className:fA()({"-esm-form-builder__pagination-module__tablet___DdaYk":u,"-esm-form-builder__pagination-module__desktop___rSwlo":!u}),children:[(0,fR.jsxs)("div",{children:[c,o&&(0,fR.jsx)(cG,{to:o,className:"-esm-form-builder__pagination-module__configurableLink___cTCLf",children:a??op("seeAll","See all")})]}),(0,fR.jsx)(fI.Pagination,{className:"-esm-form-builder__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>op("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function SL(e){return SB(SU(e,"usual","official"))}function SF(e){return SL(e)}function SB(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function SV(e){return SB(e)}function SU(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function SW(e,t=fx()){let r=fx(t),n=xR(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function SK(e,t=fx()){let r=SW(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),xj(r,n)}let SH={container:"-esm-form-builder__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-form-builder__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-form-builder__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-form-builder__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-form-builder__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-form-builder__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-form-builder__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-form-builder__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-form-builder__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-form-builder__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-form-builder__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-form-builder__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-form-builder__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-form-builder__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-form-builder__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-form-builder__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-form-builder__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-form-builder__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-form-builder__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-form-builder__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-form-builder__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-form-builder__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function Sz({showIdentifierLabel:e,type:t,value:r}){return(0,fR.jsx)("span",{className:SH.primaryIdentifier,children:(0,fR.jsxs)(fI.Tag,{className:SH.tag,type:"gray",children:[e&&t?.text&&(0,fR.jsxs)("span",{className:SH.label,children:[t.text,": "]}),(0,fR.jsx)("span",{className:SH.value,children:r})]})})}function SG({showIdentifierLabel:e,type:t,value:r}){return(0,fR.jsxs)(fI.FormLabel,{className:SH.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,fR.jsxs)("span",{className:SH.label,children:[t?.text,": "]}),(0,fR.jsx)("span",{className:SH.value,children:r})]})}function Sq({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=dW(),{primaryIdentifierCode:n}=fb(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,fR.jsx)(fR.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,fR.jsxs)(cz().Fragment,{children:[(0,fR.jsx)("span",{className:SH.identifier,children:r?.coding?.[0]?.code===n?(0,fR.jsx)(Sz,{showIdentifierLabel:t,type:r,value:e}):(0,fR.jsx)(SG,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"})]},e)):""})}let SY={Female:pb,Male:pv,Other:p_,Unknown:pw},SZ=({gender:e})=>{let t=SY[e];return t?(0,fR.jsx)(t,{fill:"#525252"}):null},SJ={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function SQ({patient:e,renderedFrom:t}){var r;let n,o,i=SL(e),a=e?.gender&&(o=SJ[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:op(n,r),iconKey:o}),s=(0,cH.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,fR.jsxs)("div",{className:SH.patientInfo,children:[(0,fR.jsx)("div",{className:fA()(SH.row,SH.patientNameRow),children:(0,fR.jsxs)("div",{className:SH.flexRow,children:[(0,fR.jsx)("span",{className:SH.patientName,children:i}),a&&(0,fR.jsxs)("div",{className:SH.gender,children:[(0,fR.jsx)(SZ,{gender:a.iconKey}),(0,fR.jsx)("span",{children:a.displayText})]}),(0,fR.jsx)(di,{className:SH.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fR.jsxs)("div",{className:SH.demographics,children:[e.birthDate&&(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("span",{children:SK(e.birthDate)}),(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"}),(0,fR.jsx)("span",{children:xD(e.birthDate,{time:!1})}),(0,fR.jsx)("span",{className:SH.separator,children:"\xb7"})]}),(0,fR.jsx)(Sq,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fR.jsx)(di,{className:SH.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var SX=r(81673);function S0({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,cH.useState)(!1),{extensions:a}=dr(r),s="tablet"===fa(),l=fd(()=>i(!1),o),u=(0,cH.useRef)(null),c=(0,cH.useRef)(null),d=(0,cH.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,h=(0,cH.useCallback)(()=>i(e=>!e),[]),m=(0,cH.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,cH.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,cH.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,cH.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,fR.jsx)("div",{className:"-esm-form-builder__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,fR.jsxs)("div",{"data-overflow-menu":!0,className:fA()("cds--overflow-menu",f$),ref:l,children:[(0,fR.jsxs)("button",{className:fA()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},fB),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:h,onKeyDown:y,ref:u,children:[(0,fR.jsx)("span",{className:"-esm-form-builder__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:op("actions","Actions")})," ",(0,fR.jsx)(SX.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fR.jsxs)("div",{className:fA()("cds--overflow-menu-options","cds--overflow-menu--flip",fL,{[fF]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,fR.jsx)("ul",{className:fA()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fR.jsx)(di,{name:r,state:g},r)}),(0,fR.jsx)("span",{})]})]})})}function S1({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,fR.jsx)(fI.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?ps:po,children:e?op("showLess","Show less"):op("showMore","Show more")})}let S3={contactDetails:"-esm-form-builder__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-form-builder__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-form-builder__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-form-builder__patient-banner-contact-details-module__row___8JcKK",col:"-esm-form-builder__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-form-builder__patient-banner-contact-details-module__relationship___GTTsg"},S4=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${ow}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=dx()(t,oD),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,cH.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)("p",{className:S3.heading,children:[op("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,fR.jsx)(fI.InlineLoading,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>xv(e?.startDate).getTime()-xv(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fR.jsx)("li",{children:(0,fR.jsx)(cG,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fR.jsx)("li",{children:"--"})})(),t.length>3&&(0,fR.jsx)("li",{className:S3.link,children:(0,fR.jsx)(cG,{to:`${window.spaBase}/home/patient-lists`,children:op("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},S2=({patientId:e})=>{let{patient:t,isLoading:r}=fg(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,fR.jsx)(fI.InlineLoading,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("address","Address")}),(0,fR.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,fR.jsxs)("li",{children:[op(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,fR.jsxs)("li",{children:[op(e,e),": ",t]},`address-${e}`)):(0,fR.jsx)("li",{children:"--"})})]})},S6=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=dW({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=dq()(`${ow}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,oD);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,cH.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,cH.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?op(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("contactDetails","Contact Details")}),t?(0,fR.jsx)(fI.InlineLoading,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,fR.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,fR.jsx)("li",{children:"--"})})]})},S5=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${ow}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=dx()(e?t:null,oD),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsx)("p",{className:S3.heading,children:op("relationships","Relationships")}),r?(0,fR.jsx)(fI.InlineLoading,{description:`${op("loading","Loading")} ...`,role:"progressbar"}):(0,fR.jsx)("ul",{children:t&&t.length>0?(0,fR.jsx)(fR.Fragment,{children:t.map(e=>(0,fR.jsxs)("li",{className:S3.relationship,children:[(0,fR.jsx)("div",{children:(0,fR.jsx)(cG,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fR.jsx)("div",{children:e.relationshipType}),(0,fR.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?op("yearAbbreviation","yr"):op("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fR.jsx)("li",{children:"--"})})]})};function S8({patientId:e,deceased:t}){return(0,fR.jsxs)("div",{className:fA()(S3.contactDetails,{[S3.deceased]:t}),children:[(0,fR.jsxs)("div",{className:S3.row,children:[(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S2,{patientId:e})}),(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S6,{patientUuid:e})})]}),(0,fR.jsxs)("div",{className:S3.row,children:[(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S5,{patientId:e})}),(0,fR.jsx)("div",{className:S3.col,children:(0,fR.jsx)(S4,{patientUuid:e})})]})]})}var S9=r(16767),S7=r.n(S9);function Ee(e){let{patientPhotoConceptUuid:t}=dW({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${ow}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=dx()(e?r:null,oD),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Et=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,d_.useTranslation)();return(0,fR.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fR.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fR.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},Er="-esm-form-builder__patient-photo-module__avatar___R93LX";function En({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=Ee(e),[i,a]=(0,cH.useState)(null),[s,l]=(0,cH.useState)(!1),u=(0,cH.useMemo)(()=>S7().generate(e),[e]);(0,cH.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,cH.useMemo)(()=>r||(i?op("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):op("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,fR.jsx)(fI.SkeletonIcon,{className:"-esm-form-builder__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,fR.jsx)(Et,{"aria-label":op("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,fR.jsx)("div",{"aria-label":c,children:(0,fR.jsx)("img",{className:Er,src:i,alt:c,title:t})}):(0,fR.jsx)("div",{"aria-label":c,children:(0,fR.jsx)("div",{className:Er,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fR.jsx)("span",{className:"-esm-form-builder__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let Eo=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],Ei=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Ea=Ei,Es=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),El=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),Eu=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),Ec=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),Ed=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Ef=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ep=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Eh=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Em=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Ey=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Eg=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Eb=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ev=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),E_=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Ew=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Ex=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),ES=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),EE=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),ED=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),EO=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),EP=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),EC=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Ek=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),ET=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Ej=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),ER=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),EM=(0,cH.memo)((0,cH.forwardRef)(function(e,t){return(0,fR.jsx)(E$,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),EA=Em,EN=EE,EI=(0,cH.memo)((0,cH.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,cH.useRef)(document.getElementById(e));return(0,cH.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,fR.jsx)(dA,{value:o.current,fallback:t,children:(0,fR.jsx)(E$,{ref:n,pictogram:e,pictogramProps:r})})})),E$=(0,cH.memo)((0,cH.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fR.jsx)("svg",{ref:r,className:fA()("-esm-form-builder__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,fR.jsx)("use",{href:`#${e}`})})})),EL=({children:e})=>"tablet"===fa()?(0,fR.jsx)(fI.Layer,{children:e}):(0,fR.jsx)(fR.Fragment,{children:e}),EF=new ea.Subject,EB=0;function EV(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{EF.next({...e,id:EB++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let EU=new ea.Subject,EW=0;function EK(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,SP.A)(t))?setTimeout(()=>{EU.next({...e,id:EW++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function EH(e,t=!1){if(t)return!0;let r=EZ[e];return!r||!r()}function Ez(e,t){let r=E3.getState()?.workspaceGroup,n=r?.name;n&&e===n&&E6(()=>{let n=De(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),E3.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function EG(e,t){let{name:r,additionalProps:n}=t;cQ(r);let o=()=>{EX(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Eq(r,n),closeWorkspaceGroup:!1})};EH(e.name)?o():E8("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Eq(e,t){let r=cQ(e),n=E3.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Ez(n.name,()=>{Eq(e,t)});let o=E3.getState().workspaceGroup?.name,i={...r,title:E9(r,t),closeWorkspace:(t={})=>EX(e,t),closeWorkspaceWithSavedChanges:t=>EX(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(EZ[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,E3.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){E3.setState(r=>{let n=[e,...t??r.openWorkspaces],o=E2(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&De(o,t);let s=E3.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===E9(t,t.additionalProps)&&{title:E9(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,E3.getState().openWorkspaces.filter(e=>e.type!=i.type)),EG(u,{name:e,additionalProps:t})):a(i);else EG(s[0],{name:e,additionalProps:t})}function EY({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){E0(t),Eq(r,n),oy({to:e})}let EZ={};function EJ(){let e=E3.getState();E3.setState({...e,prompt:null})}let EQ={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function EX(e,t={}){t={...EQ,...t};let r=()=>{let r=E3.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=E3.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Ez(o),EZ[e]=()=>!1,E3.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:E2(n?.[0])})),t?.onWorkspaceClose?.()};return EH(e,t?.ignoreChanges)?(r(),!0):(E8("closing-workspace",r,cQ(e).title??e),!1)}function E0(e){E3.getState().context!=e&&E3.setState({context:e,openWorkspaces:[],prompt:null})}let E1={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},E3=K("workspace",E1);function E4(e){let t=E3.getState();E3.setState({...t,workspaceWindowState:e})}function E2(e){return e?.preferredWindowSize??"normal"}function E6(e=()=>{},t=()=>!0){let r=E3.getState().openWorkspaces.filter(t).every(({name:e})=>EH(e)),n=()=>{E7(),e?.()};r?n():E8("closing-all-workspaces",n)}function E5(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=c2(E3);return(0,cH.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function E8(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:op("unsavedChangesTitleText","Unsaved changes"),body:op("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:op("discard","Discard")};break;case"closing-all-workspaces":{let e=E3.getState().openWorkspaces.filter(({name:e})=>!EH(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:op("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:op("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:op("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:op("unsavedChangesTitleText","Unsaved changes"),body:op("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{E3.setState(e=>({...e,prompt:null})),t?.()},confirmText:op("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}E3.setState(e=>({...e,prompt:n}))}function E9(e,t){return t?.workspaceTitle??e.title}function E7(){E3.setState(E1)}function De(e,t={}){if(!e||"default"===e)return;let r=z(e,{});return t&&r.setState(e=>({...e,...t})),r}let Dt="-esm-form-builder__action-menu-button-module__container___Uwne-",Dr="-esm-form-builder__action-menu-button-module__elementContainer___vWkQO",Dn="-esm-form-builder__action-menu-button-module__active___D7Idw";function Do({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,fR.jsxs)(fR.Fragment,{children:[e({size:16}),t?(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button-module__countTag___XJRiM",children:r})]})}let Di=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=fa(),{workspaces:s,workspaceWindowState:l}=E5(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,fR.jsxs)(fI.Button,{className:fA()(Dt,{[Dn]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,fR.jsx)("span",{className:Dr,children:(0,fR.jsx)(Do,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,fR.jsx)("span",{children:t})]}):(0,fR.jsx)(fI.IconButton,{align:"left","aria-label":r,className:fA()(Dt,{[Dn]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,fR.jsx)("div",{className:Dr,children:(0,fR.jsx)(Do,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var Da=r(54535),Ds=r(40771),Dl=/[\\^$.*+?()[\]{}|]/g,Du=RegExp(Dl.source);let Dc=function(e){return(e=(0,e5.A)(e))&&Du.test(e)?e.replace(Dl,"\\$&"):e};function Dd({contextKey:e}){let{prompt:t}=E5();return(0,cH.useEffect)(()=>{RegExp(`/${Dc(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,cH.useEffect)(()=>(E0(e),()=>{E0(null)}),[e]),(0,cH.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${Dc(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=E3.getState().openWorkspaces.every(({name:e})=>EH(e));a||(s?E7():(r?.(),E6(()=>{oy({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,fR.jsxs)(fI.ComposedModal,{open:!0,onClose:EJ,children:[(0,fR.jsx)(fI.ModalHeader,{title:t.title}),(0,fR.jsx)(fI.ModalBody,{children:(0,fR.jsx)("p",{className:"-esm-form-builder__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,fR.jsxs)(fI.ModalFooter,{children:[(0,fR.jsx)(fI.Button,{kind:"secondary",onClick:EJ,children:t.cancelText??op("cancel")}),(0,fR.jsx)(fI.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??op("confirm")})]})]}):null}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(t){Dm(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Dh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dy(e){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dg(e,t){return(Dg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Db(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dv=function(e){var t=cH.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&Dg(a,t);var r,n,o,i=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Dy(a);e=r?Reflect.construct(t,arguments,Dy(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return Db(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),Dm(Db(t=i.call(this,e)),"handleRef",function(e){t.el=e}),Dm(Db(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),Dm(Db(t),"getParcelProps",function(){var e=Dp(Dp({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,Dp({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return df&&df.Consumer?cH.createElement(df.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=df&&df.Consumer?cH.createElement(df.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return cH.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Dh(a.prototype,n),o&&Dh(a,o),a}();Dm(Dv,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function D_({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,cH.useState)(),o=function(e){let[t,r]=(0,cH.useState)({}),[n,o]=(0,cH.useState)(e);return(0,cH.useEffect)(()=>{n!==e&&o(e)},[e]),(0,cH.useEffect)(()=>{let e,t=De(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,cH.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,cH.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,fR.jsx)(Dv,{config:r,mountParcel:cR,...i},e.name):(0,fR.jsx)(fI.InlineLoading,{className:"-esm-form-builder__workspace-module__loader___v7QFg",description:`${op("loading","Loading")} ...`})}let Dw=function({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,cH.useState)(!1),i=(0,cH.useRef)(window.innerHeight),{featureName:a}=(0,cH.useContext)(c1),s=fa();(0,cH.useEffect)(()=>{let e=()=>{o(!fs(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,fR.jsx)("aside",{className:fA()("-esm-form-builder__action-menu-module__sideRail___Aa96v",{"-esm-form-builder__action-menu-module__withinWorkspace___2bJET":e,"-esm-form-builder__action-menu-module__sideRailHidden___Yb0w9":n,"-esm-form-builder__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,fR.jsx)("div",{className:"-esm-form-builder__action-menu-module__container___mzfAh",children:(0,fR.jsx)(di,{className:"-esm-form-builder__action-menu-module__chartExtensions___DiJtm",name:l,state:r})})})};function Dx({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=fa(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=E5(),u=l?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,cH.useMemo)(()=>r||u&&!d,[u,d,r]);return dB(!d&&!fs(i)),(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)("div",{className:r?"-esm-form-builder__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-form-builder__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,fR.jsx)("aside",{className:fA()(t?"-esm-form-builder__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-form-builder__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-form-builder__workspace-module__hiddenRelative___qqT-4":d,"-esm-form-builder__workspace-module__narrowWorkspace___MMI1u":"narrow"===f,"-esm-form-builder__workspace-module__widerWorkspace___be-UT":"wider"===f,"-esm-form-builder__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===f}),children:(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-form-builder__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-form-builder__workspace-module__hiddenFixed___48wS9":d}),children:a.map((e,t)=>(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-form-builder__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,fR.jsx)(cH.Suspense,{fallback:null,children:(0,fR.jsx)(d_.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fR.jsx)(DS,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,fR.jsx)(Dd,{contextKey:e})]}),p&&(0,fR.jsx)(Dw,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function DS({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,d_.useTranslation)(),n=fa(),{workspaceWindowState:o,workspaceGroup:i}=E5(),a=i?.name,s="maximized"===o;(0,cH.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,cH.useContext)(c1),u=(0,cH.useCallback)(()=>{E4(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,cH.useMemo)(()=>e??{},[e]),h=(0,cH.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,fR.jsxs)(fR.Fragment,{children:[(0,fR.jsxs)(fI.Header,{"aria-label":op("workspaceHeader","Workspace Header"),className:"-esm-form-builder__workspace-module__header___nACZO",children:[!fs(n)&&!c&&(0,fR.jsx)(fI.HeaderMenuButton,{"aria-label":op("close","Close"),renderMenuIcon:(0,fR.jsx)(fX,{}),onClick:()=>p()}),(0,fR.jsx)(fI.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,fR.jsx)("div",{className:"-esm-form-builder__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,fR.jsxs)(fI.HeaderGlobalBar,{className:"-esm-form-builder__workspace-module__headerButtons___heP0Q",children:[(0,fR.jsx)(di,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,fR.jsx)(di,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,fR.jsx)(di,{name:`workspace-header-${l}-slot`,state:h}),fs(n)&&(0,fR.jsxs)(fR.Fragment,{children:[(d||s)&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":s?op("minimize","Minimize"):op("maximize","Maximize"),onClick:u,children:s?(0,fR.jsx)(Da.Xj,{}):(0,fR.jsx)(Da.hz,{})}),c&&!a?(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("hide","Hide"),onClick:()=>E4("hidden"),children:(0,fR.jsx)(f0,{})}):(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("close","Close"),onClick:()=>p?.(),children:(0,fR.jsx)(pl,{})})]}),"tablet"===n&&c&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("close","Close"),onClick:()=>p?.(),children:(0,fR.jsx)(Ds.d3,{})})]})]}),(0,fR.jsx)("div",{className:fA()("-esm-form-builder__workspace-module__workspaceContent___oYdxI",{"-esm-form-builder__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,fR.jsx)(D_,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function DE(e,t){let{openedGroup:r}=cX.getState();if(r){if(r.groupName===e&&DP(r.props,t))return!0;else if(!await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return cX.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function DD(e){let{openedGroup:t,openedWindows:r}=cX.getState();if(t){if(r.length>0&&!(e||await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;cX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function DO(e,t=null,r=null,n=null){let o=cX.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=function(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=cX.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=function(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=cX.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=c0(e);if(a&&(a.groupName!==l.name||!DP(a.props,n)))return!!await DC({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(DP(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&DP(d.props,t)?((a||u!==o.openedWindows.length-1)&&cX.setState(Dk.restoreWindow(o,s)),!0):!!await DC({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[DR(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await DC({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(cX.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await DC({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(cX.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[DR(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function DP(e,t){return null==e||null==t||A(e,t)}function DC(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=cX.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=SO("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Dk={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=c0(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,DR(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=c0(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}},DT=()=>(0,cH.useContext)(df),Dj=()=>Object.keys(cX.getState().registeredWorkspacesByName);function DR(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:cV()}}let DM={workspaceOuterContainer:"-esm-form-builder__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-form-builder__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-form-builder__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-form-builder__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-form-builder__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-form-builder__workspace2-module__maximized___-yo9l",hidden:"-esm-form-builder__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-form-builder__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-form-builder__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-form-builder__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-form-builder__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-form-builder__workspace2-module__header___p0kuD",headerButtons:"-esm-form-builder__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-form-builder__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-form-builder__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-form-builder__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-form-builder__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-form-builder__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-form-builder__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-form-builder__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-form-builder__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},DA=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=fa(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:h}=c6(cX,Dk),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=DT(),v=c0(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,cH.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,cH.useEffect)(()=>{f[m]!==e&&p(m,e)},[f,m,e,p]),v<0||null==l||null==x)return null;let S=u[l.groupName];if(!S)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[m].window,D=c[E];if(!D)throw Error(`Cannot find registered workspace window ${E}`);let{icon:O,canMaximize:P}=D,C="closable"===S.persistence,k=!!O&&!C,{maximized:T}=w,j=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),M=v<s.length-1||h;return(0,fR.jsxs)("div",{className:fA()(DM.workspaceOuterContainer,{[DM.narrowWorkspace]:"narrow"===j,[DM.widerWorkspace]:"wider"===j,[DM.extraWideWorkspace]:"extra-wide"===j,[DM.isActionMenuOpened]:R}),children:[(0,fR.jsx)("div",{className:fA()(DM.workspaceSpacer,{[DM.hidden]:M})}),(0,fR.jsx)("div",{className:fA()(DM.workspaceMiddleContainer,{[DM.maximized]:T,[DM.hidden]:M,[DM.isRootWorkspace]:y,[DM.showActionMenu]:b}),children:(0,fR.jsxs)("div",{className:fA()(DM.workspaceInnerContainer,{[DM.maximized]:T,[DM.hidden]:M,[DM.isRootWorkspace]:y}),children:[(0,fR.jsxs)(fI.Header,{"aria-label":op("workspaceHeader"),className:DM.header,children:[(0,fR.jsx)(fI.HeaderName,{prefix:"",children:e}),(0,fR.jsx)("div",{className:DM.overlayHeaderSpacer}),(0,fR.jsx)(fI.HeaderGlobalBar,{className:DM.headerButtons,children:fs(n)?(0,fR.jsxs)(fR.Fragment,{children:[(P||T)&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":T?op("minimize"):op("maximize"),onClick:()=>o(E,!T),children:T?(0,fR.jsx)(Da.Xj,{}):(0,fR.jsx)(Da.hz,{})}),k&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("hide"),onClick:()=>i(),children:(0,fR.jsx)(f0,{})}),!C&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("close"),onClick:()=>g({closeWindow:!0}),children:(0,fR.jsx)(pl,{})})]}):(0,fR.jsxs)(fR.Fragment,{children:[k&&(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("hide"),onClick:()=>i(),children:(0,fR.jsx)(Ds.d3,{})}),(0,fR.jsx)(fI.HeaderGlobalAction,{"aria-label":op("close"),onClick:()=>{C?DD():g({closeWindow:!0})},children:(0,fR.jsx)(pl,{})})]})})]}),(0,fR.jsx)("div",{className:fA()(DM.workspaceContent),children:t})]})})]})},DN="-esm-form-builder__action-menu-button2-module__container___gYRoa",DI="-esm-form-builder__action-menu-button2-module__elementContainer___vBViO",D$="-esm-form-builder__action-menu-button2-module__active___uRJRA",DL="-esm-form-builder__action-menu-button2-module__focused___D4VYB";function DF({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,fR.jsxs)(fR.Fragment,{children:[e({size:16}),t?(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,fR.jsx)("span",{className:"-esm-form-builder__action-menu-button2-module__countTag___l8lfc",children:r})]})}let DB=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=fa(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=c6(cX,Dk),{extension:c}=(0,cH.useContext)(c1),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||u),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(p)h?s(f.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;DO(e,t,r)}};return"tablet"===i||"phone"===i?(0,fR.jsxs)(fI.Button,{className:fA()(DN,{[D$]:p&&!m,[DL]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,fR.jsx)("span",{className:DI,children:(0,fR.jsx)(DF,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,fR.jsx)("span",{children:t})]}):(0,fR.jsx)(fI.IconButton,{align:"left","aria-label":t,className:fA()(DN,{[D$]:p&&!m,[DL]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,fR.jsx)("div",{className:DI,children:(0,fR.jsx)(DF,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function DV(e,t,r){if(null==e)return r;let n=wK(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=wK(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function DU(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function DW(e){return!!e&&e.constructor===Object}var DK=r(99589);function DH(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Dz(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=DH(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return DH(e)}(t);return DK.satisfies(r,e,{includePrerelease:!0})}async function DG(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await Dq(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function Dq(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}},241(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(41917).A.Symbol},76912(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},76335(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(76912),o=r(241),i=r(20018),a=r(92049),s=o.A?o.A.isConcatSpreadable:void 0;let l=function(e){return(0,a.A)(e)||(0,i.A)(e)||!!(s&&e&&e[s])},u=function e(t,r,o,i,a){var s=-1,u=t.length;for(o||(o=l),a||(a=[]);++s<u;){var c=t[s];r>0&&o(c)?r>1?e(c,r-1,o,i,a):(0,n.A)(a,c):i||(a[a.length]=c)}return a}},18348(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(241),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n.A?n.A.toStringTag:void 0;let l=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o};var u=Object.prototype.toString,c=n.A?n.A.toStringTag:void 0;let d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?l(e):u.call(e)}},72136(e,t,r){"use strict";r.d(t,{A:()=>n});let n="object"==typeof global&&global&&global.Object===Object&&global},41917(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(72136),o="object"==typeof self&&self&&self.Object===Object&&self;let i=n.A||o||Function("return this")()},20018(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(18348),o=r(53098);let i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,n.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;let u=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},92049(e,t,r){"use strict";r.d(t,{A:()=>n});let n=Array.isArray},53098(e,t,r){"use strict";r.d(t,{A:()=>n});let n=function(e){return null!=e&&"object"==typeof e}}}]);