@openmrs/esm-openconceptlab-app 4.4.1-pre.852 → 4.4.1-pre.866
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/{2259.css.map → 6699.css.map} +1 -1
- package/dist/6699.js +32 -0
- package/dist/6699.js.map +1 -0
- package/dist/openmrs-esm-openconceptlab-app.js +2 -2
- package/dist/openmrs-esm-openconceptlab-app.js.buildmanifest.json +30 -30
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/dist/2259.js +0 -32
- package/dist/2259.js.map +0 -1
- /package/dist/{2259.css → 6699.css} +0 -0
package/dist/6699.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_openconceptlab_app=globalThis.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([["6699"],{5602(e){e.exports=function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},4397(e){e.exports=function(e,t,n){var r=t.prototype,a=function(e){var t=e.date,a=e.utc,o={};if(!(null===t||t instanceof Date||t instanceof Array||r.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=a?n.utc():n();Object.keys(t).forEach(function(e){var n;o["date"===(n=r.$utils().p(e))?"day":n]=t[e]});var s=o.day||(o.year||o.month>=0?1:i.date()),l=o.year||i.year(),u=o.month>=0?o.month:o.year||o.day?0:i.month(),c=o.hour||0,d=o.minute||0,p=o.second||0,m=o.millisecond||0;return a?new Date(Date.UTC(l,u,s,c,d,p,m)):new Date(l,u,s,c,d,p,m)}return t},o=r.parse;r.parse=function(e){e.date=a.bind(this)(e),o.bind(this)(e)};var i=r.set,s=r.add,l=r.subtract,u=function(e,t,n,r){void 0===r&&(r=1);var a=Object.keys(t),o=this;return a.forEach(function(n){o=e.bind(o)(t[n]*r,n)}),o};r.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},r.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},r.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},7657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new a(t)},i.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.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=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],o=a[0],i=60*a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r)))return this;var i=16>=Math.abs(r)?60*r:r,s=this;if(a)return s.$offset=i,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),a=o(e).local();return p.call(r,a,t,n)}}}()},9710(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(!e||"[object Object]"!==n.call(e)||e.nodeType||e.setInterval)return!1;var r,a=t.call(e,"constructor"),o=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)}e.exports=function e(){var t,n,a,o,i,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(n in t)a=l[n],l!==(o=t[n])&&(d&&o&&(r(o)||(i=Array.isArray(o)))?(i?(i=!1,s=a&&Array.isArray(a)?a:[]):s=a&&r(a)?a:{},l[n]=e(d,s,o)):void 0!==o&&(l[n]=o));return l}},5570(e,t,n){!function(t){"use strict";var r=n(9109);function a(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=new Date().toString()),n||(n={}),e.call(this,t,n)}}var o=e.exports={generate:a(function(e,t){return new r(e,t)})};t&&(t.fn.geopattern=a(function(e,n){return this.each(function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var a=o.generate(e,n);t(this).css("background-image",a.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},1812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,n,r=e.r,a=e.g,o=e.b,i=Math.max(r/=255,a/=255,o/=255),s=Math.min(r,a,o),l=(i+s)/2;if(i===s)t=n=0;else{var u=i-s;switch(n=l>.5?u/(2-i-s):u/(i+s),i){case r:t=(a-o)/u+6*(a<o);break;case a:t=(o-r)/u+2;break;case o:t=(r-a)/u+4}t/=6}return{h:t,s:n,l:l}},hsl2rgb:function(e){function t(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,a,o=e.h,i=e.s,s=e.l;if(0===i)n=r=a=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;n=t(u,l,o+1/3),r=t(u,l,o),a=t(u,l,o-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*a)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},9109(e,t,n){"use strict";var r=n(9710),a=n(1812),o=n(2742),i=n(3153),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,n){return parseInt(e.substr(t,n||1),16)}function d(e,t,n,r,a){return(parseFloat(e)-t)*(a-r)/(n-t)+r}function p(e){return e%2==0?"#ddd":"#222"}function m(e){return d(e,0,15,.02,.15)}var f=e.exports=function(e,t){return this.opts=r({},s,t),this.hash=t.hash||o(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,n,r,a){var o=g(r),i=m(a[0]),s=p(a[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(o,l).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=m(a[1]),fill:s=p(a[1])},e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(o,l).transform({translate:[t+r,n],scale:[1,1]})}function v(e,t,n,r,a){var o=m(a),i=p(a),s=g(r),l={stroke:u,"stroke-opacity":.02,"fill-opacity":o,fill:i};e.polyline(s,l).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,1]})}f.prototype.toSvg=function(){return this.svg.toString()},f.prototype.toString=function(){return this.toSvg()},f.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},f.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},f.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},f.prototype.generateBackground=function(){var e,t,n,r;this.opts.color?n=a.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),r=c(this.hash,17),(e=a.rgb2hsl(a.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,r%2==0?e.s=Math.min(1,(100*e.s+r)/100):e.s=Math.max(0,(100*e.s-r)/100),n=a.hsl2rgb(e)),this.color=a.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:a.rgb2rgbString(n)})},f.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)]()},f.prototype.geoHexagons=function(){var e,t,n,r,a,o,i,s,l,f=d(c(this.hash,0),0,15,8,60),h=f*Math.sqrt(3),g=2*f,y=(s=f/2,[0,l=Math.sin(60*Math.PI/180)*f,s,0,s+f,0,2*f,l,s+f,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*f),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(o=0;o<6;o++)a=c(this.hash,t),e=o%2==0?i*h:i*h+h/2,n=m(a),r={fill:p(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]}),0===o&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,e-h/2]}),0===i&&(e=o%2==0?6*h:6*h+h/2,this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]})),0===o&&0===i&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,5*h+h/2]}),t++},f.prototype.geoSineWaves=function(){var e,t,n,r,a,o,i,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++)n=m(o=c(this.hash,t)),e=p(o),i=s/4*.7,a={fill:"none",stroke:e,opacity:n,"stroke-width":""+u+"px"},r="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l+36*u]})},f.prototype.geoChevrons=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),f=(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,i=0;i<6;i++)for(o=0;o<6;o++)n=m(a=c(this.hash,t)),r={stroke:u,"stroke-opacity":.02,fill:p(a),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[o*s,i*l*.66-l/2]}).polyline(f).end(),0===i&&this.svg.group(r).transform({translate:[o*s,6*l*.66-l/2]}).polyline(f).end(),t+=1},f.prototype.geoPlusSigns=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,10,25),f=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),n=0,s=0;s<6;s++)for(i=0;i<6;i++)r=m(o=c(this.hash,n)),t=p(o),e=+(s%2!=0),a={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===i&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===s&&this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),n++},f.prototype.geoXes=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=m(a=c(this.hash,t)),e=o%2==0?i*u-.5*u:i*u-.5*u+u/4,r={fill:p(a),opacity:n},this.svg.group(r).transform({translate:[o*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=o%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(r).transform({translate:[o*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(r).transform({translate:[o*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&0===i&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},f.prototype.geoOverlappingCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=m(r=c(this.hash,e)),n={fill:p(r),opacity:t},this.svg.circle(a*i,o*i,i,n),0===a&&this.svg.circle(6*i,o*i,i,n),0===o&&this.svg.circle(a*i,6*i,i,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i,n),e++},f.prototype.geoOctogons=function(){var e,t,n,r,a,o,i,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),n=0,i=0;i<6;i++)for(o=0;o<6;o++)r=m(a=c(this.hash,n)),t=p(a),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,i*s]}),n+=1},f.prototype.geoSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=m(r=c(this.hash,t)),e=p(r),this.svg.rect(a*i,o*i,i,i,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},f.prototype.geoConcentricCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=m(r=c(this.hash,t)),e=p(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:n,"stroke-width":s+"px"}),n=m(r=c(this.hash,39-t)),e=p(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/4,{fill:e,"fill-opacity":n}),t+=1},f.prototype.geoOverlappingRings=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=m(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":s+"px"},this.svg.circle(a*i,o*i,i-s/2,n),0===a&&this.svg.circle(6*i,o*i,i-s/2,n),0===o&&this.svg.circle(a*i,6*i,i-s/2,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i-s/2,n),e+=1},f.prototype.geoTriangles=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,15,80),f=l/2*Math.sqrt(3),h=[s=l/2,0,l,f,0,f,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*f),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=m(a=c(this.hash,e)),r={fill:p(a),"fill-opacity":t,stroke:u,"stroke-opacity":.02},n=i%2==0?180*(o%2==0):180*(o%2!=0),this.svg.polyline(h,r).transform({translate:[o*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),0===o&&this.svg.polyline(h,r).transform({translate:[6*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),e+=1},f.prototype.geoDiamonds=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),f=[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,i=0;i<6;i++)for(o=0;o<6;o++)n=m(a=c(this.hash,t)),r={fill:p(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*i-l/2]}),0===o&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===i&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},f.prototype.geoNestedSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=m(r=c(this.hash,e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2,o*s+o*i*2+i/2,s,s,n),t=m(r=c(this.hash,39-e)),n={fill:"none",stroke:p(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2+2*i,o*s+o*i*2+i/2+2*i,3*i,3*i,n),e+=1},f.prototype.geoMosaicSquares=function(){var e,t,n,r=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)):y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):n%2==0?y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)),e+=1},f.prototype.geoPlaid=function(){var e,t,n,r,a,o,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,n=m(o=c(this.hash,t+1)),e=p(o),r=o+5,this.svg.rect(0,i,"100%",r,{opacity:n,fill:e}),i+=r,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,n=m(o=c(this.hash,t+1)),e=p(o),a=o+5,this.svg.rect(s,0,a,"100%",{opacity:n,fill:e}),s+=a,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},f.prototype.geoTessellation=function(){var e,t,n,r,a=d(c(this.hash,0),0,15,5,40),o=a*Math.sqrt(3),i=2*a,s=a/2*Math.sqrt(3),l=[0,0,s,a/2,0,a,0,0].join(","),f=3*a+2*s,h=2*o+2*a;for(this.svg.setWidth(f),this.svg.setHeight(h),e=0;e<20;e++)switch(t=m(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:p(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-a/2,-a/2,a,a,n),this.svg.rect(f-a/2,-a/2,a,a,n),this.svg.rect(-a/2,h-a/2,a,a,n),this.svg.rect(f-a/2,h-a/2,a,a,n);break;case 1:this.svg.rect(i/2+s,o/2,a,a,n);break;case 2:this.svg.rect(-a/2,h/2-a/2,a,a,n),this.svg.rect(f-a/2,h/2-a/2,a,a,n);break;case 3:this.svg.rect(i/2+s,1.5*o+a,a,a,n);break;case 4:this.svg.polyline(l,n).transform({translate:[a/2,-a/2],rotate:[0,a/2,s/2]}),this.svg.polyline(l,n).transform({translate:[a/2,h- -a/2],rotate:[0,a/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,n).transform({translate:[f-a/2,-a/2],rotate:[0,a/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[f-a/2,h+a/2],rotate:[0,a/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[f/2+a/2,o/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[f/2+a/2,h-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,h-o/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,n).transform({translate:[a/2,h/2-a/2]});break;case 11:this.svg.polyline(l,n).transform({translate:[f-a/2,h/2-a/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,a/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,a/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 15:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 16:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 17:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 18:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+a/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+a/2],rotate:[-30,0,0]})}}},2742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,n=0x98badcfe,r=0x10325476,a=0xc3d2e1f0,o=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=c<<1|c>>>31}var d=e,p=t,m=n,f=r,h=a;for(u=0;u<80;u++){u<20?(s=f^p&(m^f),l=0x5a827999):u<40?(s=p^m^f,l=0x6ed9eba1):u<60?(s=p&m|f&(p|m),l=0x8f1bbcdc):(s=p^m^f,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|o[u]);h=f,f=m,m=p<<30|p>>>2,p=d,d=g}for(u=0,e=e+d|0,t=t+p|0,n=n+m|0,r=r+f|0,a=a+h|0,i=0;u<16;u++)o[u]=0}function c(e){o[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var n=0;n<t;n++)c(e.charCodeAt(n));return}var r=e.length;l+=8*r;for(var a=0;a<r;a++)c(e[a])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var o=24;o>=0;o-=8)c(l>>o);return d(e)+d(t)+d(n)+d(r)+d(a)}}}e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},3153(e,t,n){"use strict";var r=n(9710),a=n(7338);function o(){return this.width=100,this.height=100,this.svg=a("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=o,o.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},o.prototype.end=function(){return this.context.pop(),this},o.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},o.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},o.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},o.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},o.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},o.prototype.toString=function(){return this.svg.toString()},o.prototype.rect=function(e,t,n,o,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=a("rect");return this.currentContext().appendChild(l),this.setAttributes(l,r({x:e,y:t,width:n,height:o},i)),this},o.prototype.circle=function(e,t,n,o){var i=a("circle");return this.currentContext().appendChild(i),this.setAttributes(i,r({cx:e,cy:t,r:n},o)),this},o.prototype.path=function(e,t){var n=a("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:e},t)),this},o.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach(function(e){n.polyline(e,t)}),this;var o=a("polyline");return this.currentContext().appendChild(o),this.setAttributes(o,r({points:e},t)),this},o.prototype.group=function(e){var t=a("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,r({},e)),this}},7338(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("")}},2034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:p=!0}=t,m=[],f=[];for(let c of function e(t,n){if(Array.isArray(t))for(let r of t)e(r,n);else n.push(t);return n}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:i=n}=t,u=[...e],c=[],d=0,p=0;function m(){let t="";if(r.test(u[d]))do t+=u[d++];while(a.test(u[d]));else if('"'===u[d]){let n=d;for(;d++<u.length;){if('"'===u[d]){d++,n=0;break}"\\"===u[d]&&d++,t+=u[d]}if(n)throw new l(`Unterminated quote at index ${n}`,e)}if(!t)throw new l(`Missing parameter name at index ${d}`,e);return t}for(;d<u.length;){let e=u[d],t=o[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:m()}):"*"===e?c.push({type:"wildcard",index:d++,value:m()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(n){let r=[];for(;;){let a=c[p++];if(a.type===n)break;if("char"===a.type||"escape"===a.type){let e=a.value,t=c[p];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++p];r.push({type:"text",value:i(e)});continue}if("param"===a.type||"wildcard"===a.type){r.push({type:a.type,name:a.value});continue}if("{"===a.type){r.push({type:"group",tokens:t("}")});continue}throw new l(`Unexpected ${a.type} at index ${a.index}, expected ${n}`,e)}return r}("end"),e)}(c,t);for(let t of function* e(t,n,r){if(n===t.length)return yield r;let a=t[n];if("group"===a.type)for(let o of e(a.tokens,0,r.slice()))yield*e(t,n+1,o);else r.push(a);yield*e(t,n+1,r)}(e.tokens,0,[]))f.push(function(e,t,n,r){let a="",o="",s=!0;for(let d of e){if("text"===d.type){a+=i(d.value),o+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var u,c;if(!s&&!o)throw new l(`Missing text before "${d.name}" ${d.type}`,r);"param"===d.type?a+=`(${u=t,(c=s?"":o).length<2?u.length<2?`[^${i(u+c)}]`:`(?:(?!${i(u)})[^${i(c)}])`:u.length<2?`(?:(?!${i(c)})[^${i(u)}])`:`(?:(?!${i(c)}|${i(u)})[\\s\\S])`}+)`:a+="([\\s\\S]+)",n.push(d),o="",s=!1;continue}}return a}(t,u,m,e.originalPath))}let h=`^(?:${f.join("|")})`;return p&&(h+=`(?:${i(u)}$)?`),{regexp:new RegExp(h+=c?"$":`(?=${i(u)}|$)`,d?"":"i"),keys:m}};let n=e=>e,r=/^[$_\p{ID_Start}]$/u,a=/^[$\u200c\u200d\p{ID_Continue}]$/u,o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class l extends TypeError{constructor(e,t){let n=e;t&&(n+=`: ${t}`),super(n+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},5873(e,t,n){"use strict";var r=n(5427);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},1565(e,t,n){"use strict";let r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new c(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=a;let o=n(3990),{safeRe:i,t:s}=n(2841),l=n(4004),u=n(1361),c=n(4517),d=n(7476)},7476(e,t,n){"use strict";let r=/\s+/g;class a{constructor(e,t){if(t=i(t),e instanceof a)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new a(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(r," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,n=o.get(t);if(n)return n;let r=this.options.loose,a=r?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(a,T(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],m)),l("caret trim",e=e.replace(c[d.CARETTRIM],f));let i=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>R(e,this.options));r&&(i=i.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",i);let u=new Map;for(let e of i.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return o.set(t,v),v}intersects(e,t){if(!(e instanceof a))throw TypeError("a Range is required");return this.set.some(n=>b(n,t)&&e.set.some(e=>b(e,t)&&n.every(n=>e.every(e=>n.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}e.exports=a;let o=new(n(8953)),i=n(3990),s=n(1565),l=n(1361),u=n(4517),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:m,caretTrimReplace:f}=n(2841),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=n(9543),y=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,b=(e,t)=>{let n=!0,r=e.slice(),a=r.pop();for(;n&&r.length;)n=r.every(e=>a.intersects(e,t)),a=r.pop();return n},w=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=D(e,t)),l("tildes",e=x(e,t)),l("xrange",e=k(e,t)),l("stars",e=P(e,t)),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{let n=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(n,(t,n,r,a,o)=>{let i;return l("tilde",e,t,n,r,a,o),E(n)?i="":E(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:E(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(l("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,l("tilde return",i),i})},D=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let n=t.loose?c[d.CARETLOOSE]:c[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,a,o,i)=>{let s;return l("caret",e,t,n,a,o,i),E(n)?s="":E(a)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(o)?s="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(l("replaceCaret pr",i),s="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(l("no pr"),s="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),l("caret return",s),s})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>C(e,t)).join(" ")),C=(e,t)=>{e=e.trim();let n=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(n,(n,r,a,o,i,s)=>{l("xRange",e,n,r,a,o,i,s);let u=E(a),c=u||E(o),d=c||E(i);return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(c&&(o=0),i=0,">"===r?(r=">=",c?(a=+a+1,o=0):o=+o+1,i=0):"<="===r&&(r="<",c?a=+a+1:o=+o+1),"<"===r&&(s="-0"),n=`${r+a}.${o}.${i}${s}`):c?n=`>=${a}.0.0${s} <${+a+1}.0.0-0`:d&&(n=`>=${a}.${o}.0${s} <${a}.${+o+1}.0-0`),l("xRange return",n),n})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),R=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),T=e=>(t,n,r,a,o,i,s,l,u,c,d,p)=>(n=E(r)?"":E(a)?`>=${r}.0.0${e?"-0":""}`:E(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`,l=E(u)?"":E(c)?`<${+u+1}.0.0-0`:E(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${n} ${l}`.trim()),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},4517(e,t,n){"use strict";let r=n(1361),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(9543),{safeRe:i,t:s}=n(2841),l=n(3990),{compareIdentifiers:u}=n(3806);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>a)throw TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return -1;else if(n===a)continue;else return u(n,a)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let n=this.build[t],a=e.build[t];if(r("build compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return -1;else if(n===a)continue;else return u(n,a)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?i[s.PRERELEASELOOSE]:i[s.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(n);if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},4004(e,t,n){"use strict";let r=n(8848),a=n(8220),o=n(9761),i=n(2386),s=n(1262),l=n(9639);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return a(e,n,u);case">":return o(e,n,u);case">=":return i(e,n,u);case"<":return s(e,n,u);case"<=":return l(e,n,u);default:throw TypeError(`Invalid operator: ${t}`)}}},7851(e,t,n){"use strict";let r=n(4517);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},8848(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>0===r(e,t,n)},9761(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>r(e,t,n)>0},2386(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>r(e,t,n)>=0},1262(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>0>r(e,t,n)},9639(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>0>=r(e,t,n)},8220(e,t,n){"use strict";let r=n(7851);e.exports=(e,t,n)=>0!==r(e,t,n)},7229(e,t,n){"use strict";let r=n(7476);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},9543(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},1361(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},3806(e){"use strict";let t=/^[0-9]+$/,n=(e,n)=>{if("number"==typeof e&&"number"==typeof n)return e===n?0:e<n?-1:1;let r=t.test(e),a=t.test(n);return r&&a&&(e*=1,n*=1),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},8953(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},3990(e){"use strict";let t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},2841(e,t,n){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(9543),i=n(1361),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,m="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[m,a]],h=(e,t,n)=>{let r=(e=>{for(let[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=p++;i(e,a,t),d[e]=a,u[a]=t,c[a]=r,s[a]=new RegExp(t,n?"g":void 0),l[a]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),h("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${m}+`),h("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),h("FULL",`^${u[d.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),h("LOOSE",`^${u[d.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),h("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),h("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),h("COERCERTL",u[d.COERCE],!0),h("COERCERTLFULL",u[d.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2390(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,p,m;n.r(t),n.d(t,{GenderUnknownIcon:()=>p7,evaluateAsNumber:()=>lT,getImportMapOverrideMap:()=>sC,StockManagementPictogram:()=>_G,ChemistryIcon:()=>pz,BabyIcon:()=>pj,DashboardExtension:()=>m7,openmrsComponentDecorator:()=>cK,tryRegisterExtension:()=>pe,pictogramIds:()=>_w,ActivityIcon:()=>pP,compile:()=>lj,removeRouteMapOverride:()=>s2,TableBatchActions:()=>py,getAsyncLifecycle:()=>cZ,subscribeOpenmrsEvent:()=>lo,PasswordIcon:()=>m_,Assessment2Pictogram:()=>_D,CloseIcon:()=>pq,setupRouteMapOverrides:()=>s5,getWorkspaceGroupRegistration:()=>u0,registerWorkspace:()=>uq,useFeatureFlag:()=>dy,reset:()=>uU,LabOrderIcon:()=>mu,VisitMode:()=>ld,useLocations:()=>dL,getLifecycle:()=>cG,formatDatetime:()=>EM,getVisitsForPatient:()=>lb,formatPartialDate:()=>EN,CustomOverflowMenu:()=>pD,LocationIcon:()=>md,GroupIcon:()=>mt,createUseStore:()=>cg,VisitStatus:()=>lp,getSessionLocation:()=>sn,getCurrentImportMap:()=>sF,usePatient:()=>dz,useRenderableExtensions:()=>dG,getOpenedWindowIndexByWorkspace:()=>u3,setLeftNav:()=>uW,clearHistory:()=>iz,clearConfigErrors:()=>ad,formatTime:()=>EA,isDevEnabled:()=>sd,closeWorkspaceGroup2:()=>D1,getCurrentRouteMap:()=>sX,ConfigurableLink:()=>cu,sessionStore:()=>i1,setSessionLocale:()=>sa,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>st,GenderMaleIcon:()=>p9,getExtensionSlotConfigFromStore:()=>rD,evaluateAsNumberAsync:()=>lO,getImportMapDefaultMap:()=>sS,unregisterExtensionRendering:()=>us,implementerToolsConfigStore:()=>rL,Type:()=>rc,InPatientPictogram:()=>_j,cleanupObsoleteFeatureFlags:()=>l4,getAttachmentsUrl:()=>le,showSnackbar:()=>_9,PatientBannerActionsMenu:()=>_m,PatientSearchPictogram:()=>_B,DocumentAttachmentIcon:()=>p0,Snackbar:()=>_4,CardiologyPictogram:()=>_k,ImageMedicalIcon:()=>ma,ActionableNotificationComponent:()=>xV,DiagnosisTags:()=>xy,iconIds:()=>pC,PatientsPictogram:()=>_U,interpolateUrl:()=>iM,setupHistory:()=>iV,subscribeToastShown:()=>D,detachAll:()=>uA,convertToLocaleCalendar:()=>EL,DocumentIcon:()=>pQ,configInternalStore:()=>rv,ActionMenuButton2:()=>Ss,setupDynamicOfflineDataHandler:()=>S$,makeUrl:()=>iX,oneOf:()=>av,selectPreferredName:()=>_t,launchWorkspaceGroup:()=>function e(t,n){let r=u0(t),{state:a,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:i,workspaceToLaunch:s}=n,l=function(){return Dy}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?Do(r?.name,()=>{e(t,n)}):DE(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:i}})),Dk(t,a),o?.(),s&&Ds(s.name,s.additionalProps??{})},MobileCheckIcon:()=>my,createErrorHandler:()=>P,parseDate:()=>EC,getAttachmentByUuid:()=>s8,LeftNavMenu:()=>x_,getExtensionRegistration:()=>u$,ShoppingCartAddItemIcon:()=>m5,ReferralOrderIcon:()=>mR,ReportIcon:()=>mO,dispatchToastShown:()=>E,getImportMapNextPageMap:()=>sk,registerExtension:()=>uN,setupOfflineSync:()=>SO,DownloadIcon:()=>p1,useConnectivity:()=>SM,provide:()=>r0,ShoppingCartArrowDownIcon:()=>mL,featureFlagsStore:()=>l0,promptBeforeClosing:()=>Dc,jsep:()=>lE,GeriatricsPictogram:()=>_$,SearchIcon:()=>mj,reportError:()=>C,slugify:()=>sA,isOmrsDateToday:()=>ED,getExtensionStore:()=>ul,BloodBankPictogram:()=>_S,TriagePictogram:()=>_Y,Workspace2:()=>St,refetchCurrentUser:()=>i8,CheckmarkOutlineIcon:()=>pH,registerExtensionSlot:()=>uB,AllergiesIcon:()=>m4,ArrowDownIcon:()=>pT,useOpenmrsInfinite:()=>dk,getExtensionConfigFromExtensionSlotStore:()=>rP,OpenmrsDatePicker:()=>xh,getExtensionConfigFromStore:()=>rC,getDynamicOfflineDataEntries:()=>SN,getLocaleDisplayName:()=>wQ,messageOmrsServiceWorker:()=>SI,navigate:()=>iF,launchWorkspace2:()=>D4,getGroupByWindowName:()=>u2,CustomOverflowMenuItem:()=>pS,isUrl:()=>ay,CaretDownIcon:()=>pM,ArrowLeftIcon:()=>pO,FacilityPictogram:()=>_O,ViewOffIcon:()=>mQ,updateInternalExtensionStore:()=>ut,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>s3,formatDurationBetween:()=>EK,defaultVisitCustomRepresentation:()=>lm,getBreadcrumbsFor:()=>aC,useOpenmrsPagination:()=>db,Pagination:()=>x5,CheckmarkFilledIcon:()=>pW,clearCurrentUser:()=>i7,showModal:()=>xM,ChevronUpIcon:()=>pY,saveVisit:()=>ly,useAttachments:()=>dt,Pictogram:()=>_0,useExtensionSlot:()=>cx,ChevronDownIcon:()=>pK,OpenmrsDateRangePicker:()=>xg,deleteAttachmentPermanently:()=>ln,getVisitTypes:()=>lc,OverflowMenuHorizontalIcon:()=>mE,EventScheduleIcon:()=>p3,getSessionStore:()=>i5,ActionMenu:()=>DG,ProcedureOrderIcon:()=>mC,preloadImport:()=>sL,registerWorkspaceWindows2:()=>u5,useOnVisible:()=>dB,setSessionLocation:()=>sr,userHasAccess:()=>se,ChartAverageIcon:()=>pU,getFeatureFlag:()=>l2,UserAvatarIcon:()=>mY,renderExtension:()=>co,useFhirInfinite:()=>dO,toVisitTypeObject:()=>ll,useSession:()=>dZ,EmergencyDepartmentPictogram:()=>_T,Notification:()=>xB,dispatchSnackbarShown:()=>w,navigateAndLaunchWorkspace:()=>Dl,formatDate:()=>Ej,workspace2StoreActions:()=>D6,SwitcherIcon:()=>mA,esmStyleGuideSchema:()=>pf,getImportMapDisabledOverrides:()=>sP,useAssignedExtensionIds:()=>c7,CaretRightIcon:()=>pF,evaluateAsType:()=>l$,PageHeader:()=>x3,TranslateIcon:()=>mz,setUserProperties:()=>so,MovementIcon:()=>mw,renderInlineNotifications:()=>xY,subscribePrecacheStaticDependencies:()=>SA,PaymentsDeskPictogram:()=>_V,usePrimaryIdentifierCode:()=>dK,useLayoutType:()=>dN,getCurrentUser:()=>i6,XrayPictogram:()=>_q,CaretUpIcon:()=>pB,renderActionableNotifications:()=>xJ,OpenmrsAppContext:()=>c3,setupModals:()=>xA,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(SS(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;SS(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>W,recordConfigDerivationError:()=>rA,useAbortController:()=>c5,Extension:()=>cc,getFhirServerPaginationHandlers:()=>d_,useConnectedExtensions:()=>ds,registerApp:()=>pn,HospitalBedIcon:()=>mr,useExtensionInternalStore:()=>df,configExtensionStore:()=>rw,getSynchronizationItems:()=>Sj,getExtensionSlotsConfigStore:()=>rx,registerExtensionRendering:()=>ui,RenderIfValueIsTruthy:()=>c6,registerFeatureFlag:()=>l1,useFhirFetchAll:()=>dT,restBaseUrl:()=>iY,CalendarHeatMapIcon:()=>pI,getWorkspaceRegistration:()=>uQ,isImportMapOverrideDisabled:()=>sR,resetConfigSystem:()=>ap,getExtensionInternalStore:()=>l7,registerGlobalStore:()=>U,evaluateAsBoolean:()=>lP,PatientBannerPatientInfo:()=>_d,addRouteMapOverride:()=>s4,getDefaultCalendar:()=>EO,SettingsIcon:()=>mI,DrugOrderIcon:()=>p4,ProgramsIcon:()=>mP,useAssignedExtensions:()=>cE,CloseFilledIcon:()=>pJ,canAccessStorage:()=>SD,registerDefaultCalendar:()=>ET,TreeViewAltIcon:()=>mG,OverflowMenuVerticalIcon:()=>mx,clearConfigDerivationError:()=>rM,getConfigStore:()=>rE,registerWorkspaceGroup:()=>uJ,InformationSquareIcon:()=>ms,EmptyCard:()=>xw,ChevronLeftIcon:()=>pG,RadiologyIcon:()=>m6,useCandidateExtensions:()=>de,renderToasts:()=>Dn,isDesktop:()=>dj,integrateBreakpoints:()=>ps,RegistrationPictogram:()=>_z,CardHeader:()=>pd,getExtensionRegistrationFrom:()=>uO,InformationIcon:()=>mo,TrashCanIcon:()=>mK,useShallowStableValue:()=>cd,PatientDocumentsPictogram:()=>_F,useOpenmrsSWR:()=>dU,Assessment1Pictogram:()=>__,finishRegisteringAllApps:()=>pr,importDynamic:()=>sM,useFhirPagination:()=>dx,useVisitContextStore:()=>d4,ArrowUpIcon:()=>pN,showActionableNotification:()=>xX,useForceUpdate:()=>dv,useVisit:()=>d2,updateWorkspaceWindowState:()=>Db,PatientBannerPatientIdentifiers:()=>_s,WorkspaceNotification:()=>DM,TransferPictogram:()=>_Z,usePagination:()=>dV,Breakpoint:()=>pa,PatientBannerToggleContactDetailsButton:()=>Sl,CloseOutlineIcon:()=>pX,ObstetricsPictogram:()=>_L,parseDateInput:()=>EB,getConfig:()=>r4,attach:()=>uj,getLocale:()=>w0,ActionMenuButton:()=>DO,isUrlWithTemplateParameters:()=>ag,useEmrConfiguration:()=>dp,useLeftNav:()=>dI,ToolsIcon:()=>mH,ErrorState:()=>xE,detach:()=>uI,setCurrentVisit:()=>lg,ConditionsIcon:()=>m3,SaveIcon:()=>mN,useWorkspaces:()=>Dx,resetWorkspaceStore:()=>DS,useConfig:()=>di,validator:()=>rd,CalendarIcon:()=>pA,getHistory:()=>iW,StickyNoteAddIcon:()=>mF,useWorkspace2Store:()=>D5,getPatientName:()=>x9,getVisitStore:()=>lh,getCoreTranslation:()=>iA,registerModuleWithConfigSystem:()=>rq,registerModuleLoad:()=>rJ,getBreadcrumbs:()=>aD,extractVariableNames:()=>lJ,translateFrom:()=>iI,useStoreWithActions:()=>ch,EditIcon:()=>p2,getCandidateExtensions:()=>uF,shallowEqual:()=>T,subscribeNotificationShown:()=>x,MaximizeIcon:()=>mm,promptForClosingWorkspaces:()=>D3,WarningIcon:()=>m1,closeAllWorkspaces:()=>DE,fhirBaseUrl:()=>iq,matchLocale:()=>S_,registerBreadcrumb:()=>ax,usePatientPhoto:()=>_g,EventsIcon:()=>p6,createGlobalStore:()=>B,workspaceStore:()=>Dy,subscribeToFeatureFlag:()=>l3,useExtensionStore:()=>dg,closeWorkspace:()=>Df,createAttachment:()=>lt,useLeftNavStore:()=>dA,TableIcon:()=>mV,Icon:()=>m8,InformationFilledIcon:()=>mi,getCurrentPageMap:()=>sD,LaboratoryPictogram:()=>_I,temporaryConfigStore:()=>rb,getPromptBeforeClosingFcn:()=>Dd,toDateObjectStrict:()=>ES,defineConfigSchema:()=>rY,filterBreadcrumbs:()=>ak,invalidateImplementerToolsConfig:()=>rj,PatientBannerContactDetails:()=>Sf,getAssignedExtensions:()=>uL,PatientPhoto:()=>_b,MaterialOrderIcon:()=>mp,MicroscopeIcon:()=>mg,visitTypesUrl:()=>lu,scheduleRecomputation:()=>um,PharmacyPictogram:()=>_W,AttachmentIcon:()=>m2,MoneyIcon:()=>mv,getAttachments:()=>s7,getWorkspaceGroupStore:()=>Dk,PageHeaderContent:()=>x6,MedicationIcon:()=>mf,PrinterIcon:()=>mk,PatientListsPictogram:()=>_X,useAppContext:()=>c9,isOpenmrsRoutes:()=>sV,AppointmentsAltPictogram:()=>_x,GenericOrderTypeIcon:()=>me,batchExtensionUpdates:()=>ud,useExtensionSlotStore:()=>cb,ViewIcon:()=>m0,formattedName:()=>_e,sessionEndpoint:()=>iJ,duration:()=>EH,resetImportMapOverrides:()=>s$,TableOfContentsIcon:()=>mU,CaretLeftIcon:()=>pL,getTranslationOverrides:()=>r2,isVersionSatisfied:()=>SP,EmptyCardIllustration:()=>xb,PenIcon:()=>mS,getWorkspaceStore:()=>Dv,validators:()=>ab,setupImportMapOverrides:()=>sI,showToast:()=>Dr,useDefineAppContext:()=>c2,verifyTotpCode:()=>si,getGlobalStore:()=>V,useOnClickOutside:()=>dF,getWindowByWorkspaceName:()=>u4,ArrowRightIcon:()=>p$,loadLifeCycles:()=>d9,registerBreadcrumbs:()=>a_,MotherIcon:()=>mb,fetchCurrentPatient:()=>lr,Toast:()=>_8,MessageQueueIcon:()=>mh,TwoFactorAuthenticationIcon:()=>mZ,Pharmacy2Pictogram:()=>_H,goBackInHistory:()=>iH,GroupAccessIcon:()=>mn,getExtensionRenderingsStore:()=>ue,setImplementerToolsConfigRecomputer:()=>rN,getAsyncExtensionLifecycle:()=>cq,setupApiModule:()=>sm,renderLoadingSpinner:()=>Sh,WorkspaceContainer:()=>DZ,showNotification:()=>xq,getModalRegistration:()=>uG,ListCheckedIcon:()=>mc,ResponsiveWrapper:()=>_1,GynaecologyPictogram:()=>_N,ShoppingCartIcon:()=>mM,getRouteMapNextPageMap:()=>s0,MetadataExportPictogram:()=>_M,updateVisit:()=>lv,backendDependencies:()=>sp,MaybePictogram:()=>_Q,createParcelMounter:()=>cr,openmrsFetch:()=>iQ,useStore:()=>cf,isOpenmrsAppRoutes:()=>sU,HomePictogram:()=>_J,DentistryPictogram:()=>_P,ServiceQueuesPictogram:()=>_K,toLanguageTag:()=>wX,launchWorkspace:()=>Ds,setFeatureFlag:()=>l6,DigitalTrustPictogram:()=>_R,NumericObservation:()=>x4,attachmentUrl:()=>s9,interpolateString:()=>iL,inRange:()=>ah,useExtensionSlotMeta:()=>dh,AppointmentsPictogram:()=>_E,renderSnackbars:()=>_5,getRegisteredWorkspace2Names:()=>D8,logout:()=>ss,toLocationObject:()=>li,ChartLineIcon:()=>pV,UserHasAccess:()=>dY,evaluateAsBooleanAsync:()=>lR,changeWorkspaceContext:()=>Dh,createDashboard:()=>fe,getLocations:()=>ls,useExtensionContext:()=>dm,canCloseWorkspaceWithoutPrompting:()=>Da,getExtensionsConfigStore:()=>rS,getRouteMapDefaultMap:()=>sQ,age:()=>_r,isOmrsDateStrict:()=>E_,registerWorkspaceGroups2:()=>u6,usePaginationInfo:()=>dW,evaluateAsync:()=>lC,useOpenmrsFetchAll:()=>dP,removeImportMapOverride:()=>sO,showWorkspacePrompts:()=>D_,useVisitTypes:()=>d6,ageAsDuration:()=>_n,getExtensionNameFromId:()=>uT,renderParcel:()=>cn,useWorkspace2Context:()=>D9,ResetIcon:()=>m$,RenewIcon:()=>mT,subscribeActionableNotificationShown:()=>_,ErrorCard:()=>xx,GenderFemaleIcon:()=>p5,enableImportMapOverride:()=>sN,retry:()=>SR,ComponentContext:()=>cl,ExtensionSlot:()=>cD,unsetLeftNav:()=>uH,addImportMapOverride:()=>sT,MaybeIcon:()=>m9,useCustomOverflowMenu:()=>p_,PedestrianFamilyIcon:()=>mD,cancelPrompt:()=>Dp,CtScanPictogram:()=>_C,dispatchNotificationShown:()=>v,leftNavStore:()=>uV,OpenmrsFetchError:()=>i0,UserFollowIcon:()=>mq,launchWorkspaceGroup2:()=>D0,ChevronRightIcon:()=>pZ,UserXrayIcon:()=>mJ,GenderOtherIcon:()=>p8,formatDuration:()=>EF,toOmrsIsoString:()=>Ek,Labs2Pictogram:()=>_A,workspace2Store:()=>u1,setUserLanguage:()=>i9,useBodyScrollLock:()=>dn,getExtensionConfig:()=>rk,SyringeIcon:()=>mB,LocationPicker:()=>xD,useDebounce:()=>dl,TimeIcon:()=>mW,getExtensionSlotConfig:()=>r_,AddIcon:()=>pR,getRouteMapOverrideMap:()=>s1,processConfig:()=>r3,InventoryManagementIcon:()=>ml,registerWorkspaces2:()=>u9,UserIcon:()=>mX,formatPatientName:()=>x7,fireOpenmrsEvent:()=>la,registerModal:()=>uK,registerTranslationNamespace:()=>rX,displayName:()=>x8,evaluate:()=>lk,defineExtensionConfigSchema:()=>rQ,renderWorkspaceWindowsAndMenu:()=>SE,getSyncLifecycle:()=>cY,evaluateAsTypeAsync:()=>lN});let f="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function D(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function k(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function C(e){let t=R(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let n=R(t);n.stack+=`
|
|
2
|
+
Async stacktrace:
|
|
3
|
+
${e.stack}`,C(t)}}function R(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function T(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 n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}function O(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let a=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(a):a(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}window.onerror=function(e,t,n,r,a){return console.error("Unexpected error: ",a??e),E({description:k(a??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),E({description:k(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let $=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>$(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>$(t)(e)}}},N=e=>{let t,n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,o={setState:r,getState:a,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,a,o);return o},j=e=>e?N(e):N;function I(){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 A={},M=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[M]??0)+1;function B(e,t,n="none"){let r=A[e];if(r)return r.active?I()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value.setState(t,!0),r.active=!0,r.value;{let r=H(e,t,n);return A[e]={value:r,active:!0},r}}function U(e,t){let n=A[e];return n?(n.active?I()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(A[e]={value:t,active:!0},t)}function V(e,t,n="none"){let r=A[e];if(!r){let r=H(e,t??{},n);return A[e]={value:r,active:!1},r}return r.value}function W(...e){let[t,n,r]=e,a=void 0===r?n:r,o=void 0===r?e=>e:n,i=o(t.getState());return a(i),t.subscribe(e=>{let t=o(e);T(i,t)||(i=t,a(t))})}function H(e,t,n){return"sessionStorage"===n?j()(((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."),(n,r,a)=>{let o,i,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{o=s.getStorage()}catch(e){}if(!o)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,a);let d=$(s.serialize),p=()=>{let e,t=d({state:s.partialize({...r()}),version:s.version}).then(e=>o.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},m=a.setState;a.setState=(e,t)=>{m(e,t),p()};let f=e((...e)=>{n(...e),p()},r,a),h=()=>{var e;if(!o)return;l=!1,u.forEach(e=>e(r()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,r()))||void 0;return $(o.getItem.bind(o))(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 n(i=s.merge(e,null!=(t=r())?t:f),!0),p()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return a.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(o=e.getStorage())},clearStorage:()=>{null==o||o.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},h(),i||f};return(n,r,a)=>{let o,i={storage:O(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=i.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)},r,a);let d=()=>{let e=i.partialize({...r()});return c.setItem(i.name,{state:e,version:i.version})},p=a.setState;a.setState=(e,t)=>{p(e,t),d()};let m=e((...e)=>{n(...e),d()},r,a);a.getInitialState=()=>m;let f=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:m)});let a=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=r())?e:m))||void 0;return $(c.getItem.bind(c))(i.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];else{if(i.migrate)return[!0,i.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[a,s]=e;if(n(o=i.merge(s,null!=(t=r())?t:m),!0),a)return d()}).then(()=>{null==a||a(o,void 0),o=r(),s=!0,u.forEach(e=>e(o))}).catch(e=>{null==a||a(void 0,e)})};return a.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||f(),o||m}})(()=>t,{name:e,storage:O(()=>sessionStorage)})):j()(()=>t)}L[M]=F,F>1&&!I()&&console.error(`Detected ${F} 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=A)},1e3);let z=function(e){return void 0===e};var K,G,Z,Y,q,J,X,Q,ee,et,en,er,ea="object"==typeof global&&global&&global.Object===Object&&global,eo="object"==typeof self&&self&&self.Object===Object&&self,ei=ea||eo||Function("return this")(),es=ei.Symbol,el=Object.prototype,eu=el.hasOwnProperty,ec=el.toString,ed=es?es.toStringTag:void 0;let ep=function(e){var t=eu.call(e,ed),n=e[ed];try{e[ed]=void 0;var r=!0}catch(e){}var a=ec.call(e);return r&&(t?e[ed]=n:delete e[ed]),a};var em=Object.prototype.toString,ef=es?es.toStringTag:void 0;let eh=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ef&&ef in Object(e)?ep(e):em.call(e)},eg=function(e,t){return function(n){return e(t(n))}};var ey=eg(Object.getPrototypeOf,Object);let ev=function(e){return null!=e&&"object"==typeof e};var eb=Object.prototype,ew=Function.prototype.toString,eE=eb.hasOwnProperty,ex=ew.call(Object);let e_=function(e){if(!ev(e)||"[object Object]"!=eh(e))return!1;var t=ey(e);if(null===t)return!0;var n=eE.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ew.call(n)==ex},eD=function(e,t){return e===t||e!=e&&t!=t},eS=function(e,t){for(var n=e.length;n--;)if(eD(e[n][0],t))return n;return -1};var ek=Array.prototype.splice;function eC(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eC.prototype.clear=function(){this.__data__=[],this.size=0},eC.prototype.delete=function(e){var t=this.__data__,n=eS(t,e);return!(n<0)&&(n==t.length-1?t.pop():ek.call(t,n,1),--this.size,!0)},eC.prototype.get=function(e){var t=this.__data__,n=eS(t,e);return n<0?void 0:t[n][1]},eC.prototype.has=function(e){return eS(this.__data__,e)>-1},eC.prototype.set=function(e,t){var n=this.__data__,r=eS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};let eP=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},eR=function(e){if(!eP(e))return!1;var t=eh(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eT=ei["__core-js_shared__"],eO=(K=/[^.]+$/.exec(eT&&eT.keys&&eT.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",e$=Function.prototype.toString;let eN=function(e){if(null!=e){try{return e$.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ej=/^\[object .+?Constructor\]$/,eI=Object.prototype,eA=Function.prototype.toString,eM=eI.hasOwnProperty,eL=RegExp("^"+eA.call(eM).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eF=function(e){return!!eP(e)&&(!eO||!(eO in e))&&(eR(e)?eL:ej).test(eN(e))},eB=function(e,t){var n=null==e?void 0:e[t];return eF(n)?n:void 0};var eU=eB(ei,"Map"),eV=eB(Object,"create"),eW=Object.prototype.hasOwnProperty,eH=Object.prototype.hasOwnProperty;function ez(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ez.prototype.clear=function(){this.__data__=eV?eV(null):{},this.size=0},ez.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},ez.prototype.get=function(e){var t=this.__data__;if(eV){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return eW.call(t,e)?t[e]:void 0},ez.prototype.has=function(e){var t=this.__data__;return eV?void 0!==t[e]:eH.call(t,e)},ez.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=eV&&void 0===t?"__lodash_hash_undefined__":t,this};let eK=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},eG=function(e,t){var n=e.__data__;return eK(t)?n["string"==typeof t?"string":"hash"]:n.map};function eZ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function eY(e){var t=this.__data__=new eC(e);this.size=t.size}eZ.prototype.clear=function(){this.size=0,this.__data__={hash:new ez,map:new(eU||eC),string:new ez}},eZ.prototype.delete=function(e){var t=eG(this,e).delete(e);return this.size-=!!t,t},eZ.prototype.get=function(e){return eG(this,e).get(e)},eZ.prototype.has=function(e){return eG(this,e).has(e)},eZ.prototype.set=function(e,t){var n=eG(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},eY.prototype.clear=function(){this.__data__=new eC,this.size=0},eY.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},eY.prototype.get=function(e){return this.__data__.get(e)},eY.prototype.has=function(e){return this.__data__.has(e)},eY.prototype.set=function(e,t){var n=this.__data__;if(n instanceof eC){var r=n.__data__;if(!eU||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new eZ(r)}return n.set(e,t),this.size=n.size,this};var eq=function(){try{var e=eB(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let eJ=function(e,t,n){"__proto__"==t&&eq?eq(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},eX=function(e,t,n){(void 0===n||eD(e[t],n))&&(void 0!==n||t in e)||eJ(e,t,n)},eQ=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};var e0="object"==typeof exports&&exports&&!exports.nodeType&&exports,e1=e0&&"object"==typeof module&&module&&!module.nodeType&&module,e4=e1&&e1.exports===e0?ei.Buffer:void 0,e2=e4?e4.allocUnsafe:void 0;let e3=function(e,t){if(t)return e.slice();var n=e.length,r=e2?e2(n):new e.constructor(n);return e.copy(r),r};var e6=ei.Uint8Array;let e5=function(e){var t=new e.constructor(e.byteLength);return new e6(t).set(new e6(e)),t},e9=function(e,t){var n=t?e5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},e8=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var e7=Object.create,te=function(){function e(){}return function(t){if(!eP(t))return{};if(e7)return e7(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),tt=Object.prototype;let tn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tt)},tr=function(e){return"function"!=typeof e.constructor||tn(e)?{}:te(ey(e))},ta=function(e){return ev(e)&&"[object Arguments]"==eh(e)};var to=Object.prototype,ti=to.hasOwnProperty,ts=to.propertyIsEnumerable,tl=ta(function(){return arguments}())?ta:function(e){return ev(e)&&ti.call(e,"callee")&&!ts.call(e,"callee")},tu=Array.isArray;let tc=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},td=function(e){return null!=e&&tc(e.length)&&!eR(e)};var tp="object"==typeof exports&&exports&&!exports.nodeType&&exports,tm=tp&&"object"==typeof module&&module&&!module.nodeType&&module,tf=tm&&tm.exports===tp?ei.Buffer:void 0;let th=(tf?tf.isBuffer:void 0)||function(){return!1};var tg={};tg["[object Float32Array]"]=tg["[object Float64Array]"]=tg["[object Int8Array]"]=tg["[object Int16Array]"]=tg["[object Int32Array]"]=tg["[object Uint8Array]"]=tg["[object Uint8ClampedArray]"]=tg["[object Uint16Array]"]=tg["[object Uint32Array]"]=!0,tg["[object Arguments]"]=tg["[object Array]"]=tg["[object ArrayBuffer]"]=tg["[object Boolean]"]=tg["[object DataView]"]=tg["[object Date]"]=tg["[object Error]"]=tg["[object Function]"]=tg["[object Map]"]=tg["[object Number]"]=tg["[object Object]"]=tg["[object RegExp]"]=tg["[object Set]"]=tg["[object String]"]=tg["[object WeakMap]"]=!1;let ty=function(e){return function(t){return e(t)}};var tv="object"==typeof exports&&exports&&!exports.nodeType&&exports,tb=tv&&"object"==typeof module&&module&&!module.nodeType&&module,tw=tb&&tb.exports===tv&&ea.process,tE=function(){try{var e=tb&&tb.require&&tb.require("util").types;if(e)return e;return tw&&tw.binding&&tw.binding("util")}catch(e){}}(),tx=tE&&tE.isTypedArray,t_=tx?ty(tx):function(e){return ev(e)&&tc(e.length)&&!!tg[eh(e)]};let tD=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tS=Object.prototype.hasOwnProperty;let tk=function(e,t,n){var r=e[t];tS.call(e,t)&&eD(r,n)&&(void 0!==n||t in e)||eJ(e,t,n)},tC=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),a?eJ(n,s,l):tk(n,s,l)}return n},tP=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var tR=/^(?:0|[1-9]\d*)$/;let tT=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&tR.test(e))&&e>-1&&e%1==0&&e<t};var tO=Object.prototype.hasOwnProperty;let t$=function(e,t){var n=tu(e),r=!n&&tl(e),a=!n&&!r&&th(e),o=!n&&!r&&!a&&t_(e),i=n||r||a||o,s=i?tP(e.length,String):[],l=s.length;for(var u in e)(t||tO.call(e,u))&&!(i&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tT(u,l)))&&s.push(u);return s},tN=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var tj=Object.prototype.hasOwnProperty;let tI=function(e){if(!eP(e))return tN(e);var t=tn(e),n=[];for(var r in e)"constructor"==r&&(t||!tj.call(e,r))||n.push(r);return n},tA=function(e){return td(e)?t$(e,!0):tI(e)},tM=function(e,t,n,r,a,o,i){var s=tD(e,n),l=tD(t,n),u=i.get(l);if(u)return void eX(e,n,u);var c=o?o(s,l,n+"",e,t,i):void 0,d=void 0===c;if(d){var p=tu(l),m=!p&&th(l),f=!p&&!m&&t_(l);(c=l,p||m||f)?tu(s)?c=s:ev(s)&&td(s)?c=e8(s):m?(d=!1,c=e3(l,!0)):f?(d=!1,c=e9(l,!0)):c=[]:e_(l)||tl(l)?(c=s,tl(s))?c=tC(s,tA(s)):(!eP(s)||eR(s))&&(c=tr(l)):d=!1}d&&(i.set(l,c),a(c,l,r,o,i),i.delete(l)),eX(e,n,c)},tL=function e(t,n,r,a,o){t!==n&&eQ(n,function(i,s){if(o||(o=new eY),eP(i))tM(t,n,s,r,e,a,o);else{var l=a?a(tD(t,s),i,s+"",t,n,o):void 0;void 0===l&&(l=i),eX(t,s,l)}},tA)},tF=function(e){return e},tB=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var tU=Math.max;let tV=function(e,t,n){return t=tU(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=tU(r.length-t,0),i=Array(o);++a<o;)i[a]=r[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=r[a];return s[t]=n(i),tB(e,this,s)}};var tW=Date.now,tH=(G=eq?function(e,t){return eq(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tF,Z=0,Y=0,function(){var e=tW(),t=16-(e-Y);if(Y=e,t>0){if(++Z>=800)return arguments[0]}else Z=0;return G.apply(void 0,arguments)});let tz=function(e,t,n){if(!eP(n))return!1;var r=typeof t;return("number"==r?!!(td(n)&&tT(t,n.length)):"string"==r&&t in n)&&eD(n[t],e)},tK=function(e){var t;return tH(tV(t=function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,i=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,i&&tz(n[0],n[1],i)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var s=n[r];s&&e(t,s,r,o)}return t},void 0,tF),t+"")};var tG=tK(function(e,t,n,r){tL(e,t,n,r)});function tZ(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new eZ;++t<n;)this.add(e[t])}tZ.prototype.add=tZ.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},tZ.prototype.has=function(e){return this.__data__.has(e)};let tY=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},tq=function(e,t,n,r,a,o){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,m=2&n?new tZ:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var f=e[d],h=t[d];if(r)var g=i?r(h,f,d,t,e,o):r(f,h,d,e,t,o);if(void 0!==g){if(g)continue;p=!1;break}if(m){if(!tY(t,function(e,t){if(!m.has(t)&&(f===e||a(f,e,n,r,o)))return m.push(t)})){p=!1;break}}else if(!(f===h||a(f,h,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p},tJ=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},tX=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var tQ=es?es.prototype:void 0,t0=tQ?tQ.valueOf:void 0;let t1=function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new e6(e),new e6(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eD(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=tJ;case"[object Set]":var l=1&r;if(s||(s=tX),e.size!=t.size&&!l)break;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var c=tq(s(e),s(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(t0)return t0.call(e)==t0.call(t)}return!1},t4=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},t2=function(e,t,n){var r=t(e);return tu(e)?r:t4(r,n(e))},t3=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o},t6=function(){return[]};var t5=Object.prototype.propertyIsEnumerable,t9=Object.getOwnPropertySymbols,t8=t9?function(e){return null==e?[]:t3(t9(e=Object(e)),function(t){return t5.call(e,t)})}:t6,t7=eg(Object.keys,Object),ne=Object.prototype.hasOwnProperty;let nt=function(e){if(!tn(e))return t7(e);var t=[];for(var n in Object(e))ne.call(e,n)&&"constructor"!=n&&t.push(n);return t},nn=function(e){return td(e)?t$(e):nt(e)},nr=function(e){return t2(e,nn,t8)};var na=Object.prototype.hasOwnProperty;let no=function(e,t,n,r,a,o){var i=1&n,s=nr(e),l=s.length;if(l!=nr(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:na.call(t,c)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var f=i;++u<l;){var h=e[c=s[u]],g=t[c];if(r)var y=i?r(g,h,c,t,e,o):r(h,g,c,e,t,o);if(!(void 0===y?h===g||a(h,g,n,r,o):y)){m=!1;break}f||(f="constructor"==c)}if(m&&!f){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m};var ni=eB(ei,"DataView"),ns=eB(ei,"Promise"),nl=eB(ei,"Set"),nu=eB(ei,"WeakMap"),nc="[object Map]",nd="[object Promise]",np="[object Set]",nm="[object WeakMap]",nf="[object DataView]",nh=eN(ni),ng=eN(eU),ny=eN(ns),nv=eN(nl),nb=eN(nu),nw=eh;(ni&&nw(new ni(new ArrayBuffer(1)))!=nf||eU&&nw(new eU)!=nc||ns&&nw(ns.resolve())!=nd||nl&&nw(new nl)!=np||nu&&nw(new nu)!=nm)&&(nw=function(e){var t=eh(e),n="[object Object]"==t?e.constructor:void 0,r=n?eN(n):"";if(r)switch(r){case nh:return nf;case ng:return nc;case ny:return nd;case nv:return np;case nb:return nm}return t});let nE=nw;var nx="[object Arguments]",n_="[object Array]",nD="[object Object]",nS=Object.prototype.hasOwnProperty;let nk=function(e,t,n,r,a,o){var i=tu(e),s=tu(t),l=i?n_:nE(e),u=s?n_:nE(t);l=l==nx?nD:l,u=u==nx?nD:u;var c=l==nD,d=u==nD,p=l==u;if(p&&th(e)){if(!th(t))return!1;i=!0,c=!1}if(p&&!c)return o||(o=new eY),i||t_(e)?tq(e,t,n,r,a,o):t1(e,t,l,n,r,a,o);if(!(1&n)){var m=c&&nS.call(e,"__wrapped__"),f=d&&nS.call(t,"__wrapped__");if(m||f){var h=m?e.value():e,g=f?t.value():t;return o||(o=new eY),a(h,g,n,r,o)}}return!!p&&(o||(o=new eY),no(e,t,n,r,a,o))},nC=function(e,t){return function e(t,n,r,a,o){return t===n||(null!=t&&null!=n&&(ev(t)||ev(n))?nk(t,n,r,a,e,o):t!=t&&n!=n)}(e,t)},nP=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},nR=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};var nT=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)t4(t,t8(e)),e=ey(e);return t}:t6;let nO=function(e){return t2(e,tA,nT)};var n$=Object.prototype.hasOwnProperty;let nN=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&n$.call(e,"index")&&(n.index=e.index,n.input=e.input),n},nj=function(e,t){var n=t?e5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var nI=/\w*$/;let nA=function(e){var t=new e.constructor(e.source,nI.exec(e));return t.lastIndex=e.lastIndex,t};var nM=es?es.prototype:void 0,nL=nM?nM.valueOf:void 0;let nF=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return e5(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return nj(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e9(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return nA(e);case"[object Symbol]":return nL?Object(nL.call(e)):{}}};var nB=tE&&tE.isMap,nU=nB?ty(nB):function(e){return ev(e)&&"[object Map]"==nE(e)},nV=tE&&tE.isSet,nW=nV?ty(nV):function(e){return ev(e)&&"[object Set]"==nE(e)},nH="[object Arguments]",nz="[object Function]",nK="[object Object]",nG={};nG[nH]=nG["[object Array]"]=nG["[object ArrayBuffer]"]=nG["[object DataView]"]=nG["[object Boolean]"]=nG["[object Date]"]=nG["[object Float32Array]"]=nG["[object Float64Array]"]=nG["[object Int8Array]"]=nG["[object Int16Array]"]=nG["[object Int32Array]"]=nG["[object Map]"]=nG["[object Number]"]=nG[nK]=nG["[object RegExp]"]=nG["[object Set]"]=nG["[object String]"]=nG["[object Symbol]"]=nG["[object Uint8Array]"]=nG["[object Uint8ClampedArray]"]=nG["[object Uint16Array]"]=nG["[object Uint32Array]"]=!0,nG["[object Error]"]=nG[nz]=nG["[object WeakMap]"]=!1;let nZ=function e(t,n,r,a,o,i){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=o?r(t,a,o,i):r(t)),void 0!==s)return s;if(!eP(t))return t;var d=tu(t);if(d){if(s=nN(t),!l)return e8(t,s)}else{var p,m,f,h,g=nE(t),y=g==nz||"[object GeneratorFunction]"==g;if(th(t))return e3(t,l);if(g==nK||g==nH||y&&!o){if(s=u||y?{}:tr(t),!l)return u?(m=(p=s)&&tC(t,tA(t),p),tC(t,nT(t),m)):(h=(f=s)&&tC(t,nn(t),f),tC(t,t8(t),h))}else{if(!nG[g])return o?t:{};s=nF(t,g,l)}}i||(i=new eY);var v=i.get(t);if(v)return v;i.set(t,s),nW(t)?t.forEach(function(a){s.add(e(a,n,r,a,t,i))}):nU(t)&&t.forEach(function(a,o){s.set(o,e(a,n,r,o,t,i))});var b=c?u?nO:nr:u?tA:nn,w=d?void 0:b(t);return nR(w||t,function(a,o){w&&(a=t[o=a]),tk(s,o,e(a,n,r,o,t,i))}),s},nY=function(e){return"symbol"==typeof e||ev(e)&&"[object Symbol]"==eh(e)};var nq=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nJ=/^\w*$/;let nX=function(e,t){if(tu(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||nY(e))||nJ.test(e)||!nq.test(e)||null!=t&&e in Object(t)};function nQ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(nQ.Cache||eZ),n}nQ.Cache=eZ;var n0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n1=/\\(\\)?/g,n4=(J=(q=nQ(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n0,function(e,n,r,a){t.push(r?a.replace(n1,"$1"):n||e)}),t},function(e){return 500===J.size&&J.clear(),e})).cache,q),n2=1/0,n3=es?es.prototype:void 0,n6=n3?n3.toString:void 0;let n5=function e(t){if("string"==typeof t)return t;if(tu(t))return nP(t,e)+"";if(nY(t))return n6?n6.call(t):"";var n=t+"";return"0"==n&&1/t==-n2?"-0":n},n9=function(e){return null==e?"":n5(e)},n8=function(e,t){return tu(e)?e:nX(e,t)?[e]:n4(n9(e))},n7=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var re=1/0;let rt=function(e){if("string"==typeof e||nY(e))return e;var t=e+"";return"0"==t&&1/e==-re?"-0":t},rn=function(e,t){t=n8(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[rt(t[n++])];return n&&n==r?e:void 0},rr=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o},ra=function(e,t){var n,r;return t=n8(t,e),n=e,null==(e=(r=t).length<2?n:rn(n,rr(r,0,-1)))||delete e[rt(n7(t))]},ro=function(e){return e_(e)?void 0:e};var ri=es?es.isConcatSpreadable:void 0;let rs=function(e){return tu(e)||tl(e)||!!(ri&&e&&e[ri])},rl=function e(t,n,r,a,o){var i=-1,s=t.length;for(r||(r=rs),o||(o=[]);++i<s;){var l=t[i];n>0&&r(l)?n>1?e(l,n-1,r,a,o):t4(o,l):a||(o[o.length]=l)}return o};var ru=tH(tV(X=function(e,t){var n={};if(null==e)return n;var r=!1;t=nP(t,function(t){return t=n8(t,e),r||(r=t.length>1),t}),tC(e,nO(e),n),r&&(n=nZ(n,7,ro));for(var a=t.length;a--;)ra(n,t[a]);return n},void 0,function(e){return(null==e?0:e.length)?rl(e,1):[]}),X+""),rc=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function rd(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let rp=rd(e=>Array.isArray(e),"must be an array"),rm=rd(e=>"boolean"==typeof e,"must be a boolean"),rf=rd(e=>"number"==typeof e,"must be a number"),rh=rd(e=>"string"==typeof e,"must be a string"),rg=rd(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),ry=rd(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"),rv=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),rb=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});rb.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let rw=B("config-store-of-extension-state",{mountedExtensions:[]});function rE(e){return V(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function rx(){return V("config-extension-slots",{slots:{}})}function r_(e){return rD(rx().getState(),e)}function rD(e,t){return e.slots[t]??{loaded:!1,config:{}}}function rS(){return V("config-extensions",{configs:{}})}function rk(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let n=rS(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},subscribe:e=>n.subscribe((t,n)=>{let a=r(t),o=r(n);T(a,o)||e(a,o)})}}function rC(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function rP(e,t,n){return e.configure?.[n]??null}let rR=j()(()=>({config:{}})),rT=0,rO=!0,r$=!1;function rN(e){r=e}function rj(){rO=!0,rT>0&&rI()}function rI(){if(rO&&r&&!r$){r$=!0,rO=!1;try{r()}catch(e){rO=!0,rA(e),console.error("Failed to derive the implementer tools config",e)}finally{r$=!1}}}function rA(e){rR.setState({derivationError:e instanceof Error?e.message:String(e)})}function rM(){rR.getState().derivationError&&rR.setState({derivationError:void 0})}let rL=U("config-implementer-tools",{...rR,getState:()=>(0===rT&&rI(),rR.getState()),setState:(...e)=>(rO=!1,rR.setState(...e)),subscribe(e){rT++,rI();let t=rR.subscribe(e),n=!1;return()=>{!n&&(n=!0,rT--),t()}}});function rF(e,t){if(Array.isArray(t))return t}function rB(e,t){return tG({},e,t,rF)}let rU=[];function rV(){let e=rv.getState(),t=rb.getState(),n=rw.getState();if(rW?.configState===e&&rW.tempConfigState===t)return void rZ(e,n,t,rW.slotConfigs,!0);!function(e,t){for(let n of Object.keys(e.schemas)){let r,a=rE(n),o=e.schemas[n],i=!!e.moduleLoaded[n],s=rG.get(n);if(s&&s.schema===o&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)r=s.state;else{let a=i?function(e,t,n){let r=t.schemas[e],a=ae(e,r8(t,n));an(r,a,e);let o=ai(r,a);return ar(r,o,e),delete o.extensionSlots,o}(n,e,t):function(e,t,n){let r=ai(af,ae(e,r8(t,n)));return ar(af,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:i,config:a},rG.set(n,{schema:o,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:r})}let l=a.getState();l.loaded===r.loaded&&l.translationOverridesLoaded===r.translationOverridesLoaded&&nC(l.config,r.config)||a.setState(r)}}(e,t);let r=function(e,t){let n=at(r8(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});var a=r;for(let[e,t]of Object.entries(a))for(let[n,r]of Object.entries(t))!function(e,t,n){let r=`${t}.extensionSlots.${n}`,a=`Extension slot config '${r}'`,o=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));o.length&&ac(r,a+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||ac(r,a+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||ac(r,a+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||ac(r,a+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!al(e.configure)&&ac(r,a+".configure' is invalid. Must be an object with extension IDs for keys")}(r,e,n);let o={},i={};for(let e of Object.values(r))for(let[t,n]of Object.entries(e))o[t]=n,n.configure&&(i[t]??(i[t]=[])).push(n.configure);for(let[e,t]of Object.entries(i)){let n=1===t.length?t[0]:at(t);o[e].configure!==n&&(o[e]={...o[e],configure:n})}return o}(e,t);(function(e){let t=rx(),n=t.getState().slots,r={},a=!1;for(let[t,o]of Object.entries(e)){let e=n[t];e?.loaded&&nC(e.config,o)?r[t]=e:(r[t]={loaded:!0,config:o},a=!0)}(a||Object.keys(n).length!==Object.keys(r).length)&&t.setState({slots:r})})(r),rZ(e,n,t,r,!1),rW={configState:e,tempConfigState:t,slotConfigs:r},rj()}let rW=null,rH=new WeakMap;function rz(){r=()=>{var e,t;let n,r;return e=rv.getState(),t=rb.getState(),n=rL.getState(),r={config:function(e,t){let n=function(e){let t={};for(let[n,r]of Object.entries(e)){let e=r9.get(n);if(e&&e.schema===r)t[n]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:al(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}(nZ(r,5));r9.set(n,{schema:r,annotated:e}),t[n]=e}}return t}(e.schemas),r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],a=new Set(Object.keys(n));for(let[e]of r)for(let t of Object.keys(e))a.add(t);let o={};for(let e of a){let t=n[e],a=r.map(([t])=>t[e]),i=r.map(([,e])=>e),s=r5.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===a.length&&s.configSlices.every((e,t)=>e===a[t])&&s.sources.every((e,t)=>e===i[t])){o[e]=s.result;continue}let l=t??{};r.forEach(([,e],t)=>{let n=a[t];void 0!==n&&(l=rB(l,function e(t,n){return al(t)?Object.keys(t).reduce((r,a)=>(r[a]=e(t[a],n),r),{}):{_value:t,_source:n}}(n,e)))}),r5.set(e,{annotatedSchema:t,configSlices:a,sources:i,result:l}),o[e]=l}return o}(e,t)},void(nC(n.config,r.config)||rL.setState(r))},rV(),rU.push(rv.subscribe(rK),rb.subscribe(rK),rw.subscribe(rK))}function rK(){rM();try{rV()}catch(e){rA(e),console.error("Failed to recompute the configuration",e)}}rz();let rG=new Map;function rZ(e,t,n,r,a){let o=rS(),i=o.getState().configs,s={},l=!1,u=0;for(let o of t.mountedExtensions){let t,c=i[o.slotName]?.[o.extensionId],d=c&&rH.get(c);if(a&&c?.loaded&&d?.slotModuleName===o.slotModuleName&&d.extensionModuleName===o.extensionModuleName)t=c;else{let a=function(e,t,n,r,a,o,i){let s=function(e){let[t]=e.split("#");return t}(r),l=a.schemas[s],u=JSON.stringify([n,r,e,t]),c=r6.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===a.schemas[t]&&c.providedConfigs===a.providedConfigs&&c.temporaryConfig===o.config)return c.config;let d=l?s:t,p=r8(a,o),m=i?.configure?.[r]??{},f=ae(e,p),h=f?.extensionSlots?.[n]?.configure?.[r]??{},g=at([ae(d,p),m,h]),y=l??a.schemas[t];an(y,g,d);let v=ai(y,g);return ar(y,v,d),delete v.extensionSlots,r6.set(u,{extensionSchema:l,extensionModuleSchema:a.schemas[t],providedConfigs:a.providedConfigs,temporaryConfig:o.config,config:v}),v}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n,r[o.slotName]);t=c?.loaded&&nC(c.config,a)?c:{config:a,loaded:!0}}rH.set(t,o),t!==c&&(l=!0),s[o.slotName]||(s[o.slotName]={}),s[o.slotName][o.extensionId]=t,u++}for(let[e,t]of Object.entries(s)){let n=i[e];n&&Object.keys(n).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>n[e]===t)&&(s[e]=n)}l||(l=Object.keys(i).length!==Object.keys(s).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),l&&o.setState({configs:s})}function rY(e,t){r7(e,t);let n=rB(t,af);rv.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function rq(e){rv.setState(t=>({...t,schemas:{...t.schemas,[e]:af}}))}function rJ(e){rv.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function rX(e){rv.setState(t=>({...t,schemas:{...t.schemas,[e]:am}}))}function rQ(e,t){r7(e,t);let n=rB(t,af);rv.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.`),rv.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function r0(e,t="provided"){rv.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function r1(e,t,n){return new Promise(r=>{let a,o=!1;function i(e){!o&&t(e)&&(o=!0,r(n(e)),a?.())}i(e.getState()),o||(a=e.subscribe(i))})}function r4(e){return r1(rE(e),e=>!!(e.loaded&&e.config),e=>ru(e.config,["Display conditions","Translation overrides"]))}function r2(e,t,n){let r=[r1(rE(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&n&&r.push(r1(rk(t,n),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(r)}function r3(e,t,n){an(e,t,n);let r=ai(e,t);return ar(e,r,n),r}let r6=new Map,r5=new Map,r9=new Map;function r8(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function r7(e,t,n=""){let r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let a of Object.keys(t).filter(e=>!e.startsWith("_"))){let o=n+(n&&".")+a,i=t[a];if("Display conditions"===o&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===o&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!al(i)){console.error(`${e} has bad config schema definition for key '${o}'. ${r}`);continue}i.hasOwnProperty("_default")||r7(e,i,o);let s=i._elements;if(as(s)&&r7(e,s,o+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${o}' ${r}.
|
|
4
|
+
|
|
5
|
+
If you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);let l=i._type;l&&!Object.values(rc).includes(l)&&console.error(`${e} has invalid type for key '${o}' ${r}.
|
|
6
|
+
|
|
7
|
+
If you're the maintainer: the allowed types are ${Object.values(rc).join(", ")}. Received '${l}'`),Object.keys(i).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${o}'. ${r}.
|
|
8
|
+
|
|
9
|
+
If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![rc.Array,rc.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${o}'. ${r}.
|
|
10
|
+
|
|
11
|
+
If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function ae(e,t){return at(t.map(({[e]:t})=>t).filter(e=>!!e))}function at(e){return e.reduce((e,t)=>tG(e,t,rF),{})}function an(e,t,n=""){for(let r of Object.keys(t)){let a=t[r],o=n+"."+r,i=e[r];if(!e.hasOwnProperty(r)){("extensionSlots"!==r||""===n)&&ac(o,`Unknown config key '${o}' provided. Ignoring.`);continue}(function e(t,n,r){aa(r,t._type,n),al(n)?t._type===rc.Object?function(t,n,r){if(t._elements)for(let a of Object.keys(n)){let o=n[a];e(t._elements,o,`${r}.${a}`)}}(t,n,r):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||an(t,n,r):t._type===rc.Array&&function(t,n,r){if(aa(r,rc.Array,n)){if(as(t._elements))for(let a=0;a<n.length;a++)e(t._elements,n[a],`${r}[${a}]`);for(let e=0;e<n.length;e++)aa(`${r}[${e}]`,t._elements?._type,n[e])}}(t,n,r)})(i,a,o)}}function ar(e,t,n=""){if(e){if(t!==e._default&&ao(n,e._validators,t),al(t))for(let r of Object.keys(t)){let a=t[r],o=n+"."+r,i=e[r];e._type===rc.Object&&e._elements?ar(e._elements,a,o):ar(i,a,o)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)ar(e._elements,t[r],`${n}[${r}]`)}}function aa(e,t,n){return!t||ao(e,[{Array:rp,Boolean:rm,ConceptUuid:ry,Number:rf,Object:rg,String:rh,UUID:ry,PersonAttributeTypeUuid:ry,PatientIdentifierTypeUuid:ry}[t]],n)}function ao(e,t,n){let r=!0;if(t)try{for(let a of t){let t=a(n);if("string"==typeof t){let a="object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`;ac(e,a),r=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
|
|
12
|
+
${t}`)}return r}let ai=(e,t)=>{let n=structuredClone(t);if(!e)return n;for(let t of Object.keys(e)){let r=n[t],a=e[t];if(a&&(a.hasOwnProperty("_type")||a.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=a._default);let e=a._elements;if(r&&as(e)){if(a._type===rc.Array&&Array.isArray(r)){let a=r.map(t=>ai(e,t));n[t]=a}else if(a._type===rc.Object)for(let t of Object.keys(r))r[t]=ai(e,r[t])}}else if(al(a)){let e=r??{};al(e)&&(n[t]=ai(a,e))}}return n};function as(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function al(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let au=new Set;function ac(e,t){let n=`${e}:::${t}`;au||(au=new Set),au.has(n)||(console.error(t),au.add(n))}function ad(e){e?au.forEach(t=>{t.startsWith(e)&&au.delete(t)}):au.clear()}function ap(){rU.forEach(e=>e()),rU.length=0,rG.clear(),r6.clear(),r9.clear(),r5.clear(),rW=null,rH=new WeakMap,rz()}let am={"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:rc.Object,_default:{},_validators:[rd(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(", ")}.`})]}},af={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:rc.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:rc.String,_default:void 0}},...am},ah=(e,t)=>rd(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),ag=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return rd(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},ay=ag([]),av=e=>rd(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),ab={inRange:ah,isUrl:ay,isUrlWithTemplateParameters:ag,oneOf:av};var aw=n(2034);let aE=B("breadcrumbs",[]);function ax(e){return a_([e])}function a_(e){let t=[...aD(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,aw.pathToRegexp)(e.matcher).regexp:(0,aw.pathToRegexp)(e.path).regexp,settings:e}))];aE.setState(t,!0)}function aD(){return aE.getState()}function aS(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=aS(e,n.join("/"));if(t)return t}}(e,t)}function ak(e,t){if(e.length>0){let n=aS(e,t);if(n){let t=[n],r=aS(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=aS(e,r.settings.parent);return t.reverse()}}return[]}function aC(e){return ak(aD(),e)}var aP=Object.freeze({__proto__:null,get start(){return oX},get ensureJQuerySupport(){return oC},get setBootstrapMaxTime(){return ol},get setMountMaxTime(){return ou},get setUnmountMaxTime(){return oc},get setUnloadMaxTime(){return od},get registerApplication(){return oL},get unregisterApplication(){return oB},get getMountedApps(){return oj},get getAppStatus(){return oA},get unloadApplication(){return oU},get checkActivityFunctions(){return oF},get getAppNames(){return oI},get pathToActiveWhen(){return oH},get navigateToUrl(){return ov},get patchHistoryApi(){return oD},get triggerAppChange(){return oZ},get addErrorHandler(){return aN},get removeErrorHandler(){return aj},get mountRootParcel(){return or},get NOT_LOADED(){return aM},get LOADING_SOURCE_CODE(){return aL},get NOT_BOOTSTRAPPED(){return aF},get BOOTSTRAPPING(){return aB},get NOT_MOUNTED(){return aU},get MOUNTING(){return aV},get UPDATING(){return aH},get LOAD_ERROR(){return aG},get MOUNTED(){return aW},get UNLOADING(){return aK},get UNMOUNTING(){return az},get SKIP_BECAUSE_BROKEN(){return aZ}}),aR=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,aT=!function(){try{var e=new aR("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 n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:aR;let aO=[];function a$(e,t,n){let r=aA(e,t,n);aO.length?aO.forEach(e=>e(r)):setTimeout(()=>{throw r})}function aN(e){if("function"!=typeof e)throw Error(aI(28,!1));aO.push(e)}function aj(e){if("function"!=typeof e)throw Error(aI(29,!1));let t=!1;return aO=aO.filter(n=>{let r=n===e;return t=t||r,!r}),t}function aI(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function aA(e,t,n){let r,a=`${aQ(t)} '${aJ(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(aI(30,!1,t.status,aJ(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=aJ(t),t.status=n,r}let aM="NOT_LOADED",aL="LOADING_SOURCE_CODE",aF="NOT_BOOTSTRAPPED",aB="BOOTSTRAPPING",aU="NOT_MOUNTED",aV="MOUNTING",aW="MOUNTED",aH="UPDATING",az="UNMOUNTING",aK="UNLOADING",aG="LOAD_ERROR",aZ="SKIP_BECAUSE_BROKEN";function aY(e){return e.status===aW}function aq(e){try{return e.activeWhen(window.location)}catch(t){return a$(t,e,aZ),!1}}function aJ(e){return e.name}function aX(e){return!!e.unmountThisParcel}function aQ(e){return aX(e)?"parcel":"application"}function a0(){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 a1(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function a4(e){return e&&("function"==typeof e||Array.isArray(e)&&!a1(e,e=>"function"!=typeof e))}function a2(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=aQ(e),a=aJ(e);return function(e){return n.reduce((n,o,i)=>n.then(()=>{let n=o(e);return a3(n)?n:Promise.reject(aI(15,!1,r,a,t,i))}),Promise.resolve())}}function a3(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let a6=[];function a5(e,t){return Promise.resolve().then(()=>e.status!==aF?e:(e.status=aB,e.bootstrap?op(e,"bootstrap").then(n).catch(n=>{if(t)throw aA(n,e,aZ);return a$(n,e,aZ),e}):Promise.resolve().then(n)));function n(){return e.status=aU,e}}function a9(e,t){return Promise.resolve().then(()=>{if(e.status!==aW)return e;return e.status=az,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,r=>n().then(()=>{let n=Error(r.message);if(t)throw aA(n,e,aZ);a$(n,e,aZ)})).then(()=>e);function n(){return op(e,"unmount").then(()=>{e.status=aU},n=>{if(t)throw aA(n,e,aZ);a$(n,e,aZ)})}})}let a8=!1,a7=!1;function oe(e,t){return Promise.resolve().then(()=>e.status!==aU?e:(a8||(window.dispatchEvent(new aT("single-spa:before-first-mount")),a8=!0),e.status=aV,op(e,"mount").then(()=>(e.status=aW,a7||(window.dispatchEvent(new aT("single-spa:first-mount")),a7=!0),e)).catch(n=>{return e.status=aW,a9(e,!0).then(r,r);function r(){if(t)throw aA(n,e,aZ);return a$(n,e,aZ),e}})))}let ot=0,on={parcels:{}};function or(){return oa.apply(on,arguments)}function oa(e,t){let n,r,a,o=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(aI(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(aI(3,!1,typeof e.name));let i=ot++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(aI(4,!1,s,typeof t));if(!t.domElement)throw Error(aI(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?aL:aF,customProps:t,parentName:aJ(o),unmountThisParcel:()=>m.then(()=>{if(c.status!==aW)throw Error(aI(6,!1,s,c.status));return a9(c,!0)}).then(e=>(c.parentName&&delete o.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=aZ,a(e),e})};o.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(aI(7,!1));let p=(d=d.then(e=>{if(!e)throw Error(aI(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!a4(e.bootstrap))throw Error(aI(9,!1,s));if(!a4(e.mount))throw Error(aI(10,!1,s));if(!a4(e.unmount))throw Error(aI(11,!1,s));if(e.update&&!a4(e.update))throw Error(aI(12,!1,s));let t=a2(e,"bootstrap"),r=a2(e,"mount"),a=a2(e,"unmount");c.status=aF,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=a,c.timeouts=om(e.timeouts),e.update&&(c.update=a2(e,"update"),n.update=function(e){return c.customProps=e,oo(Promise.resolve().then(()=>{if(c.status!==aW)throw Error(aI(32,!1,aJ(c)));return c.status=aH,op(c,"update").then(()=>(c.status=aW,c)).catch(e=>{throw aA(e,c,aZ)})}))})})).then(()=>a5(c,!0)),m=p.then(()=>oe(c,!0)),f=new Promise((e,t)=>{r=e,a=t});return n={mount:()=>oo(Promise.resolve().then(()=>{if(c.status!==aU)throw Error(aI(13,!1,s,c.status));return o.parcels[i]=c,oe(c)})),unmount:()=>oo(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:oo(d),bootstrapPromise:oo(p),mountPromise:oo(m),unmountPromise:oo(f)}}function oo(e){return e.then(()=>null)}function oi(e){let t=aJ(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(aI(40,!1),t,n));let r=a0({},n,{name:t,mountParcel:oa.bind(e),singleSpa:aP});return aX(e)&&(r.unmountSelf=e.unmountThisParcel),r}let os={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 ol(e,t,n){if("number"!=typeof e||e<=0)throw Error(aI(16,!1));os.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ou(e,t,n){if("number"!=typeof e||e<=0)throw Error(aI(17,!1));os.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function oc(e,t,n){if("number"!=typeof e||e<=0)throw Error(aI(18,!1));os.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function od(e,t,n){if("number"!=typeof e||e<=0)throw Error(aI(19,!1));os.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function op(e,t){let n=e.timeouts[t],r=n.warningMillis,a=aQ(e);return new Promise((o,i)=>{let s=!1,l=!1;e[t](oi(e)).then(e=>{s=!0,o(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=aI(31,!1,t,a,aJ(e),n.millis);function c(e){s||(!0===e?(l=!0,n.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*r+r<n.millis&&setTimeout(()=>c(e+1),r)))}})}function om(e){let t={};for(let n in os)t[n]=a0({},os[n],e&&e[n]||{});return t}function of(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==aM&&e.status!==aG?e:(e.status=aL,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(oi(e));if(!a3(r))throw n=!0,Error(aI(33,!1,aJ(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!a4(t.bootstrap)&&(r=35),a4(t.mount)||(r=36),a4(t.unmount)||(r=37);let a=aQ(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(aI(r,!1,a,aJ(e),n),t),a$(void 0,e,aZ),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=a0({},e.devtools.overlays,t.devtools.overlays)),e.status=aF,e.bootstrap=a2(t,"bootstrap"),e.mount=a2(t,"mount"),e.unmount=a2(t,"unmount"),e.unload=a2(t,"unload"),e.timeouts=om(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=aZ:(r=aG,e.loadErrorTime=(new Date).getTime()),a$(t,e,r),e}))})}let oh="u">typeof window,og={hashchange:[],popstate:[]},oy=["hashchange","popstate"];function ov(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(aI(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=oS(window.location.href),r=oS(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function ob(e){if(e){let t=e[0].type;oy.indexOf(t)>=0&&og[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function ow(){oY([],arguments)}function oE(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return a&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let ox=null,o_=!1;function oD(e){if(o_)throw Error(aI(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,o_=!0,ox=window.history.replaceState,window.addEventListener("hashchange",ow),window.addEventListener("popstate",ow);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&oy.indexOf(e)>=0)||a1(og[e],e=>e===n))return t.apply(this,arguments);og[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&oy.indexOf(e)>=0&&(og[e]=og[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=oE(window.history.pushState,"pushState"),window.history.replaceState=oE(ox,"replaceState")}function oS(e){let t=document.createElement("a");return t.href=e,t}oh&&(window.singleSpaNavigate?console.warn(aI(41,!1)):window.singleSpaNavigate=ov);let ok=!1;function oC(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!ok){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return oP.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return oP.call(this,n,window.removeEventListener,e,t,arguments)},ok=!0}}function oP(e,t,n,r,a){return"string"!=typeof n?e.apply(this,a):(n.split(/\s+/).forEach(e=>{oy.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,a))}let oR={};function oT(e){return Promise.resolve().then(()=>{let t=oR[aJ(e)];if(!t)return e;if(e.status===aM)return oO(e,t),e;if(e.status===aK)return t.promise.then(()=>e);if(e.status!==aU&&e.status!==aG)return e;let n=e.status===aG?Promise.resolve():op(e,"unload");return e.status=aK,n.then(()=>(oO(e,t),e)).catch(n=>(delete oR[aJ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,a$(n,e,aZ),t.reject(n),e))})}function oO(e,t){delete oR[aJ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=aM,t.resolve()}function o$(e,t,n,r){oR[aJ(e)]={app:e,resolve:n,reject:r},Object.defineProperty(oR[aJ(e)],"promise",{get:t})}let oN=[];function oj(){return oN.filter(aY).map(aJ)}function oI(){return oN.map(aJ)}function oA(e){let t=a1(oN,t=>aJ(t)===e);return t?t.status:null}let oM=!1;function oL(e,t,n,r){var a,o;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(aI(39,!1));let t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(aI(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(aI(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(aI(24,!1));if(!oW(e.customProps))throw Error(aI(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(aI(20,!1));if(!t)throw Error(aI(23,!1));if("function"!=typeof n)throw Error(aI(24,!1));if(!oW(r))throw Error(aI(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(a=i.loadApp)?()=>Promise.resolve(a):a,i.customProps=i.customProps||{},s=(s=Array.isArray(o=i.activeWhen)?o:[o]).map(e=>"function"==typeof e?e:oH(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(oJ||oM||(oM=!0,setTimeout(()=>{oJ||console.warn(aI(1,!1))},5e3)),-1!==oI().indexOf(l.name))throw Error(aI(21,!1,l.name));oN.push(a0({loadErrorTime:null,status:aM,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),oh&&(oC(),oY())}function oF(e=window.location){return oN.filter(t=>t.activeWhen(e)).map(aJ)}function oB(e){if(0===oN.filter(t=>aJ(t)===e).length)throw Error(aI(25,!1,e));return(oh?oU(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=oN.map(aJ).indexOf(e);oN.splice(t,1)})}function oU(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(aI(26,!1));let n=a1(oN,t=>aJ(t)===e);if(!n)throw Error(aI(27,!1,e));let r=oR[aJ(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{o$(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,oV(n,r.resolve,r.reject)):e=new Promise((t,r)=>{o$(n,()=>e,t,r),oV(n,t,r)}),e}}function oV(e,t,n){Promise.resolve().then(()=>{if(a1(oF(),t=>t===aJ(e)))return oZ()}).then(()=>a9(e).then(oT).then(()=>{t(),setTimeout(()=>{oY()})})).catch(n)}function oW(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function oH(e,t){let n=function(e,t){let n=0,r=!1,a="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],a=r&&"/"===n;(!r&&":"===n||a)&&o(t)}return o(e.length),RegExp(a,"i");function o(o){let i=e.slice(n,o).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(a+=r?"[^/]+/?":i,o===e.length)if(r)t&&(a+="$");else{let e=t?"":".*";a="/"===a.charAt(a.length-1)?`${a}${e}$`:`${a}(/${e})?(#.*)?$`}r=!r,n=o}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let oz=!1,oK=[],oG=oh&&window.location.href;function oZ(){return oY()}function oY(e=[],t,n=!1){let r,a,o,i,s;if(oz)return new Promise((e,n)=>{oK.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],a=[],o=[],i=[],s=(new Date).getTime(),oN.forEach(e=>{let t=e.status!==aZ&&aq(e);switch(e.status){case aG:t&&s-e.loadErrorTime>=200&&o.push(e);break;case aM:case aL:t&&o.push(e);break;case aF:case aU:!t&&oR[aJ(e)]?r.push(e):t&&i.push(e);break;case aW:t||a.push(e)}}),{appsToUnload:r,appsToUnmount:a,appsToLoad:o,appsToMount:i}),p,m=[],f=oG,h=oG=window.location.href;return oJ?(oz=!0,p=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===p.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(m).then(n=>{if(n.some(e=>e))return ox.call(window.history,history.state,"",f.substring(location.origin.length)),oG=location.href,oz=!1,oY(e,t,!0);let r=l.map(oT),a=Promise.all(u.map(a9).map(e=>e.then(oT)).concat(r));a.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let o=c.map(e=>of(e).then(e=>oq(e,a))),i=d.filter(e=>0>c.indexOf(e)).map(e=>oq(e,a));return a.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(o.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(p=c,Promise.resolve().then(()=>Promise.all(c.map(of)).then(v).then(()=>[]).catch(e=>{throw v(),e}).finally(()=>{})));function g(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);m.push(t.catch(e=>(console.warn(Error(aI(42,!1))),console.warn(e),!1)))}function y(){let t=oj();e.forEach(e=>e.resolve(t));try{w(0===p.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(oz=!1,oK.length>0){let e=oK;oK=[],oY(e)}return t}function v(){n||(e.forEach(e=>{ob(e.eventArguments)}),ob(t))}function b(e=!1,n){let r={},a={[aW]:[],[aU]:[],[aM]:[],[aZ]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,aW)}),l.forEach(e=>{i(e,aM)}),u.forEach(e=>{i(e,aU)})):p.forEach(e=>{i(e)});let o={detail:{newAppStatuses:r,appsByNewStatus:a,totalAppChanges:p.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:h}};return n&&a0(o.detail,n),o;function i(e,t){let n=aJ(e);t=t||oA(n),r[n]=t,(a[t]=a[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new aT(`single-spa:${e}`,t))}}function oq(e,t){return aq(e)?a5(e).then(e=>t.then(()=>aq(e)?oe(e):e)):t.then(()=>e)}let oJ=!1;function oX(e){oJ=!0,oh&&(oD(e),oY())}oh&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...oN]},reroute:oY,NOT_LOADED:aM,toLoadPromise:of,toBootstrapPromise:a5,unregisterApplication:oB,getProfilerData:function(){return a6}});let oQ={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",applicationError:"Application Error",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",clearDevOverrides:"Clear dev overrides",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",copied:"Copied!",copyToClipboard:"Copy to clipboard",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",reload:"Reload",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",serverStartingUp:"The server is starting",serverStartingUpExplainer:"This can take a few minutes. OpenMRS will open automatically when the server is ready.",serverStartingUpSlowExplainer:"This is taking longer than usual. First startup after an upgrade can take 10 minutes or more. You can leave this page open.",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",somethingWentWrongTryReloading:"Something went wrong. Please try reloading.",toggleDevTools:"Toggle dev tools",unknown:"Unknown",viewSetupProgress:"View setup progress",waitingForServer:"Waiting for the server",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},o0=e=>"string"==typeof e,o1=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},o4=e=>null==e?"":""+e,o2=/###/g,o3=e=>e&&e.indexOf("###")>-1?e.replace(o2,"."):e,o6=e=>!e||o0(e),o5=(e,t,n)=>{let r=o0(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(o6(e))return{};let t=o3(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return o6(e)?{}:{obj:e,k:o3(r[a])}},o9=(e,t,n)=>{let{obj:r,k:a}=o5(e,t,Object);if(void 0!==r||1===t.length){r[a]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),s=o5(e,i,Object);for(;void 0===s.obj&&i.length;)o=`${i[i.length-1]}.${o}`,s=o5(e,i=i.slice(0,i.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},o8=(e,t)=>{let{obj:n,k:r}=o5(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},o7=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?o0(e[r])||e[r]instanceof String||o0(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):o7(e[r],t[r],n):e[r]=t[r]);return e};var ie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};let it=e=>o0(e)?e.replace(/[&<>"'\/]/g,e=>ie[e]):e,ir=[" ",",","?","!",";"],ia=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 n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),io=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),a=e;for(let e=0;e<r.length;){let t;if(!a||"object"!=typeof a)return;let o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],void 0!==(t=a[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},ii=e=>e?.replace("_","-"),is={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 il{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||is,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,n,r){return r&&!this.debug?null:(o0(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new il(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new il(this.logger,e)}}var iu=new il;class ic{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+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,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}class id extends ic{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,n,r={}){let a,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):o0(n)&&o?a.push(...n.split(o)):a.push(n)));let s=o8(this.data,a);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&o0(n))?io(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r,a={silent:!1}){let o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),o9(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(o0(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let s=o8(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?o7(s,n,a):s={...s,...n},o9(this.data,i,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),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 ip={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};let im=Symbol("i18next/PATH_KEY");function ih(e,t){let n,r,a,{[im]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===im)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy));return o.join(t?.keySeparator??".")}let ig={},iy=e=>!o0(e)&&"boolean"!=typeof e&&"number"!=typeof e;class iv extends ic{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[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=iu.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let a=iy(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=ir.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let a=ia.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!a.test(e);if(!o){let t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r);if(o&&!i){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o0(a)?[a]:a};let o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:o0(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ih(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?a?{res:`${l}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:i;let p=this.resolve(e,r),m=p?.res,f=p?.usedKey||i,h=p?.exactUsedKey||i,g=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!o0(r.count),b=iv.hasDefaultValue(r),w=v?this.pluralResolver.getSuffix(c,r.count,r):"",E=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",x=v&&!r.ordinal&&0===r.count,_=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${E}`]||r.defaultValue,D=m;y&&!m&&b&&(D=_);let S=iy(D),k=Object.prototype.toString.apply(D);if(y&&D&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(k)&&!(o0(g)&&Array.isArray(D))){if(!r.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(f,D,{...r,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(r),p):e}if(o){let e=Array.isArray(D),t=e?[]:{},n=e?h:f;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let a=`${n}${o}${e}`;b&&!m?t[e]=this.translate(a,{...r,defaultValue:iy(_)?_[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(a,{...r,joinArrays:!1,ns:s}),t[e]===a&&(t[e]=D[e])}m=t}}else if(y&&o0(g)&&Array.isArray(m))(m=m.join(g))&&(m=this.extendTranslation(m,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(m)&&b&&(t=!0,m=_),this.isValidLookup(m)||(a=!0,m=i);let s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:m,d=b&&_!==m&&this.options.updateMissing;if(a||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,i,d?_:m),o){let e=this.resolve(i,{...r,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,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let a=b&&n!==m?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,a,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,a,d,r),this.emit("missingKey",e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||_)})}):n(e,i,_))}m=this.extendTranslation(m,e,r,p,n),a&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${i}`:i,t?m:void 0,r))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(r),p):m}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let o;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let i=o0(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!o0(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,i=o0(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=ip.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return o0(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!o0(t.count),d=c&&!t.ordinal&&0===t.count,p=void 0!==t.context&&(o0(t.context)||"number"==typeof t.context)&&""!==t.context,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(i=e,!ig[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(ig[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(r=>{let i;if(this.isValidLookup(n))return;o=r;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(a)&&s.push(l+e.replace(a,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),p){let r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),c&&(t.ordinal&&0===e.indexOf(a)&&s.push(r+e.replace(a,this.options.pluralSeparator)),s.push(r+e),d&&s.push(r+n))}}for(;i=s.pop();)this.isValidLookup(n)||(a=i,n=this.getResource(r,e,i,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!o0(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}class ib{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=iu.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ii(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=ii(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(o0(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 n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&(e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.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)),o0(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return o0(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):o0(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&a(this.formatLanguageCode(e))}),r}}let iw={zero:0,one:1,two:2,few:3,many:4,other:5},iE={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ix{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=iu.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=ii("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:a})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),iE;if(!e.match(/-|_/))return iE;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>iw[e]-iw[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let i_=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=o8(e,n))?o:o8(t,n);return!i&&a&&o0(n)&&void 0===(i=io(e,n,r))&&(i=io(t,n,r)),i};class iD{constructor(e={}){this.logger=iu.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:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:f,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:it,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):p||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=m?m.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,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,n,r){let a,o,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let a=i_(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}let a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(i_(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp();let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.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(i=0;a=t.regex.exec(e);){let n=a[1].trim();if(void 0===(o=l(n)))if("function"==typeof u){let t=u(e,a,r);o=o0(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o="";else o0(o)||this.useRawValueToEscape||(o=o4(o));let s=t.safeValue(o);if(e=e.replace(a[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o,i=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),a=`{${r[1]}`;e=r[0];let i=(a=this.interpolate(a,o)).match(/'/g),s=a.match(/"/g);((i?.length??0)%2!=0||s)&&s.length%2==0||(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(o=(o={...n}).replace&&!o0(o.replace)?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),(a=t(i.call(this,r[1].trim(),o),o))&&r[0]===e&&!o0(a))return a;o0(a)||(a=o4(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),s.length&&(a=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}let iS=e=>{let t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});let i=r+JSON.stringify(o),s=t[i];return s||(s=e(ii(r),a),t[i]=s),s(n)}},ik=e=>(t,n,r)=>e(ii(n),r)(t);class iC{constructor(e={}){this.logger=iu.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?iS:ik;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=iS(t)}format(e,t,n,r={}){let a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&0>a[0].indexOf(")")&&a.find(e=>e.indexOf(")")>-1)){let e=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,e)].join(this.formatSeparator)}return a.reduce((e,t)=>{let{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let a=r[1].substring(0,r[1].length-1);"currency"===t&&0>a.indexOf(":")?n.currency||(n.currency=a.trim()):"relativetime"===t&&0>a.indexOf(":")?n.range||(n.range=a.trim()):a.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{let i=r?.formatParams?.[r.interpolationkey]||{},s=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,s,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e)}}class iP extends ic{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=iu.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let a={},o={},i={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let i={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:a,k:o}=o5(e,t,Object);a[o]=a[o]||[],a[o].push(n)})(n.loaded,[a],o),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;let i=(i,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)}i&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*a,o)},a):o(i,s)},s=this.backend[n].bind(this.backend);if(2===s.length){try{let n=s(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}return}return s(e,t,i)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();o0(e)&&(e=this.languageUtils.toResolveHierarchy(e)),o0(t)&&(t=[t]);let a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=n&&""!==n){if(this.backend?.create){let s={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let a;(a=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else l(e,t,n,r,i,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let iR=()=>({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]),o0(e[1])&&(t.defaultValue=e[1]),o0(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),iT=e=>(o0(e.ns)&&(e.ns=[e.ns]),o0(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),o0(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),iO=()=>{};class i$ extends ic{constructor(e={},t){if(super(),this.options=iT(e),this.services={},this.logger=iu,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&&(o0(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=iR();this.options={...n,...this.options,...iT(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?iu.init(r(this.modules.logger),this.options):iu.init(null,this.options),e=this.modules.formatter?this.modules.formatter:iC;let t=new ib(this.options);this.store=new id(this.options.resources,this.options);let a=this.services;a.logger=iu,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new ix(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.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===n.interpolation.format)&&(a.formatter=r(e),a.formatter.init&&a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new iD(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new iP(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new iv(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=iO),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 a=o1(),o=()=>{let e=(e,n)=>{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),a.resolve(n),t(e,n)};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?o():setTimeout(o,0),a}loadResources(e,t=iO){let n=t,r=o0(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):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),n(e)})}else n(null)}reloadResources(e,t,n){let r=o1();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=iO),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}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&&ip.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 n=o1();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let n=o0(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(o0(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){let r=(e,t,...a)=>{let o,i;(o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t}).lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);let s=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?i=e.map(e=>("function"==typeof e&&(e=ih(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ih(e,{...this.options,...t})),i=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(i,o)};return o0(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}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 n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(a,e)))}loadNamespaces(e,t){let n=o1();return this.options.ns?(o0(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=o1();o0(e)&&(e=[e]);let r=this.options.preload||[],a=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(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 ib(iR());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 i$(e,t)}cloneInstance(e={},t=iO){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new i$(r);return(void 0!==e.debug||void 0!==e.prefix)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new id(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),a.services.resourceStore=a.store),a.translator=new iv(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let iN=i$.createInstance();iN.createInstance=i$.createInstance,iN.createInstance,iN.dir,iN.init,iN.loadResources,iN.reloadResources,iN.use,iN.changeLanguage,iN.getFixedT,iN.t,iN.exists,iN.setDefaultNamespace,iN.hasLoadedNamespace,iN.loadNamespaces,iN.loadLanguages;let ij=iN.default||iN;function iI(e,t,n,r){return ij.t(t,{ns:e,defaultValue:n,...r})}function iA(e,t,n){return oQ[e]?iI("core",e,t??oQ[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function iM(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=iL(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function iL(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function iF({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=iM(e,t).replace(window.location.origin,""),a=new URL(r,window.location.origin);if("http:"!=a.protocol&&"https:"!=a.protocol)throw console.error(`Received request to navigate to non-http URL: ${a.toString()}`),Error(iA("navigateNonHttp"));r.startsWith(n)?ov(r):window.location.assign(r)}ij.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let iB="openmrs:history";function iU(e){let t=JSON.parse(sessionStorage.getItem(iB)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(iB,JSON.stringify(t))}function iV(){0===JSON.parse(sessionStorage.getItem(iB)??"[]").length&&document.referrer&&iU(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=iW();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(iB,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?iH({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&iU(window.location.href)})}function iW(){return JSON.parse(sessionStorage.getItem(iB)??"[]")}function iH({toUrl:e}){let t=iW(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);iF({to:t[n]}),sessionStorage.setItem(iB,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function iz(){sessionStorage.removeItem(iB)}let iK="${openmrsSpaBase}/login",iG={redirectAuthFailure:{enabled:{_type:rc.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:rc.String,_default:iK,_validators:[ab.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:rc.Array,_default:[401],_elements:{_type:rc.Number,_validators:[ab.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:rc.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:rc.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function iZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let iY="/ws/rest/v1",iq="/ws/fhir2/R4",iJ=`${iY}/session`;function iX(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function iQ(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=iX(e);t.headers||(t.headers={}),e_(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;let r=!1;try{let e=new URL(n,window.location.href),t=new URL(iX(iY),window.location.href),a=e.pathname.replace(/\/{2,}/g,"/"),o=t.pathname.replace(/\/{2,}/g,"/");r=e.origin===t.origin&&(a===o||a.startsWith(`${o}/`))}catch{}if(r){let e=!1;for(let[n,r]of Object.entries(t.headers))"disable-www-authenticate"===n.toLowerCase()&&(void 0===r?delete t.headers[n]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(iq)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let a=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:r,followRedirects:o}=await r4("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===iX(iJ)||204===e.status)&&iF({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(n===iX(iJ)&&403===e.status||r.enabled&&r.errors.includes(e.status))&&(iz(),iF({to:r.url||e.headers.get("location")||iK}),!0!==t.rejectAuthFailure)?r.resolvePromise?Promise.resolve():new Promise(()=>{}):e.clone().text().then(t=>{let r=t;try{r=JSON.parse(t)}catch(e){}throw new i0(n,e,r,a)},()=>{throw new i0(n,e,null,a)})})}class i0 extends Error{constructor(e,t,n,r){super(),iZ(this,"response",void 0),iZ(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
|
|
13
|
+
${r.stack}
|
|
14
|
+
Stacktrace for incoming response:
|
|
15
|
+
${this.stack}`}}let i1=B("session",{loaded:!1,session:null}),i4=0,i2=null;function i3(){return i2||(i1.getState().loaded&&i4>=Date.now()-6e4?null:i8())}function i6(e){let t=e?.includeAuthStatus??!0,n=e=>t?e:e.user,r=i3();return r?new Promise(e=>{let t=()=>{let t=i1.getState();t.loaded&&(a(),e(n(t.session)))},a=i1.subscribe(t);r.then(t,t)}):Promise.resolve(n(i1.getState().session))}function i5(){return i3(),i1}function i9(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 i8(e,t){i4=Date.now(),o??(o=i4);let n={};e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let r=sl(iQ(iJ,{headers:n,rejectAuthFailure:!0})),a=()=>{i2===r&&(i2=null)};return r.then(a,a),i2=r,r}function i7(){i1.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function se(e,t){var n,r;if(void 0===t)return!e;if(!e)return!0;return n=e,r=t,("string"==typeof n?!z(r.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!z(r.privileges.find(t=>e===t.display))):(z(n)||console.error(`Could not understand privileges "${n}"`),!0))||!z(t.roles.find(e=>"System Developer"===e.display))}function st(){let e,t;return new Promise(n=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(i1.getState()),e||(t=i1.subscribe(r))})}async function sn(){return(await i6()).sessionLocation}async function sr(e,t){return sl(iQ(iJ,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function sa(e,t){return await iQ(iJ,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),i8()}async function so(e,t,n){return n||(n=new AbortController),await iQ(`${iY}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),i8()}async function si(e,t=!1){let n=await iQ(t?`${iJ}?rememberMe=true`:iJ,{headers:{"X-Totp-Code":e}});return n.data?.authenticated?(await i8()).session:n.data}async function ss(){try{await iQ(iJ,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!su(e))throw e}i7(),await i8().catch(()=>{})}function sl(e){return new Promise((t,n)=>{e.then(e=>{if("object"==typeof e?.data){let n={loaded:!0,session:e.data};i1.setState(n,!0),t(n)}else!function(e){if(!e?.redirected||!e.url)return!1;try{return new URL(e.url,window.location.href).pathname.replace(/\/+$/,"").endsWith("/initialsetup")}catch{return!1}}(e)?n(sc(Error("The session endpoint did not respond with a session"))):n(sc(Error("The server is still starting up"),!0))}).catch(e=>{var r,a;if(su(e)){"object"==typeof(r=e.responseBody)&&null!==r&&!1===r.authenticated?i1.setState({loaded:!0,session:e.responseBody},!0):i7(),t(i1.getState());return}(a=e)instanceof i0&&502===a.response.status&&!i1.getState().loaded&&void 0!==o&&Date.now()-o<18e4?n(sc(e,!0)):(C(`Failed to fetch new session information: ${e}`),n(sc(e)))})})}function su(e){return e instanceof i0&&(401===e.response.status||403===e.response.status)}function sc(e,t=!1){return i1.getState().loaded||i1.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e)),initializing:t},!0),i1.getState()}function sd(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}i1.subscribe(e=>{e.loaded&&e.session&&i9(e.session)});let sp={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function sm(){rY("@openmrs/esm-api",iG),i8()}let sf="import-map-override:",sh="import-map-overrides-disabled",sg="import-map-overrides:change",sy=!1,sv=null,sb=null;async function sw(){return sb??(sb=sE().then(({map:e,complete:t})=>(t||(sb=null),e))),sb}async function sE(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{if(a.src){let e=await fetch(a.src);if(!e.ok)throw Error(`Request for ${a.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else a.textContent&&t.push(JSON.parse(a.textContent))}catch(e){n=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${r}`,e)}}return{map:sx(t),complete:n}}function sx(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function s_(){let e={};try{let t=sP();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(sf)){let n=r.slice(sf.length);if(!t.includes(n)){let t=localStorage.getItem(r);t&&(e[n]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function sD(){let e=await sw();return sy?sx([e,sv??s_()]):e}async function sS(){return sw()}async function sk(){return sy?sx([await sw(),s_()]):sw()}function sC(e){if(!sy)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(sf)){let t=localStorage.getItem(n);t&&(e[n.slice(sf.length)]=t)}}return{imports:e}}return s_()}function sP(){if(!sy)return[];try{let e=localStorage.getItem(sh);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function sR(e){return!!sy&&sP().includes(e)}function sT(e,t){if(!sy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(sf+e,t),window.dispatchEvent(new CustomEvent(sg))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function sO(e){if(!sy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(sf+e);let t=sP().filter(t=>t!==e);t.length>0?localStorage.setItem(sh,JSON.stringify(t)):localStorage.removeItem(sh),window.dispatchEvent(new CustomEvent(sg))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function s$(){if(!sy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(sf)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(sh),window.dispatchEvent(new CustomEvent(sg))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function sN(e){if(!sy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=sP().filter(t=>t!==e);t.length>0?localStorage.setItem(sh,JSON.stringify(t)):localStorage.removeItem(sh),window.dispatchEvent(new CustomEvent(sg))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let sj=!1;function sI(){!sj&&(sj=!0,(sy="development"===window.spaEnv)&&(sv=s_()))}function sA(e){return e.replace(/[\/\-@]/g,"_")}async function sM(e,t="./start",r){var a;let o,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([sL(e,r?.importMap),new Promise((t,n)=>{o=setTimeout(()=>{var t;n(Error(`Could not resolve requested script, ${e}, within ${(t=i)<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`}.`))},i)})]),o&&clearTimeout(o);let s=sA(e),l=window[s];if(!("object"==typeof(a=l)&&null!==a&&"init"in a&&"function"==typeof a.init&&"get"in a&&"function"==typeof a.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(n.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 sL(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 n=sA(e);if(!window[n]){let n=t??await sF();if(!n.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let r=n.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let a=e in sC().imports;try{return await function(e){var t;let n=(t=window)[sB]??(t[sB]=new Map),r=n.get(e);if(r)return r;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let a=document.createElement("script");a.src=e,a.type="text/javascript",a.async=!0;let o=new Promise((t,r)=>{let o=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 i(){clearTimeout(o),a.removeEventListener("load",s),a.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),n.delete(e),a.remove();let o=`Failed to load script from ${e}`;console.error(o,t),r(t.message??o)}a.addEventListener("load",s),a.addEventListener("error",l),document.head.appendChild(a)});return n.set(e,o),o}(r)}catch(e){return a&&E({kind:"error",title:iA("scriptLoadingFailed","Error: Script failed to load"),description:iA("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:r}),actionButtonLabel:iA("resetOverrides","Reset overrides"),onActionButtonClick(){s$(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function sF(){return sD()}let sB=Symbol.for("__openmrs_script_loading");function sU(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function sV(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&sU(t))}let sW="openmrs-routes:",sH="openmrs-routes:change",sz=!1,sK=null,sG=null;async function sZ(){return sG??(sG=sY().then(({map:e,complete:t})=>(t||(sG=null),e))),sG}async function sY(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{let e;if(a.src){let t=await fetch(a.src);if(!t.ok)throw Error(`Request for ${a.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else a.textContent&&(e=JSON.parse(a.textContent));e&&sV(e)&&t.push(e)}catch(e){n=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${r}`,e)}}return{map:sq(t),complete:n}}function sq(e){let t={routes:{}};for(let n of e)n&&"object"==typeof n&&!Array.isArray(n)&&(Object.assign(t.routes,n.routes),void 0===t.version&&void 0!==n.version&&(t.version=n.version));return t}async function sJ(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n?.startsWith(sW)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(sW.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(sU(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(sU(r))return{moduleName:e,routes:r};throw Error(`${n} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===n.status?e.routes[n.value.moduleName]=n.value.routes:console.warn("[route-maps] Failed to load route override",n.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function sX(){let e=await sZ();return sz?sq([e,sK??await sJ()]):e}async function sQ(){return sZ()}async function s0(){return sz?sq([await sZ(),await sJ()]):sZ()}function s1(){if(!sz)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(sW)){let t=localStorage.getItem(n);t&&(e[n.slice(sW.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function s4(e,t){if(!sz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(sW+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!sU(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(sW+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(sW+e,JSON.stringify(t.toString()));else{if(!sU(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(sW+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(sH))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function s2(e){if(!sz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(sW+e),window.dispatchEvent(new CustomEvent(sH))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function s3(){if(!sz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(sW)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(sH))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let s6=null;function s5(){return s6||(s6=(sz="development"===window.spaEnv)?sJ().then(e=>{sK=e}):Promise.resolve())}let s9=`${iY}/attachment`;function s8(e,t){return iQ(`${s9}/${e}`,{signal:t.signal})}function s7(e,t,n,r){return iQ(le(e,t,r),{signal:n.signal})}function le(e,t,n){return n?`${s9}?patient=${e}&encounter=${n}`:`${s9}?patient=${e}&includeEncounterless=${t}`}async function lt(e,t,n){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),n&&r.append("encounter",n),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),iQ(`${s9}`,{method:"POST",body:r})}function ln(e,t){return iQ(`${s9}/${e}`,{method:"DELETE",signal:t.signal})}async function lr(e,t){return e?(await iQ(`${iq}/Patient/${e}`,t)).data:null}function la(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function lo(e,t){let n=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}function li(e){return{uuid:e.uuid,display:e.display}}function ls(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return iQ(`${iY}/location${r?"?"+r:""}`).then(e=>e.data.results.map(li))}function ll(e){return{uuid:e.uuid,display:e.display,name:e.name}}let lu=`${iY}/visittype`;function lc(e=lu){return iQ(e).then(e=>e.data.results.map(ll))}var ld=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),lp=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let lm="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))",lf=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lh(){return V("visit",lf)}function lg(e,t){lh().setState({patientUuid:e,manuallySetVisitUuid:t})}function ly(e,t){return iQ(`${iY}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lv(e,t,n){return iQ(`${iY}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lb(e,t,n){return iQ(`${iY}/visit?patient=${e}&v=${n??lm}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lh().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class lw{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lw.version}static addUnaryOp(e){return lw.max_unop_len=Math.max(e.length,lw.max_unop_len),lw.unary_ops[e]=1,lw}static addBinaryOp(e,t,n){return lw.max_binop_len=Math.max(e.length,lw.max_binop_len),lw.binary_ops[e]=t,n?lw.right_associative.add(e):lw.right_associative.delete(e),lw}static addIdentifierChar(e){return lw.additional_identifier_chars.add(e),lw}static addLiteral(e,t){return lw.literals[e]=t,lw}static removeUnaryOp(e){return delete lw.unary_ops[e],e.length===lw.max_unop_len&&(lw.max_unop_len=lw.getMaxKeyLen(lw.unary_ops)),lw}static removeAllUnaryOps(){return lw.unary_ops={},lw.max_unop_len=0,lw}static removeIdentifierChar(e){return lw.additional_identifier_chars.delete(e),lw}static removeBinaryOp(e){return delete lw.binary_ops[e],e.length===lw.max_binop_len&&(lw.max_binop_len=lw.getMaxKeyLen(lw.binary_ops)),lw.right_associative.delete(e),lw}static removeAllBinaryOps(){return lw.binary_ops={},lw.max_binop_len=0,lw}static removeLiteral(e){return delete lw.literals[e],lw}static removeAllLiterals(){return lw.literals={},lw}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 lw(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 lw.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lw.binary_ops[String.fromCharCode(e)]||lw.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lw.isIdentifierStart(e)||lw.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(lw.hooks[e]){let n={context:this,node:t};return lw.hooks.run(e,n),n.node}return t}searchHook(e){if(lw.hooks[e]){let t={context:this};return lw.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lw.SPACE_CODE||e===lw.TAB_CODE||e===lw.LF_CODE||e===lw.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:lw.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===lw.SEMCOL_CODE||n===lw.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===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,lw.max_binop_len),t=e.length;for(;t>0;){if(lw.binary_ops.hasOwnProperty(e)&&(!lw.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lw.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,a,o,i,s,l;if(!(o=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return o;for(a={value:t,prec:lw.binaryPrecedence(t),right_a:lw.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,i];t=this.gobbleBinaryOp();){if(0===(n=lw.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:lw.right_associative.has(t)},l=t;let s=e=>a.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&s(r[r.length-2]);)i=r.pop(),t=r.pop().value,o=r.pop(),e={type:lw.BINARY_EXP,operator:t,left:o,right:i},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(a,e)}for(s=r.length-1,e=r[s];s>1;)e={type:lw.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,lw.isDecimalDigit(e)||e===lw.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lw.SQUOTE_CODE||e===lw.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===lw.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,lw.max_unop_len)).length;n>0;){if(lw.unary_ops.hasOwnProperty(t)&&(!lw.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lw.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lw.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}lw.isIdentifierStart(e)?(r=this.gobbleIdentifier(),lw.literals.hasOwnProperty(r.name)?r={type:lw.LITERAL,value:lw.literals[r.name],raw:r.name}:r.name===lw.this_str&&(r={type:lw.THIS_EXP})):e===lw.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lw.PERIOD_CODE||t===lw.OBRACK_CODE||t===lw.OPAREN_CODE||t===lw.QUMARK_CODE;){let n;if(t===lw.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lw.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lw.OBRACK_CODE?((e={type:lw.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lw.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lw.OPAREN_CODE?e={type:lw.CALL_EXP,arguments:this.gobbleArguments(lw.CPAREN_CODE),callee:e}:(t===lw.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:lw.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;lw.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lw.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lw.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++));lw.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lw.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,lw.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===lw.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lw.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lw.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!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 r||this.throwError('Unclosed quote after "'+e+'"'),{type:lw.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lw.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lw.isIdentifierPart(e))this.index++;else break;return{type:lw.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let a=this.code;if(a===e){n=!0,this.index++,e===lw.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===lw.COMMA_CODE){if(this.index++,++r!==t.length){if(e===lw.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lw.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lw.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lw.CPAREN_CODE);if(this.code===lw.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lw.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lw.ARRAY_EXP,elements:this.gobbleArguments(lw.CBRACK_CODE)}}}Object.assign(lw,{hooks:new class{add(e,t,n){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][n?"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)})}}(lw),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"}),lw.max_unop_len=lw.getMaxKeyLen(lw.unary_ops),lw.max_binop_len=lw.getMaxKeyLen(lw.binary_ops);let lE=e=>new lw(e).parse(),lx=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lw).filter(e=>!lx.includes(e)&&void 0===lE[e]).forEach(e=>{lE[e]=lw[e]}),lE.Jsep=lw,lE.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}});let l_="ArrowFunctionExpression",lD={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)}},lS={...lD,Promise};function lk(e,t={}){return l$(e,t,lI)}async function lC(e,t={}){return lN(e,t,lI)}function lP(e,t={}){return l$(e,t,lA)}function lR(e,t={}){return lN(e,t,lA)}function lT(e,t={}){return l$(e,t,lM)}function lO(e,t={}){return lN(e,t,lM)}function l$(e,t={},n){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 r=lV(t,lD),a=lL("string"==typeof e?lE(e):e,r);if(n(a))return a;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 lN(e,t={},n){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 r=lV(t,lS);return Promise.resolve(lL("string"==typeof e?lE(e):e,r)).then(t=>{if(n(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 lj(e){return lE(e)}function lI(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function lA(e){return"boolean"==typeof e}function lM(e){return"number"==typeof e}function lL(e,t){switch(e.type){case"UnaryExpression":var n,r,a,o,i,s,l,u,c,d,p,m,f,h=e,g=t;let y=lL(h.argument,g);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,b=t;switch(v.operator){case"&&":return lL(v.left,b)&&lL(v.right,b);case"||":return lL(v.left,b)||lL(v.right,b);case"??":return lL(v.left,b)??lL(v.right,b)}let w=lL(v.left,b),E=lL(v.right,b);switch(v.operator){case"+":return w+E;case"-":return w-E;case"*":return w*E;case"/":return w/E;case"%":return w%E;case"**":return w**E;case"==":return w==E;case"===":return w===E;case"!=":return w!=E;case"!==":return w!==E;case">":return w>E;case">=":return w>=E;case"<":return w<E;case"<=":return w<=E;case"in":return w in E;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return n=e,r=t,lL(n.test,r)?lL(n.consequent,r):lL(n.alternate,r);case"CallExpression":return lz(lB(e,t));case"ArrowFunctionExpression":let x;return a=e,o=t,x=a.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<x.length)throw`Required argument(s) ${x.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(x.reduce((t,n,r)=>{let a=e[r];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 n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(a)&&t.push([n,a]),t},[]));return lL(a.body,o.addVariables(t))}).bind(null);case"MemberExpression":return lz(lU(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(lK(s));case"SequenceExpression":let _;return l=e,u=t,(_=l.expressions.map(lK(u)))[_.length-1];case"NewExpression":var D=e,S=t;if(D.callee&&"Identifier"===D.callee.type){let e=D.arguments?.map(lK(S));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,(lG(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 k,C;return p=e,m=t,k=p.expressions?.map(lK(m))??[],(C=p.quasis?.map(lK(m))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+k.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lF(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return lF(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function lB(e,t){let n=lH(e.callee,t);if(n===lW||e.optional&&null==n)return lW;let r=e.arguments?.map(lK(t));if(n){if("function"!=typeof n)throw`${lq(e.callee)} is not a function`}else throw`No function named ${lq(e.callee)} is defined in this context`;return n(...r)}function lU(e,t){let n=lH(e.object,t);if(n===lW||e.optional&&null==n)return lW;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${lY(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=lF(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${lY(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof n&&"function"!=typeof n&&"string"!=typeof n&&"number"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;let r=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}(lL(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);lG(r),function(e,t){if(lZ.has(String(t)))return;let n=Object(e);for(;null!==n;){if(Object.hasOwn(n,t)){if(n===Object.prototype||n===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}n=Object.getPrototypeOf(n)}}(n,r);let a=n[r];return"function"==typeof a?a.bind(n):a}function lV(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}lE.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 n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:l_,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=l_,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),lE.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),lE.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 n(t){let n=this.index,r="",a=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};a(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),a());let o=this.char;("e"===o||"E"===o)&&(r+=this.expr.charAt(this.index++),("+"===(o=this.char)||"-"===o)&&(r+=this.expr.charAt(this.index++)),a(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(i===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:r},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var a,o,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;a=this.code,o=u,95===a||o.some(([e,t])=>a>=e&&a<=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,n.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(c,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,r)})}}),lE.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,a=this.expr.slice(n,this.index),o="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)o+=this.char;else break}try{r=new RegExp(a,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lE.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),lE.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},r="",a="",o=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:a,cooked:r},tail:o});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,o=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),a="",r="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(a+=i,i=this.expr.charAt(++this.index),a+=i,i){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=i}else r+=i,a+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),lE.addBinaryOp("in",7),lE.addBinaryOp("??",1);let lW=Symbol("optional chain short-circuited");function lH(e,t){switch(e.type){case"MemberExpression":return lU(e,t);case"CallExpression":return lB(e,t);default:return lL(e,t)}}function lz(e){return e===lW?void 0:e}function lK(e){return function(t){return null===t?null:lL(t,e)}}function lG(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let lZ=new Set(["toString","valueOf","hasOwnProperty"]);function lY(e,t){try{return lF(e,t)}catch{return"<computed>"}}function lq(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function lJ(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:{...lS},isLocalExpression:!1,variables:new Set};return lX("string"==typeof e?lE(e):e,t),[...t.variables]}function lX(e,t){switch(e.type){case"UnaryExpression":return r=e,a=t,lX(r.argument,a);case"BinaryExpression":return o=e,i=t,[lX(o.left,i),lX(o.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[lX(s.consequent,l),lX(s.test,l),lX(s.alternate,l)].filter(Boolean);case"CallExpression":let n;return u=e,c=t,n=lX(u.callee,c),u.arguments?.map(lQ(c)),n;case"ArrowFunctionExpression":var r,a,o,i,s,l,u,c,d,p,m,f,h,g,y,v,b=e,w=t;let E={...w};E.isLocalExpression=!0;let x=b.params?.map(lQ(E))??[],_=lX(b.body,E)??[];if(_&&Array.isArray(_))for(let e of _)x.includes(e)||w.variables.add(e);return;case"MemberExpression":var D=e,S=t;if(lX(D.object,S),D.computed)return void lX(D.property,S);let k={...S};k.isLocalExpression=!0,lX(D.property,k);return;case"ArrayExpression":return d=e,p=t,void d.elements?.map(lQ(p));case"SequenceExpression":return m=e,f=t,void m.expressions?.map(lQ(f));case"NewExpression":return h=e,g=t,void h.arguments?.map(lQ(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,P=t;if(!(C.name in P.globals))if(P.isLocalExpression)return C.name;else P.variables.add(C.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(lQ(v)),y.quasis?.map(lQ(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function lQ(e){return function(t){return null===t?null:lX(t,e)}}let l0=V("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()});function l1(e,t,n){l0.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function l4(){let e=l0.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function l2(e){return l0.getState().flags[e].enabled}function l3(e,t){l0.subscribe(n=>{t(n.flags[e].enabled)})}function l6(e,t){l0.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}l0.subscribe(e=>{for(let[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))});var l5=tK(function(e,t,n){tL(e,t,n)});let l9=B("extensionsInternal",{slots:{},extensions:{}}),l8=B("extensionRenderings",{renderings:new Map}),l7=()=>V("extensionsInternal",{slots:{},extensions:{}}),ue=()=>V("extensionRenderings",{renderings:new Map});function ut(e){let t=l9.getState(),n=e(t);n!==t&&l9.setState(n)}let un=null,ur=null;function ua(){let e=l8.getState();return un&&e===ur||(un=new Map(e.renderings),ur=e,function(e){for(let t of(uf.clear(),e.values()))ug(t,1);uh=!0}(un)),un}function uo(e){ur={renderings:e},l8.setState(ur,!0)}function ui(e){let t=ua();t.has(e.renderingId)||(t.set(e.renderingId,e),ug(e,1),uo(t))}function us(e){let t=ua(),n=t.get(e);n&&(t.delete(e),ug(n,-1),uo(t))}let ul=()=>V("extensions",{slots:{}}),uu=0,uc=new Set;function ud(e){uu++;try{return e()}finally{if(0==--uu&&uc.size>0){let e=Array.from(uc);for(let t of(uc.clear(),e))up(t)}}}function up(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function um(e){uu>0?uc.add(e):up(e)}let uf=new Map,uh=!1;function ug(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=uf.get(n);if(!r){if(t<0)return;uf.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),uh=!0;return}r.count+=t,r.count<1&&(uf.delete(n),uh=!0)}function uy(){var e,t;if(ua(),!uh)return;uh=!1;let n=Array.from(uf.values(),({record:e})=>e);n.sort(uv),e=rw.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===uv(e,t[n]))||rw.setState({mountedExtensions:n})}function uv(e,t){return ub(e.slotName,t.slotName)||ub(e.extensionId,t.extensionId)||ub(e.slotModuleName,t.slotModuleName)||ub(e.extensionModuleName,t.extensionModuleName)}function ub(e,t){return e===t?0:e<t?-1:1}uy(),l8.subscribe(()=>um(uy));let uw=l7(),uE=ul(),ux=rx(),u_=rS(),uD=new Set,uS=!1;function uk(e){if(null===e)uD=null;else if(null!==uD)for(let t of e)uD.add(t);um(uC)}function uC(){if(!uS){uS=!0;try{for(let e=1;;e++){let t=uD;if(null!==t&&0===t.size)return;uD=new Set;try{!function(e,t,n,r,a,o=null){let i=uE.getState().slots,s={},l=!1,u=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,c]of Object.entries(e.slots)){let d=i[r];if(d&&o&&!o.has(r)){s[r]=d;continue}let{config:p}=rD(t,c.name),m=function(e,t,n,r,a,o){let i=function(e,t){let n=e.add||[],r=e.remove||[],a=e.order||[],{extensions:o}=uw.getState(),i=new Set(r),s=[...t,...n].filter(e=>!i.has(e)),l=uM(a),u=uM(t),c=new Map(s.map(e=>[e,function(e,t,n,r){let a=t.get(e);if(void 0!==a)return a;{if(void 0!==n)return 1e3+n;let t=r.get(e);return void 0!==t?2e3+t:3e3}}(e,l,o[uT(e)]?.order,u)]));return s.sort((e,t)=>c.get(e)-c.get(t))}(n,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=rC(r,e,l),u=rP(n,e,l),c=u?l5({},i,u):i,d=uT(l),p=t.extensions[d];if(p){let e=c?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!o?.user||!se(e,o.user))||p.featureFlag&&!a.includes(p.featureFlag))continue;s.push({id:l,name:d,moduleName:p.moduleName,config:c,featureFlag:p.featureFlag,meta:p.meta,displayConditionExpression:c?.["Display conditions"]?.expression||p.displayExpression})}}return s}(r,e,p,n,u,a.session);d&&d.moduleName===c.moduleName&&nC(d.candidateExtensions,m)?s[r]=d:(s[r]={moduleName:c.moduleName,candidateExtensions:m},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&uE.setState({slots:s})}(uw.getState(),ux.getState(),u_.getState(),l0.getState(),i1.getState(),t)}catch(e){throw uD=null===t||null===uD?null:new Set([...t,...uD]),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{uS=!1}}}function uP(e,t){let n=new Set;for(let r of Object.keys(e))e[r]!==t[r]&&n.add(r);for(let r of Object.keys(t))r in e||n.add(r);return n}function uR(e,t){return{moduleName:t,name:e,attachedIds:[]}}function uT(e){let[t]=e.split("#");return t}function uO(e,t){let n=uT(t);return e.extensions[n]}function u$(e){return uO(uw.getState(),e)}uw.subscribe((e,t)=>{uk(e.extensions!==t.extensions?null:uP(e.slots,t.slots))}),ux.subscribe((e,t)=>{uk(uP(e.slots,t.slots))}),u_.subscribe((e,t)=>{uk(uP(e.configs,t.configs))}),l0.subscribe(()=>uk(null)),i1.subscribe(()=>uk(null)),uk(null);let uN=e=>ut(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function uj(e,t){ut(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...uR(e),attachedIds:[t]}}}})}function uI(e,t){ut(n=>{let r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function uA(e){ut(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function uM(e){let t=new Map;return e.forEach((e,n)=>{t.has(e)||t.set(e,n)}),t}function uL(e,t){return function(e,t,n=null,r){let a;return e.filter(e=>{let o=e.displayConditionExpression;if("string"!=typeof o||0===o.trim().length)return!0;a??(a=t&&"object"==typeof t?{session:n,...t}:{session:n});try{return!!lP(o,a)}catch(t){return console.error(`Error while evaluating expression '${o}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(uF(e),t,i1.getState().session,e)}function uF(e){return uE.getState().slots[e]?.candidateExtensions??[]}let uB=(e,t)=>uw.setState(n=>{let r=n.slots[t]?.moduleName;if(r&&r!=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 ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let a=uR(t,e);return{...n,slots:{...n.slots,[t]:{...a}}}}),uU=()=>{uD=null,ut(()=>({slots:{},extensions:{}})),ue().setState({renderings:new Map}),uE.setState({slots:{}})},uV=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function uW({name:e,basePath:t,mode:n,componentContext:r,state:a}){uV.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:a})}function uH(e){uV.getState().slotName===e&&uV.setState(uV.getInitialState(),!0)}let uz=B("modalRegistry",{modals:{}});function uK(e){uz.setState(t=>(t.modals[e.name]=e,t))}function uG(e){let t=uz.getState().modals[e];if(!t){let n=u$(e);n&&(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.`),uK(t))}return t}let uZ=B("workspaceRegistrations",{workspaces:{}}),uY=B("workspaceGroups",{workspaceGroups:{}});function uq(e){uZ.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function uJ(e){uY.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let uX=new Set;function uQ(e){let t=uZ.getState().workspaces;if(t[e])return t[e];{let t=u$(e);if(t){var n;let r;return uX.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.`),uX.add(e)),{name:t.name,title:(n=t,"string"==typeof(r=n?.meta?.title)?r:r&&"object"==typeof r?iI(n.moduleName,r.key,r.default):n.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.`)}}function u0(e){let t=uY.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let u1=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function u4(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=u1.getState(),r=t[e];if(r){let t=n[r.window];if(t)return t;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function u2(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=u1.getState(),r=n[e];if(r){let n=t[r.group];if(n)return n;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function u3(e){let{openedWindows:t}=u1.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function u6(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=u1.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}u1.setState({registeredGroupsByName:r})}function u5(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=u1.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace window ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}u1.setState({registeredWindowsByName:r})}function u9(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=u1.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}u1.setState({registeredWorkspacesByName:r})}let u8=0,u7=null,ce={bootstrap:15e3,mount:15e3,unmount:15e3};function ct(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(ce).filter(t=>e[t]).map(r=>{var a,o;let i,s;return[r,(a=e[r],o=ce[r],i=Array.isArray(a)?a:[a],s=e=>i.reduce((t,a,o)=>t.then(()=>{let t=a(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${r} at array index ${o} for parcel ${n} did not return a promise`))}),Promise.resolve(void 0)),e=>{let a,i=new Promise((e,t)=>{a=setTimeout(()=>t(Error(`Lifecycle function ${r} for parcel ${n} did not settle within ${o}ms`)),o)});return Promise.race([s(e),i]).finally(()=>clearTimeout(a)).then(e=>(t(r,!1),e),e=>{throw t(r,!0),e})})]}));return{...e,...r}}async function cn(e,t){var n,r;let a,o,i,s,l,u=await (u7??(u7=new Promise((e,t)=>{or({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),or))),u7),c={...t},d=(a=c,o=!1,{retarget:e=>a={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(a),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":o||(o=t);return;case"unmount":(t||o)&&i();return}}});return r=u((n=d.onSettled,"function"==typeof e?()=>e().then(e=>ct(e,n)):ct(e,n)),c),s=e=>t=>e.call(r,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===r.getStatus()&&d.release(),e}),l=r.update&&s(r.update),Object.defineProperty(r,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function cr(){return ca}function ca(e,t){let n,r=cn(e,t).then(e=>n=e);return{mount:()=>r.then(e=>e.mount()),unmount:()=>r.then(e=>e.unmount()),update:e=>r.then(t=>t.update?.(e)),getStatus:()=>n?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return r.then(e=>e.loadPromise)},get bootstrapPromise(){return r.then(e=>e.bootstrapPromise)},get mountPromise(){return r.then(e=>e.mountPromise)},get unmountPromise(){return r.then(e=>e.unmountPromise)}}}async function co(e,t,n,r,a=e=>e,o={}){let i=uT(r),s=u$(r),l=null;if(e){let u;if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${t}'`);let{meta:c,moduleName:d,load:p}=s,m=u8++,f=`${t}/${r}-${m}`;e.dataset.extensionRenderingId=f;let h=e=>{try{us(f)}catch(t){console.error(e,t)}};try{ui({renderingId:f,extensionName:i,extensionModuleName:d,extensionId:r,slotName:t,slotModuleName:n})}catch(e){throw h(`Recomputing configuration after registering '${r}' failed also failed`),e}try{u=await p()}catch(e){throw h(`Recomputing configuration after '${r}' failed to load also failed`),e}try{l=await cn(a({...u,name:`${t}/${i}-${m}`}),{...o,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${r}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${r}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${r}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${r}' failed`),e=>{console.error(`Extension '${r}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${r}' failed to unmount also failed`)})}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return l}var ci=n(2491),cs=n.n(ci);let cl=(0,ci.createContext)({moduleName:"",featureName:""});function cu({to:e,templateParams:t,onBeforeNavigate:n,children:r,...a}){return(0,ci.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),cs().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),iF({to:e,templateParams:t})),0===r.button&&(r.ctrlKey||r.metaKey)&&n?.(r),0===r.button&&r.shiftKey&&n?.(r),1===r.button&&n?.(r)},href:iM(e,t),...a},r)}let cc=({state:e,children:t,...n})=>{let{extension:r}=(0,ci.useContext)(cl),a=(0,ci.useRef)(null),o=(0,ci.useRef)(Promise.resolve()),i=(0,ci.useRef)(!1),s=(0,ci.useRef)(!1),l=(0,ci.useRef)(e),u=(0,ci.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":o.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,ci.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(o.current=Promise.all([e.mountPromise,o.current]).then(()=>{if(a.current?.getStatus()==="MOUNTED"&&a.current.update)return a.current.update({...t})}).catch(e=>{let t=a.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${r?.extensionId}' failed to update`,e)}))},[]),d=(0,ci.useCallback)(t=>{t&&!a.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,co(t,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(t=>{(s.current=!1,a.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,ci.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(a.current)}),[]),(0,ci.useEffect)(()=>{l.current=e,a.current&&c(a.current,e)},[e]),r?cs().createElement("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function cd(e){let t=(0,ci.useRef)(e);return T(t.current,e)||(t.current=e),t.current}function cp(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[r,a]of Object.entries(t)){let t=function(...t){e.setState(e=>a(e,...t))};n[r]=t}return n}let cm=e=>e;function cf(e,t=cm,n){let r=(0,ci.useCallback)(t=>e.subscribe(t),[e]),a=(0,ci.useCallback)(()=>t(e.getState()),[e,t]),o=(0,ci.useSyncExternalStore)(r,a,a),i=(0,ci.useMemo)(()=>n?cp(e,n):null,[e,n]);return(0,ci.useMemo)(()=>i?{...o,...i}:o,[o,i])}function ch(e,t){return cf(e,cm,t)}function cg(e){return function(t){let n=(0,ci.useCallback)(t=>e.subscribe(t),[]),r=(0,ci.useCallback)(()=>e.getState(),[]),a=(0,ci.useSyncExternalStore)(n,r,r),o=(0,ci.useMemo)(()=>t?cp(e,t):null,[t]);return(0,ci.useMemo)(()=>o?{...a,...o}:a,[a,o])}}let cy=[];Object.freeze(cy);let cv={candidateExtensions:cy};Object.freeze(cv);let cb=e=>{let t=(0,ci.useCallback)(t=>t.slots?.[e]??cv,[e]);return cf(ul(),t)},cw=e=>e.session;function cE(e,t){let{candidateExtensions:n}=cb(e),r=cf(i1,cw),a=cd(t);return(0,ci.useMemo)(()=>uL(e,a),[e,a,r,n])}function cx(e,t){let{moduleName:n}=(0,ci.useContext)(cl);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,ci.useEffect)(()=>{uB(n,e)},[n,e]),{extensions:cE(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function c_(e){return e}function cD({name:e,extensionSlotName:t,select:n=c_,children:r,state:a,style:o,...i}){if(r&&a)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,ci.useRef)(null),{extensions:u,extensionSlotModuleName:c}=cx(s,a),d=(0,ci.useMemo)(()=>n(u),[n,u]),p=(0,ci.useMemo)(()=>{if("function"==typeof r&&!cs().isValidElement(r))return d.map(e=>r(e,a))},[r,d]);return cs().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...o,position:"relative"},...i},s&&d?.map((e,t)=>cs().createElement(cl.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},p?.[t]??("function"!=typeof r?r:null)??cs().createElement(cc,{state:a}))))}var cS=n(5873);function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ck(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],a in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ck(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cP(e){return(cP="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 cR(e){return(cR="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 cT(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(cR(n)));return function(){var e=n(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(cR(e)));return e}}var cO=null;try{cO=require("react").createContext()}catch(e){}var c$={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 cN(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function cj(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var a,o=cL(e,t,function(){n(this)}),i=cT(e,t)(),s=function(e){var t=e.reactDom,n=e.renderType,r=e.elementToRender,a=e.domElement,o=t[n];if("function"!=typeof o)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(a);return i.render(r),i;case"hydrateRoot":return o(a,r);default:return o(r,a),null}}({elementToRender:o,domElement:i,reactDom:cM(e),renderType:"function"==typeof(a=e).renderType?a.renderType():a.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function cI(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():cM(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function cA(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=cL(e,t,null),a=e.renderResults[t.name];if(a&&a.render)a.render(r);else{var o=cT(e,t)();cM(e).render(r,o)}})}function cM(e){return e.ReactDOMClient||e.ReactDOM}function cL(e,t,n){var r=e.React.createElement(e.rootComponent,t),a=cO?e.React.createElement(cO.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),a=e.React.createElement(e.errorBoundaryClass,t,a)),a=e.React.createElement(e.SingleSpaRoot,cC(cC({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),a)}var cF=n(4011),cB=n(5327),cU=n.n(cB),cV=n(3780);let cW={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},cH=new Map;(0,cV.initCache)(cH);let cz={errorRetryCount:3,fetcher:iQ,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof i0){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>cH};function cK(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},cW,e),n={...cz,...t.swrConfig};return function(e){var r,a,o,i,s;return o=a=class extends(r=cs().Component){componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return cs().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=cs().createElement(ci.Suspense,{fallback:null},cs().createElement(cB.SWRConfig,{value:n},cs().createElement(cl.Provider,{value:this.state.config},t.disableTranslations?cs().createElement(e,this.props):cs().createElement(cF.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},cs().createElement(e,this.props)))));return t.strictMode&&cs().StrictMode?cs().createElement(cs().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${t.featureName})`,i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,a}}function cG(e,t){return function(e){if("object"!==cP(e))throw Error("single-spa-react requires a configuration object");var t,n=cC(cC({},c$),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!cO&&n.React.createContext&&(cO=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:cN.bind(null,n),mount:cj.bind(null,n),unmount:cI.bind(null,n)};return n.parcelCanUpdate&&(r.update=cA.bind(null,n)),r}({React:cs(),ReactDOMClient:cS,rootComponent:cK(t)(e)})}function cZ(e,t){return()=>e().then(({default:e})=>cG(e,t))}function cY(e,t){return()=>Promise.resolve(cG(e,t))}let cq=cZ,cJ=j()(()=>({}));U("openmrs-app-context",cJ);let cX={};function cQ(e,t=e=>e){let n=cJ.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function c0(e,t){cJ.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function c1(e){return null===e?null:Object.freeze(Object.assign({},e))}let c4=new Map;function c2(e,t){let n=(0,ci.useRef)(t??{}),r=(0,ci.useRef)(t=>c0(e,t)),a=(0,ci.useRef)(Symbol());return(0,ci.useEffect)(()=>{let n=t??{},r=a.current;return null===cQ(e)?!function(e,t=cX){cJ.setState(n=>{if(e in n)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({},n,{[e]:t===cX?{}:t})})}(e,n):(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.`),c0(e,()=>n)),c4.set(e,r),()=>{c4.get(e)===r&&(cJ.setState(t=>(e in t&&delete t[e],t)),c4.delete(e))}},[e]),(0,ci.useEffect)(()=>{let r=t??{};T(n.current,r)||(c0(e,()=>r),n.current=r)},[t]),r.current}function c3({namespace:e,value:t}){return c2(e,t),null}let c6=({children:e,value:t,fallback:n})=>t?cs().createElement(cs().Fragment,null,e):n?cs().createElement(cs().Fragment,null,n):null;function c5(){let e=(0,ci.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,ci.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function c9(e,t=e=>e??{}){let[n,r]=(0,ci.useState)(()=>{if(c8(e))return;let n=cQ(e);if(null!==n)return t?t(n):n});return(0,ci.useEffect)(()=>{if(c8(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,ci.useEffect)(()=>{var n;let a;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>T(e,n)?e:n)})(c1(a=cQ(e))),cJ.subscribe(t=>{let r=e in t?t[e]:null;r!==a&&(a=r,n(c1(r)))})},[e,t]),n}function c8(e){return"string"!=typeof e||0===e.trim().length}function c7(e){let t=cE(e);return(0,ci.useMemo)(()=>t.map(e=>e.id),[t])}function de(e){return cb(e).candidateExtensions}function dt(e,t,n){let{data:r,error:a,mutate:o,isLoading:i,isValidating:s}=cU()(e?le(e,t,n):null,iQ);return(0,ci.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:a,mutate:o,isValidating:s}),[r,a,i,s,o])}function dn(e){(0,ci.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dr={},da=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
|
|
16
|
+
Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function di(e){let{moduleName:t,extension:n}=(0,ci.useContext)(cl),r=e?.externalModuleName??t;if(!r&&!n)throw Error(da);let a=function(e){let t=(0,ci.useMemo)(()=>rE(e),[e]),n=function(e){let[t,n]=(0,ci.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,ci.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw dr[e]||(dr[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),dr[e];return n}(r),o=function(e){let t=(0,ci.useMemo)(rS,[]),n=function(e,t){let[n,r]=(0,ci.useState)(t?()=>{let n=rC(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,ci.useEffect)(()=>{if(t)return e.subscribe(e=>{let a=rC(e,t.extensionSlotName,t.extensionId);a.loaded&&a.config&&!nC(a.config,n)&&r(a.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!dr[n]&&t&&(dr[n]=new Promise(n=>{let r=t.subscribe(t=>{let a=rC(t,e.extensionSlotName,e.extensionId);a.loaded&&a.config&&(n(a.config),r())})})),dr[n]}return n||{}}(n);return(0,ci.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...a}:{...a,...o},[r,e?.externalModuleName,a,o])}let ds=cE;function dl(e,t=300){let[n,r]=(0,ci.useState)(e);return(0,ci.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var du=n(9256),dc=n.n(du);let dd=`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 dp(){let e=`${iY}/emrapi/configuration?v=${dd}`,t=dc()(e,iQ);return(0,ci.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function dm(){return(0,ci.useContext)(cl).extension}let df=cg(l7());function dh(e){let t=cE(e);return(0,ci.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let dg=cg(ul());function dy(e){let{flags:t}=cf(l0);return t[e]?.enabled??!1}function dv(){let[,e]=(0,ci.useState)(0);return(0,ci.useCallback)(()=>{e(e=>e+1)},[])}function db(e,t,n={}){return dE(e,t,dw,n)}let dw={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(iX(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.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 dE(e,t,n,r={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:i,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??iQ,[d,p]=(0,ci.useState)(1),m=(0,ci.useRef)(NaN),f=(0,ci.useRef)(NaN),h=(0,ci.useRef)(d),g=(0,ci.useRef)(!1),y=(0,ci.useRef)(!1),v=e?.toString()??"",[b,w]=(0,ci.useState)(v);v!==b&&(w(v),p(1),h.current=1,m.current=NaN,f.current=NaN,g.current=!1,y.current=!1);let E=(d-1)*t,x=(0,ci.useMemo)(()=>a(e,t,E),[e,t,E]),{data:_,...D}=(l?dc():cU())(x,c,u);_?.data&&(m.current=o(_?.data),f.current=i(_?.data),g.current=!0);let S=Math.ceil(m.current/t),k=(0,ci.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let n=Math.ceil(m.current/t);!g.current||Number.isNaN(n)||e<=n?(h.current=e,p(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,ci.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(m.current)){y.current||(y.current=!0,console.warn(`useServerPagination: ${v} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(m.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),h.current=e,p(e))},[d,t,v,_]);let C=(0,ci.useCallback)(()=>{k(h.current+1)},[k]),P=(0,ci.useCallback)(()=>{k(h.current-1)},[k]);return{data:s(_?.data),totalPages:S,totalCount:m.current,currentPage:d,currentPageSize:f.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:k,goToNext:C,goToPrevious:P,...D}}function dx(e,t,n={}){return dE(e,t,d_(),n)}function d_(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(iX(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.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 dD=n(6038),dS=n.n(dD);function dk(e,t={}){return dC(e,dw,t)}function dC(e,t,n={}){let{swrInfiniteConfig:r,immutable:a}=n,{getNextUrl:o,getTotalCount:i,getData:s}=t,l=n.fetcher??iQ,u=(0,ci.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:p,...m}=dS()(u,l,{...r,...a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),f=o(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=f,loadMore:()=>{p((c?.length??0)+1)},nextUri:f,...m}}function dP(e,t={}){return dR(e,dw,t)}function dR(e,t,n={}){let r=dC(e,t,n),{hasMore:a,error:o,data:i,loadMore:s,isLoading:l,nextUri:u}=r;return((0,ci.useEffect)(()=>{a&&!o&&s()},[a,u]),n.partialData)?r:{...r,data:a||o?void 0:i,isLoading:l||a}}function dT(e,t={}){return dR(e,d_(),t)}function dO(e,t={}){return dC(e,d_(),t)}function d$(){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 dN(){let[e,t]=(0,ci.useState)(d$);return(0,ci.useEffect)(()=>{let e=()=>{t(d$())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let dj=e=>"small-desktop"===e||"large-desktop"===e;function dI(e){let t=(0,ci.useContext)(cl);(0,ci.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),uW(e),()=>{uH(e.name)}),[t,e])}function dA(){return cf(uV)}let dM=[];function dL(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString(),{data:a}=dP(`${iY}/location${r?"?"+r:""}`,{immutable:!0});return a??dM}function dF(e,t=!0){let n=(0,ci.useRef)(null);return(0,ci.useEffect)(()=>{let r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}function dB(e){let t=(0,ci.useRef)();return(0,ci.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function dU(e,t={}){let{abortController:n,fetchInit:r,url:a,swrConfig:o}=t,i=c5(),s=(0,ci.useMemo)(()=>r?.signal??n?.signal??i.signal,[n?.signal,r?.signal,i.signal]),l=(0,ci.useCallback)(e=>iQ(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,a),{...r,signal:s}),[s,r,a]);return cU()(e,l,o)}function dV(e=[],t=10){let[n,r]=(0,ci.useState)(1),a=(0,ci.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);n>a&&r(a);let o=Math.min(Math.max(1,n),a),i=(0,ci.useMemo)(()=>{let n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)},[e,o,t]),s=(0,ci.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,ci.useCallback)(()=>{r(e=>e+1)},[]),u=(0,ci.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,ci.useMemo)(()=>({results:i,totalPages:a,currentPage:o,paginated:e.length>t,showNextButton:o<a,showPreviousButton:o>1,goTo:s,goToNext:l,goToPrevious:u}),[i,a,e.length,t,o,s,l,u])}function dW(e,t,n,r){return{pageSizes:(0,ci.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,ci.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function dH(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function dz(e){let[t,n]=(0,ci.useState)(e??dH()),{data:r,error:a,isValidating:o}=cU()(t?["patient",t]:null,()=>lr(t,{}));return(0,ci.useEffect)(()=>{let e=()=>{let e=dH();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,ci.useMemo)(()=>({isLoading:o&&!a&&!r,patient:r,patientUuid:t,error:a}),[o,a,r,t])}function dK(){let e=`${iY}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=cU()(e,iQ);return(0,ci.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function dG(e){let{extensions:t,extensionSlotModuleName:n}=cx(e);return e?t.map(t=>({state:r})=>cs().createElement(cl.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n,extensionMeta:t.meta}}},cs().createElement(cc,{state:r}))):[]}function dZ(){let e=(0,ci.useRef)(),[t,n]=(0,ci.useState)(null),r=null;if(!t){if(i){let e=i5().getState();e.loaded&&(r=e.session)}else i=new Promise(t=>{let n=({loaded:n,session:a})=>{n&&(t(a),r=a,e.current&&(e.current(),e.current=void 0))};n(i5().getState()),r||(e.current=i5().subscribe(n))});if(r)n(r);else throw i}(0,ci.useEffect)(()=>(e.current||(e.current=i5().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let a=t||r;if(!a)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return a}let dY=({privilege:e,fallback:t,children:n})=>{let[r,a]=(0,ci.useState)(null);return((0,ci.useEffect)(()=>{let e=i5(),t=e.subscribe(({loaded:e,session:t})=>{a(e?t?.user??null:null)}),{loaded:n,session:r}=e.getState();return n&&a(r?.user??null),t},[]),r&&se(e,r))?cs().createElement(cs().Fragment,null,n):t?cs().createElement(cs().Fragment,null,t):null};var dq=n(4274),dJ=n.n(dq),dX=n(5602);let dQ=new Map;function d0(){for(let e of Array.from(dQ.values()))e()}let d1={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function d4(e){let t=(0,ci.useId)();return(0,ci.useEffect)(()=>{if(e)return dQ.set(t,e),()=>{dQ.delete(t)}},[t,e]),{...ch(lh(),d1),mutateVisit:d0}}function d2(e,t=lm){let n=(0,ci.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:a,setVisitContext:o}=d4((0,ci.useCallback)(()=>n.current?.(),[])),i=e&&r==e?a:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:p}=cU()(e?`${iY}/visit${s}`:null,iQ),{data:m,error:f,mutate:h,isValidating:g}=cU()(e&&i?`${iY}/visit${l}`:null,iQ),y=(0,ci.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,ci.useMemo)(()=>i&&m?m.data:null,[m,i]),b=(0,ci.useRef)(null);(0,ci.useEffect)(()=>{!p&&y&&r===e&&null===a&&o(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&o(null),b.current=v)},[v,a,y,p,g,r]);let w=(0,ci.useCallback)(()=>{d(),h()},[d,h]);(0,ci.useEffect)(()=>{n.current=w},[w]);let E=!!(!u||i&&!m),x=!!(i?f:c);return{error:c||f,mutate:w,isValidating:p||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:E&&!x}}dJ().extend(dX);let d3=[];function d6(){let{data:e}=dc()(lu,lc);return e??d3}let d5=new Map;async function d9(e,t){let n=t.indexOf("#"),r=n>=0,a=r?t.substring(0,n):e,o=r?t.substring(n+1):t,i=await sM(a);return i&&Object.hasOwn(i,o)&&"function"==typeof i[o]?d7(a,i).then(()=>i[o]()):(i?i&&Object.hasOwn(i,o)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${a} does not define a component called "${o}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${a} for ${t} defined in ${e}'s routes.json`),d8)}let d8={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function d7(e,t){if(e in d5)await d5[e];else{let n=t??await sM(e);await (d5[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let a=n.startupApp;if("function"==typeof a)return Promise.resolve(a()).then(()=>{rJ(e),t(null)}).catch(r)}rJ(e),t(null)}))}}function pe(e,t){let n=t.name;if(!n)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
|
|
17
|
+
registered. To fix this, ensure that you define the "name" field inside the
|
|
18
|
+
extension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${n} from ${e} declares both a 'slots' property and
|
|
19
|
+
a 'slot' property. Only the 'slots' property will be honored.`);let r=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
|
|
20
|
+
To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let a of(uN({name:n,load:()=>d9(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))uj(a,n)}let pt=[];function pn(e,t){ud(()=>(function(e,t){if(e&&t&&"object"==typeof t){rq(e);let n=t.extensions??[],r=t.modals??[],a=t.workspaces??[],o=t.workspaceGroups??[],i=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?pt.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?pe(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let n;(n=t.name)?t.component?uK({name:n,moduleName:e,load:()=>d9(e,t.component)}):console.error(`The modal ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
|
|
21
|
+
To fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be
|
|
22
|
+
registered. To fix this, ensure that you define the "name" field inside the
|
|
23
|
+
modal definition.`,t)}else console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let n=t.name;if(!n)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
|
|
24
|
+
To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let r=t.title;if(!r)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
|
|
25
|
+
To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
|
|
26
|
+
To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let a of(uq({name:n,title:r,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>d9(e,t.component)}),t.groups||[]))uJ({name:a,members:[n]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let n;(n=t.name)?uJ({name:n,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
|
|
27
|
+
To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),u6(e,s);for(let t of(u5(e,l),l))t.icon&&pe(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});u9(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?l1(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
|
|
28
|
+
To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
|
|
29
|
+
To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
|
|
30
|
+
To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function pr(){pt.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pt){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,a=t.containerDomId??"omrs-apps-container",o=document.getElementById(a),i=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=i,o?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${a}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
|
|
31
|
+
To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?oL(e,()=>d9(t.appName,t.component),function(e,{featureFlag:t}){return t?n=>!!l2(t)&&e(n):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?oH(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
|
|
32
|
+
To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let pa={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function po(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<pa.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>pa.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>pa.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<pa.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<pa.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<pa.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>pa.SMALL_DESKTOP_MAX)}let pi=!1;function ps(){pi||(window.addEventListener("resize",po),po(),pi=!0)}var pl=n(1085),pu=n(3373),pc=n.n(pu);function pd({title:e,children:t}){let n="tablet"===dN();return(0,pl.jsxs)("div",{className:pc()({"-esm-openconceptlab__card-header-module__tabletHeader___xhRSy":n,"-esm-openconceptlab__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,pl.jsx)("h4",{children:e}),t]})}let pp=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],pm={primaryColor:{_type:rc.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[ab.oneOf(pp)]},secondaryColor:{_type:rc.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[ab.oneOf(pp)]}},pf={"Brand color #1":{_default:"#005d5d",_type:rc.String},"Brand color #2":{_default:"#004144",_type:rc.String},"Brand color #3":{_default:"#007d79",_type:rc.String},excludePatientIdentifierCodeTypes:{uuids:{_type:rc.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:rc.UUID}}},implementationName:{_type:rc.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},logo:{src:{_type:rc.String,_default:"",_description:"The path or URL to the logo shown on the login page and while the server is starting up. If set to an empty string, the default OpenMRS logo is used.",_validators:[ab.isUrl]},alt:{_type:rc.String,_default:"Logo",_description:"The alternative text for the logo image, displayed when the image cannot be loaded or on hover."}},patientPhotoConceptUuid:{_type:rc.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:rc.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[ab.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:rc.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:rc.String}},diagnosisTags:pm};var ph=n(4920);let pg={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},py=e=>(0,pl.jsx)(ph.TableBatchActions,{translateWithId:(e,t)=>{let n=pg[e];return n?iA(n,e,t):e},...e}),pv="-esm-openconceptlab__custom-overflow-menu-module__container___QIBvW",pb="-esm-openconceptlab__custom-overflow-menu-module__menu___ZppPo",pw="-esm-openconceptlab__custom-overflow-menu-module__show___8rVUu",pE="-esm-openconceptlab__custom-overflow-menu-module__overflowMenuButton___0VKUu",px=(0,ci.createContext)(null);function p_(){let e=(0,ci.useContext)(px);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function pD({menuTitle:e,children:t}){let[n,r]=cs().useState(!1),a=dF(()=>r(!1),n),o="tablet"===dN(),i=(0,ci.useCallback)(()=>r(e=>!e),[]),s=(0,ci.useRef)(null),l=(0,ci.useRef)(null),u=(0,ci.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,p=(0,ci.useCallback)(()=>{r(!1),s.current?.focus()},[]),m=(0,ci.useMemo)(()=>({closeMenu:p}),[p]),f=(0,ci.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),p())},[p,n]),h=ci.Children.toArray(t);(0,ci.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,ci.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,a=Array.from(n).indexOf(r);if(-1===a)return void n[t>0?0:n.length-1]?.focus();let o=a+t,i=o<0?n.length-1:o>=n.length?0:o;n[i]?.focus()},[]),y=h.map((e,t)=>(0,ci.isValidElement)(e)?(0,ci.cloneElement)(e,{closeMenu:p,handleOverflowMenuItemFocus:g,index:t}):e);return(0,pl.jsxs)("div",{"data-overflow-menu":!0,className:pc()("cds--overflow-menu",pv),ref:a,children:[(0,pl.jsx)("button",{className:pc()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},pE),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:f,ref:s,children:e}),(0,pl.jsxs)("div",{className:pc()("cds--overflow-menu-options","cds--overflow-menu--flip",pb,{[pw]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:f,ref:l,role:"menu",tabIndex:-1,children:[(0,pl.jsx)("ul",{className:pc()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":o}),children:(0,pl.jsx)(px.Provider,{value:m,children:y})}),(0,pl.jsx)("span",{})]})]})}function pS(e){let t=(0,ci.useContext)(px);return(0,pl.jsx)(ph.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var pk=n(6311);let pC=["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"],pP=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),pR=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-add",iconProps:e})})),pT=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),pO=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),p$=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),pN=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),pj=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),pI=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),pA=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),pM=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),pL=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),pF=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),pB=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),pU=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),pV=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),pW=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),pH=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),pz=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),pK=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),pG=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),pZ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),pY=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),pq=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-close",iconProps:e})})),pJ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),pX=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),pQ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-document",iconProps:e})})),p0=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),p1=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-download",iconProps:e})})),p4=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),p2=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),p3=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),p6=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-events",iconProps:e})})),p5=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),p9=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),p8=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),p7=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),me=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),mt=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-group",iconProps:e})})),mn=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),mr=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),ma=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),mo=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-information",iconProps:e})})),mi=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),ms=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),ml=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),mu=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),mc=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),md=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-location",iconProps:e})})),mp=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),mm=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),mf=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),mh=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),mg=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),my=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),mv=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-money",iconProps:e})})),mb=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),mw=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),mE=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),mx=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),m_=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-password",iconProps:e})})),mD=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),mS=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),mk=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),mC=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),mP=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),mR=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),mT=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),mO=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-report",iconProps:e})})),m$=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),mN=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-save",iconProps:e})})),mj=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-search",iconProps:e})})),mI=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),mA=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),mM=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),mL=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),mF=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),mB=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),mU=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),mV=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-table",iconProps:e})})),mW=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-time",iconProps:e})})),mH=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),mz=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),mK=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),mG=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mZ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),mY=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),mq=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mJ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mX=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mQ=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),m0=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-view",iconProps:e})})),m1=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(m8,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),m4=m1,m2=p0,m3=mc,m6=ma,m5=mL,m9=(0,ci.memo)((0,ci.forwardRef)(function({icon:e,fallback:t,...n},r){let a=(0,ci.useRef)(e?document.getElementById(e):void 0);return(0,ci.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,pl.jsx)(c6,{value:a.current,fallback:t,children:(0,pl.jsx)(m8,{ref:r,icon:e,iconProps:n})})})),m8=(0,ci.memo)((0,ci.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,fill:a,size:o}=Object.assign({},{fill:"currentColor",size:20},t);(o<=0||o>72)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 20.`),o=20);let i=(0,ci.useRef)(null);return(0,ci.useImperativeHandle)(n,()=>i.current),(0,ci.useEffect)(()=>{i.current&&"currentColor"!==a&&i.current.style.setProperty("--omrs-icon-fill",a)},[]),(0,pl.jsx)("svg",{ref:i,className:pc()("omrs-icon","-esm-openconceptlab__icons-module__icon___uq4qr",r),height:o,width:o,viewBox:"0 0 16 16",children:(0,pl.jsx)("use",{href:`#${e}`})})})),m7=({path:e,title:t,basePath:n,icon:r})=>{let{t:a}=(0,cF.useTranslation)(),o=(0,pk.useLocation)(),i=(0,ci.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(o.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[o.pathname,e]);return(0,pl.jsx)("div",{children:(0,pl.jsx)(cu,{className:pc()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${n}/${encodeURIComponent(e)}`,children:(0,pl.jsxs)("span",{className:"-esm-openconceptlab__dashboard-module__menu___WbY42",children:[(0,pl.jsx)(m9,{icon:r,className:"-esm-openconceptlab__dashboard-module__icon___L-hKL",size:16}),(0,pl.jsx)("span",{children:a(t)})]})})},e)};function fe(e){return function({basePath:t}){return(0,pl.jsx)(pk.BrowserRouter,{children:(0,pl.jsx)(m7,{basePath:t,...e})})}}function ft(e){let t=(0,ci.useRef)(null);return(0,ci.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function fn(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let fr="u">typeof document?cs().useLayoutEffect:()=>{};function fa(e){let t=(0,ci.useRef)(null);return fr(()=>{t.current=e},[e]),(0,ci.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}let fo={prefix:String(Math.round(1e10*Math.random())),current:0},fi=cs().createContext(fo),fs=cs().createContext(!1),fl=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),fu="function"==typeof cs().useId?function(e){let t=cs().useId(),[n]=(0,ci.useState)(fm()),r=n?"react-aria":`react-aria${fo.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,ci.useContext)(fi),n=function(e=!1){let t=(0,ci.useContext)(fi),n=(0,ci.useRef)(null);if(null===n.current&&!e){var r,a;let e=null==(a=cs().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=a.ReactCurrentOwner)?void 0:r.current;if(e){let n=fl.get(e);null==n?fl.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,fl.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function fc(){return!1}function fd(){return!0}function fp(e){return()=>{}}function fm(){return"function"==typeof cs().useSyncExternalStore?cs().useSyncExternalStore(fp,fc,fd):(0,ci.useContext)(fs)}let ff=!!("u">typeof window&&window.document&&window.document.createElement),fh=new Map;function fg(e){let[t,n]=(0,ci.useState)(e),r=(0,ci.useRef)(null),a=fu(t),o=(0,ci.useRef)(null);if(s&&s.register(o,a),ff){let e=fh.get(a);e&&!e.includes(r)?e.push(r):fh.set(a,[r])}return fr(()=>()=>{s&&s.unregister(o),fh.delete(a)},[a]),(0,ci.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function fy(e=[]){let t=fg(),[n,r]=function(e){let[t,n]=(0,ci.useState)(e),r=(0,ci.useRef)(null),a=fa(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?a():n(e.value)});fr(()=>{r.current&&a()});let o=fa(e=>{r.current=e(t),a()});return[t,o]}(t),a=(0,ci.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return fr(a,[t,a,...e]),n}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{fh.delete(e)}));let fv=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r};function fb(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],a=r[e];"function"==typeof n&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=fn(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=fv(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=fh.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=fh.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):t[e]=void 0!==a?a:n}}return t}let fw=Symbol("default");function fE({values:e,children:t}){for(let[n,r]of e)t=cs().createElement(n.Provider,{value:r},t);return t}function fx(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,ci.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:l||i?{...i,...l}:void 0,children:null!=u?u:o,"data-rac":""}},[t,n,r,a,o,i,s])}function f_(e,t){let n=(0,ci.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||fw;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function fD(e,t,n){let{ref:r,...a}=f_(n,e.slot)||{},o=ft((0,ci.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:t=>{for(let n of e)"function"==typeof n?n(t):null!=n&&(n.current=t)}})(t,r),[t,r])),i=fb(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function fS(e=!0){let[t,n]=(0,ci.useState)(e),r=(0,ci.useRef)(!1),a=(0,ci.useCallback)(e=>{r.current=!0,n(!!e)},[]);return fr(()=>{r.current||n(!1)},[]),[a,t]}function fk(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let fC=(0,ci.createContext)(null),fP=null;function fR(e,t="assertive",n=7e3){fP?fP.announce(e,t,n):(fP=new fT,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?fP.announce(e,t,n):setTimeout(()=>{(null==fP?void 0:fP.isAttached())&&(null==fP||fP.announce(e,t,n))},100))}class fT{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",n=7e3){var r,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},n)}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 fO=new Set(["id"]),f$=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),fN=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),fj=/^(data-.*)$/;function fI(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,o={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(fO.has(t)||n&&f$.has(t)||r&&fN.has(t)||(null==a?void 0:a.has(t))||fj.test(t))&&(o[t]=e[t]);return o}let fA=["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"])'],fM=fA.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";fA.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let fL=fA.join(':not([hidden]):not([tabindex="-1"]),');function fF(e){return e.matches(fM)}function fB(e){return e.matches(fL)}let fU=e=>{var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document},fV=e=>e&&"window"in e&&e.window===e?e:fU(e).defaultView||window;function fW(e){if(function(){if(null==fH){fH=!1;try{document.createElement("div").focus({get preventScroll(){return fH=!0,!0}})}catch{}}return fH}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let fH=null;function fz(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function fK(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function fG(e){let t=(0,ci.useRef)({isFocused:!1,observer:null});fr(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=fa(t=>{null==e||e(t)});return(0,ci.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(fz(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null==(e=t.current.observer)||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let fZ=!1;function fY(e){var t;return!("u"<typeof window)&&null!=window.navigator&&((null==(t=window.navigator.userAgentData)?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent))}function fq(e){var t;return"u">typeof window&&null!=window.navigator&&e.test((null==(t=window.navigator.userAgentData)?void 0:t.platform)||window.navigator.platform)}function fJ(e){let t=null;return()=>(null==t&&(t=e()),t)}let fX=fJ(function(){return fq(/^Mac/i)}),fQ=fJ(function(){return fq(/^iPhone/i)}),f0=fJ(function(){return fq(/^iPad/i)||fX()&&navigator.maxTouchPoints>1}),f1=fJ(function(){return fQ()||f0()});fJ(function(){return fX()||f1()});let f4=fJ(function(){return fY(/AppleWebKit/i)&&!f2()}),f2=fJ(function(){return fY(/Chrome/i)}),f3=fJ(function(){return fY(/Android/i)}),f6=fJ(function(){return fY(/Firefox/i)}),f5=new Map,f9=new Set;function f8(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{if(!e(n)||!n.target)return;let r=f5.get(n.target);if(r&&(r.delete(n.propertyName),0===r.size&&(n.target.removeEventListener("transitioncancel",t),f5.delete(n.target)),0===f5.size)){for(let e of f9)e();f9.clear()}};document.body.addEventListener("transitionrun",n=>{if(!e(n)||!n.target)return;let r=f5.get(n.target);r||(r=new Set,f5.set(n.target,r),n.target.addEventListener("transitioncancel",t,{once:!0})),r.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function f7(e){requestAnimationFrame(()=>{0===f5.size?e():f9.add(e)})}"u">typeof document&&("loading"!==document.readyState?f8():document.addEventListener("DOMContentLoaded",f8));let he="default",ht="",hn=new WeakMap;function hr(e){if(f1())"disabled"===he&&(he="restoring",setTimeout(()=>{f7(()=>{if("restoring"===he){let t=fU(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=ht||""),ht="",he="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&hn.has(e)){let t=hn.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),hn.delete(e)}}let ha=cs().createContext({register:()=>{}});function ho(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function hi(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function hs(e,t,n){var r=ho(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function hl(e,t){fr(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hu(){let e=(0,ci.useRef)(new Map),t=(0,ci.useCallback)((t,n,r,a)=>{let o=(null==a?void 0:a.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:a}),t.addEventListener(n,o,a)},[]),n=(0,ci.useCallback)((t,n,r,a)=>{var o;let i=(null==(o=e.current.get(r))?void 0:o.fn)||r;t.removeEventListener(n,i,a),e.current.delete(r)},[]),r=(0,ci.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,ci.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}ha.displayName="PressResponderContext";function hc(e,t){return!!t&&!!e&&e.contains(t)}function hd(e){return e.target}function hp(e,t,n=!0){var r,a;let{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}=t;f6()&&(null==(a=window.event)||null==(r=a.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(fX()?o=!0:i=!0);let u=f4()&&fX()&&!f0()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});hp.isOpening=n,fW(e),e.dispatchEvent(u),hp.isOpening=!1}function hm(e){return 0===e.mozInputSource&&!!e.isTrusted||(f3()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}hp.isOpening=!1;var hf=n(5427),hh=n.n(hf),hg=new WeakMap;class hy{continuePropagation(){hs(this,hg,!1)}get shouldStopPropagation(){var e;return e=ho(this,hg,"get"),e.get?e.get.call(this):e.value}constructor(e,t,n,r){var a;hi(this,hg,{writable:!0,value:void 0}),hs(this,hg,!0);let o=null!=(a=null==r?void 0:r.target)?a:n.currentTarget;const i=null==o?void 0:o.getBoundingClientRect();let s,l=0,u,c=null;null!=n.clientX&&null!=n.clientY&&(u=n.clientX,c=n.clientY),i&&(null!=u&&null!=c?(s=u-i.left,l=c-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l}}let hv=Symbol("linkClicked");function hb(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...m}=function(e){let t=(0,ci.useContext)(ha);if(t){let{register:n,...r}=t;e=fb(r,e),n()}return hl(t,e.ref),e}(e),[f,h]=(0,ci.useState)(!1),g=(0,ci.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=hu(),b=fa((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new hy("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,h(!0),o}),w=fa((e,r,o=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(a){let t=new hy("pressend",r,e);a(t),l=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&o&&!s){let n=new hy("press",r,e);t(n),l&&(l=n.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),E=fa((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new hy("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),x=fa(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(hx(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||hr(t.target),t.disposables))n();t.disposables=[]}}),_=fa(e=>{c&&x(e)}),D=fa(e=>{null==i||i(e)}),S=fa((e,t)=>{if(i){let n=new MouseEvent("click",e);fK(n,t),i(fz(n))}}),k=(0,ci.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(hE(t.nativeEvent,t.currentTarget)&&hc(t.currentTarget,hd(t.nativeEvent))){var r;h_(hd(t.nativeEvent),t.key)&&t.preventDefault();let a=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",a=b(t,"keyboard");let r=t.currentTarget;y(fU(t.currentTarget),"keyup",fn(t=>{hE(t,r)&&!t.repeat&&hc(r,hd(t))&&e.target&&E(hx(e.target,t),"keyboard")},n),!0)}a&&t.stopPropagation(),t.metaKey&&fX()&&(null==(r=e.metaKeyEvents)||r.set(t.key,t.nativeEvent))}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||hc(t.currentTarget,hd(t.nativeEvent)))&&t&&0===t.button&&!e.isTriggeringEvent&&!hp.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||hm(t.nativeEvent))){let e=b(t,"virtual"),r=E(t,"virtual"),a=w(t,"virtual");D(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual";n=w(hx(t.currentTarget,t),r,!0),e.isOverTarget=!1,D(t),x(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n,r,a;if(e.isPressed&&e.target&&hE(t,e.target)){h_(hd(t),t.key)&&t.preventDefault();let n=hd(t),a=hc(e.target,hd(t));w(hx(e.target,t),"keyboard",a),a&&S(t,e.target),v(),"Enter"!==t.key&&hw(e.target)&&hc(e.target,n)&&!t[hv]&&(t[hv]=!0,hp(e.target,t,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(t.key)}else if("Meta"===t.key&&(null==(n=e.metaKeyEvents)?void 0:n.size)){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))null==(a=e.target)||a.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var a;if(0!==t.button||!hc(t.currentTarget,hd(t.nativeEvent)))return;if(a=t.nativeEvent,!f3()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(f1()){if("default"===he){let t=fU(e);ht=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}he="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";hn.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=b(t,e.pointerType);let a=hd(t.nativeEvent);"releasePointerCapture"in a&&a.releasePointerCapture(t.pointerId),y(fU(t.currentTarget),"pointerup",n,!1),y(fU(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(hc(t.currentTarget,hd(t.nativeEvent))&&0===t.button){if(u){let n=function(e){for(;e&&!fF(e);)e=e.parentElement;let t=fV(e),n=t.document.activeElement;if(!n||n===e)return;fZ=!0;let r=!1,a=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},o=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,fW(n),l()))},i=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,fW(n),l()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),fZ=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{hc(t.currentTarget,hd(t.nativeEvent))&&"virtual"!==e.pointerType&&0===t.button&&E(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(hx(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,w(hx(e.target,t),e.pointerType,!1),_(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(hc(e.target,hd(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?x(t):(fW(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else x(t);e.isOverTarget=!1}},r=e=>{x(e)};t.onDragStart=e=>{hc(e.currentTarget,hd(e.nativeEvent))&&x(e)}}return t},[y,s,u,v,d,x,_,w,b,E,D,S]);return(0,ci.useEffect)(()=>{let e=null==p?void 0:p.current;e&&e instanceof fV(e).Element&&"auto"===fV(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[p]),(0,ci.useEffect)(()=>{let e=g.current;return()=>{var t;for(let n of(d||hr(null!=(t=e.target)?t:void 0),e.disposables))n();e.disposables=[]}},[d]),{isPressed:l||f,pressProps:fb(m,k)}}function hw(e){return"A"===e.tagName&&e.hasAttribute("href")}function hE(e,t){let{key:n,code:r}=e,a=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof fV(t).HTMLInputElement&&!hS(t,n)||t instanceof fV(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===a||!a&&hw(t))&&"Enter"!==n)}function hx(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function h_(e,t){return e instanceof HTMLInputElement?!hS(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!hw(e))}let hD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hS(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:hD.has(e.type)}let hk=null,hC=new Set,hP=new Map,hR=!1,hT=!1,hO={Tab:!0,Escape:!0};function h$(e,t){for(let n of hC)n(e,t)}function hN(e){hR=!0,e.metaKey||!fX()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(hk="keyboard",h$("keyboard",e))}function hj(e){hk="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(hR=!0,h$("pointer",e))}function hI(e){hm(e)&&(hR=!0,hk="virtual")}function hA(e){e.target!==window&&e.target!==document&&!fZ&&e.isTrusted&&(hR||hT||(hk="virtual",h$("virtual",e)),hR=!1,hT=!1)}function hM(){fZ||(hR=!1,hT=!0)}function hL(e){if("u"<typeof window||hP.get(fV(e)))return;let t=fV(e),n=fU(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){hR=!0,r.apply(this,arguments)},n.addEventListener("keydown",hN,!0),n.addEventListener("keyup",hN,!0),n.addEventListener("click",hI,!0),t.addEventListener("focus",hA,!0),t.addEventListener("blur",hM,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",hj,!0),n.addEventListener("pointermove",hj,!0),n.addEventListener("pointerup",hj,!0)),t.addEventListener("beforeunload",()=>{hF(e)},{once:!0}),hP.set(t,{focus:r})}let hF=(e,t)=>{let n=fV(e),r=fU(e);t&&r.removeEventListener("DOMContentLoaded",t),hP.has(n)&&(n.HTMLElement.prototype.focus=hP.get(n).focus,r.removeEventListener("keydown",hN,!0),r.removeEventListener("keyup",hN,!0),r.removeEventListener("click",hI,!0),n.removeEventListener("focus",hA,!0),n.removeEventListener("blur",hM,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",hj,!0),r.removeEventListener("pointermove",hj,!0),r.removeEventListener("pointerup",hj,!0)),hP.delete(n))};function hB(){return"pointer"!==hk}"u">typeof document&&("loading"!==(p=fU(void 0)).readyState?hL(void 0):p.addEventListener("DOMContentLoaded",()=>{hL(void 0)}));let hU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hV(e){let t=fU(e),n=((e=document)=>e.activeElement)(t);"virtual"===hk?f7(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&fW(e)}):fW(e)}function hW(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e,o=(0,ci.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),a&&a(!1),!0},[r,a]),i=fG(o),s=(0,ci.useCallback)(e=>{let t=fU(e.target),r=t?((e=document)=>e.activeElement)(t):((e=document)=>e.activeElement)();e.target===e.currentTarget&&r===hd(e.nativeEvent)&&(n&&n(e),a&&a(!0),i(e))},[a,n,i]);return{focusProps:{onFocus:!t&&(n||a||r)?s:void 0,onBlur:!t&&(r||a)?o:void 0}}}function hH(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}let hz=cs().createContext(null);function hK(e,t){let{focusProps:n}=hW(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:hH(e.onKeyDown),onKeyUp:hH(e.onKeyUp)}},a=fb(n,r),o=function(e){let t=(0,ci.useContext)(hz)||{};hl(t,e);let{ref:n,...r}=t;return r}(t),i=e.isDisabled?{}:o,s=(0,ci.useRef)(e.autoFocus);(0,ci.useEffect)(()=>{s.current&&t.current&&hV(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:fb({...a,tabIndex:l},i)}}function hG(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,o=(0,ci.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=hu(),l=(0,ci.useCallback)(e=>{e.currentTarget.contains(e.target)&&o.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(e),a&&a(!1))},[n,a,o,s]),u=fG(l),c=(0,ci.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=fU(e.target),n=((e=document)=>e.activeElement)(t);if(!o.current.isFocusWithin&&n===hd(e.nativeEvent)){r&&r(e),a&&a(!0),o.current.isFocusWithin=!0,u(e);let n=e.currentTarget;i(t,"focus",e=>{if(o.current.isFocusWithin&&!hc(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});fK(r,n),l(fz(r))}},{capture:!0})}},[r,a,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function hZ(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:a}=e,o=(0,ci.useRef)({isFocused:!1,isFocusVisible:n||hB()}),[i,s]=(0,ci.useState)(!1),[l,u]=(0,ci.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),c=(0,ci.useCallback)(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,ci.useCallback)(e=>{o.current.isFocused=e,s(e),c()},[c]);t={isTextInput:r},hL(),(0,ci.useEffect)(()=>{let e=(e,n)=>{var r;let a,i,s,l,u;r=!!(null==t?void 0:t.isTextInput),a=fU(null==n?void 0:n.target),i="u">typeof window?fV(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?fV(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?fV(null==n?void 0:n.target).HTMLElement:HTMLElement,u="u">typeof window?fV(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent,(r=r||a.activeElement instanceof i&&!hU.has(a.activeElement.type)||a.activeElement instanceof s||a.activeElement instanceof l&&a.activeElement.isContentEditable)&&"keyboard"===e&&n instanceof u&&!hO[n.key]||(e=>{o.current.isFocusVisible=e,c()})(hB())};return hC.add(e),()=>{hC.delete(e)}},[]);let{focusProps:p}=hW({isDisabled:a,onFocusChange:d}),{focusWithinProps:m}=hG({isDisabled:!a,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:a?m:p}}cs().forwardRef(function(e,t){let{children:n,...r}=e,a=ft(t),o={...r,ref:a};return cs().createElement(hz.Provider,{value:o},n)});let hY=!1,hq=0;function hJ(e){"touch"===e.pointerType&&(hY=!0,setTimeout(()=>{hY=!1},50))}function hX(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",hJ),hq++,()=>{!(--hq>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",hJ)}}function hQ(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:a}=e,[o,i]=(0,ci.useState)(!1),s=(0,ci.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,ci.useEffect)(hX,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=hu(),{hoverProps:c,triggerHoverEnd:d}=(0,ci.useMemo)(()=>{let e=(e,t)=>{let a=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&a&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:a,pointerType:t}),n&&n(!1),i(!1))},o={};return"u">typeof PointerEvent&&(o.onPointerEnter=r=>{hY&&"mouse"===r.pointerType||((r,o)=>{if(s.pointerType=o,a||"touch"===o||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(fU(r.target),"pointerover",t=>{s.isHovered&&s.target&&!hc(s.target,t.target)&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:o}),n&&n(!0),i(!0)})(r,r.pointerType)},o.onPointerLeave=t=>{!a&&t.currentTarget.contains(t.target)&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,n,r,a,s,l,u]);return(0,ci.useEffect)(()=>{a&&d({currentTarget:s.target},s.pointerType)},[a]),{hoverProps:c,isHovered:o}}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 h0=(0,ci.createContext)(!1);function h1(e){let t=(t,n)=>(0,ci.useContext)(h0)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,ci.forwardRef)(t)}let h4=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),h2=(0,ci.createContext)({}),h3=h1(function(e,t){var n;[e,t]=fD(e,t,h2);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:a}=r,{buttonProps:o,isPressed:i}=function(e,t){let n,{elementType:r="button",isDisabled:a,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:m,target:f,rel:h,type:g="button"}=e;n="button"===r?{type:g,disabled:a}:{role:"button",href:"a"!==r||a?void 0:m,target:"a"===r?f:void 0,type:"input"===r?g:void 0,disabled:"input"===r?a:void 0,"aria-disabled":a&&"input"!==r?a:void 0,rel:"a"===r?h:void 0};let{pressProps:y,isPressed:v}=hb({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:o,onPressUp:l,onClick:p,isDisabled:a,preventFocusOnPress:c,ref:t}),{focusableProps:b}=hK(e,t);d&&(b.tabIndex=a?-1:b.tabIndex);let w=fb(b,y,fI(e,{labelable:!0}));return{isPressed:v,buttonProps:fb(n,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"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=hZ(e),{hoverProps:c,isHovered:d}=hQ({...e,isDisabled:e.isDisabled||a}),p={isHovered:d,isPressed:(r.isPressed||i)&&!a,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=a&&a},m=fx({...e,values:p,defaultClassName:"react-aria-Button"}),f=fg(o.id),h=fg(),g=o["aria-labelledby"];a&&(g?g=`${g} ${h}`:o["aria-label"]&&(g=`${f} ${h}`));let y=(0,ci.useRef)(a);return(0,ci.useEffect)(()=>{let e={"aria-labelledby":g||f};!y.current&&l&&a?fR(e,"assertive"):y.current&&l&&!a&&fR(e,"assertive"),y.current=a},[a,l,g,f]),cs().createElement("button",{...fI(e,{propNames:h4}),...fb(o,s,c),...m,type:"submit"===o.type&&a?"button":o.type,id:f,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":a?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":a||void 0,"data-focus-visible":u||void 0},cs().createElement(fC.Provider,{value:{id:h}},m.children))});(0,ci.createContext)(null),(0,ci.createContext)(null),(0,ci.createContext)(null),(0,ci.createContext)(null),(0,ci.createContext)(null);let h6=(0,ci.createContext)({}),h5=(0,ci.createContext)({}),h9=(0,ci.forwardRef)(function(e,t){[e,t]=fD(e,t,h5);let{elementType:n="span",...r}=e;return cs().createElement(n,{className:"react-aria-Text",...r,ref:t})}),h8=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),h7=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ge(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return h8.has(t.script)}let t=e.split("-")[0];return h7.has(t)}let gt=Symbol.for("react-aria.i18n.locale");function gn(){let e="u">typeof window&&window[gt]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:ge(e)?"rtl":"ltr"}}let gr=gn(),ga=new Set;function go(){for(let e of(gr=gn(),ga))e(gr)}function gi(){let e=fm(),[t,n]=(0,ci.useState)(gr);return((0,ci.useEffect)(()=>(0===ga.size&&window.addEventListener("languagechange",go),ga.add(n),()=>{ga.delete(n),0===ga.size&&window.removeEventListener("languagechange",go)}),[]),e)?{locale:"en-US",direction:"ltr"}:t}let gs=cs().createContext(null);function gl(e){let{locale:t,children:n}=e,r=gi(),a=cs().useMemo(()=>t?{locale:t,direction:ge(t)?"rtl":"ltr"}:r,[r,t]);return cs().createElement(gs.Provider,{value:a},n)}function gu(){let e=gi();return(0,ci.useContext)(gs)||e}var gc={};function gd(e,t){return e-t*Math.floor(e/t)}function gp(e,t,n,r){let a=(t=gf(e,t))-1,o=-2;return n<=2?o=0:gm(t)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*n-362)/12+o+r)}function gm(e){return e%4==0&&(e%100!=0||e%400==0)}function gf(e,t){return"BC"===e?1-t:t}function gh(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}gc={"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 gg={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 gy{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=gd(t,146097),a=Math.floor(r/36524),o=gd(r,36524),i=Math.floor(o/1461),s=Math.floor(gd(o,1461)/365),[l,u]=gh(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),c=e-gp(l,u,1,1),d=2;e<gp(l,u,3,1)?d=0:gm(u)&&(d=1);let p=Math.floor(((c+d)*12+373)/367),m=e-gp(l,u,p,1)+1;return new gF(l,u,p,m)}toJulianDay(e){return gp(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return gg[gm(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return gm(e.year)?366:365}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 gv(e,t){let n=e.copy(),r="hour"in n?gP(n,t):0;gb(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,gw(n),gE(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,gw(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,gw(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let a=n.calendar.getYearsInEra(n);if(n.year>a){var o,i;let e=null==(o=(i=n.calendar).isInverseEra)?void 0:o.call(i,n);n.year=a,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function gb(e,t){var n,r;(null==(n=(r=e.calendar).isInverseEra)?void 0:n.call(r,e))&&(t=-t),e.year+=t}function gw(e){for(;e.month<1;)gb(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gb(e,1)}function gE(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 gx(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gE(e)}function g_(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function gD(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),gx(n),n}function gS(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),gk(n),n}function gk(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 gC(e,t){let n=e%t;return n<0&&(n+=t),n}function gP(e,t){let n;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=gC(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=gC(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=gC(e.minute,60),n=Math.floor(e.hour/24),e.hour=gC(e.hour,24),n}function gR(e,t){let n=e.copy();return gP(n,t),n}function gT(e,t,n,r){let a=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=g$(o,n,0,t.length-1,null==r?void 0:r.round),a.era=t[o],gx(a);break}case"year":var o,i;(null==(o=(i=a.calendar).isInverseEra)?void 0:o.call(i,a))&&(n=-n),a.year=g$(e.year,n,-1/0,9999,null==r?void 0:r.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=g$(e.month,n,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":a.day=g$(e.day,n,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),gx(a),a}function gO(e,t,n,r){let a=e.copy();switch(t){case"hour":{let t=e.hour,o=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=t>=12;o=12*!!e,i=e?23:11}a.hour=g$(t,n,o,i,null==r?void 0:r.round);break}case"minute":a.minute=g$(e.minute,n,0,59,null==r?void 0:r.round);break;case"second":a.second=g$(e.second,n,0,59,null==r?void 0:r.round);break;case"millisecond":a.millisecond=g$(e.millisecond,n,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+t)}return a}function g$(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function gN(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?gJ(gv(g1(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):gK(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),g4(gQ(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function gj(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 gI(e){let t,n=g4(e,new gy);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function gA(e){return`${gI(e)}T${gj(e)}`}function gM(e){let t,n="object"==typeof e[0]?e.shift():new gy;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}var gL=new WeakMap;class gF{copy(){return this.era?new gF(this.calendar,this.era,this.year,this.month,this.day):new gF(this.calendar,this.year,this.month,this.day)}add(e){return gv(this,e)}subtract(e){return gv(this,g_(e))}set(e){return gD(this,e)}cycle(e,t,n){return gT(this,e,t,n)}toDate(e){return gX(this,e)}toString(){return gI(this)}compare(e){return yt(this,e)}constructor(...e){hi(this,gL,{writable:!0,value:void 0});let[t,n,r,a,o]=gM(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,gx(this)}}var gB=new WeakMap;class gU{copy(){return new gU(this.hour,this.minute,this.second,this.millisecond)}add(e){return gR(this,e)}subtract(e){return gR(this,g_(e))}set(e){return gS(this,e)}cycle(e,t,n){return gO(this,e,t,n)}toString(){return gj(this)}compare(e){var t,n;return t=this,n=e,yn(t)-yn(n)}constructor(e=0,t=0,n=0,r=0){hi(this,gB,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,gk(this)}}var gV=new WeakMap;class gW{copy(){return this.era?new gW(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new gW(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return gv(this,e)}subtract(e){return gv(this,g_(e))}set(e){return gD(gS(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return gT(this,e,t,n);default:return gO(this,e,t,n)}}toDate(e,t){return gX(this,e,t)}toString(){return gA(this)}compare(e){var t,n;let r=yt(this,e);return 0===r?(t=this,n=g1(e),yn(t)-yn(n)):r}constructor(...e){hi(this,gV,{writable:!0,value:void 0});let[t,n,r,a,o]=gM(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gx(this)}}var gH=new WeakMap;class gz{copy(){return this.era?new gz(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new gz(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return gN(this,e)}subtract(e){return gN(this,g_(e))}set(e,t){let n,r;return 0===(r=gS(gD(n=g1(this),e),e)).compare(n)?this:g4(gQ(gJ(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,a=23;if((null==r?void 0:r.hourCycle)===12){let n=e.hour>=12;t=12*!!n,a=n?23:11}let o=g1(e),i=g4(gS(o,{hour:t}),new gy),s=[gJ(i,e.timeZone,"earlier"),gJ(i,e.timeZone,"later")].filter(t=>gQ(t,e.timeZone).day===i.day)[0],l=g4(gS(o,{hour:a}),new gy),u=[gJ(l,e.timeZone,"earlier"),gJ(l,e.timeZone,"later")].filter(t=>gQ(t,e.timeZone).day===l.day).pop(),c=gK(e)-e.offset,d=Math.floor(c/36e5),p=c%36e5;return g4(gQ(c=36e5*g$(d,n,Math.floor(s/36e5),Math.floor(u/36e5),null==r?void 0:r.round)+p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return gO(e,t,n,r);case"era":case"year":case"month":case"day":return g4(gQ(gJ(gT(g1(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(gK(e)-e.offset)}toString(){var e;let t,n,r;return`${gA(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof gz){var n,r;return e.timeZone===t?e:(n=e,r=t,g4(gQ(gK(n)-n.offset,r),n.calendar))}return gQ(gJ(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}constructor(...e){hi(this,gH,{writable:!0,value:void 0});let[t,n,r,a,o]=gM(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,gx(this)}}function gK(e){return gG(gf((e=g4(e,new gy)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function gG(e,t,n,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,t-1,n),s.getTime()}function gZ(e,t){if("UTC"===t)return 0;if(e>0&&t===ya())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=gq(e,t);return gG(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let gY=new Map;function gq(e,t){let n=gY.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),gY.set(t,n));let r=n.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function gJ(e,t,n="compatible"){var r,a,o;let i=g1(e);if("UTC"===t)return gK(i);if(t===ya()&&"compatible"===n){i=g4(i,new gy);let e=new Date,t=gf(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=gK(i),l=gZ(s-864e5,t),u=gZ(s+864e5,t),c=(r=i,((a=s-l)==(o=s-u)?[a]:[a,o]).filter(e=>{var n;let a;return n=r,a=gq(e,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.second}));if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){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 gX(e,t,n="compatible"){return new Date(gJ(e,t,n))}function gQ(e,t){let n=gZ(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new gz(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function g0(e){return new gF(e.calendar,e.era,e.year,e.month,e.day)}function g1(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new gW(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function g4(e,t){if(g5(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,gx(r),r}let g2={"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 g3(e,t){return t=g4(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function g6(e,t){return g5(e.calendar,t.calendar)&&g3(e,t)}function g5(e,t){var n,r,a,o;return null!=(o=null!=(a=null==(n=e.isEqual)?void 0:n.call(e,t))?a:null==(r=t.isEqual)?void 0:r.call(t,e))?o:e.identifier===t.identifier}let g9={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function g8(e,t,n){let r,a=Math.ceil(e.calendar.toJulianDay(e)+1-(n?g9[n]:(r=function(e){if(Intl.Locale){let t=yl.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&yl.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(t))&&g2[r]||0))%7;return a<0&&(a+=7),a}function g7(e){return gQ(Date.now(),e)}function ye(e){return g0(g7(e))}function yt(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function yn(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let yr=null;function ya(){return null==yr&&(yr=new Intl.DateTimeFormat().resolvedOptions().timeZone),yr}function yo(e){return e.subtract({days:e.day-1})}function yi(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function ys(e,t,n){let r=g8(e,t,n);return e.subtract({days:r})}let yl=new Map;function yu(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function yc(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}let yd=Symbol.for("react-aria.i18n.locale"),yp=Symbol.for("react-aria.i18n.strings");class ym{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let a=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[a])return t[a];for(let e in t)if(e.startsWith(a+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[yd];if(void 0===m){let e=window[yp];if(!e)return null;for(let n in m={},e)m[n]=new ym({[t]:e[n]},t)}let n=null==m?void 0:m[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}}let yf=new Map,yh=new Map;class yg{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let a=this.locale+":"+n,o=yf.get(a);return o||(o=new Intl.PluralRules(this.locale,{type:n}),yf.set(a,o)),"function"==typeof(r=t[o.select(e)]||t.other)?r():r}number(e){let t=yh.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),yh.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}constructor(e,t){this.locale=e,this.strings=t}}let yy=new WeakMap;function yv(e,t){let n;return t&&ym.getGlobalDictionaryForPackage(t)||((n=yy.get(e))||(n=new ym(e),yy.set(e,n)),n)}function yb(e,t){let{locale:n}=gu(),r=yv(e,t);return(0,ci.useMemo)(()=>new yg(n,r),[n,r])}let yw=new Map;class yE{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 n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==yS&&(yS="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),yS&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=y_(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),a=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===a)return"h23";if(24===r&&23===a)return"h24";if(0===r&&11===a)return"h11";if(12===r&&11===a)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}constructor(e,t={}){this.formatter=y_(e,t),this.options=t}}let yx={true:{ja:"h11"},false:{}};function y_(e,t={}){if("boolean"==typeof t.hour12&&(null==yD&&(yD="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),yD)){let n=yx[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=null!=n?n:r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(yw.has(n))return yw.get(n);let r=new Intl.DateTimeFormat(e,t);return yw.set(n,r),r}let yD=null,yS=null;function yk(e,t){let n=(0,ci.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function yC(e){e=yk(null!=e?e:{},yP);let{locale:t}=gu();return(0,ci.useMemo)(()=>new yE(t,e),[t,e])}function yP(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function yR(e){return e&&e.__esModule?e.default:e}let yT=new WeakMap;function yO(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function y$(e,t,n,r){let a=yb(yR(gc),"@react-aria/calendar"),o=yO(e)||yO(t),i=yC({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n}),s=yC({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n});return(0,ci.useMemo)(()=>{if(g3(e,yo(e))){let o=e,s=t;if(e.calendar.getFormattableMonth&&(o=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),g3(t,yi(e)))return i.format(o.toDate(n));if(g3(t,yi(t)))return r?yN(i,a,o,s,n):i.formatRange(o.toDate(n),s.toDate(n))}return r?yN(s,a,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,i,s,a,n,r])}function yN(e,t,n,r,a){let o=e.formatRangeToParts(n.toDate(a),r.toDate(a)),i=-1;for(let e=0;e<o.length;e++){let t=o[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<o.length;e++)e<i?s+=o[e].value:e>i&&(l+=o[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function yj(e,t){let n=(0,ci.useRef)(!0),r=(0,ci.useRef)(null);(0,ci.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,ci.useEffect)(()=>{let a=r.current;n.current?n.current=!1:(!a||t.some((e,t)=>!Object.is(e,a[t])))&&e(),r.current=t},t)}function yI(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=fg(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),r||a||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function yA(e,t){var n,r;let a,o,i,s,l,u=yb((n=gc)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=fI(e),d=y$(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),p=y$(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);yj(()=>{t.isFocused||fR(p)},[p]);let m=(i=yb(yR(gc),"@react-aria/calendar"),"highlightedRange"in t?{start:a,end:o}=t.highlightedRange||{}:a=o=null!=(r=t.value)?r:void 0,s=yC({weekday:"long",month:"long",year:"numeric",day:"numeric",era:yO(a)||yO(o),timeZone:t.timeZone}),l="anchorDate"in t?t.anchorDate:null,(0,ci.useMemo)(()=>{if(!l&&a&&o)if(g3(a,o)){let e=s.format(a.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=yN(s,i,a,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[a,o,l,t.timeZone,i,s]));yj(()=>{m&&fR(m,"polite",4e3)},[m]);let f=fy([!!e.errorMessage,e.isInvalid,e.validationState]);yT.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:f,selectedDateDescription:m});let[h,g]=(0,ci.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(g(!1),t.setFocused(!0));let[v,b]=(0,ci.useState)(!1),w=e.isDisabled||t.isPreviousVisibleRangeInvalid();return w&&v&&(b(!1),t.setFocused(!0)),{calendarProps:fb(c,yI({id:e.id,"aria-label":[e["aria-label"],p].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:w,onFocusChange:b},errorMessageProps:{id:f},title:d}}let yM={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 yL(e){let{children:t,elementType:n="div",isFocusable:r,style:a,...o}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:n}=e,[r,a]=(0,ci.useState)(!1),{focusWithinProps:o}=hG({isDisabled:!n,onFocusWithinChange:e=>a(e)}),i=(0,ci.useMemo)(()=>r?t:t?{...yM,...t}:yM,[r]);return{visuallyHiddenProps:{...o,style:i}}}(e);return cs().createElement(n,fb(o,i),t)}function yF(e,t,n,r){let a=fa(n),o=null==n;(0,ci.useEffect)(()=>{if(o||!e.current)return;let n=e.current;return n.addEventListener(t,a,r),()=>{n.removeEventListener(t,a,r)}},[e,t,r,o,a])}let yB=0,yU=new Map;function yV(e){let[t,n]=(0,ci.useState)();return fr(()=>{if(!e)return;let t=yU.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${yB++}`;n(r);let a=document.createElement("div");a.id=r,a.style.display="none",a.textContent=e,document.body.appendChild(a),t={refCount:0,element:a},yU.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),yU.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function yW(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function yH(e,t,n){let r="left"===n?"offsetLeft":"offsetTop",a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function yz(e,t){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let t of function(e){let t=[];for(;e&&e!==document.documentElement;)yW(e,void 0)&&t.push(e),e=e.parentElement;return t}(e))!function(e,t){let n=yH(e,t,"left"),r=yH(e,t,"top"),a=t.offsetWidth,o=t.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:d,scrollPaddingBottom:p,scrollPaddingLeft:m}=getComputedStyle(e),f=i+parseInt(u,10),h=s+parseInt(l,10),g=f+e.clientWidth,y=h+e.clientHeight,v=parseInt(c,10)||0,b=parseInt(p,10)||0,w=parseInt(d,10)||0,E=parseInt(m,10)||0;n<=i+E?i=n-parseInt(u,10)-E:n+a>g-w&&(i+=n+a-g+w),r<=h+v?s=r-parseInt(l,10)-v:r+o>y-b&&(s+=r+o-y+b),e.scrollLeft=i,e.scrollTop=s}(t,e);else{var n,r,a,o;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(n=e.scrollIntoView)||n.call(e,{block:"nearest"});let{left:l,top:u}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-u)>1)&&(null==t||null==(a=t.containingElement)||null==(r=a.scrollIntoView)||r.call(a,{block:"center",inline:"center"}),null==(o=e.scrollIntoView)||o.call(e,{block:"nearest"}))}}}function yK(e,t){let n=e;for(yW(n,t)&&(n=n.parentElement);n&&!yW(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}class yG extends gy{fromJulianDay(e){let t=super.fromJulianDay(e);return new gF(this,gf(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(yZ(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(yZ(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function yZ(e){let[t,n]=gh(e.year+-543);return new gF(t,n,e.month,e.day)}function yY(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function yq(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-yY(e,n,1,1))/30),a=t+1-yY(e,n,r,1);return[n,r,a]}function yJ(e){return Math.floor(e%4/3)}function yX(e,t){return t%13!=0?30:yJ(e)+5}class yQ{fromJulianDay(e){let[t,n,r]=yq(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new gF(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),yY(1723856,t,e.month,e.day)}getDaysInMonth(e){return yX(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+yJ(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class y0 extends yQ{fromJulianDay(e){let[t,n,r]=yq(1723856,e);return new gF(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class y1 extends yQ{fromJulianDay(e){let[t,n,r]=yq(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new gF(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),yY(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),yX(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 y4=765433;function y2(e){return 7>gd(7*e+1,19)}function y3(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>gd(3*(n+1),7)&&(n+=1),n}function y6(e){let t,n;return y3(e)+(t=y3(e-1),n=y3(e),y3(e+1)-n==356?2:+(n-t==382))}function y5(e){return y6(e+1)-y6(e)}function y9(e,t){if(t>=6&&!y2(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=y5(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!y2(e):30}class y8{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/y4*19+234)/235)+1,r=y6(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=y6(--n)));let o=1,i=0;for(;i<a;)i+=y9(n,o),o++;let s=a-(i-=y9(n,--o));return new gF(this,n,o,s)}toJulianDay(e){let t=y6(e.year);for(let n=1;n<e.month;n++)t+=y9(e.year,n);return t+e.day+347997}getDaysInMonth(e){return y9(e.year,e.month)}getMonthsInYear(e){return y2(e.year)?13:12}getDaysInYear(e){return y5(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(y2(t.year)&&!y2(e.year)&&t.month>6?e.month--:!y2(t.year)&&y2(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class y7 extends gy{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-gp(a.era,a.year,1,1);if(i<80?(o--,i+=(t=gm(a.year-1)?31:30)+155+90+10):(t=gm(a.year)?31:30,i-=80),i<t)n=1,r=i+1;else{let e=i-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new gF(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=gh(e.year+78);return(gm(a)?(t=31,n=gp(r,a,3,21)):(t=30,n=gp(r,a,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&gm(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 ve(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vt(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+ve(t,r,1,1)))/29.5)+1),o=n-ve(t,r,a,1)+1;return new gF(e,r,a,o)}function vn(e){return(14+11*e)%30<11}class vr{fromJulianDay(e){return vt(this,1948440,e)}toJulianDay(e){return ve(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vn(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vn(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class va extends vr{fromJulianDay(e){return vt(this,1948439,e)}toJulianDay(e){return ve(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vo(e){return 460322+u[e-1300]}function vi(e,t){return(l[e-1300]&1<<11-(t-1))==0?29:30}function vs(e,t){let n=vo(e);for(let r=1;r<t;r++)n+=vi(e,r);return n}function vl(e){return u[e+1-1300]-u[e-1300]}class vu extends vr{fromJulianDay(e){let t=e-1948440,n=vo(1300),r=vo(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-vo(++e)+1;let a=vl(e);if(r===a){n=12;break}if(r<a){let t=vi(e,n);for(n=1;r>t;)r-=t,t=vi(e,++n);break}}return new gF(this,e,n,t-vs(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vs(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vi(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vl(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!u){u=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){u[t-1300]=e;for(let n=1;n<=12;n++)e+=vi(t,n)}}}}let vc=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],vd=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],vp=[1867,1911,1925,1988,2018],vm=["meiji","taisho","showa","heisei","reiwa"];function vf(e){let t=vc.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?vc.length-1:0===t?0:t-1}function vh(e){let t=vp[vm.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new gF(e.year+t,e.month,e.day)}class vg extends gy{fromJulianDay(e){let t=super.fromJulianDay(e),n=vf(t);return new gF(this,vm[n],t.year-vp[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(vh(e))}balanceDate(e){let t=vh(e),n=vf(t);vm[n]!==e.era&&(e.era=vm[n],e.year=t.year-vp[n]),this.constrainDate(e)}constrainDate(e){let t=vm.indexOf(e.era),n=vd[t];if(null!=n){let[r,a,o]=n,i=r-vp[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=vc[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return vm}getYearsInEra(e){let t=vm.indexOf(e.era),n=vc[t],r=vc[t+1];if(null==r)return 9999-n[0]+1;let a=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(vh(e))}getMinimumMonthInYear(e){let t=vy(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=vy(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function vy(e){if(1===e.year)return vc[vm.indexOf(e.era)]}let vv=[0,31,62,93,124,155,186,216,246,276,306,336];class vb{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-vv[a]+1;return new gF(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=vv[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>gd(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function vw(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function vE(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class vx extends gy{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=vE(gf(t.era,t.year));return new gF(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(v_(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=vE(vw(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(v_(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function v_(e){let[t,n]=gh(vw(e));return new gF(t,n,e.month,e.day)}function vD(e){switch(e){case"buddhist":return new yG;case"ethiopic":return new yQ;case"ethioaa":return new y0;case"coptic":return new y1;case"hebrew":return new y8;case"indian":return new y7;case"islamic-civil":return new vr;case"islamic-tbla":return new va;case"islamic-umalqura":return new vu;case"japanese":return new vg;case"persian":return new vb;case"roc":return new vx;default:return new gy}}function vS(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function vk(e,t,n,r,a){let o={};for(let e in t)o[e]=Math.floor(t[e]/2),o[e]>0&&t[e]%2==0&&o[e]--;let i=vC(e,t,n).subtract(o);return vR(e,i,t,n,r,a)}function vC(e,t,n,r,a){let o=e;if(t.years)o=yo(e.subtract({months:e.month-1}));else t.months?o=yo(e):t.weeks&&(o=ys(e,n));return vR(e,o,t,n,r,a)}function vP(e,t,n,r,a){let o={...t};o.days?o.days--:o.weeks?o.weeks--:o.months?o.months--:o.years&&o.years--;let i=vC(e,t,n).subtract(o);return vR(e,i,t,n,r,a)}function vR(e,t,n,r,a,o){if(a&&e.compare(a)>=0){let e=yc(t,vC(g0(a),n,r));e&&(t=e)}if(o&&0>=e.compare(o)){let e=yu(t,vP(g0(o),n,r));e&&(t=e)}return t}function vT(e,t,n){if(t){let n=yc(e,g0(t));n&&(e=n)}if(n){let t=yu(e,g0(n));t&&(e=t)}return e}function vO(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function v$(e,t,n){let[r,a]=(0,ci.useState)(e||t),o=(0,ci.useRef)(void 0!==e),i=void 0!==e;(0,ci.useEffect)(()=>{o.current,o.current=i},[i]);let s=i?e:r,l=(0,ci.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&!Object.is(s,e)&&n(e,...t),i||(s=e)};"function"==typeof e?a((n,...a)=>{let o=e(i?s:n,...a);return(r(o,...t),i)?n:o}):(i||a(e),r(e,...t))},[i,s,n]);return[s,l]}function vN(e){var t,n,r;let a=(0,ci.useMemo)(()=>new yE(e.locale),[e.locale]),o=(0,ci.useMemo)(()=>a.resolvedOptions(),[a]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:u,maxValue:c,selectionAlignment:d,isDateUnavailable:p,pageBehavior:m="visible",firstDayOfWeek:f}=e,h=(0,ci.useMemo)(()=>s(o.calendar),[s,o.calendar]),[g,y]=v$(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),v=(0,ci.useMemo)(()=>g?g4(g0(g),h):null,[g,h]),b=(0,ci.useMemo)(()=>g&&"timeZone"in g?g.timeZone:o.timeZone,[g,o.timeZone]),[w,E]=v$((0,ci.useMemo)(()=>e.focusedValue?vT(g4(g0(e.focusedValue),h),u,c):void 0,[e.focusedValue,h,u,c]),(0,ci.useMemo)(()=>vT(e.defaultFocusedValue?g4(g0(e.defaultFocusedValue),h):v||g4(ye(b),h),u,c),[e.defaultFocusedValue,v,b,h,u,c]),e.onFocusChange),[x,_]=(0,ci.useState)(()=>{switch(d){case"start":return vC(w,l,i,u,c);case"end":return vP(w,l,i,u,c);default:return vk(w,l,i,u,c)}}),[D,S]=(0,ci.useState)(e.autoFocus||!1),k=(0,ci.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,x.add(e)},[x,l]),[C,P]=(0,ci.useState)(h);if(!g5(h,C)){let e=g4(w,h);_(vk(e,l,i,u,c)),E(e),P(h)}function R(e){E(e=vT(e,u,c))}function T(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void y(null);(e=vO(e=vT(e,u,c),x,p))&&(e=g4(e,(null==g?void 0:g.calendar)||new gy),g&&"hour"in g?y(g.set(e)):y(e))}}vS(w,u,c)?E(vT(w,u,c)):0>w.compare(x)?_(vP(w,l,i,u,c)):w.compare(k)>0&&_(vC(w,l,i,u,c));let O=(0,ci.useMemo)(()=>!!v&&(!!(p&&p(v))||vS(v,u,c)),[v,p,u,c]),$=e.isInvalid||"invalid"===e.validationState||O,N=(0,ci.useMemo)(()=>"visible"===m?l:vj(l),[m,l]);return{isDisabled:null!=(n=e.isDisabled)&&n,isReadOnly:null!=(r=e.isReadOnly)&&r,value:v,setValue:T,visibleRange:{start:x,end:k},minValue:u,maxValue:c,focusedDate:w,timeZone:b,validationState:$?"invalid":null,isValueInvalid:$,setFocusedDate(e){R(e),S(!0)},focusNextDay(){R(w.add({days:1}))},focusPreviousDay(){R(w.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&R(w.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&R(w.subtract({weeks:1}))},focusNextPage(){let e=x.add(N);E(vT(w.add(N),u,c)),_(vC(vR(w,e,N,i,u,c),N,i))},focusPreviousPage(){let e=x.subtract(N);E(vT(w.subtract(N),u,c)),_(vC(vR(w,e,N,i,u,c),N,i))},focusSectionStart(){l.days?R(x):l.weeks?R(ys(w,i)):(l.months||l.years)&&R(yo(w))},focusSectionEnd(){l.days?R(k):l.weeks?R(ys(w,i,void 0).add({days:6})):(l.months||l.years)&&R(yi(w))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?R(w.add({months:1})):(l.months||l.years)&&R(w.add({years:1})):R(w.add(vj(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?R(w.subtract({months:1})):(l.months||l.years)&&R(w.subtract({years:1})):R(w.subtract(vj(l)))},selectFocusedDate(){p&&p(w)||T(w)},selectDate(e){T(e)},isFocused:D,setFocused:S,isInvalid:e=>vS(e,u,c),isSelected(e){return null!=v&&g3(e,v)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>D&&w&&g3(e,w),isCellDisabled(t){return e.isDisabled||0>t.compare(x)||t.compare(k)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=x.subtract({days:1});return g3(e,x)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=k.add({days:1});return g3(e,k)||this.isInvalid(e)},getDatesInWeek(e,t=x){let n=t.add({weeks:e}),r=[],a=g8(n=ys(n,i,f),i,f);for(let e=0;e<a;e++)r.push(null);for(;r.length<7;){r.push(n);let e=n.add({days:1});if(g3(n,e))break;n=e}for(;r.length<7;)r.push(null);return r}}}function vj(e){let t={...e};for(let n in e)t[n]=1;return t}function vI(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:g0(e),end:g0(t)}):null}function vA(e,t){return(e=g4(e,(null==t?void 0:t.calendar)||new gy),t&&"hour"in t)?t.set(e):e}function vM(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let vL=(0,ci.createContext)(null),vF=(0,ci.createContext)(null),vB=(0,ci.createContext)(null),vU=(0,ci.createContext)(null),vV=(0,ci.forwardRef)(function(e,t){[e,t]=fD(e,t,vL);let{locale:n}=gu(),r=vN({...e,locale:n,createCalendar:e.createCalendar||vD}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=yA(e,r),u=fx({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return cs().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},cs().createElement(fE,{values:[[h2,{slots:{previous:o,next:i}}],[h6,{"aria-hidden":!0,level:2,children:l}],[vB,r],[vL,e],[h5,{slots:{errorMessage:s}}]]},cs().createElement(yL,null,cs().createElement("h2",null,a["aria-label"])),u.children,cs().createElement(yL,null,cs().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),vW=(0,ci.forwardRef)(function(e,t){var n,r;let a,o,i;[e,t]=fD(e,t,vF);let{locale:s}=gu(),l=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:a,locale:o,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=v$(t,n||null,r),[p,m]=(0,ci.useState)(null),f="center";if(c&&c.start&&c.end){let e=vk(g0(c.start),i,o,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(f="start")}let h=(0,ci.useRef)(null),[g,y]=(0,ci.useState)(null),v=(0,ci.useMemo)(()=>yc(s,null==g?void 0:g.start),[s,g]),b=(0,ci.useMemo)(()=>yu(l,null==g?void 0:g.end),[l,g]),w=vN({...u,value:c&&c.start,createCalendar:a,locale:o,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:f}),E=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:vM(t,w,-1),end:vM(t,w,1)},y(h.current)):(h.current=null,y(null))},[x,_]=(0,ci.useState)(w.visibleRange);g6(w.visibleRange.start,x.start)&&g6(w.visibleRange.end,x.end)||(E(p),_(w.visibleRange));let D=e=>{e?(m(e),E(e)):(m(null),E(null))},S=p?vI(p,w.focusedDate):c&&vI(c.start,c.end),k=t=>{if(e.isReadOnly)return;let n=vO(vT(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(n)if(p){let e=vI(p,n);e&&d({start:vA(e.start,null==c?void 0:c.start),end:vA(e.end,null==c?void 0:c.end)}),D(null)}else D(n)},[C,P]=(0,ci.useState)(!1),{isDateUnavailable:R}=e,T=(0,ci.useMemo)(()=>!!c&&!p&&(!!(R&&(R(c.start)||R(c.end)))||vS(c.start,s,l)||vS(c.end,s,l)),[R,c,p,s,l]),O=e.isInvalid||"invalid"===e.validationState||T;return{...w,value:c,setValue:d,anchorDate:p,setAnchorDate:D,highlightedRange:S,validationState:O?"invalid":null,isValueInvalid:O,selectFocusedDate(){k(w.focusedDate)},selectDate:k,highlightDate(e){p&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid(e){var t,n;return w.isInvalid(e)||vS(e,null==(t=h.current)?void 0:t.start,null==(n=h.current)?void 0:n.end)},isDragging:C,setDragging:P}}({...e,locale:s,createCalendar:e.createCalendar||vD}),{calendarProps:u,prevButtonProps:c,nextButtonProps:d,errorMessageProps:p,title:m}=(n=e,r=t,a=yA(n,l),o=(0,ci.useRef)(!1),yF(i=(0,ci.useRef)("u">typeof window?window:null),"pointerdown",e=>{o.current=0===e.width&&0===e.height}),yF(i,"pointerup",e=>{if(o.current){o.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let t=e.target;r.current&&r.current.contains(document.activeElement)&&(!r.current.contains(t)||!t.closest('button, [role="button"]'))&&l.selectFocusedDate()}),a.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&r.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},yF(r,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),a),f=fx({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return cs().createElement("div",{...f,...u,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},cs().createElement(fE,{values:[[h2,{slots:{previous:c,next:d}}],[h6,{"aria-hidden":!0,level:2,children:m}],[vU,l],[vF,e],[h5,{slots:{errorMessage:p}}]]},cs().createElement(yL,null,cs().createElement("h2",null,u["aria-label"])),f.children,cs().createElement(yL,null,cs().createElement("button",{"aria-label":d["aria-label"],disabled:d.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),vH=(0,ci.createContext)(null),vz=(0,ci.forwardRef)(function(e,t){var n,r;let a=(0,ci.useContext)(vB),o=(0,ci.useContext)(vU),i=f_(vL),s=f_(vF),l=null!=a?a:o,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(n=null==i?void 0:i.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:p,weekDays:m,weeksInMonth:f}=function(e,t){let n,{startDate:r=t.visibleRange.start,endDate:a=t.visibleRange.end,firstDayOfWeek:o}=e,{direction:i}=gu(),s=y$(r,a,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=yT.get(t),c=yI({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),d=yC({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:p}=gu(),m=(0,ci.useMemo)(()=>{let e=ys(ye(t.timeZone),p,o);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return d.format(r)})},[p,t.timeZone,d,o]),f=(n=r.calendar.getDaysInMonth(r),Math.ceil((g8(yo(r),p,o)+n)/7));return{gridProps:fb(c,{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:m,weeksInMonth:f}}({startDate:u,endDate:yi(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return cs().createElement(vH.Provider,{value:{headerProps:p,weekDays:m,startDate:u,weeksInMonth:f}},cs().createElement("table",{...fI(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:cs().createElement(cs().Fragment,null,cs().createElement(vK,null,e=>cs().createElement(vG,null,e)),cs().createElement(vZ,null,e.children))))}),vK=(0,ci.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,{headerProps:o,weekDays:i}=(0,ci.useContext)(vH);return cs().createElement("thead",{...fI(e),...o,ref:t,style:r,className:a||"react-aria-CalendarGridHeader"},cs().createElement("tr",null,i.map((e,t)=>cs().cloneElement(n(e),{key:t}))))}),vG=(0,ci.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e;return cs().createElement("th",{...fI(e),ref:t,style:r,className:a||"react-aria-CalendarHeaderCell"},n)}),vZ=(0,ci.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,o=(0,ci.useContext)(vB),i=(0,ci.useContext)(vU),s=null!=o?o:i,{startDate:l,weeksInMonth:u}=(0,ci.useContext)(vH);return cs().createElement("tbody",{...fI(e),ref:t,style:r,className:a||"react-aria-CalendarGridBody"},[...Array(u).keys()].map(e=>cs().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?cs().cloneElement(n(e),{key:t}):cs().createElement("td",{key:t})))))}),vY=(0,ci.forwardRef)(function({date:e,...t},n){var r,a,o;let i=(0,ci.useContext)(vB),s=(0,ci.useContext)(vU),l=null!=i?i:s,{startDate:u}=null!=(r=(0,ci.useContext)(vH))?r:{startDate:l.visibleRange.start},c=(0,ci.useRef)(null),{cellProps:d,buttonProps:p,...m}=function(e,t,n){var r;let a,{date:o,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=yT.get(t),u=yb((r=gc)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=yC({weekday:"long",day:"numeric",month:"long",year:"numeric",era:yO(o),timeZone:t.timeZone}),d=t.isSelected(o),p=t.isCellFocused(o);i=i||t.isCellDisabled(o);let m=t.isCellUnavailable(o),f=!i&&!m,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&o.compare(t.highlightedRange.start)>=0&&0>=o.compare(t.highlightedRange.end):t.value&&g3(t.value,o));h&&(d=!0),o=yk(o,g6);let g=(0,ci.useMemo)(()=>o.toDate(t.timeZone),[o,t.timeZone]),y=g3(o,ye(t.timeZone)),v=(0,ci.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(g3(o,t.value.start)||g3(o,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&g3(o,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&g3(o,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,o,t,l]),b="";"anchorDate"in t&&p&&!t.isReadOnly&&f&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=yV(b),E=(0,ci.useRef)(!1),x=(0,ci.useRef)(!1),_=(0,ci.useRef)(void 0),{pressProps:D,isPressed:S}=hb({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(e){if(t.isReadOnly)return void t.setFocusedDate(o);if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(g3(o,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(o),t.setDragging(!0),x.current=!0;return}else if(g3(o,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(o),t.setDragging(!0),x.current=!0;return}}let n=()=>{t.setDragging(!0),_.current=void 0,t.selectDate(o),t.setFocusedDate(o),E.current=!0};"touch"===e.pointerType?_.current=setTimeout(n,200):n()}},onPressEnd(){x.current=!1,E.current=!1,clearTimeout(_.current),_.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(o),t.setFocusedDate(o))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&_.current&&(t.selectDate(o),t.setFocusedDate(o)),"anchorDate"in t))if(x.current)t.setAnchorDate(o);else if(t.anchorDate&&!E.current)t.selectDate(o),t.setFocusedDate(o);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(o),t.setFocusedDate(o));else{t.selectDate(o);let e=o.add({days:1});t.isInvalid(e)&&(e=o.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}}});i||(a=g3(o,t.focusedDate)?0:-1),(0,ci.useEffect)(()=>{p&&n.current&&(fW(n.current),"pointer"!==hk&&document.activeElement===n.current&&yz(n.current,{containingElement:yK(n.current)}))},[p,n]);let k=yC({day:"numeric",timeZone:t.timeZone,calendar:o.calendar.identifier}),C=(0,ci.useMemo)(()=>k.formatToParts(g).find(e=>"day"===e.type).value,[k,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:fb(D,{onFocus(){i||t.setFocusedDate(o)},tabIndex:a,role:"button","aria-disabled":!f||void 0,"aria-label":v,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&f&&t.highlightDate(o)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:p,isSelected:d,isDisabled:i,isUnavailable:m,isOutsideVisibleRange:0>o.compare(t.visibleRange.start)||o.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:C}}({date:e},l,c),{hoverProps:f,isHovered:h}=hQ({...t,isDisabled:m.isDisabled}),{focusProps:g,isFocusVisible:y}=hZ();y&&(y=m.isFocused);let v=(a=u,o=g4(o=e,a.calendar),a=yo(a),o=yo(o),a.era!==o.era||a.year!==o.year||a.month!==o.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=g3(e,l.highlightedRange.start),w=g3(e,l.highlightedRange.end));let E=fx({...t,defaultChildren:m.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...m}}),x={"data-focused":m.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":m.isPressed||void 0,"data-unavailable":m.isUnavailable||void 0,"data-disabled":m.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":m.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":m.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":m.isInvalid||void 0};return cs().createElement("td",{...d,ref:n},cs().createElement("div",{...fb(fI(t),p,g,f,x,E),ref:c}))}),vq=(0,ci.createContext)({}),vJ=(0,ci.forwardRef)(function(e,t){var n,r;[e,t]=fD(e,t,vq);let{isDisabled:a,isInvalid:o,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=hQ({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:a}),{isFocused:p,isFocusVisible:m,focusProps:f}=hZ({within:!0});null!=a||(a=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=fx({...e,values:{isHovered:d,isFocusWithin:p,isFocusVisible:m,isDisabled:a,isInvalid:o},defaultClassName:"react-aria-Group"});return cs().createElement("div",{...fb(u,f,c),...h,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":p||void 0,"data-hovered":d||void 0,"data-focus-visible":m||void 0,"data-disabled":a||void 0,"data-invalid":o||void 0},h.children)}),vX=(0,ci.createContext)({}),vQ=h1(function(e,t){[e,t]=fD(e,t,vX);let{hoverProps:n,isHovered:r}=hQ(e),{isFocused:a,isFocusVisible:o,focusProps:i}=hZ({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=fx({...e,values:{isHovered:r,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return cs().createElement("input",{...fb((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...a}=e;return a})(e),i,n),...l,ref:t,"data-focused":a||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":s||void 0})});var v0={};v0={"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:"Anfangsdatum",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 v1=cs().createContext(null),v4="react-aria-focus-scope-restore",v2=null;function v3(e){var t,n,r,a,o,i,s,l,u,c;let d,p,m,f,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,ci.useRef)(null),w=(0,ci.useRef)(null),E=(0,ci.useRef)([]),{parentNode:x}=(0,ci.useContext)(v1)||{},_=(0,ci.useMemo)(()=>new bu({scopeRef:E}),[E]);fr(()=>{let e=x||bc.root;if(bc.getTreeNode(e.scopeRef)&&v2&&!v7(v2,e.scopeRef)){let t=bc.getTreeNode(v2);t&&(e=t)}e.addChild(_),bc.addNode(_)},[_,x]),fr(()=>{let e=bc.getTreeNode(E);e&&(e.contain=!!g)},[g]),fr(()=>{var e;let t=null==(e=b.current)?void 0:e.nextSibling,n=[],r=e=>e.stopPropagation();for(;t&&t!==w.current;)n.push(t),t.addEventListener(v4,r),t=t.nextSibling;return E.current=n,()=>{for(let e of n)e.removeEventListener(v4,r)}},[h]),fr(()=>{if(n||r)return;let e=t.current,a=fU(e?e[0]:void 0),o=e=>{let n=hd(e);v9(n,t.current)?v2=t:v8(n)||(v2=null)};return a.addEventListener("focusin",o,!1),null==e||e.forEach(e=>e.addEventListener("focusin",o,!1)),()=>{a.removeEventListener("focusin",o,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",o,!1))}},[t=E,n=y,r=g]),a=E,o=g,d=(0,ci.useRef)(void 0),p=(0,ci.useRef)(void 0),fr(()=>{let e=a.current;if(!o){p.current&&(cancelAnimationFrame(p.current),p.current=void 0);return}let t=fU(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!v5(a)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=a.current;if(!r||!v9(n,r))return;let o=bo(v6(r),{tabbable:!0},r);if(!n)return;o.currentNode=n;let i=e.shiftKey?o.previousNode():o.nextNode();i||(o.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,i=e.shiftKey?o.previousNode():o.nextNode()),e.preventDefault(),i&&be(i,!0)},r=e=>{(!v2||v7(v2,a))&&v9(hd(e),a.current)?(v2=a,d.current=hd(e)):v5(a)&&!v8(hd(e),a)?d.current?d.current.focus():v2&&v2.current&&bn(v2.current):v5(a)&&(d.current=hd(e))},i=e=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{let n=hk,r=("virtual"===n||null===n)&&f3()&&f2(),o=((e=document)=>e.activeElement)(t);if(!r&&o&&v5(a)&&!v8(o,a)){v2=a;let t=hd(e);if(t&&t.isConnected){var i;d.current=t,null==(i=d.current)||i.focus()}else v2.current&&bn(v2.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[a,o]),fr(()=>()=>{p.current&&cancelAnimationFrame(p.current)},[p]),i=E,s=y,l=g,m=(0,ci.useRef)("u">typeof document?((e=document)=>e.activeElement)(fU(i.current?i.current[0]:void 0)):null),fr(()=>{let e=i.current,t=fU(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!v2||v7(v2,i))&&v9(((e=document)=>e.activeElement)(t),i.current)&&(v2=i)};return t.addEventListener("focusin",n,!1),null==e||e.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",n,!1))}},[i,l]),fr(()=>{let e=fU(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!v5(i)||t.isComposing)return;let n=e.activeElement;if(!v8(n,i)||!br(i))return;let r=bc.getTreeNode(i);if(!r)return;let a=r.nodeToRestore,o=bo(e.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if(a&&a.isConnected&&a!==e.body||(a=void 0,r.nodeToRestore=void 0),(!s||!v8(s,i))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(v8(s,i));(t.preventDefault(),t.stopPropagation(),s)?be(s,!0):v8(a)?be(a,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),fr(()=>{var e;let t=fU(i.current?i.current[0]:void 0);if(!s)return;let n=bc.getTreeNode(i);if(n)return n.nodeToRestore=null!=(e=m.current)?e:void 0,()=>{let e=bc.getTreeNode(i);if(!e)return;let n=e.nodeToRestore,r=((e=document)=>e.activeElement)(t);if(s&&n&&(r&&v8(r,i)||r===t.body&&br(i))){let e=bc.clone();requestAnimationFrame(()=>{if(t.activeElement===t.body){let t=e.getTreeNode(i);for(;t;){if(t.nodeToRestore&&t.nodeToRestore.isConnected)return void ba(t.nodeToRestore);t=t.parent}for(t=e.getTreeNode(i);t;){if(t.scopeRef&&t.scopeRef.current&&bc.getTreeNode(t.scopeRef))return void ba(bt(t.scopeRef.current,!0));t=t.parent}}})}}},[i,s]),u=E,c=v,f=cs().useRef(c),(0,ci.useEffect)(()=>{f.current&&(v2=u,!v9(((e=document)=>e.activeElement)(fU(u.current?u.current[0]:void 0)),v2.current)&&u.current&&bn(u.current)),f.current=!1},[u]),(0,ci.useEffect)(()=>{let e=((e=document)=>e.activeElement)(fU(E.current?E.current[0]:void 0)),t=null;if(v9(e,E.current)){for(let n of bc.traverse())n.scopeRef&&v9(e,n.scopeRef.current)&&(t=n);t===bc.getTreeNode(E)&&(v2=t.scopeRef)}},[E]),fr(()=>()=>{var e,t,n;let r=null!=(n=null==(t=bc.getTreeNode(E))||null==(e=t.parent)?void 0:e.scopeRef)?n:null;(E===v2||v7(E,v2))&&(!r||bc.getTreeNode(r))&&(v2=r),bc.removeTreeNode(E)},[E]);let D=(0,ci.useMemo)(()=>{var e;return e=E,{focusNext(t={}){var n;let r=e.current,{from:a,tabbable:o,wrap:i,accept:s}=t,l=a||((e=document)=>e.activeElement)(fU(null!=(n=r[0])?n:void 0)),u=r[0].previousElementSibling,c=bo(v6(r),{tabbable:o,accept:s},r);c.currentNode=v9(l,r)?l:u;let d=c.nextNode();return!d&&i&&(c.currentNode=u,d=c.nextNode()),d&&be(d,!0),d},focusPrevious(t={}){var n;let r=e.current,{from:a,tabbable:o,wrap:i,accept:s}=t,l=a||((e=document)=>e.activeElement)(fU(null!=(n=r[0])?n:void 0)),u=r[r.length-1].nextElementSibling,c=bo(v6(r),{tabbable:o,accept:s},r);c.currentNode=v9(l,r)?l:u;let d=c.previousNode();return!d&&i&&(c.currentNode=u,d=c.previousNode()),d&&be(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=bo(v6(n),{tabbable:r,accept:a},n);o.currentNode=n[0].previousElementSibling;let i=o.nextNode();return i&&be(i,!0),i},focusLast(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=bo(v6(n),{tabbable:r,accept:a},n);o.currentNode=n[n.length-1].nextElementSibling;let i=o.previousNode();return i&&be(i,!0),i}}},[]),S=(0,ci.useMemo)(()=>({focusManager:D,parentNode:_}),[_,D]);return cs().createElement(v1.Provider,{value:S},cs().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,cs().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function v6(e){return e[0].parentElement}function v5(e){let t=bc.getTreeNode(v2);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function v9(e,t){return!!e&&!!t&&t.some(t=>t.contains(e))}function v8(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of bc.traverse(bc.getTreeNode(t)))if(n&&v9(e,n.current))return!0;return!1}function v7(e,t){var n;let r=null==(n=bc.getTreeNode(t))?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function be(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{hV(e)}catch{}}function bt(e,t=!0){let n=e[0].previousElementSibling,r=v6(e),a=bo(r,{tabbable:t},e);a.currentNode=n;let o=a.nextNode();return t&&!o&&((a=bo(r=v6(e),{tabbable:!1},e)).currentNode=n,o=a.nextNode()),o}function bn(e,t=!0){be(bt(e,t))}function br(e){let t=bc.getTreeNode(v2);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(null==t?void 0:t.scopeRef)===e}function ba(e){e.dispatchEvent(new CustomEvent(v4,{bubbles:!0,cancelable:!0}))&&be(e)}function bo(e,t,n){var r,a,o;let i=(null==t?void 0:t.tabbable)?fB:fF,s=fU((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(r=e||s,a=NodeFilter.SHOW_ELEMENT,o={acceptNode(e){var r;return(null==t||null==(r=t.from)?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(t,n){return"#comment"!==t.nodeName&&function(e){let t=fV(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a="none"!==n&&"hidden"!==r&&"collapse"!==r;if(a){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);a="none"!==n&&"hidden"!==r&&"collapse"!==r}return a}(t)&&!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==t.nodeName||!n||"SUMMARY"===n.nodeName||t.hasAttribute("open"))&&(!t.parentElement||e(t.parentElement,t))}(e)&&(!n||v9(e,n))&&(!(null==t?void 0:t.accept)||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(r,a,o));return(null==t?void 0:t.from)&&(l.currentNode=t.from),l}function bi(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(fU(r)),u=bo(r,{tabbable:o,accept:s});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=r,c=u.nextNode()),c&&be(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(fU(r)),u=bo(r,{tabbable:o,accept:s});if(r.contains(l))u.currentNode=l;else{let e=bs(u);return e&&be(e,!0),null!=e?e:null}let c=u.previousNode();if(!c&&i){u.currentNode=r;let e=bs(u);if(!e)return null;c=e}return c&&be(c,!0),null!=c?c:null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=bo(r,{tabbable:a,accept:o}).nextNode();return i&&be(i,!0),i},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=bs(bo(r,{tabbable:a,accept:o}));return i&&be(i,!0),null!=i?i:null}}}function bs(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class bl{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(null!=t?t:null);if(!r)return;let a=new bu({scopeRef:e});r.addChild(a),a.parent=r,this.fastMap.set(e,a),n&&(a.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&v9(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.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(){var e,t;let n=new bl;for(let r of this.traverse())n.addTreeNode(r.scopeRef,null!=(t=null==(e=r.parent)?void 0:e.scopeRef)?t:null,r.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new bu({scopeRef:null}),this.fastMap.set(null,this.root)}}class bu{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let bc=new bl;function bd(e,t,n){let{direction:r}=gu(),a=(0,ci.useMemo)(()=>bi(t),[t]),o=()=>{var e;if(!t.current)return;let n=null==(e=window.event)?void 0:e.target,r=bo(t.current,{tabbable:!0});if(n&&(r.currentNode=n,n=r.previousNode()),!n){let e;do(e=r.lastChild())&&(n=e);while(e)}for(;null==n?void 0:n.hasAttribute("data-placeholder");){let e=r.previousNode();if(e&&e.hasAttribute("data-placeholder"))n=e;else break}n&&n.focus()},{pressProps:i}=hb({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&o()},onPress(e){"mouse"!==e.pointerType&&o()}});return fb(i,{onKeyDown:o=>{if(o.currentTarget.contains(o.target)&&(o.altKey&&("ArrowDown"===o.key||"ArrowUp"===o.key)&&"setOpen"in e&&(o.preventDefault(),o.stopPropagation(),e.setOpen(!0)),!n))switch(o.key){case"ArrowLeft":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=o.target,n=bp(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else a.focusPrevious();break;case"ArrowRight":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=o.target,n=bp(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else a.focusNext()}}})}function bp(e,t,n){let r=bo(e,{tabbable:!0}),a=r.nextNode(),o=null,i=1/0;for(;a;){let e=a.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<i&&(o=a,i=s),a=r.nextNode()}return o}function bm(e,t,n){let r=(0,ci.useRef)(t),a=fa(()=>{n&&n(r.current)});(0,ci.useEffect)(()=>{var t;let n=null==e||null==(t=e.current)?void 0:t.form;return null==n||n.addEventListener("reset",a),()=>{null==n||n.removeEventListener("reset",a)}},[e,a])}function bf(e){let{description:t,errorMessage:n,isInvalid:r,validationState:a}=e,{labelProps:o,fieldProps:i}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":a,labelElementType:o="label"}=e;t=fg(t);let i=fg(),s={};return n&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===o?t:void 0}),{labelProps:s,fieldProps:yI({id:t,"aria-label":a,"aria-labelledby":r})}}(e),s=fy([!!t,!!n,r,a]),l=fy([!!t,!!n,r,a]);return{labelProps:o,fieldProps:i=fb(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function bh(e,t,n){let{validationBehavior:r,focus:a}=e;fr(()=>{if("native"===r&&(null==n?void 0:n.current)&&!n.current.disabled){var e;let r,a=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(a),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let o=fa(()=>{t.resetValidation()}),i=fa(e=>{var r,o;t.displayValidation.isInvalid||t.commitValidation();let i=null==n||null==(r=n.current)?void 0:r.form;!e.defaultPrevented&&n&&i&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}(i)===n.current&&(a?a():null==(o=n.current)||o.focus(),hk="keyboard",h$("keyboard",null)),e.preventDefault()}),s=fa(()=>{t.commitValidation()});(0,ci.useEffect)(()=>{let e=null==n?void 0:n.current;if(!e)return;let t=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==t||t.addEventListener("reset",o),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==t||t.removeEventListener("reset",o)}},[n,i,s,o,r])}let bg=new WeakMap,by="__role_"+Date.now(),bv="__focusManager_"+Date.now();function bb(e,t,n){var r,a;let o,{isInvalid:i,validationErrors:s,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:p}=bf({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),m=(0,ci.useRef)(null),{focusWithinProps:f}=hG({...e,onFocusWithin(n){var r;m.current=t.value,null==(r=e.onFocus)||r.call(e,n)},onBlurWithin:n=>{var r;t.confirmPlaceholder(),t.value!==m.current&&t.commitValidation(),null==(r=e.onBlur)||r.call(e,n)},onFocusWithinChange:e.onFocusChange}),h=yb((a=v0)&&a.__esModule?a.default:a,"@react-aria/datepicker"),g="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",v=yV(t.value?h.format(g,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[by]?c["aria-describedby"]:[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,w=e[bv],E=(0,ci.useMemo)(()=>w||bi(n),[w,n]),x=bd(t,n,"presentation"===e[by]);bg.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:E});let _=(0,ci.useRef)(e.autoFocus);o="presentation"===e[by]?{role:"presentation"}:fb(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,ci.useEffect)(()=>{_.current&&E.focusFirst(),_.current=!1},[E]),bm(e.inputRef,t.value,t.setValue),bh({...e,focus(){E.focusFirst()}},t,e.inputRef);let D={type:"hidden",name:e.name,value:(null==(r=t.value)?void 0:r.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(D.type="text",D.hidden=!0,D.required=e.isRequired,D.onChange=()=>{});let S=fI(e);return{labelProps:{...u,onClick:()=>{E.focusFirst()}},fieldProps:fb(S,o,x,f,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:D,descriptionProps:d,errorMessageProps:p,isInvalid:i,validationErrors:s,validationDetails:l}}var bw={};bw={"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 Anfangsdatum 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{C0C1}\u{C774}\u{C5B4}\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 bE={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bx={...bE,customError:!0,valid:!1},b_={isInvalid:!1,validationDetails:bE,validationErrors:[]},bD=(0,ci.createContext)({}),bS="__formValidationState"+Date.now();function bk(e){if(e[bS]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}=e[bS];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}}return function(e){let{isInvalid:t,validationState:n,name:r,value:a,builtinValidation:o,validate:i,validationBehavior:s="aria"}=e;n&&(t||(t="invalid"===n));let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:bx}:null,u=(0,ci.useMemo)(()=>i&&null!=a?bP(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return bC(n)}return[]}(i,a)):null,[i,a]);(null==o?void 0:o.validationDetails.valid)&&(o=void 0);let c=(0,ci.useContext)(bD),d=(0,ci.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>bC(c[e])):bC(c[r]):[],[c,r]),[p,m]=(0,ci.useState)(c),[f,h]=(0,ci.useState)(!1);c!==p&&(m(c),h(!1));let g=(0,ci.useMemo)(()=>bP(f?[]:d),[f,d]),y=(0,ci.useRef)(b_),[v,b]=(0,ci.useState)(b_),w=(0,ci.useRef)(b_),[E,x]=(0,ci.useState)(!1);return(0,ci.useEffect)(()=>{if(!E)return;x(!1);let e=u||o||y.current;bR(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||o||b_,displayValidation:"native"===s?l||g||v:l||g||u||o||v,updateValidation(e){"aria"!==s||bR(v,e)?y.current=e:b(e)},resetValidation(){bR(b_,w.current)||(w.current=b_,b(b_)),"native"===s&&x(!1),h(!0)},commitValidation(){"native"===s&&x(!0),h(!0)}}}(e)}function bC(e){return e?Array.isArray(e)?e:[e]:[]}function bP(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:bx}:null}function bR(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function bT(...e){let t=new Set,n=!1,r={...bE};for(let a of e){for(let e of a.validationErrors)t.add(e);for(let e in n||(n=a.isInvalid),r)r[e]||(r[e]=a.validationDetails[e])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let bO=new ym((en=bw)&&en.__esModule?en.default:en);function b$(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function bN(e,t,n,r,a){let o=null!=e&&null!=n&&e.compare(n)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&(null==r?void 0:r(e))||!1,l=o||i||s,u=[];if(l){let e=b$(),r=new yg(e,ym.getGlobalDictionaryForPackage("@react-stately/datepicker")||bO),l=new yE(e,bA({},a)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),o&&null!=n&&u.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(c))})),s&&u.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:o,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let bj={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},bI={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function bA(e,t){var n;e={...t.shouldForceLeadingZeros?bI:bj,...e};let r=t.granularity||"minute",a=Object.keys(e),o=a.indexOf(null!=(n=t.maxGranularity)?n:"year");o<0&&(o=0);let i=a.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let s=a.slice(o,i+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(s.hour12=12===t.hourCycle),s.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(s.timeZoneName="short"),t.showEra&&0===o&&(s.era="short"),s}function bM(e){return e&&"hour"in e?e:new gU}function bL(e,t){return null===e?null:e?g4(e,t):void 0}function bF(e,t,n,r){if(e)return bL(e,n);let a=g4(g7(null!=r?r:ya()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?g0(a):r?a:g1(a)}function bB(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[a,o]=(0,ci.useState)([r,n]);return e&&(a[0]!==r||a[1]!==n)&&o([r,n]),t||(t=e?r:a[0]),[t,e?n:a[1]]}let bU=new ym({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"},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"},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"),bV={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},bW={year:5,month:2,day:7,hour:2,minute:15,second:15},bH={dayperiod:"dayPeriod"};function bz(e){var t,n;let{locale:r,createCalendar:a,hideTimeZone:o,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:u,maxValue:c,isDateUnavailable:d}=e,p=e.value||e.defaultValue||e.placeholderValue||null,[m,f]=bB(p,e.granularity),h=f||"UTC";if(p&&!(m in p))throw Error("Invalid granularity "+m+" for value "+p.toString());let g=(0,ci.useMemo)(()=>new yE(r),[r]),y=(0,ci.useMemo)(()=>a(g.resolvedOptions().calendar),[a,g]),[v,b]=v$(e.value,null!=(t=e.defaultValue)?t:null,e.onChange),w=(0,ci.useMemo)(()=>{var e;return null!=(e=bL(v,y))?e:null},[v,y]),[E,x]=(0,ci.useState)(()=>bF(e.placeholderValue,m,y,f)),_="gregory"===y.identifier&&"BC"===(w||E).era,D=(0,ci.useMemo)(()=>{var t;return{granularity:m,maxGranularity:null!=(t=e.maxGranularity)?t:"year",timeZone:f,hideTimeZone:o,hourCycle:e.hourCycle,showEra:_,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,m,e.hourCycle,e.shouldForceLeadingZeros,f,o,_]),S=(0,ci.useMemo)(()=>bA({},D),[D]),k=(0,ci.useMemo)(()=>new yE(r,S),[r,S]),C=(0,ci.useMemo)(()=>k.resolvedOptions(),[k]),P=(0,ci.useMemo)(()=>k.formatToParts(new Date).filter(e=>bV[e.type]).reduce((e,t)=>(e[t.type]=!0,e),{}),[k]),[R,T]=(0,ci.useState)(()=>e.value||e.defaultValue?{...P}:{}),O=(0,ci.useRef)(null),$=(0,ci.useRef)(y);(0,ci.useEffect)(()=>{g5(y,$.current)||($.current=y,x(t=>Object.keys(R).length>0?g4(t,y):bF(e.placeholderValue,m,y,f)))},[y,m,R,f,e.placeholderValue]),v&&Object.keys(R).length<Object.keys(P).length&&T(R={...P}),null==v&&Object.keys(R).length===Object.keys(P).length&&(T(R={}),x(bF(e.placeholderValue,m,y,f)));let N=w&&Object.keys(R).length>=Object.keys(P).length?w:E,j=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(R),r=Object.keys(P);null==t?(b(null),x(bF(e.placeholderValue,m,y,f)),T({})):n.length>=r.length||n.length===r.length-1&&P.dayPeriod&&!R.dayPeriod&&"dayPeriod"!==O.current?b(t=g4(t,(null==p?void 0:p.calendar)||new gy)):x(t),O.current=null},I=(0,ci.useMemo)(()=>N.toDate(h),[N,h]),A=(0,ci.useMemo)(()=>(function(e,t,n,r,a,o,i,s){let l=["hour","minute","second"],u=n.formatToParts(e),c=[];for(let e of u){var d,p;let n=bV[e.type];"era"===e.type&&1===o.getEras().length&&(n=!1);let u=bV[e.type]&&!t[e.type],m=bV[e.type]?(d=e.type,p=e.value,"era"===d||"dayPeriod"===d?p:"year"===d||"month"===d||"day"===d?bU.getStringForLocale(d,i):"––"):null,f={type:bH[e.type]||e.type,text:u?m:e.value,...bK(a,e.type,r),isPlaceholder:u,placeholder:m,isEditable:n};"hour"===e.type?(c.push({type:"literal",text:"",...bK(a,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1}),c.push(f),e.type===s&&c.push({type:"literal",text:"",...bK(a,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(c.push(f),c.push({type:"literal",text:"",...bK(a,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):c.push(f)}return c})(I,R,k,C,N,y,r,m),[I,R,k,C,N,y,r,m]);P.era&&R.year&&!R.era?(R.era=!0,T({...R})):!P.era&&R.era&&(delete R.era,T({...R}));let M=e=>{R[e]=!0,"year"===e&&P.era&&(R.era=!0),T({...R})},L=(e,t)=>{if(R[e])j(function(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:"year"===t})}if("hour"in e)switch(t){case"dayPeriod":{let t=e.hour;return e.set({hour:t>=12?t-12:t+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:"hour"!==t,hourCycle:r.hour12?12:24})}throw Error("Unknown segment: "+t)}(N,e,t,C));else{M(e);let t=Object.keys(R),n=Object.keys(P);(t.length>=n.length||t.length===n.length-1&&P.dayPeriod&&!R.dayPeriod)&&j(N)}},F=(0,ci.useMemo)(()=>bN(v,u,c,d,D),[v,u,c,d,D]),B=bk({...e,value:v,builtinValidation:F}),U=B.displayValidation.isInvalid,V=e.validationState||(U?"invalid":null);return{...B,value:w,dateValue:I,calendar:y,setValue:j,segments:A,dateFormatter:k,validationState:V,isInvalid:U,granularity:m,maxGranularity:null!=(n=e.maxGranularity)?n:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,bW[e]||1)},decrementPage(e){L(e,-(bW[e]||1))},setSegment(e,t){M(e),j(function(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e&&"number"==typeof n)switch(t){case"dayPeriod":{let t=e.hour,r=t>=12;if(n>=12===r)return e;return e.set({hour:r?t-12:t+12})}case"hour":if(r.hour12){let t=e.hour>=12;t||12!==n||(n=0),t&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}throw Error("Unknown segment: "+t)}(N,e,t,C))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(R),n=Object.keys(P);t.length===n.length-1&&P.dayPeriod&&!R.dayPeriod&&(T(R={...P}),j(N.copy()))},clearSegment(t){delete R[t],O.current=t,T({...R});let n=bF(e.placeholderValue,m,y,f),r=N;if("dayPeriod"===t&&"hour"in N&&"hour"in n){let e=N.hour>=12,t=n.hour>=12;e&&!t?r=N.set({hour:N.hour-12}):!e&&t&&(r=N.set({hour:N.hour+12}))}else"hour"===t&&"hour"in N&&N.hour>=12&&R.dayPeriod?r=N.set({hour:n.hour+12}):t in N&&(r=N.set({[t]:n[t]}));b(null),j(r)},formatValue:e=>w?new yE(r,bA(e,D)).format(I):"",getDateFormatter:(e,t)=>new yE(e,bA({},{...D,...t}))}}function bK(e,t,n){switch(t){case"era":{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(n.hour12){let t=e.hour>=12;return{value:e.hour,minValue:12*!!t,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let bG=(0,ci.createContext)(null),bZ=(0,ci.createContext)(null),bY=(0,ci.createContext)(null),bq=(0,ci.forwardRef)(function(e,t){let n=(0,ci.useContext)(bZ),r=(0,ci.useContext)(bY);return n||r?cs().createElement(bX,{...e,ref:t}):cs().createElement(bJ,{...e,ref:t})}),bJ=(0,ci.forwardRef)((e,t)=>{let[n,r]=fD({slot:e.slot},t,bG),{locale:a}=gu(),o=bz({...n,locale:a,createCalendar:vD}),i=(0,ci.useRef)(null),{fieldProps:s,inputProps:l}=bb({...n,inputRef:i},o,r);return cs().createElement(fE,{values:[[bZ,o],[vX,{...l,ref:i}],[vq,{...s,ref:r,isInvalid:o.isInvalid,isDisabled:o.isDisabled}]]},cs().createElement(bX,e))}),bX=(0,ci.forwardRef)((e,t)=>{let{className:n,children:r}=e,a=(0,ci.useContext)(bZ),o=(0,ci.useContext)(bY),i=null!=a?a:o;return cs().createElement(cs().Fragment,null,cs().createElement(vJ,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,t)=>(0,ci.cloneElement)(r(e),{key:t}))),cs().createElement(vQ,null))}),bQ=(0,ci.createContext)({});function b0({children:e}){let t=(0,ci.useMemo)(()=>({register:()=>{}}),[]);return cs().createElement(ha.Provider,{value:t},e)}cs().forwardRef(({children:e,...t},n)=>{let r=(0,ci.useRef)(!1),a=(0,ci.useContext)(ha);n=ft(n||(null==a?void 0:a.ref));let o=fb(a||{},{...t,ref:n,register(){r.current=!0,a&&a.register()}});return hl(a,n),(0,ci.useEffect)(()=>{r.current||(r.current=!0)},[]),cs().createElement(ha.Provider,{value:o},e)});let b1=cs().createContext(null);function b4(e){var t;let n=fm(),{portalContainer:r=n?null:document.body,isExiting:a}=e,[o,i]=(0,ci.useState)(!1),s=(0,ci.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:l}=null!=(t=(0,ci.useContext)(bQ))?t:{};if(!e.portalContainer&&l&&(r=l()),!r)return null;let u=e.children;return e.disableFocusManagement||(u=cs().createElement(v3,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!a},u)),u=cs().createElement(b1.Provider,{value:s},cs().createElement(b0,null,u)),hh().createPortal(u,r)}let b2=(0,ci.createContext)(null),b3=(0,ci.createContext)(null),b6=(0,ci.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=fD(e,t,b2);let{dialogProps:r,titleProps:a}=function(e,t){let n,r,{role:a="dialog"}=e,o=fy();o=e["aria-label"]?void 0:o;let i=(0,ci.useRef)(!1);return(0,ci.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){hV(t.current);let e=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),hV(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),fr(()=>{null==r||r(!0)},[r=null==(n=(0,ci.useContext)(b1))?void 0:n.setContain]),{dialogProps:{...fI(e,{labelable:!0}),role:a,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||o,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:o}}}({...e,"aria-labelledby":n},t),o=(0,ci.useContext)(b3);r["aria-label"]||r["aria-labelledby"]||e["aria-labelledby"]&&(r["aria-labelledby"]=e["aria-labelledby"]);let i=fx({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==o?void 0:o.close)||(()=>{})}});return cs().createElement("section",{...fI(e),...r,...i,ref:t,slot:e.slot||void 0},cs().createElement(fE,{values:[[h6,{slots:{[fw]:{},title:{...a,level:2}}}],[h2,{slots:{[fw]:{},close:{onPress:()=>null==o?void 0:o.close()}}}]]},i.children))}),b5=(0,ci.createContext)(null),b9=(0,ci.forwardRef)(function(e,t){let n=(0,ci.useContext)(b5);return(null==n?void 0:n.isInvalid)?cs().createElement(b8,{...e,ref:t}):null}),b8=(0,ci.forwardRef)((e,t)=>{let n=(0,ci.useContext)(b5),r=fI(e),a=fx({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==a.children?null:cs().createElement(h9,{slot:"errorMessage",...r,...a,ref:t})}),b7=(0,ci.createContext)(null),we=(0,ci.createContext)({}),wt=h1(function(e,t){[e,t]=fD(e,t,we);let{elementType:n="label",...r}=e;return cs().createElement(n,{className:"react-aria-Label",...r,ref:t})}),wn=(0,ci.createContext)({placement:"bottom"}),wr=new WeakMap,wa=[];function wo(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function wi(e,t){let n=e,r=t.toString(),a=r.indexOf("."),o=a>=0?r.length-a:0;if(o>0){let e=Math.pow(10,o);n=Math.round(n*e)/e}return n}function ws(e,t,n,r){t=Number(t),n=Number(n);let a=(e-(isNaN(t)?0:t))%r,o=wi(2*Math.abs(a)>=r?e+Math.sign(a)*(r-Math.abs(a)):e-a,r);return isNaN(t)?!isNaN(n)&&o>n&&(o=Math.floor(wi(n/r,r))*r):o<t?o=t:!isNaN(n)&&o>n&&(o=t+Math.floor(wi((n-t)/r,r))*r),o=wi(o,r)}let wl={top:"top",bottom:"top",left:"left",right:"left"},wu={top:"bottom",bottom:"top",left:"right",right:"left"},wc={top:"left",left:"top"},wd={top:"height",left:"width"},wp={width:"totalWidth",height:"totalHeight"},wm={},wf="u">typeof document?window.visualViewport:null;function wh(e){var t,n,r,a,o;let i=0,s=0,l=0,u=0,c=0,d=0,p={},m=(null!=(t=null==wf?void 0:wf.scale)?t:1)>1;if("BODY"===e.tagName){let t=document.documentElement;l=t.clientWidth,u=t.clientHeight,i=null!=(n=null==wf?void 0:wf.width)?n:l,s=null!=(r=null==wf?void 0:wf.height)?r:u,p.top=t.scrollTop||e.scrollTop,p.left=t.scrollLeft||e.scrollLeft,wf&&(c=wf.offsetTop,d=wf.offsetLeft)}else({width:i,height:s,top:c,left:d}=ww(e)),p.top=e.scrollTop,p.left=e.scrollLeft,l=i,u=s;return f4()&&("BODY"===e.tagName||"HTML"===e.tagName)&&m&&(p.top=0,p.left=0,c=null!=(a=null==wf?void 0:wf.pageTop)?a:0,d=null!=(o=null==wf?void 0:wf.pageLeft)?o:0),{width:i,height:s,totalWidth:l,totalHeight:u,scroll:p,top:c,left:d}}function wg(e,t,n,r,a,o,i){var s;let l=null!=(s=a.scroll[e])?s:0,u=r[wd[e]],c=r.scroll[wl[e]]+o,d=u+r.scroll[wl[e]]-o,p=t-l+i[e]-r[wl[e]],m=t-l+n+i[e]-r[wl[e]];return p<c?c-p:m>d?Math.max(d-m,c-p):0}function wy(e){if(wm[e])return wm[e];let[t,n]=e.split(" "),r=wl[t]||"right",a=wc[r];wl[n]||(n="center");let o=wd[r],i=wd[a];return wm[e]={placement:t,crossPlacement:n,axis:r,crossAxis:a,size:o,crossSize:i},wm[e]}function wv(e,t,n,r,a,o,i,s,l,u){var c,d,p,m,f;let{placement:h,crossPlacement:g,axis:y,crossAxis:v,size:b,crossSize:w}=r,E={};E[v]=null!=(c=e[v])?c:0,"center"===g?E[v]+=((null!=(d=e[w])?d:0)-(null!=(p=n[w])?p:0))/2:g!==v&&(E[v]+=(null!=(m=e[w])?m:0)-(null!=(f=n[w])?f:0)),E[v]+=o;let x=e[v]-n[w]+l+u,_=e[v]+e[w]-l-u;if(E[v]=wo(E[v],x,_),h===y){let n=s?i[b]:t[wp[b]];E[wu[y]]=Math.floor(n-e[y]+a)}else E[y]=Math.floor(e[y]+e[b]+a);return E}function wb(e,t,n,r,a,o){var i,s,l;let{placement:u,axis:c,size:d}=o;return u===c?Math.max(0,n[c]-e[c]-(null!=(i=e.scroll[c])?i:0)+t[c]-(null!=(s=r[c])?s:0)-r[wu[c]]-a):Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-n[c]-n[d]-(null!=(l=r[c])?l:0)-r[wu[c]]-a)}function ww(e){let{top:t,left:n,width:r,height:a}=e.getBoundingClientRect(),{scrollTop:o,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+o-s,left:n+i-l,width:r,height:a}}function wE(e,t){let n,r=window.getComputedStyle(e);if("fixed"===r.position){let{top:t,left:r,width:a,height:o}=e.getBoundingClientRect();n={top:t,left:r,width:a,height:o}}else{n=ww(e);let r=ww(t),a=window.getComputedStyle(t);r.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=r.top,n.left-=r.left}return n.top-=parseInt(r.marginTop,10)||0,n.left-=parseInt(r.marginLeft,10)||0,n}function wx(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 w_=new WeakMap;function wD(e){let{ref:t,box:n,onResize:r}=e;(0,ci.useEffect)(()=>{let e=null==t?void 0:t.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[r,t,n])}let wS="u">typeof document?window.visualViewport:null;function wk(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let wC=[],wP="u">typeof document&&window.visualViewport,wR=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),wT=0;function wO(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function w$(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function wN(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=yK(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect().top,r=n.getBoundingClientRect().top;r>t+n.clientHeight&&(e.scrollTop+=r-t)}n=e.parentElement}}var wj={};function wI(e){var t;let{onDismiss:n,...r}=e,a=yI(r,yb((t=wj)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return cs().createElement(yL,null,cs().createElement("button",{...a,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function wA(e,t,n){fr(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,hf.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}function wM(e){let[t,n]=v$(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,ci.useCallback)(()=>{n(!0)},[n]),a=(0,ci.useCallback)(()=>{n(!1)},[n]),o=(0,ci.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:a,toggle:o}}wj={"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 wL=(0,ci.createContext)(null),wF=(0,ci.createContext)(null),wB=(0,ci.forwardRef)(function(e,t){[e,t]=fD(e,t,wL);let n=(0,ci.useContext)(b3),r=wM(e),a=null==e.isOpen&&null==e.defaultOpen&&n?n:r,o=function(e,t){let[n,r]=(0,ci.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let a="exiting"===n;return wA(e,a,(0,ci.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),a}(t,a.isOpen)||e.isExiting||!1,i=(0,ci.useContext)(h0),{direction:s}=gu();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),cs().createElement(cs().Fragment,null,t)}return!a||a.isOpen||o?cs().createElement(wU,{...e,triggerRef:e.triggerRef,state:a,popoverRef:t,isExiting:o,dir:s}):null});function wU({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var a,o;let i=(0,ci.useRef)(null),[s,l]=(0,ci.useState)(0),u=(0,ci.useRef)(null),d=(0,ci.useContext)(wF),p=d&&"SubmenuTrigger"===r.trigger;fr(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:m,underlayProps:f,arrowProps:h,placement:g}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,u="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:p}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:a,isDismissable:o=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,ci.useEffect)(()=>{if(a&&!wC.includes(t))return wC.push(t),()=>{let e=wC.indexOf(t);e>=0&&wC.splice(e,1)}},[a,t]);let l=()=>{wC[wC.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:a}=e,o=(0,ci.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=fa(e=>{n&&wk(e,t)&&(a&&a(e),o.current.isPointerDown=!0)}),s=fa(e=>{n&&n(e)});(0,ci.useEffect)(()=>{let e=o.current;if(r)return;let n=fU(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&wk(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",i,!0),n.addEventListener("pointerup",r,!0),()=>{n.removeEventListener("pointerdown",i,!0),n.removeEventListener("pointerup",r,!0)}}},[t,r,i,s])}({ref:t,onInteractOutside:o&&a?e=>{(!s||s(e.target))&&(wC[wC.length-1]===t&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&wC[wC.length-1]===t&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:u}=hG({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||v8(e.relatedTarget,v2))&&(!s||s(e.relatedTarget))&&(null==n||n())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...u},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||u,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=a?a:r),{overlayProps:m,arrowProps:f,placement:h}=function(e){var t,n,r;let{direction:a}=gu(),{arrowSize:o=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:u="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:p="u">typeof document?document.body:null,offset:m=0,crossOffset:f=0,shouldUpdatePosition:h=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:b=0}=e,[w,E]=(0,ci.useState)(null),x=[h,u,s.current,i.current,l.current,c,d,p,m,f,g,a,v,b,o],_=(0,ci.useRef)(null==wS?void 0:wS.scale);(0,ci.useEffect)(()=>{g&&(_.current=null==wS?void 0:wS.scale)},[g]);let D=(0,ci.useCallback)(()=>{var e,t,n,r,y,w;if(!1===h||!g||!s.current||!i.current||!p||(null==wS?void 0:wS.scale)!==_.current)return;let x=null;if(l.current&&l.current.contains(document.activeElement)){let r=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),a=l.current.getBoundingClientRect();(x={type:"top",offset:(null!=(t=null==r?void 0:r.top)?t:0)-a.top}).offset>a.height/2&&(x.type="bottom",x.offset=(null!=(n=null==r?void 0:r.bottom)?n:0)-a.bottom)}let D=s.current;!v&&s.current&&(D.style.top="0px",D.style.bottom="",D.style.maxHeight=(null!=(y=null==(r=window.visualViewport)?void 0:r.height)?y:window.innerHeight)+"px");let S=function(e){var t,n,r,a;let o,{placement:i,targetNode:s,overlayNode:l,scrollNode:u,padding:c,shouldFlip:d,boundaryElement:p,offset:m,crossOffset:f,maxHeight:h,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,v=l instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!wx(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!wx(t);)t=t.parentElement;return t||document.documentElement}(l):document.documentElement,b=v===document.documentElement,w=window.getComputedStyle(v).position,E=b?ww(s):wE(s,v);if(!b){let{marginTop:e,marginLeft:t}=window.getComputedStyle(s);E.top+=parseInt(e,10)||0,E.left+=parseInt(t,10)||0}let x=ww(l),_={top:parseInt((o=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(o.marginBottom,10)||0,left:parseInt(o.marginLeft,10)||0,right:parseInt(o.marginRight,10)||0};x.width+=(null!=(t=_.left)?t:0)+(null!=(n=_.right)?n:0),x.height+=(null!=(r=_.top)?r:0)+(null!=(a=_.bottom)?a:0);let D={top:u.scrollTop,left:u.scrollLeft,width:u.scrollWidth,height:u.scrollHeight},S=wh(p),k=wh(v),C="BODY"===p.tagName?ww(v):wE(v,p);return"HTML"===v.tagName&&"BODY"===p.tagName&&(k.scroll.top=0,k.scroll.left=0),function(e,t,n,r,a,o,i,s,l,u,c,d,p,m,f,h){var g,y,v,b,w,E,x,_,D,S,k,C,P,R;let T,O,$,N=wy(e),{size:j,crossAxis:I,crossSize:A,placement:M,crossPlacement:L}=N,F=wv(t,s,n,N,c,d,u,p,f,h),B=c,U=wb(s,u,t,a,o+c,N);if(i&&r[j]>U){let e=wy(`${wu[M]} ${L}`),r=wv(t,s,n,e,c,d,u,p,f,h);wb(s,u,t,a,o+c,e)>U&&(N=e,F=r,B=c)}let V="bottom";"top"===N.axis?"top"===N.placement?V="top":"bottom"===N.placement&&(V="bottom"):"top"===N.crossAxis&&("top"===N.crossPlacement?V="bottom":"bottom"===N.crossPlacement&&(V="top"));let W=wg(I,F[I],n[A],s,l,o,u);F[I]+=W;let H=(w=F,E=n.height,x=V,T=p?u.height:s[wp.height],O=null!=w.top?u.top+w.top:u.top+(T-(null!=(_=w.bottom)?_:0)-E),$="top"!==x?Math.max(0,s.height+s.top+(null!=(D=s.scroll.top)?D:0)-O-((null!=(S=a.top)?S:0)+(null!=(k=a.bottom)?k:0)+o)):Math.max(0,O+E-(s.top+(null!=(C=s.scroll.top)?C:0))-((null!=(P=a.top)?P:0)+(null!=(R=a.bottom)?R:0)+o)),Math.min(s.height-2*o,$));m&&m<H&&(H=m),n.height=Math.min(n.height,H),W=wg(I,(F=wv(t,s,n,N,B,d,u,p,f,h))[I],n[A],s,l,o,u),F[I]+=W;let z={},K=t[I]+.5*t[A]-F[I]-a[wl[I]],G=f/2+h,Z="left"===wl[I]?(null!=(g=a.left)?g:0)+(null!=(y=a.right)?y:0):(null!=(v=a.top)?v:0)+(null!=(b=a.bottom)?b:0),Y=n[A]-Z-f/2-h,q=wo(K,t[I]+f/2-(F[I]+a[wl[I]]),t[I]+t[A]-f/2-(F[I]+a[wl[I]]));return z[I]=wo(q,G,Y),{position:F,maxHeight:H,arrowOffsetLeft:z.left,arrowOffsetTop:z.top,placement:N.placement}}(i,E,x,D,_,c,d,S,k,C,m,f,!!w&&"static"!==w,h,g,y)}({placement:(w=u,"rtl"===a?w.replace("start","right").replace("end","left"):w.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:c,shouldFlip:d,boundaryElement:p,offset:m,crossOffset:f,maxHeight:v,arrowSize:o,arrowBoundaryOffset:b});if(S.position){if(D.style.top="",D.style.bottom="",D.style.left="",D.style.right="",Object.keys(S.position).forEach(e=>D.style[e]=S.position[e]+"px"),D.style.maxHeight=null!=S.maxHeight?S.maxHeight+"px":"",x&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),t=l.current.getBoundingClientRect(),n=e[x.type]-t[x.type];l.current.scrollTop+=n-x.offset}E(S)}},x);fr(D,x),fr(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=D]),wD({ref:s,onResize:D}),wD({ref:i,onResize:D});let S=(0,ci.useRef)(!1);fr(()=>{let e,t=()=>{S.current=!0,clearTimeout(e),e=setTimeout(()=>{S.current=!1},500),D()},n=()=>{S.current&&t()};return null==wS||wS.addEventListener("resize",t),null==wS||wS.addEventListener("scroll",n),()=>{null==wS||wS.removeEventListener("resize",t),null==wS||wS.removeEventListener("scroll",n)}},[D]);let k=(0,ci.useCallback)(()=>{S.current||null==y||y()},[y,S]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,ci.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let a=r||w_.get(t.current);a&&a()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:i,isOpen:g,onClose:y&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==w?void 0:w.position,maxHeight:null!=(t=null==w?void 0:w.maxHeight)?t:"100vh"}},placement:null!=(n=null==w?void 0:w.placement)?n:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==w?void 0:w.arrowOffsetLeft,top:null==w?void 0:w.arrowOffsetTop}},updatePosition:D}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return!function(e={}){let{isDisabled:t}=e;fr(()=>{if(!t){let e,t,n,r;return 1==++wT&&(c=f1()?(n=null,r=fn(w$(document,"touchstart",n=>{((e=yK(n.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(t=wO(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),w$(document,"touchmove",t=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault():t.preventDefault()},{passive:!1,capture:!0}),w$(document,"touchend",()=>{t&&t()},{passive:!1,capture:!0}),w$(document,"focus",e=>{var t;let r=e.target;((t=r)instanceof HTMLInputElement&&!wR.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable)&&((()=>{if(n)return;let e=window.pageXOffset,t=window.pageYOffset;n=fn(w$(window,"scroll",()=>{window.scrollTo(0,0)}),wO(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wO(document.documentElement,"overflow","hidden"),wO(document.body,"marginTop",`-${t}px`),()=>{window.scrollTo(e,t)}),window.scrollTo(0,0)})(),r.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{r.style.transform="",wP&&(wP.height<window.innerHeight?requestAnimationFrame(()=>{wN(r)}):wP.addEventListener("resize",()=>wN(r),{once:!0}))}))},!0)),()=>{null==t||t(),null==n||n(),r()}):fn(wO(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),wO(document.documentElement,"overflow","hidden"))),()=>{0==--wT&&c()}}},[t])}({isDisabled:o||!t.isOpen}),fr(()=>{if(t.isOpen&&r.current){if(!o)return function(e,t=document.body){let n=new Set(e),r=new Set,a=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(t);let t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of n)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),i=t(e);if(i===NodeFilter.FILTER_ACCEPT&&o(e),i!==NodeFilter.FILTER_REJECT){let e=a.nextNode();for(;null!=e;)o(e),e=a.nextNode()}},o=e=>{var t;let n=null!=(t=wr.get(e))?t:0;("true"!==e.getAttribute("aria-hidden")||0!==n)&&(0===n&&e.setAttribute("aria-hidden","true"),r.add(e),wr.set(e,n+1))};wa.length&&wa[wa.length-1].disconnect(),a(t);let i=new MutationObserver(e=>{for(let t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...r].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?n.add(e):e instanceof Element&&a(e)}});i.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){i.observe(t,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return wa.push(s),()=>{for(let e of(i.disconnect(),r)){let t=wr.get(e);null!=t&&(1===t?(e.removeAttribute("aria-hidden"),wr.delete(e)):wr.set(e,t-1))}s===wa[wa.length-1]?(wa.pop(),wa.length&&wa[wa.length-1].observe()):wa.splice(wa.indexOf(s),1)}}([null!=(n=null==a?void 0:a.current)?n:r.current]);var e,n,i=null!=(e=null==a?void 0:a.current)?e:r.current;let t=wa[wa.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}},[o,t.isOpen,r,a]),{popoverProps:fb(d,m),arrowProps:f,underlayProps:p,placement:h}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:p?d:u},e),y=r.popoverRef,v=function(e,t=!0){let[n,r]=(0,ci.useState)(!0),a=n&&t;return fr(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),wA(e,a,(0,ci.useCallback)(()=>r(!1),[])),a}(y,!!g)||r.isEntering||!1,b=fx({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!r.isNonModal||"SubmenuTrigger"===r.trigger,[E,x]=(0,ci.useState)(!1);fr(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,ci.useEffect)(()=>{E&&y.current&&!y.current.contains(document.activeElement)&&hV(y.current)},[E,y]);let _={...m.style,...b.style},D=cs().createElement("div",{...fb(fI(r),m),...b,role:E?"dialog":void 0,tabIndex:E?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:y,slot:r.slot||void 0,style:_,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!r.isNonModal&&cs().createElement(wI,{onDismiss:e.close}),cs().createElement(wn.Provider,{value:{...h,placement:g,ref:i}},b.children),cs().createElement(wI,{onDismiss:e.close}));return p?cs().createElement(b4,{...r,shouldContainFocus:E,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},D):cs().createElement(b4,{...r,shouldContainFocus:E,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&cs().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),cs().createElement("div",{ref:u,style:{display:"contents"}},cs().createElement(wF.Provider,{value:u},D)))}function wV(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let wW=(0,ci.createContext)(null),wH=(0,ci.createContext)(null),wz=(0,ci.createContext)(null),wK=(0,ci.createContext)(null),wG=(0,ci.forwardRef)(function(e,t){var n,r;[e,t]=fD(e,t,wW);let{validationBehavior:a}=f_(b7)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){var t;let n=wM(e),[r,a]=v$(e.value,e.defaultValue||null,e.onChange),o=r||e.placeholderValue||null,[i,s]=bB(o,e.granularity),l=null!=r?r.toDate(null!=s?s:"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=null==(t=e.shouldCloseOnSelect)||t,[d,p]=(0,ci.useState)(null),[m,f]=(0,ci.useState)(null);if(r&&(d=r,"hour"in r&&(m=r)),o&&!(i in o))throw Error("Invalid granularity "+i+" for value "+o.toString());let h=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,g=(0,ci.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,ci.useMemo)(()=>bN(r,y,v,b,g),[r,y,v,b,g]),E=bk({...e,value:r,builtinValidation:w}),x=E.displayValidation.isInvalid,_=e.validationState||(x?"invalid":null),D=(e,t)=>{a("timeZone"in t?t.set(g0(e)):g1(e,t)),p(null),f(null),E.commitValidation()};return{...E,value:r,setValue:a,dateValue:d,timeValue:m,setDateValue:t=>{let r="function"==typeof c?c():c;u?m||r?D(t,m||bM(e.defaultValue||e.placeholderValue)):p(t):(a(t),E.commitValidation()),r&&n.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):f(e)},granularity:i,hasTime:u,...n,setOpen(t){!t&&!r&&d&&u&&D(d,m||bM(e.defaultValue||e.placeholderValue)),n.setOpen(t)},validationState:_,isInvalid:x,formatValue:(e,t)=>l?new yE(e,bA(t,g)).format(l):"",getDateFormatter:(e,t)=>new yE(e,bA({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,ci.useRef)(null),[l,u]=fS(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:m,dialogProps:f,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r;let a=fg(),o=fg(),i=fg(),s=yb((r=v0)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:m,errorMessageProps:f}=bf({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=bd(t,n),g=p["aria-labelledby"]||p.id,{locale:y}=gu(),v=t.formatValue(y,{month:"long"}),b=yV(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=fI(e),x=(0,ci.useMemo)(()=>bi(n),[n]),_=(0,ci.useRef)(!1),{focusWithinProps:D}=hG({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(o);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,a;_.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(a=e.onFocusChange)||a.call(e,!1)}},onFocusWithin:t=>{if(!_.current){var n,r;_.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}});return{groupProps:fb(E,h,p,b,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...d,onClick:()=>{x.focusFirst()}},fieldProps:{...p,id:i,[by]:"presentation","aria-describedby":w,value:t.value,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,[bS]:t,autoFocus:e.autoFocus,name:e.name},descriptionProps:m,errorMessageProps:f,buttonProps:{...b,id:a,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${a} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:o,"aria-labelledby":`${a} ${g}`},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(" ")},isInvalid:l,validationErrors:u,validationDetails:c}}({...fk(e),label:u,validationBehavior:o},i,s),[b,w]=(0,ci.useState)(null),E=(0,ci.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);wD({ref:s,onResize:E});let{focusProps:x,isFocused:_,isFocusVisible:D}=hZ({within:!0}),S=fx({...e,values:{state:i,isFocusWithin:_,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=fI(e);return delete k.id,cs().createElement(fE,{values:[[wz,i],[vq,{...c,ref:s,isInvalid:i.isInvalid}],[bG,p],[h2,{...m,isPressed:i.isOpen}],[we,{...d,ref:l,elementType:"span"}],[vL,h],[b3,i],[wL,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[b2,f],[h5,{slots:{description:g,errorMessage:y}}],[b5,v]]},cs().createElement("div",{...x,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),wZ=(0,ci.forwardRef)(function(e,t){var n,r;[e,t]=fD(e,t,wH);let{validationBehavior:a}=f_(b7)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){var t,n,r;let a=wM(e),[o,i]=v$(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,ci.useState)(()=>o||{start:null,end:null});null==o&&s.start&&s.end&&l(s={start:null,end:null});let u=o||s,c=e=>{l(e||{start:null,end:null}),wV(e)?i(e):i(null)},[d,p]=bB((null==u?void 0:u.start)||(null==u?void 0:u.end)||e.placeholderValue||null,e.granularity),m="hour"===d||"minute"===d||"second"===d,f=null==(r=e.shouldCloseOnSelect)||r,[h,g]=(0,ci.useState)(null),[y,v]=(0,ci.useState)(null);u&&wV(u)&&(h=u,"hour"in u.start&&(y=u));let b=(e,t)=>{c({start:"timeZone"in t.start?t.start.set(g0(e.start)):g1(e.start,t.start),end:"timeZone"in t.end?t.end.set(g0(e.end)):g1(e.end,t.end)}),g(null),v(null),P.commitValidation()},w=t=>{let n="function"==typeof f?f():f;m?wV(t)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?b(t,{start:(null==y?void 0:y.start)||bM(e.placeholderValue),end:(null==y?void 0:y.end)||bM(e.placeholderValue)}):g(t):wV(t)?(c(t),P.commitValidation()):g(t),n&&a.setOpen(!1)},E=e=>{wV(h)&&wV(e)?b(h,e):v(e)},x=(null==u||null==(t=u.start)?void 0:t.calendar.identifier)==="gregory"&&"BC"===u.start.era||(null==u||null==(n=u.end)?void 0:n.calendar.identifier)==="gregory"&&"BC"===u.end.era,_=(0,ci.useMemo)(()=>({granularity:d,timeZone:p,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:x}),[d,e.hourCycle,e.shouldForceLeadingZeros,p,e.hideTimeZone,x]),{minValue:D,maxValue:S,isDateUnavailable:k}=e,C=(0,ci.useMemo)(()=>{var e,t;let n;return n=bT(bN(null!=(e=null==u?void 0:u.start)?e:null,D,S,k,_),bN(null!=(t=null==u?void 0:u.end)?t:null,D,S,k,_)),(null==u?void 0:u.end)!=null&&null!=u.start&&0>u.end.compare(u.start)&&(n=bT(n,{isInvalid:!0,validationErrors:[(ym.getGlobalDictionaryForPackage("@react-stately/datepicker")||bO).getStringForLocale("rangeReversed",b$())],validationDetails:{...bE,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),n},[u,D,S,k,_]),P=bk({...e,value:o,name:(0,ci.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:C}),R=P.displayValidation.isInvalid,T=e.validationState||(R?"invalid":null);return{...P,value:u,setValue:c,dateRange:h,timeRange:y,granularity:d,hasTime:m,setDate(e,t){var n,r;"start"===e?w({start:t,end:null!=(n=null==h?void 0:h.end)?n:null}):w({start:null!=(r=null==h?void 0:h.start)?r:null,end:t})},setTime(e,t){var n,r;"start"===e?E({start:t,end:null!=(n=null==y?void 0:y.end)?n:null}):E({start:null!=(r=null==y?void 0:y.start)?r:null,end:t})},setDateTime(e,t){var n,r;"start"===e?c({start:t,end:null!=(n=null==u?void 0:u.end)?n:null}):c({start:null!=(r=null==u?void 0:u.start)?r:null,end:t})},setDateRange:w,setTimeRange:E,...a,setOpen(t){!t&&!((null==u?void 0:u.start)&&(null==u?void 0:u.end))&&wV(h)&&m&&b(h,{start:(null==y?void 0:y.start)||bM(e.placeholderValue),end:(null==y?void 0:y.end)||bM(e.placeholderValue)}),a.setOpen(t)},validationState:T,isInvalid:R,formatValue(t,n){let r;if(!u||!u.start||!u.end)return null;let a="timeZone"in u.start?u.start.timeZone:void 0,o=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),i="timeZone"in u.end?u.end.timeZone:void 0,s=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),l=bA(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===u.start.calendar.identifier&&"BC"===u.start.era||"gregory"===u.end.calendar.identifier&&"BC"===u.end.era}),c=u.start.toDate(a||"UTC"),d=u.end.toDate(i||"UTC"),p=new yE(t,l);if(a===i&&o===s&&0!==u.start.compare(u.end)){try{let e=p.formatRangeToParts(c,d),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let a=0;a<e.length;a++)a<t?n+=e[a].value:a>t&&(r+=e[a].value);return{start:n,end:r}}catch{}r=p}else r=new yE(t,bA(n,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new yE(e,bA({},{..._,...t}))}}({...e,validationBehavior:o}),s=(0,ci.useRef)(null),[l,u]=fS(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:m,buttonProps:f,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,n){var r,a,o,i,s,l;let u=yb((l=v0)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:c,validationErrors:d,validationDetails:p}=t.displayValidation,{labelProps:m,fieldProps:f,descriptionProps:h,errorMessageProps:g}=bf({...e,labelElementType:"span",isInvalid:c,errorMessage:e.errorMessage||d}),y=f["aria-labelledby"]||f.id,{locale:v}=gu(),b=t.formatValue(v,{month:"long"}),w=yV(b?u.format("selectedRangeDescription",{startDate:b.start,endDate:b.end}):""),E={"aria-label":u.format("startDate"),"aria-labelledby":y},x={"aria-label":u.format("endDate"),"aria-labelledby":y},_=fg(),D=fg(),S=bd(t,n),k=[w["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,C=(0,ci.useMemo)(()=>bi(n,{accept:e=>e.id!==_}),[n,_]),P={[bv]:C,[by]:"presentation","aria-describedby":k,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},R=fI(e),T=(0,ci.useRef)(!1),{focusWithinProps:O}=hG({...e,isDisabled:t.isOpen,onBlurWithin:t=>{let n=document.getElementById(D);if(!(null==n?void 0:n.contains(t.relatedTarget))){var r,a;T.current=!1,null==(r=e.onBlur)||r.call(e,t),null==(a=e.onFocusChange)||a.call(e,!1)}},onFocusWithin:t=>{if(!T.current){var n,r;T.current=!0,null==(n=e.onFocus)||n.call(e,t),null==(r=e.onFocusChange)||r.call(e,!0)}}}),$=(0,ci.useRef)(b_),N=(0,ci.useRef)(b_);return{groupProps:fb(R,S,f,w,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...m,onClick:()=>{C.focusFirst()}},buttonProps:{...w,id:_,"aria-haspopup":"dialog","aria-label":u.format("calendar"),"aria-labelledby":`${_} ${y}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${_} ${y}`},startFieldProps:{...E,...P,value:null!=(i=null==(r=t.value)?void 0:r.start)?i:null,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[bS]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){$.current=e,t.updateValidation(bT(e,N.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...x,...P,value:null!=(s=null==(a=t.value)?void 0:a.end)?s:null,onChange:e=>t.setDateTime("end",e),name:e.endName,[bS]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){N.current=e,t.updateValidation(bT($.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:h,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(o=t.dateRange)?void 0:o.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(" ")},isInvalid:c,validationErrors:d,validationDetails:p}}({...fk(e),label:u,validationBehavior:o},i,s),[w,E]=(0,ci.useState)(null),x=(0,ci.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);wD({ref:s,onResize:x});let{focusProps:_,isFocused:D,isFocusVisible:S}=hZ({within:!0}),k=fx({...e,values:{state:i,isFocusWithin:D,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=fI(e);return delete C.id,cs().createElement(fE,{values:[[wK,i],[vq,{...c,ref:s,isInvalid:i.isInvalid}],[h2,{...f,isPressed:i.isOpen}],[we,{...d,ref:l,elementType:"span"}],[vF,g],[b3,i],[wL,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[b2,h],[bG,{slots:{start:p,end:m}}],[h5,{slots:{description:y,errorMessage:v}}],[b5,b]]},cs().createElement("div",{..._,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function wY(e){return cs().createElement(gl,e)}function wq(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof gF||e instanceof gW||e instanceof gz)return t?g4(e,t):e;{let n=dJ()(e).toDate(),r=new gF(n.getFullYear(),n.getMonth()+1,n.getDate());return t?g4(r,t):r}}function wJ(e){if(e)return e.toDate(ya())}function wX(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function wQ(e){let t=e??"",n=wX(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function w0(){let e=window.i18next.language,t=wX(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;er=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;er=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var w1=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(er||"en-US"),w4=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},w2={};for(let e=1;e<100;e++)w2[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var w3={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},w6="[1234567890一二三四五六七八九〇\\d]",w5={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},w9={},w8={"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},w7={zone:w8,year:w2,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:{}},Ee={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(w8).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,}"},Et={...Ee,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}"},En={},Er=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=w1){return En[t.toLowerCase()]||(En[t.toLowerCase()]=new e(t)),En[t.toLowerCase()]}constructor(e=w1){this.locale=e,this.lookups={...w7},this.vars={...Ee};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 n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);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 n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}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,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=w5: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(w9[e])return w9[e];if("fullwide"===e||"hanidec"===e)return{group:w6,lookup:{...w5}};let t=w3[e];if(!t)return{group:"\\d",lookup:{...w5}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),a={};for(let e=0;e<10;e++)a[String.fromCharCode(t+e)]=e;return w9[e]={group:`[${n}-${r}]`,lookup:a},w9[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,Et)Et.hasOwnProperty(n)&&(this.vars[n]=Et[n].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((n,r)=>{["","k","kuu","kuuta"].forEach((a,o)=>{e[n+a+(o<2?"\\.?":"")]=!0,t[n+a]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let a of["full","long","medium"]){let o=Intl.DateTimeFormat(this.locale,{dateStyle:a});for(let i=0;i<12;i++){let s=o.formatToParts(n[i]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===a?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let a=Intl.DateTimeFormat(this.locale,{month:"short"});for(let o=0;o<12;o++){let i=a.formatToParts(n[o]).find(r).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=o+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 n=[],r={};for(let a of["long","short"]){let o=Intl.DateTimeFormat(this.locale,{weekday:a});for(let i=0;i<7;i++){let s=o.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===a?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=i}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},a=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let o=0;o<2;o++){let i=a.formatToParts(e[o]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);n.push(s),r[s]=12*o}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}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")}},Ea=["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"],Eo={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Ei=()=>new Date;function Es(e){return function(t){let n={};for(let r=0,a=e.length;r<a;r++){let a=e[r];a&&(n[a]=t[r])}return n}}var El=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let a=t.match(e.regex);if(!a)continue;r=!0;let o=e.handler(a);if(o){for(let[e,t]of Object.entries(o))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,a.index)+t.slice(a.index+a[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},Eu=["year","month","day","hour","minute","second","millisecond","offset"],Ec={};function Ed(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 Ep=[[/([^\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"]],Em={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," "],...Ep],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:Ep,id:Ep,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ef(e,t=w1){let n=function(e){if(!Ec[e]){var t,n;let r,a,o=Er.factory(e);Ec[e]=new El({doneChecker:Ed,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Es(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Es(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Es(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${w6}{2,4})\\s*\u5E74\\s*(${w6}{1,2})\\s*\u6708\\s*(${w6}{1,2})\\s*\u65E5$`),handler:Es(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Es(["","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:Es(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Ei(),n=e[1].toLowerCase();switch(n){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let r={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===n&&(r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()),console.log("today=>",n,r),r}},{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,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?Eo[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=Ei();return"millisecond"===n?a.setUTCMilliseconds(a.getUTCMilliseconds()+t):"second"===n?a.setUTCSeconds(a.getUTCSeconds()+t):"minute"===n?a.setUTCMinutes(a.getUTCMinutes()+t):"hour"===n?a.setUTCHours(a.getUTCHours()+t):"day"===n?a.setUTCDate(a.getUTCDate()+t):"month"===n?a.setUTCMonth(a.getUTCMonth()+t):"year"===n&&a.setUTCFullYear(a.getUTCFullYear()+t),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){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:o.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Es(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Es(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Es(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Es(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Es(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:Es(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Es(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Es(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Es(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Es(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Es(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Es(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Es(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Es(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Es(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Es(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Es(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Es(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:Es(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Es(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Es(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:Es(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:Es(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:Es(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Es(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:Es(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:Es(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:Es(["zone"])}],a=o.baseName.slice(0,5),Ea.includes(a)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=o,function(e){let t={};for(let[r,a]of Object.entries(e))if("monthname"===r){if(a){let e=n.monthNameToInt(a);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(a,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(a){let e=n.zoneToOffset(a);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(a);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(a);"number"==typeof e&&(t.millisecond=e)}else if(Eu.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=w2[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return Ec[e]}(t),r=function(e,t){let n=Em[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function Eh(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new w4(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 w4(t.valueOf()-60*e.offset*1e3):t}function Eg(e,t=w1){let n=Ef(e,t),r=n.invalid?new w4(NaN):Eh(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function Ey(e,t=w1){return e instanceof Date?new w4(e.valueOf()):"number"==typeof e?new w4(e):Eg(e,t)}Date.fromString=w4.fromString=Eg,Date.fromAny=w4.fromAny=Ey,"u">typeof window&&(window.anyDateParser={fromString:Eg,fromAny:Ey,fromObject:Eh,attempt:Ef});var Ev=n(4397),Eb=n(7657),Ew=n(254);function EE(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}dJ().extend(dX),dJ().extend(Eb),dJ().extend(Ev);let Ex="YYYY-MM-DDTHH:mm:ss.SSSZZ";function E_(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&dJ()(e,Ex).isValid()}function ED(e){return dJ()(e).isToday()}function ES(e){return E_(e)?dJ()(e,Ex).toDate():null}function Ek(e,t=!1){let n=dJ()(e);return t&&(n=n.utc()),n.format(Ex)}function EC(e){return dJ()(e).toDate()}var EP=new WeakMap;let ER=new class{register(e,t){EE(this,EP).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(EE(this,EP).has(t))return EE(this,EP).get(t)}if(e.language&&EE(this,EP).has(e.language))return EE(this,EP).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return EE(this,EP).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,EP,{writable:!0,value:new Map})}};function ET(e,t){ER.register(e,t)}function EO(e){let t=e??w0();return ER.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let E$={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EN(e,t={}){let n=Ef(e,w0());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,Ew.A)(n.day)&&(0,Ew.A)(n.month)&&(n=Object.assign({},ru(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},ru(n,"day"),{date:n.day}));let r=dJ()().set(n).toDate();return(0,Ew.A)(n.year)&&(t.year=!1),(0,Ew.A)(n.month)&&(t.month=!1),(0,Ew.A)(n.date)&&(t.day=!1),Ej(r,t)}function Ej(e,t){let n,r=t?.locale??w0(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...E$,...{noToday:"am"===a.language},...t},m={calendar:o??EO(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},f=dJ()(e).isToday();if(f&&!d)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===a.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,m).formatToParts(e);("en"===a.language||"am"===a.language)&&"standard"==i&&c&&l&&(t=t.map(EI("-"))),"wide"==i&&(t=t.map(EI(" — "))),"ethiopic"===m.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||f&&"for today"===s)&&(n+=`, ${EA(e)}`),n}let EI=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function EA(e){return e.toLocaleTimeString(w0(),{hour:"2-digit",minute:"2-digit"})}function EM(e,t){return Ej(e,{...t,time:!0})}function EL(e,t){let n=EO("string"==typeof t?new Intl.Locale(t):t);return n?g4(e,vD(n)):e}function EF(e,t){return new Intl.DurationFormat(w0(),t).format(e)}function EB(e,t){if(null==e)return null;if("string"==typeof e){let n=Ef(e,w0());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...ru(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...ru(n,"day"),...{date:n.day}}),dJ()(t).set(n))}return dJ()(e)}let EU=["years","months","days","hours","minutes","seconds"],EV={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},EW={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function EH(e,t=dJ()(),n){let r,a=dJ()(t),o=EB(e,a);if(null==o)return null;if("string"==typeof n){let e=EV[n]??n;return{[e]:a.diff(o,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?EV[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=EU.indexOf(n);for(let a=0;a<EU.length;a++){let o=EU[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):EV[s]??s,function(e,t,n,r){let a=EU.indexOf(n),o=EU.indexOf(r),i=EU.slice(a,o+1),s={},l=e;for(let e of i){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(o,a,e,t??e)}let u=(r=function(e){let t={...EW};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[EV[n]??n]=r);return t}(i),a.diff(o,"seconds")<r.seconds?"seconds":a.diff(o,"minutes")<r.minutes?"minutes":a.diff(o,"hours")<r.hours?"hours":a.diff(o,"days")<r.days?"days":a.diff(o,"months")<r.months?"months":"years");return{[u]:a.diff(o,u)}}let Ez={style:"short",localeMatcher:"lookup"};function EK(e,t=dJ()(),n){let r=EH(e,t,n);return null==r?null:EF(r,"object"==typeof n&&n.formatOptions?{...Ez,...n.formatOptions}:Ez)}let EG=(0,ci.createContext)(null);function EZ(){let e=di({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,ci.useMemo)(()=>{let t=w0();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,ci.useMemo)(()=>{let e=EO(t);return void 0!==e?vD(e):void 0},[t]),r=(0,ci.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,ci.useMemo)(()=>n?g4(ye(ya()),n):ye(ya()),[n]);return{calendar:n,intlLocale:r,today_:a}}let EY=new gF(1793,1,1);var Eq={};function EJ(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}Eq={"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 EX=n(3244);function EQ(e={}){let{locale:t}=gu();return(0,ci.useMemo)(()=>new(0,EX.K)(t,e),[t,e])}var E0={};function E1(e){var t;let n=(0,ci.useRef)(void 0),{value:r,textValue:a,minValue:o,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:m,onDecrementToMin:f,onIncrementToMax:h}=e,g=yb((t=E0)&&t.__esModule?t.default:t,"@react-aria/spinbutton");(0,ci.useEffect)(()=>()=>clearTimeout(n.current),[]);let y=(0,ci.useRef)(!1),v=()=>{y.current=!0},b=()=>{y.current=!1},w=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,ci.useEffect)(()=>{y.current&&(fP&&fP.clear("assertive"),fR(w,"assertive"))},[w]);let E=fa(e=>{clearTimeout(n.current),null==c||c(),n.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&E(60)},e)}),x=fa(e=>{clearTimeout(n.current),null==p||p(),n.current=window.setTimeout(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&x(60)},e)}),_=e=>{e.preventDefault()},{addGlobalListener:D,removeAllGlobalListeners:S}=hu();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":w,"aria-valuemin":o,"aria-valuemax":i,"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)switch(e.key){case"PageUp":if(d){e.preventDefault(),null==d||d();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),null==c||c());break;case"PageDown":if(m){e.preventDefault(),null==m||m();break}case"ArrowDown":case"Down":p&&(e.preventDefault(),null==p||p());break;case"Home":f&&(e.preventDefault(),null==f||f());break;case"End":h&&(e.preventDefault(),null==h||h())}},onFocus:v,onBlur:b},incrementButtonProps:{onPressStart:()=>{E(400),D(window,"contextmenu",_)},onPressEnd:()=>{clearTimeout(n.current),S()},onFocus:v,onBlur:b},decrementButtonProps:{onPressStart:()=>{x(400),D(window,"contextmenu",_)},onPressEnd:()=>{clearTimeout(n.current),S()},onFocus:v,onBlur:b}}}E0={"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:"空白"}};var E4=n(6659);function E2(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let a=t.toString().split("."),o=n.toString().split("."),i=Math.pow(10,Math.max(a[1]&&a[1].length||0,o[1]&&o[1].length||0));t=Math.round(t*i),n=Math.round(n*i),r=("+"===e?t+n:t-n)/i}return r}let E3=(0,ci.createContext)(null),E6=(0,ci.createContext)(null),E5=(0,ci.forwardRef)(function(e,t){var n,r;[e,t]=fD(e,t,E3);let{validationBehavior:a}=f_(b7)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=gu(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:a,value:o,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c}=e;null===o&&(o=NaN),void 0===o||isNaN(o)||(o=void 0===r||isNaN(r)?wo(o,t,n):ws(o,t,n,r)),isNaN(i)||(i=void 0===r||isNaN(r)?wo(i,t,n):ws(i,t,n,r));let[d,p]=v$(o,isNaN(i)?NaN:i,s),[m,f]=(0,ci.useState)(()=>isNaN(d)?"":new(0,EX.K)(l,a).format(d)),h=(0,ci.useMemo)(()=>new(0,E4.d)(l,a),[l,a]),g=(0,ci.useMemo)(()=>h.getNumberingSystem(m),[h,m]),y=(0,ci.useMemo)(()=>new(0,EX.K)(l,{...a,numberingSystem:g}),[l,a,g]),v=(0,ci.useMemo)(()=>y.resolvedOptions(),[y]),b=(0,ci.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),w=bk({...e,value:d}),E=void 0===r||isNaN(r)?1:r;"percent"===v.style&&(void 0===r||isNaN(r))&&(E=.01);let[x,_]=(0,ci.useState)(d),[D,S]=(0,ci.useState)(l),[k,C]=(0,ci.useState)(a);Object.is(d,x)&&l===D&&a===k||(f(b(d)),_(d),S(l),C(a));let P=(0,ci.useMemo)(()=>h.parse(m),[h,m]),R=(e,r=0)=>{if(isNaN(P))return ws(isNaN(r)?0:r,t,n,E);{let r=ws(P,t,n,E);return"+"===e&&r>P||"-"===e&&r<P?r:ws(E2(e,P,E),t,n,E)}},T=(0,ci.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===n||isNaN(n)||ws(P,t,n,E)>P||E2("+",P,E)<=n),[u,c,t,n,E,P]),O=(0,ci.useMemo)(()=>!u&&!c&&(isNaN(P)||void 0===t||isNaN(t)||ws(P,t,n,E)<P||E2("-",P,E)>=t),[u,c,t,n,E,P]);return{...w,validate:e=>h.isValidPartialNumber(e,t,n),increment:()=>{let e=R("+",t);e===d&&f(b(e)),p(e),w.commitValidation()},incrementToMax:()=>{null!=n&&(p(ws(n,t,n,E)),w.commitValidation())},decrement:()=>{let e=R("-",n);e===d&&f(b(e)),p(e),w.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),w.commitValidation())},canIncrement:T,canDecrement:O,minValue:t,maxValue:n,numberValue:P,setNumberValue:p,setInputValue:f,inputValue:m,commit:()=>{let e;if(!m.length){p(NaN),f(void 0===o?"":b(d));return}isNaN(P)?f(b(d)):(e=void 0===r||isNaN(r)?wo(P,t,n):ws(P,t,n,r),p(e=h.parse(b(e))),f(b(void 0===o?e:d)))}}}({...e,locale:i,validationBehavior:o}),l=(0,ci.useRef)(null),[u,c]=fS(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:m,incrementButtonProps:f,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r,a;let o,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:u,isReadOnly:c,isRequired:d,minValue:p,maxValue:m,autoFocus:f,label:h,formatOptions:g,onBlur:y=()=>{},onFocus:v,onFocusChange:b,onKeyDown:w,onKeyUp:E,description:x,errorMessage:_,isWheelDisabled:D,...S}=e,{increment:k,incrementToMax:C,decrement:P,decrementToMin:R,numberValue:T,inputValue:O,commit:$,commitValidation:N}=t,j=yb((a=Eq)&&a.__esModule?a.default:a,"@react-aria/numberfield"),I=fg(i),{focusProps:A}=hW({onBlur(){$()}}),M=EQ(g),L=(0,ci.useMemo)(()=>M.resolvedOptions(),[M]),F=EQ({...g,currencySign:void 0}),B=(0,ci.useMemo)(()=>isNaN(T)?"":F.format(T),[F,T]),{spinButtonProps:U,incrementButtonProps:V,decrementButtonProps:W}=E1({isDisabled:u,isReadOnly:c,isRequired:d,maxValue:m,minValue:p,onIncrement:k,onIncrementToMax:C,onDecrement:P,onDecrementToMin:R,value:T,textValue:B}),[H,z]=(0,ci.useState)(!1),{focusWithinProps:K}=hG({isDisabled:u,onFocusWithinChange:z});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,ci.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);yF(t,"wheel",r?void 0:a)}({onScroll:(0,ci.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?k():e.deltaY<0&&P())},[P,k]),isDisabled:D||u||c||!H},n);let G=(null!=(r=L.maximumFractionDigits)?r:0)>0,Z=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,Y="numeric";fQ()?Z?Y="text":G&&(Y="decimal"):f3()&&(Z?Y="numeric":G&&(Y="decimal"));let q=fI(e),J=(0,ci.useCallback)(e=>{"Enter"===e.key?($(),N()):e.continuePropagation()},[$,N]),{isInvalid:X,validationErrors:Q,validationDetails:ee}=t.displayValidation,{labelProps:et,inputProps:en,descriptionProps:er,errorMessageProps:ea}=function(e,t,n){let r=fa(e=>{let r=n.current;if(!r)return;let a=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":a=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":a=r.value.slice(r.selectionStart);break;default:null!=e.data&&(a=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=a&&t.validate(a)||e.preventDefault()});(0,ci.useEffect)(()=>{if(!EJ()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n,r]);let a=EJ()?null:e=>{let n=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:o,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:o=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=v$(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=hK(e,t),d=bk({...e,value:l}),{isInvalid:p,validationErrors:m,validationDetails:f}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=bf({...e,isInvalid:p,errorMessage:e.errorMessage||m}),b=fI(e,{labelable:!0}),w={type:i,pattern:e.pattern};return bm(t,l,u),bh(e,d,t),(0,ci.useEffect)(()=>{if(t.current instanceof fV(t.current).HTMLTextAreaElement){let e=t.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[t]),{labelProps:h,inputProps:fb(b,"input"===n?w:void 0,{disabled:r,readOnly:o,required:a&&"native"===s,"aria-required":a&&"aria"===s||void 0,"aria-invalid":p||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(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(cs().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,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:p,validationErrors:m,validationDetails:f}}(e,n),c=(0,ci.useRef)(null);return{inputProps:fb(i,{onBeforeInput:a,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;c.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:a}=c.current;n.current.value=e,n.current.setSelectionRange(r,a),t.setInputValue(e)}}}),labelProps:o,descriptionProps:s,errorMessageProps:l,...u}}({...S,...q,name:void 0,label:h,autoFocus:f,isDisabled:u,isReadOnly:c,isRequired:d,validate:void 0,[bS]:t,value:O,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Y,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:y,onFocus:v,onFocusChange:b,onKeyDown:(0,ci.useMemo)(()=>fn(J,w),[J,w]),onKeyUp:E,description:x,errorMessage:_},t,n);bm(n,t.numberValue,t.setNumberValue);let eo=fb(U,A,en,{role:null,"aria-roledescription":f1()?null:j.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eo["aria-required"]=void 0);let ei=e=>{var t;document.activeElement!==n.current&&("mouse"===e.pointerType?null==(t=n.current)||t.focus():e.target.focus())},es=e["aria-label"]||("string"==typeof e.label?e.label:"");es||(o=null!=e.label?et.id:e["aria-labelledby"]);let el=fg(),eu=fg(),ec=fb(V,{"aria-label":l||j.format("increase",{fieldLabel:es}).trim(),id:o&&!l?el:null,"aria-labelledby":o&&!l?`${el} ${o}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ei}),ed=fb(W,{"aria-label":s||j.format("decrease",{fieldLabel:es}).trim(),id:o&&!s?eu:null,"aria-labelledby":o&&!s?`${eu} ${o}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ei});return{groupProps:{...K,role:"group","aria-disabled":u,"aria-invalid":X?"true":void 0},labelProps:et,inputProps:eo,incrementButtonProps:ec,decrementButtonProps:ed,errorMessageProps:ea,descriptionProps:er,isInvalid:X,validationErrors:Q,validationDetails:ee}}({...fk(e),label:c,validationBehavior:o},s,l),b=fx({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=fI(e);return delete w.id,cs().createElement(fE,{values:[[E6,s],[vq,p],[vX,{...m,ref:l}],[we,{...d,ref:u}],[h2,{slots:{increment:f,decrement:h}}],[h5,{slots:{description:g,errorMessage:y}}],[b5,v]]},cs().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&cs().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function E9(e,t){return Number.parseInt(Ej(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let E8=(0,ci.forwardRef)(function(e,t){let{className:n}=e,r=(0,ci.useContext)(vB),a=(0,ci.useContext)(vU),o=r??a,i=(0,ci.useContext)(EG),s=ya(),l=Ej(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=E9(o.visibleRange.start.toDate(s),i),c=o.maxValue?E9(o.maxValue.toDate(s),i):void 0,d=o.minValue?E9(o.minValue.toDate(s),i):void 0,p=(0,ci.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,pl.jsxs)("span",{ref:t,className:n,children:[(0,pl.jsx)("span",{children:l}),(0,pl.jsxs)(E5,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,pl.jsx)(vQ,{}),(0,pl.jsxs)(vJ,{children:[(0,pl.jsx)(h3,{slot:"increment",children:(0,pl.jsx)(pB,{size:8})}),(0,pl.jsx)(h3,{slot:"decrement",children:(0,pl.jsx)(pM,{size:8})})]})]})]})}),E7="-esm-openconceptlab__datepicker-module__inputGroup___gBam-",xe="-esm-openconceptlab__datepicker-module__inputSegment___wIJDZ",xt="-esm-openconceptlab__datepicker-module__dateInputWrapper___LiY68",xn="-esm-openconceptlab__datepicker-module__invalidText___A4cv4",xr="-esm-openconceptlab__datepicker-module__flatButton___HcpME",xa="-esm-openconceptlab__datepicker-module__flatButtonMd___eFpyF",xo="-esm-openconceptlab__datepicker-module__flatButtonSm___tsawR",xi="-esm-openconceptlab__datepicker-module__flatButtonLg___4HG5y";function xs({children:e}){let t=(0,ci.useContext)(wz),n=(0,ci.useContext)(wK),r=t??n,a=dF(()=>r?.close());return(0,pl.jsx)(b6,{className:"-esm-openconceptlab__datepicker-module__dialog___DaqYi",ref:a,children:e})}let xl=(0,ci.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,pl.jsx)(wB,{ref:a,className:"-esm-openconceptlab__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,pl.jsx)(xs,{children:(0,pl.jsxs)(o?vW:vV,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,pl.jsxs)("header",{className:"-esm-openconceptlab__datepicker-module__header___rPv3L",children:[(0,pl.jsx)(h3,{className:pc()(xr,xa),slot:"previous",children:(0,pl.jsx)(pG,{size:16})}),(0,pl.jsx)(E8,{className:"-esm-openconceptlab__datepicker-module__monthYear___Rw4qE"}),(0,pl.jsx)(h3,{className:pc()(xr,xa),slot:"next",children:(0,pl.jsx)(pZ,{size:16})})]}),(0,pl.jsx)(vz,{className:"-esm-openconceptlab__datepicker-module__calendarGrid___yKV-n",children:e=>(0,pl.jsx)(vY,{className:pc()("cds--date-picker__day",{"-esm-openconceptlab__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),xu=(0,ci.forwardRef)(function(e,t){let n=(0,ci.useContext)(wz),[r,a]=fD({slot:e.slot},t,bG),{locale:o}=gu(),i=bz({...r,locale:o,createCalendar:vD}),s=(0,ci.useRef)(null),{fieldProps:l,inputProps:u}=bb({...r,inputRef:s},i,a),c=(0,ci.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,pl.jsxs)(fE,{values:[[bZ,i],[vX,{...u,ref:s}],[vq,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,pl.jsx)(vJ,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,n)=>(0,ci.cloneElement)(e.children(t),{key:n}))}),(0,pl.jsx)(vQ,{})]})}),xc=(0,ci.forwardRef)(function(e,t){let n=(0,ci.useContext)(wz),r=(0,ci.useContext)(wK);return(n??r).isInvalid?(0,pl.jsx)(m1,{ref:t,size:16,...e}):(0,pl.jsx)(pA,{ref:t,size:16,...e})});class xd{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}}let xp=new Map,xm=(0,ci.forwardRef)(function({segment:e,...t},n){let r=(0,ci.useContext)(bZ),a=ft(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,ci.useRef)(""),{locale:l,direction:u}=gu(),c=function(){var e;let{locale:t}=gu(),n=yv((e=v0)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,ci.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new xd(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:m,focusManager:f}=bg.get(t),h=e.isPlaceholder?"":e.text,g=(0,ci.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=yC({month:"long",timeZone:g.timeZone}),v=yC({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=E1({value:e.value,textValue:h,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="",void 0!==e.maxValue&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&t.setSegment(e.type,e.minValue)}}),w=(0,ci.useMemo)(()=>new(0,E4.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&f.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=w.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:x}=(r=function(e){let{locale:t}=gu(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(xp.has(n))return xp.get(n);let r=new Intl.Collator(t,e);return xp.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,ci.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),o=(0,ci.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),i=(0,ci.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,a=(t=t.normalize("NFC")).length;for(;n+a<=e.length;n++){let o=e.slice(n,n+a);if(0===r.compare(t,o))return!0}return!1},[r]),(0,ci.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),_=yC({hour:"numeric",hour12:!0}),D=(0,ci.useMemo)(()=>{let e=new Date;return e.setHours(0),_.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[_]),S=(0,ci.useMemo)(()=>{let e=new Date;return e.setHours(12),_.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[_]),k=yC({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,ci.useMemo)(()=>{if("era"!==e.type)return[];let n=g4(new gF(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),a=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(a)for(let e of r)e.formatted=e.formatted.slice(a);return r},[k,t.calendar,e.type]),P=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(x(D,n))t.setSegment("dayPeriod",0);else if(x(S,n))t.setSegment("dayPeriod",12);else break;f.focusNext();break;case"era":{let e=C.find(e=>x(e.formatted,n));e&&(t.setSegment("era",e.era),f.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(r))return;let a=w.parse(r),o=a,i=0===e.minValue;if("hour"===e.type&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":a>11&&(o=w.parse(n));break;case"h12":i=!1,a>12&&(o=w.parse(n))}void 0!==e.value&&e.value>=12&&a>1&&(a+=12)}else void 0!==e.maxValue&&a>e.maxValue&&(o=w.parse(n));if(isNaN(a))return;let l=0!==o||i;l&&t.setSegment(e.type,o),void 0!==e.maxValue&&(Number(a+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",l&&f.focusNext()):s.current=r}}};yF((0,ci.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let t=window.getSelection();(null==t?void 0:t.anchorNode)&&(null==(e=n.current)?void 0:e.contains(null==t?void 0:t.anchorNode))&&t.collapse(n.current)});let R=(0,ci.useRef)("");yF(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&E();break;case"insertCompositionText":R.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&P(r.data)}}),yF(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=R.current),null!=r&&(x(D,r)||x(S,r))&&P(r))}),fr(()=>{let e=n.current;return()=>{document.activeElement===e&&(f.focusPrevious()||f.focusNext())}},[n,f]);let T=f1()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,ci.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(m=void 0);let O=fg(),$=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),j=yI({"aria-label":`${N}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===u){I.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:fb(b,j,{id:O,...T,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":m,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:$,suppressContentEditableWarning:$,spellCheck:$?"false":void 0,autoCorrect:$?"off":void 0,[parseInt(cs().version,10)>=17?"enterKeyHint":"enterkeyhint"]:$?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!$?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(fX()?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(),E()}},onFocus:()=>{s.current="",n.current&&yz(n.current,{containingElement:yK(n.current)});let e=window.getSelection();null==e||e.collapse(n.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,a),{focusProps:i,isFocused:s,isFocusVisible:l}=hZ(),{hoverProps:u,isHovered:c}=hQ({...t,isDisabled:r.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,ci.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:e??a,style:l||i?{...i,...l}:void 0,children:u??o,"data-rac":""}},[t,n,r,a,o,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,ci.useCallback)(e=>{e.stopPropagation()},[]);return(0,pl.jsx)("span",{...fb(fI(t),o,i,u),...d,ref:a,style:o.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),xf={short:!1,size:"md"},xh=(0,ci.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:a,invalid:o,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:m,onChangeRaw:f,short:h,size:g,value:y,...v}={...xf,...e},{calendar:b,intlLocale:w,today_:E}=EZ(),x=(0,ci.useId)(),_=!!(u??l),D=(0,ci.useMemo)(()=>wq(r,b),[r,b]),S=(0,ci.useMemo)(()=>wq(y,b,!0),[y,b]),k=(0,ci.useMemo)(()=>wq(d,b),[d,b]),C=(0,ci.useMemo)(()=>wq(p??EY,b),[p,b]),P=(0,ci.useMemo)(()=>o||s,[o,s]),R=(0,ci.useMemo)(()=>(f&&m&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>m?.(wJ(e)))),[f,m]);return(0,pl.jsx)(wY,{locale:w.toString(),children:(0,pl.jsx)("div",{className:pc()("cds--form-item",n),children:(0,pl.jsx)(fE,{values:[[EG,w]],children:(0,pl.jsxs)(wG,{className:pc()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:D,isDisabled:a,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:R,children:[(0,pl.jsxs)("div",{className:"cds--date-picker-container",children:[_&&(0,pl.jsx)(wt,{className:pc()("cds--label",{"cds--label--disabled":a}),htmlFor:x,children:u??l}),(0,pl.jsxs)(vJ,{className:E7,children:[(0,pl.jsx)(xu,{id:_?x:void 0,ref:t,className:pc()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__inputWrapper___uKdT1",{"-esm-openconceptlab__datepicker-module__inputWrapperSm___0RXJc":"sm"===g,"-esm-openconceptlab__datepicker-module__inputWrapperMd___4Vff1":"md"===g||!g||0===g.length,"-esm-openconceptlab__datepicker-module__inputWrapperLg___VCRm5":"lg"===g}),children:e=>"era"!==e.type?(0,pl.jsx)(xm,{className:xe,segment:e}):(0,pl.jsx)(cs().Fragment,{})}),(0,pl.jsx)(h3,{className:pc()(xr,{[xo]:"sm"===g,[xa]:"md"===g||!g||0===g.length,[xi]:"lg"===g}),children:(0,pl.jsx)(xc,{})})]}),(0,pl.jsx)(b9,{className:xn,children:i})]}),(0,pl.jsx)(xl,{variant:"single",today_:E})]})})})})}),xg=(0,ci.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:a,isInvalid:o,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:m="md",value:f,...h},g){let{calendar:y,intlLocale:v,today_:b}=EZ(),w=(0,ci.useId)(),E=!!(s??i),x=(0,ci.useMemo)(()=>{if(f)return{start:wq(f[0],y,!1),end:wq(f[1],y,!1)}},[f,y]),_=(0,ci.useMemo)(()=>{if(t)return{start:wq(t[0],y,!1),end:wq(t[1],y,!1)}},[t,y]),D=(0,ci.useMemo)(()=>wq(c??EY,y,!0),[c,y]),S=(0,ci.useMemo)(()=>wq(u,y,!0),[u,y]),k=(0,ci.useMemo)(()=>n||o,[n,o]),C=(0,ci.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([wJ(e.start),wJ(e.end)]))),[p,d]);return(0,pl.jsx)(wY,{locale:v.toString(),children:(0,pl.jsx)("div",{className:pc()("cds--form-item",e),children:(0,pl.jsx)(fE,{values:[[EG,v]],children:(0,pl.jsx)(wZ,{id:E?w:void 0,className:pc()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:D,value:x,defaultValue:_,ref:g,isDisabled:a,...h,onChange:C,children:(0,pl.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,pl.jsx)(wt,{className:pc()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,pl.jsxs)(vJ,{className:E7,children:[(0,pl.jsxs)("div",{className:pc()("-esm-openconceptlab__datepicker-module__inputsWrapper___xXRQI",{"-esm-openconceptlab__datepicker-module__inputsWrapperSm___nL+b6":"sm"===m,"-esm-openconceptlab__datepicker-module__inputsWrapperMd___Kgcps":"md"===m||!m||0===m.length,"-esm-openconceptlab__datepicker-module__inputsWrapperLg___raaSN":"lg"===m}),children:[(0,pl.jsx)(bq,{className:pc()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__startInput___cWw-5",xt),slot:"start",children:e=>(0,pl.jsx)(xm,{className:xe,segment:e})}),(0,pl.jsx)("div",{className:"-esm-openconceptlab__datepicker-module__separator___Ddb4g",children:(0,pl.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,pl.jsx)(bq,{className:pc()("cds--date-picker-input__wrapper","-esm-openconceptlab__datepicker-module__endInput___xdYOl",xt),slot:"end",children:e=>(0,pl.jsx)(xm,{className:xe,segment:e})})]}),(0,pl.jsx)(h3,{className:pc()(xr,{[xo]:"sm"===m,[xa]:"md"===m||!m||0===m.length,[xi]:"lg"===m}),children:(0,pl.jsx)(xc,{})})]}),(0,pl.jsx)(b9,{className:xn,children:r}),(0,pl.jsx)(xl,{variant:"range",today_:b,minDate:D,maxDate:S})]})})})})})}),xy=({diagnoses:e})=>{let{diagnosisTags:t}=di({externalModuleName:"@openmrs/esm-styleguide"});return(0,pl.jsx)("div",{className:"-esm-openconceptlab__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:n,uuid:r,display:a}=e,o=t[1===n?"primaryColor":"secondaryColor"];return(0,pl.jsx)(ph.Tag,{type:o,children:a},r)})})},xv={action:"-esm-openconceptlab__empty-card-module__action___oG778",content:"-esm-openconceptlab__empty-card-module__content___YUXvR",desktopHeading:"-esm-openconceptlab__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-openconceptlab__empty-card-module__tabletHeading___8mc7w",tile:"-esm-openconceptlab__empty-card-module__tile___3-rRO"},xb=({width:e="64",height:t="64"})=>(0,pl.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,pl.jsx)("use",{href:"#omrs-empty-data-illustration"})}),xw=e=>{let t="tablet"===dN(),n=e.launchForm;return(0,pl.jsx)(ph.Layer,{className:xv.layer,children:(0,pl.jsxs)(ph.Tile,{className:xv.tile,children:[(0,pl.jsx)("div",{className:t?xv.tabletHeading:xv.desktopHeading,children:(0,pl.jsx)("h4",{children:e.headerTitle})}),(0,pl.jsx)(xb,{}),(0,pl.jsx)("p",{className:xv.content,children:iA("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,pl.jsx)("p",{className:xv.action,children:n&&(0,pl.jsx)(ph.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:iA("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},xE=({error:e,headerTitle:t})=>{let n="tablet"===dN();return(0,pl.jsx)(ph.Layer,{children:(0,pl.jsxs)(ph.Tile,{className:"-esm-openconceptlab__error-state-module__tile___mzWLn",children:[(0,pl.jsx)("div",{className:n?"-esm-openconceptlab__error-state-module__tabletHeading___l7Cpn":"-esm-openconceptlab__error-state-module__desktopHeading___p57fl",children:(0,pl.jsx)("h4",{children:t})}),(0,pl.jsxs)("p",{className:"-esm-openconceptlab__error-state-module__errorMessage___0fU6v",children:[iA("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,pl.jsx)("p",{className:"-esm-openconceptlab__error-state-module__errorCopy___xkVog",children:iA("errorCopy")})]})})},xx=xE,x_=cs().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=dA(),i=window.location??{pathname:""},s=cE(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,pl.jsxs)(ph.SideNav,{"aria-label":iA("leftNavigation","Left navigation"),className:"-esm-openconceptlab__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,pl.jsx)(cD,{name:"global-nav-menu-slot"}),n?(0,pl.jsx)(c6,{value:a,fallback:(0,pl.jsx)(cD,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,pl.jsx)(cl.Provider,{value:a,children:(0,pl.jsx)(cD,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),xD=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,ci.useState)(""),s=(0,ci.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=dc()(t,iQ,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,ci.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&a}),[n,a,r,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:m,setPage:f}=function(e,t=0,n=""){let r=dl(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=dS()(function(n,a){if(a){let e=a.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 o=`${iq}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),n&&i.append("_getpagesoffset",""+n*t),e&&i.append("_tag",e),"string"==typeof r&&""!==r&&i.append("name:contains",r),o+i.toString()},iQ);return(0,ci.useMemo)(()=>({locations:a?.length?a?.flatMap(e=>e?.data?.entry??[]):[],isLoading:o,totalResults:a?.[0]?.data?.total,hasMore:!!a?.length&&a?.[a.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[o,a,i,s,l])}(n,r,o),h=(0,ci.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,ci.useCallback)(e=>{a(),i(e.trim())},[a]),y=dB((0,ci.useCallback)(()=>{!p&&d&&f(e=>e+1)},[p,d,f])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)(ph.Search,{"aria-describedby":m?`${s}-error`:void 0,labelText:iA("searchForLocation"),id:s,placeholder:iA("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),m&&(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,pl.jsx)(ph.InlineNotification,{kind:"error",subtitle:iA("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:iA("error","Error")})}),(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__searchResults___agplm",children:c?(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,pl.jsx)(ph.RadioButtonSkeleton,{className:"-esm-openconceptlab__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__locationResultsContainer___06YOS",children:h.length>0?(0,pl.jsx)(ph.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,pl.jsx)(ph.RadioButton,{className:"-esm-openconceptlab__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,pl.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__emptyState___cPWp8",children:(0,pl.jsx)("p",{className:"-esm-openconceptlab__location-picker-module__locationNotFound___b14++",children:iA("noResultsToDisplay")})})}),p&&(0,pl.jsx)("div",{className:"-esm-openconceptlab__location-picker-module__loadingIcon___GVlrq",children:(0,pl.jsx)(ph.InlineLoading,{description:iA("loading")})})]})})]})},xS=B("modalState",{modalContainer:null,modalStack:[]}),xk=0;async function xC(e,t,n={}){let r=uG(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=xk++;a=await cn({...i,name:`${t}-${s}`},{...n,domElement:e})}else C(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function xP(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xR(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xT(e){return e.find(e=>!xP(e))}function xO(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let x$=window.getComputedStyle(document.body).overflow;function xN({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xI),document.body.style.overflow="hidden",t.style.visibility="unset");let n=xT(e);e.forEach(e=>{switch(e.state){case"NEW":{let n=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=n,e.state="MOUNTING",xC(n,e.modalName,e.props).then(r=>{xP(e)?xR(e.modalName,r):r?(e.parcel=r,t.prepend(n),xO(e,xT(xS.getState().modalStack)===e),r.mountPromise.then(()=>{xP(e)||(e.state="MOUNTED")},t=>{C(t),e.parcel=null,xj(e)})):xj(e)},t=>{C(t),xj(e)});break}case"MOUNTING":case"MOUNTED":xO(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xR(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=xS.getState();xS.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=x$,removeEventListener("keydown",xI)}function xj(e){if(xP(e))return;e.state="TO_BE_DELETED";let t=xS.getState();xS.setState({...t,modalStack:[...t.modalStack]})}function xI(e){"Escape"===e.key&&function(){let[e]=xS.getState().modalStack;e&&xj(e)}()}function xA(e){xS.subscribe(xN),xS.setState({...xS.getState(),modalContainer:e})}function xM(e,t={},n=()=>{}){let r=()=>{let e=xS.getState().modalStack.find(e=>e.onClose===n);e&&xj(e)};if(uG(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=xS.getState()).modalStack],xS.setState({...o,modalStack:i})}else C(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var xL=Object.prototype.hasOwnProperty;let xF=function(e){if(null==e)return!0;if(td(e)&&(tu(e)||"string"==typeof e||"function"==typeof e.splice||th(e)||t_(e)||tl(e)))return!e.length;var t=nE(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tn(e))return!nt(e).length;for(var n in e)if(xL.call(e,n))return!1;return!0},xB=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,pl.jsx)(ph.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},xU=({subject:e})=>{let[t,n]=(0,ci.useState)([]);return(0,ci.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pl.jsx)(pl.Fragment,{children:t.map(e=>(0,pl.jsx)(xB,{notification:e},e.id))})},xV=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,ci.useState)(t);return(0,pl.jsx)(ph.ActionableNotification,{kind:a||"info",actionButtonLabel:c,ariaLabel:iA("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:iA("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},xW=({subject:e})=>{let[t,n]=(0,ci.useState)([]);return(0,ci.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pl.jsx)(pl.Fragment,{children:t.map(e=>(0,pl.jsx)(xV,{notification:e},e.id))})};class xH{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"listeners",new Set)}}let xz=new xH,xK=0,xG=new xH,xZ=0;function xY(e){e&&(0,cS.createRoot)(e).render((0,pl.jsx)(xU,{subject:xz}))}function xq(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!xF(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{xz.next({...e,id:xK++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function xJ(e){e&&(0,cS.createRoot)(e).render((0,pl.jsx)(xW,{subject:xG}))}function xX(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!xF(t))?setTimeout(()=>{xG.next({...e,id:xZ++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let xQ=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],x0=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],x1={container:"-esm-openconceptlab__numeric-observation-module__container___gS0Wg",card:"-esm-openconceptlab__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-openconceptlab__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-openconceptlab__numeric-observation-module__critical-value___Jynsn",cell:"-esm-openconceptlab__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-openconceptlab__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-openconceptlab__numeric-observation-module__critically-low___XP+HX",high:"-esm-openconceptlab__numeric-observation-module__high___JV9do",low:"-esm-openconceptlab__numeric-observation-module__low___-uDKD","label-container":"-esm-openconceptlab__numeric-observation-module__label-container___vTf2y","value-container":"-esm-openconceptlab__numeric-observation-module__value-container___xTUIC",label:"-esm-openconceptlab__numeric-observation-module__label___-pfmb",value:"-esm-openconceptlab__numeric-observation-module__value___1A4zt",units:"-esm-openconceptlab__numeric-observation-module__units___SzvX+","pad-right":"-esm-openconceptlab__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-openconceptlab__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-openconceptlab__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-openconceptlab__numeric-observation-module__arrow___9bvsX"},x4=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,ci.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${iY}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${iY}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=dc()(n,iQ),i=r?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:a,isLoading:o}}(a||r?void 0:o,s),d=a??u,p=(0,ci.useMemo)(()=>{if(r)return r?"--"===r?"normal":xQ.includes(r)?r.toLowerCase():x0.includes(r)?r:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[r,d,e,c])??"normal",m="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,f="normal"!==p,h=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:iA("notAvailable","Not available"),w=pc()({[x1["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[x1["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[x1.low]:"low"===p,[x1.high]:"high"===p,[x1["off-scale-low"]]:"off_scale_low"===p,[x1["off-scale-high"]]:"off_scale_high"===p}),E=pc()({[x1.container]:!0,[x1.card]:!0,[x1["critical-value"]]:m,[x1["abnormal-value"]]:f&&!m}),x=pc()({[x1.cell]:!0,[w]:!0});return"cell"===i?(0,pl.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,pl.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[n&&(0,pl.jsxs)("div",{className:x1["label-container"],children:[(0,pl.jsx)("span",{id:h,className:x1.label,children:n}),f&&(0,pl.jsx)("span",{className:x1[p.replace("_","-")],title:iA("abnormalValue","Abnormal value")})]}),(0,pl.jsxs)("div",{className:x1["value-container"],children:[(0,pl.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:x1.value,children:b}),v&&t&&(0,pl.jsx)("span",{id:y,className:x1.units,children:t})]})]})},x2="-esm-openconceptlab__page-header-module__pageHeader___6TOjO",x3=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,pl.jsx)("div",{className:pc()(x2,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,pl.jsx)("div",{className:pc()(x2,r),...a,children:(0,pl.jsx)(x6,{title:t,illustration:n})})}},x6=({title:e,illustration:t,className:n})=>{let[r,a]=(0,ci.useState)(null);return(0,ci.useEffect)(()=>{r4("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,pl.jsxs)("div",{className:pc()("-esm-openconceptlab__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,pl.jsxs)("div",{className:"-esm-openconceptlab__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,pl.jsx)("p",{children:iA(r.implementationName)}),(0,pl.jsx)("p",{className:"-esm-openconceptlab__page-header-module__pageName___SbZBC",children:e})]})]})},x5=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=dW(t,e,r,o),u="tablet"===dN(),c=iA("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,pl.jsx)(pl.Fragment,{children:e>0&&(0,pl.jsxs)("div",{className:pc()({"-esm-openconceptlab__pagination-module__tablet___82gj1":u,"-esm-openconceptlab__pagination-module__desktop___6yI8e":!u}),children:[(0,pl.jsxs)("div",{children:[c,a&&(0,pl.jsx)(cu,{to:a,className:"-esm-openconceptlab__pagination-module__configurableLink___oIqma",children:i??iA("seeAll","See all")})]}),(0,pl.jsx)(ph.Pagination,{className:"-esm-openconceptlab__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>iA("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function x9(e){return x7(_t(e,"usual","official"))}function x8(e){return x9(e)}function x7(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function _e(e){return x7(e)}function _t(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function _n(e,t=dJ()()){let n=dJ()(t),r=EB(e,n);if(null==r)return null;let a=n.diff(r,"hours"),o=n.diff(r,"days"),i=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),u={};if(a<2)u.minutes=n.diff(r,"minutes");else if(o<2)u.hours=a;else if(i<4)u.days=o;else if(l<1){let e=n.subtract(i,"weeks").diff(r,"days");u.weeks=i,u.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");u.months=s,u.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");u.years=l,u.months=e}else u.years=l;return u}function _r(e,t=dJ()()){let n=_n(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),EF(n,r)}let _a={container:"-esm-openconceptlab__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-openconceptlab__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-openconceptlab__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-openconceptlab__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-openconceptlab__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-openconceptlab__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-openconceptlab__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-openconceptlab__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-openconceptlab__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-openconceptlab__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-openconceptlab__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-openconceptlab__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-openconceptlab__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-openconceptlab__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-openconceptlab__patient-banner-patient-info-module__tag___InccN",gender:"-esm-openconceptlab__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-openconceptlab__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-openconceptlab__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-openconceptlab__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function _o({showIdentifierLabel:e,type:t,value:n}){return(0,pl.jsx)("span",{className:_a.primaryIdentifier,children:(0,pl.jsxs)(ph.Tag,{className:_a.tag,type:"gray",children:[e&&t?.text&&(0,pl.jsxs)("span",{className:_a.label,children:[t.text,": "]}),(0,pl.jsx)("span",{className:_a.value,children:n})]})})}function _i({showIdentifierLabel:e,type:t,value:n}){return(0,pl.jsxs)(ph.FormLabel,{className:_a.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,pl.jsxs)("span",{className:_a.label,children:[t?.text,": "]}),(0,pl.jsx)("span",{className:_a.value,children:n})]})}function _s({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=di(),{primaryIdentifierCode:r}=dK(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,pl.jsx)(pl.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,pl.jsxs)(cs().Fragment,{children:[(0,pl.jsx)("span",{className:_a.identifier,children:n?.coding?.[0]?.code===r?(0,pl.jsx)(_o,{showIdentifierLabel:t,type:n,value:e}):(0,pl.jsx)(_i,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,pl.jsx)("span",{className:_a.separator,children:"\xb7"})]},e)):""})}let _l={Female:p5,Male:p9,Other:p8,Unknown:p7},_u=({gender:e})=>{let t=_l[e];return t?(0,pl.jsx)(t,{fill:"#525252"}):null},_c={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function _d({patient:e,renderedFrom:t}){var n;let r,a,o=x9(e),i=e?.gender&&(a=_c[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:iA(r,n),iconKey:a}),s=(0,ci.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,pl.jsxs)("div",{className:_a.patientInfo,children:[(0,pl.jsx)("div",{className:pc()(_a.row,_a.patientNameRow),children:(0,pl.jsxs)("div",{className:_a.flexRow,children:[(0,pl.jsx)("span",{className:_a.patientName,children:o}),i&&(0,pl.jsxs)("div",{className:_a.gender,children:[(0,pl.jsx)(_u,{gender:i.iconKey}),(0,pl.jsx)("span",{children:i.displayText})]}),(0,pl.jsx)(cD,{className:_a.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,pl.jsxs)("div",{className:_a.demographics,children:[e.birthDate&&(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)("span",{children:_r(e.birthDate)}),(0,pl.jsx)("span",{className:_a.separator,children:"\xb7"}),(0,pl.jsx)("span",{children:EN(e.birthDate,{time:!1})}),(0,pl.jsx)("span",{className:_a.separator,children:"\xb7"})]}),(0,pl.jsx)(_s,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,pl.jsx)(cD,{className:_a.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var _p=n(8282);function _m({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,ci.useState)(!1),{extensions:i}=cx(n),s="tablet"===dN(),l=dF(()=>o(!1),a),u=(0,ci.useRef)(null),c=(0,ci.useRef)(null),d=(0,ci.useId)(),p=`patient-actions-menu-trigger-${d}`,m=`patient-actions-menu-${d}`,f=(0,ci.useCallback)(()=>o(e=>!e),[]),h=(0,ci.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,ci.useCallback)(e=>{if("Escape"===e.key&&a){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&a){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let a=r+("ArrowDown"===e.key?1:-1),o=a<0?t.length-1:a>=t.length?0:a;t[o]?.focus()}},[h,a]);(0,ci.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,ci.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,pl.jsx)("div",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,pl.jsxs)("div",{"data-overflow-menu":!0,className:pc()("cds--overflow-menu",pv),ref:l,children:[(0,pl.jsxs)("button",{className:pc()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},pE),"aria-controls":m,"aria-expanded":a,"aria-haspopup":"true",id:p,onClick:f,onKeyDown:g,ref:u,children:[(0,pl.jsx)("span",{className:"-esm-openconceptlab__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:iA("actions","Actions")})," ",(0,pl.jsx)(_p.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,pl.jsxs)("div",{className:pc()("cds--overflow-menu-options","cds--overflow-menu--flip",pb,{[pw]:a}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:m,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,pl.jsx)("ul",{className:pc()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,pl.jsx)(cD,{name:n,state:y},n)}),(0,pl.jsx)("span",{})]})]})})}var _f=n(5570),_h=n.n(_f);function _g(e){let{patientPhotoConceptUuid:t}=di({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${iY}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=cU()(e?n:null,iQ),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let _y=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,cF.useTranslation)();return(0,pl.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pl.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,pl.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"})]})},_v="-esm-openconceptlab__patient-photo-module__avatar___thboZ";function _b({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=_g(e),[o,i]=(0,ci.useState)(null),[s,l]=(0,ci.useState)(!1),u=(0,ci.useMemo)(()=>_h().generate(e),[e]);(0,ci.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(i(e),l(!1))},n.onerror=()=>{t||(i(null),l(!1))},n.src=e,()=>{t=!0}}i(null),l(!1)},[r?.imageSrc]);let c=(0,ci.useMemo)(()=>n||(o?iA("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):iA("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,pl.jsx)(ph.SkeletonIcon,{className:"-esm-openconceptlab__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,pl.jsx)(_y,{"aria-label":iA("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,pl.jsx)("div",{"aria-label":c,children:(0,pl.jsx)("img",{className:_v,src:o,alt:c,title:t})}):(0,pl.jsx)("div",{"aria-label":c,children:(0,pl.jsx)("div",{className:_v,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,pl.jsx)("span",{className:"-esm-openconceptlab__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let _w=["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-documents","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"],_E=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),_x=_E,__=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),_D=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),_S=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),_k=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),_C=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),_P=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),_R=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),_T=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),_O=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),_$=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),_N=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),_j=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),_I=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),_A=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),_M=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),_L=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),_F=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),_B=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),_U=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),_V=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),_W=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),_H=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),_z=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),_K=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),_G=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),_Z=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),_Y=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),_q=(0,ci.memo)((0,ci.forwardRef)(function(e,t){return(0,pl.jsx)(_0,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),_J=_O,_X=_U,_Q=(0,ci.memo)((0,ci.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,ci.useRef)(document.getElementById(e));return(0,ci.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,pl.jsx)(c6,{value:a.current,fallback:t,children:(0,pl.jsx)(_0,{ref:r,pictogram:e,pictogramProps:n})})})),_0=(0,ci.memo)((0,ci.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,size:a}=Object.assign({},{size:92},t);return(a<=26||a>144)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 92.`),a=92),(0,pl.jsx)("svg",{ref:n,className:pc()("-esm-openconceptlab__pictograms-module__pictogram___ooPKM",r),height:a,width:a,children:(0,pl.jsx)("use",{href:`#${e}`})})})),_1=({children:e})=>"tablet"===dN()?(0,pl.jsx)(ph.Layer,{children:e}):(0,pl.jsx)(pl.Fragment,{children:e}),_4=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:a=()=>{},isLowContrast:o="error"!==r,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==r,title:c,id:d,...p}=e,[m,f]=(0,ci.useState)(n),[h,g]=(0,ci.useState)(!0),[y,v]=(0,ci.useState)(!1),b=(0,ci.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,ci.useCallback)(()=>{v(!0),b()},[b]);return(0,ci.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,ci.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,pl.jsx)(ph.ActionableNotification,{actionButtonLabel:m,"aria-label":iA("closeSnackbar","Close snackbar"),className:pc()("-esm-openconceptlab__snackbar-module__slideIn___senVE",{"-esm-openconceptlab__snackbar-module__animated___8eltL":h,"-esm-openconceptlab__snackbar-module__slideOut___BIIXm":y}),kind:r,lowContrast:o,onActionButtonClick:()=>{a(),w(),i&&f(i)},onClose:b,statusIconDescription:iA("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},_2=({subject:e})=>{let[t,n]=(0,ci.useState)([]),r=(0,ci.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,ci.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,pl.jsx)(pl.Fragment,{children:t.map(e=>(0,pl.jsx)(_4,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},_3=new xH,_6=0;function _5(e){e&&(0,cS.createRoot)(e).render((0,pl.jsx)(_2,{subject:_3}))}function _9(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{_3.next({...e,id:_6++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let _8=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,ci.useCallback)(()=>{s(),t()},[t,s]);return(0,pl.jsx)("div",{children:(0,pl.jsx)(ph.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},_7=({subject:e})=>{let[t,n]=(0,ci.useState)([]),r=(0,ci.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,ci.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,pl.jsx)(pl.Fragment,{children:t.map(e=>(0,pl.jsx)(_8,{toast:e,closeToast:()=>r(e)},e.id))})},De=new xH,Dt=0;function Dn(e){e&&(0,cS.createRoot)(e).render((0,pl.jsx)(_7,{subject:De}))}function Dr(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!xF(t))?setTimeout(()=>{De.next({...e,id:Dt++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Da(e,t=!1){if(t)return!0;let n=Du[e];return!n||!n()}function Do(e,t){let n=Dy.getState()?.workspaceGroup,r=n?.name;r&&e===r&&DE(()=>{let r=Dk(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),Dy.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function Di(e,t){let{name:n,additionalProps:r}=t;uQ(n);let a=()=>{Df(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Ds(n,r),closeWorkspaceGroup:!1})};Da(e.name)?a():D_("closing-workspace-launching-new-workspace",a,e.title??e.name)}function Ds(e,t){let n=uQ(e),r=Dy.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void Do(r.name,()=>{Ds(e,t)});let a=Dy.getState().workspaceGroup?.name,o={...n,title:DD(n,t),closeWorkspace:(t={})=>Df(e,t),closeWorkspaceWithSavedChanges:t=>Df(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(Du[n]=r)},setTitle:(t,n)=>{o.title=t,o.titleNode=n,Dy.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?o:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:a,additionalProps:t??{}};function i(e,t){Dy.setState(n=>{let r=[e,...t??n.openWorkspaces],a=Dw(e);return{...n,openWorkspaces:r,workspaceWindowState:a}})}a&&Dk(a,t);let s=Dy.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==o.type);if(0===s.length)i(o);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];i({...t,additionalProps:o.additionalProps,...t.title===DD(t,t.additionalProps)&&{title:DD(o,o.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,Dy.getState().openWorkspaces.filter(e=>e.type!=o.type)),Di(u,{name:e,additionalProps:t})):i(o);else Di(s[0],{name:e,additionalProps:t})}function Dl({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Dh(t),Ds(n,r),iF({to:e})}let Du={};function Dc(e,t){Du[e]=t}function Dd(e){return Du[e]}function Dp(){let e=Dy.getState();Dy.setState({...e,prompt:null})}let Dm={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Df(e,t={}){t={...Dm,...t};let n=()=>{let n=Dy.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),a=Dy.getState().workspaceGroup?.name;a&&t.closeWorkspaceGroup&&Do(a),Du[e]=()=>!1,Dy.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:Dw(r?.[0])})),t?.onWorkspaceClose?.()};return Da(e,t?.ignoreChanges)?(n(),!0):(D_("closing-workspace",n,uQ(e).title??e),!1)}function Dh(e){Dy.getState().context!=e&&Dy.setState({context:e,openWorkspaces:[],prompt:null})}let Dg={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},Dy=B("workspace",Dg);function Dv(){return Dy}function Db(e){let t=Dy.getState();Dy.setState({...t,workspaceWindowState:e})}function Dw(e){return e?.preferredWindowSize??"normal"}function DE(e=()=>{},t=()=>!0){let n=Dy.getState().openWorkspaces.filter(t).every(({name:e})=>Da(e)),r=()=>{DS(),e?.()};n?r():D_("closing-all-workspaces",r)}function Dx(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=cf(Dy);return(0,ci.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function D_(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:iA("unsavedChangesTitleText","Unsaved changes"),body:iA("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:iA("discard","Discard")};break;case"closing-all-workspaces":{let e=Dy.getState().openWorkspaces.filter(({name:e})=>!Da(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:iA("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:iA("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:iA("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:iA("unsavedChangesTitleText","Unsaved changes"),body:iA("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{Dy.setState(e=>({...e,prompt:null})),t?.()},confirmText:iA("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}Dy.setState(e=>({...e,prompt:r}))}function DD(e,t){return t?.workspaceTitle??e.title}function DS(){Dy.setState(Dg)}function Dk(e,t={}){if(!e||"default"===e)return;let n=V(e,{});return t&&n.setState(e=>({...e,...t})),n}let DC="-esm-openconceptlab__action-menu-button-module__container___F68g0",DP="-esm-openconceptlab__action-menu-button-module__elementContainer___D1ACn",DR="-esm-openconceptlab__action-menu-button-module__active___HAE75";function DT({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,pl.jsxs)(pl.Fragment,{children:[e({size:16}),t?(0,pl.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,pl.jsx)("span",{className:"-esm-openconceptlab__action-menu-button-module__countTag___3mn9k",children:n})]})}let DO=({getIcon:e,label:t,iconDescription:n,handler:r,type:a,tagContent:o})=>{let i=dN(),{workspaces:s,workspaceWindowState:l}=Dx(),u=s?.findIndex(({type:e})=>e===a)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===i||"phone"===i?(0,pl.jsxs)(ph.Button,{className:pc()(DC,{[DR]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,pl.jsx)("span",{className:DP,children:(0,pl.jsx)(DT,{formOpenInTheBackground:d,getIcon:e,tagContent:o})}),(0,pl.jsx)("span",{children:t})]}):(0,pl.jsx)(ph.IconButton,{align:"left","aria-label":n,className:pc()(DC,{[DR]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,pl.jsx)("div",{className:DP,children:(0,pl.jsx)(DT,{formOpenInTheBackground:d,getIcon:e,tagContent:o})})})};var D$=n(4240),DN=n(8622),Dj=/[\\^$.*+?()[\]{}|]/g,DI=RegExp(Dj.source);let DA=function(e){return(e=n9(e))&&DI.test(e)?e.replace(Dj,"\\$&"):e};function DM({contextKey:e}){let{prompt:t}=Dx();return(0,ci.useEffect)(()=>{RegExp(`/${DA(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,ci.useEffect)(()=>(Dh(e),()=>{Dh(null)}),[e]),(0,ci.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,a=RegExp(`/${DA(e)}(/|$)`),o=new URL(r),i=a.test(o.pathname),s=Dy.getState().openWorkspaces.every(({name:e})=>Da(e));i||(s?DS():(n?.(),DE(()=>{iF({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,pl.jsxs)(ph.ComposedModal,{open:!0,onClose:Dp,children:[(0,pl.jsx)(ph.ModalHeader,{title:t.title}),(0,pl.jsx)(ph.ModalBody,{children:(0,pl.jsx)("p",{className:"-esm-openconceptlab__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,pl.jsxs)(ph.ModalFooter,{children:[(0,pl.jsx)(ph.Button,{kind:"secondary",onClick:Dp,children:t.cancelText??iA("cancel")}),(0,pl.jsx)(ph.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??iA("confirm")})]})]}):null}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DL(Object(n),!0).forEach(function(t){DU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function DU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DV(e){return(DV=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function DW(e,t){return(DW=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DH(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Dz=function(e){var t=ci.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&DW(i,t);var n,r,a,o=(n=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=DV(i);e=n?Reflect.construct(t,arguments,DV(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 DH(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),DU(DH(t=o.call(this,e)),"handleRef",function(e){t.el=e}),DU(DH(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),DU(DH(t),"getParcelProps",function(){var e=DF(DF({},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 r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw 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(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,DF({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 cO&&cO.Consumer?ci.createElement(cO.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=cO&&cO.Consumer?ci.createElement(cO.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return ci.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],DB(i.prototype,r),a&&DB(i,a),i}();DU(Dz,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function DK({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,ci.useState)(),a=function(e){let[t,n]=(0,ci.useState)({}),[r,a]=(0,ci.useState)(e);return(0,ci.useEffect)(()=>{r!==e&&a(e)},[e]),(0,ci.useEffect)(()=>{let e,t=Dk(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,ci.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let o=(0,ci.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...a,...e.additionalProps},[e,t,a]);return n?(0,pl.jsx)(Dz,{config:n,mountParcel:ca,...o},e.name):(0,pl.jsx)(ph.InlineLoading,{className:"-esm-openconceptlab__workspace-module__loader___jEP+q",description:`${iA("loading","Loading")} ...`})}function DG({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,a]=(0,ci.useState)(!1),o=(0,ci.useRef)(window.innerHeight),{featureName:i}=(0,ci.useContext)(cl),s=dN();(0,ci.useEffect)(()=>{let e=()=>{a(!dj(s)&&o.current>window.innerHeight),o.current!=window.innerHeight&&(o.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[o]);let l=`action-menu-${t&&"default"!=t?t:i}-items-slot`;return(0,pl.jsx)("aside",{className:pc()("-esm-openconceptlab__action-menu-module__sideRail___iVmKs",{"-esm-openconceptlab__action-menu-module__withinWorkspace___YZfet":e,"-esm-openconceptlab__action-menu-module__sideRailHidden___bCdyQ":r,"-esm-openconceptlab__action-menu-module__sideRailVisible___+oJCY":!r}),children:(0,pl.jsx)("div",{className:"-esm-openconceptlab__action-menu-module__container___sf6Et",children:(0,pl.jsx)(cD,{className:"-esm-openconceptlab__action-menu-module__chartExtensions___l+r+Y",name:l,state:n})})})}function DZ({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:a}){let o=dN(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=Dx(),u=l?.name,c=i[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),m=(0,ci.useMemo)(()=>n||u&&!d,[u,d,n]);return dn(!d&&!dj(o)),(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsxs)("div",{className:n?"-esm-openconceptlab__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-openconceptlab__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,pl.jsx)("aside",{className:pc()(t?"-esm-openconceptlab__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-openconceptlab__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-openconceptlab__workspace-module__hiddenRelative___7oRNR":d,"-esm-openconceptlab__workspace-module__narrowWorkspace___R3CN9":"narrow"===p,"-esm-openconceptlab__workspace-module__widerWorkspace___L-pDK":"wider"===p,"-esm-openconceptlab__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===p}),children:(0,pl.jsx)("div",{className:pc()("-esm-openconceptlab__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-openconceptlab__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-openconceptlab__workspace-module__hiddenFixed___kBFgl":d}),children:i.map((e,t)=>(0,pl.jsx)("div",{className:pc()("-esm-openconceptlab__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-openconceptlab__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,pl.jsx)(ci.Suspense,{fallback:null,children:(0,pl.jsx)(cF.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,pl.jsx)(DY,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,pl.jsx)(DM,{contextKey:e})]}),m&&(0,pl.jsx)(DG,{name:u,isWithinWorkspace:!n,actionMenuProps:a})]})}function DY({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,cF.useTranslation)(),r=dN(),{workspaceWindowState:a,workspaceGroup:o}=Dx(),i=o?.name,s="maximized"===a;(0,ci.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,ci.useContext)(cl),u=(0,ci.useCallback)(()=>{Db(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:m}=(0,ci.useMemo)(()=>e??{},[e]),f=(0,ci.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsxs)(ph.Header,{"aria-label":iA("workspaceHeader","Workspace Header"),className:"-esm-openconceptlab__workspace-module__header___nMH1R",children:[!dj(r)&&!c&&(0,pl.jsx)(ph.HeaderMenuButton,{"aria-label":iA("close","Close"),renderMenuIcon:(0,pl.jsx)(pO,{}),onClick:()=>m()}),(0,pl.jsx)(ph.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,pl.jsx)("div",{className:"-esm-openconceptlab__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,pl.jsxs)(ph.HeaderGlobalBar,{className:"-esm-openconceptlab__workspace-module__headerButtons___lek95",children:[(0,pl.jsx)(cD,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:f}),(0,pl.jsx)(cD,{name:`workspace-header-type-${e.type}-slot`,state:f}),(0,pl.jsx)(cD,{name:`workspace-header-${l}-slot`,state:f}),dj(r)&&(0,pl.jsxs)(pl.Fragment,{children:[(d||s)&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":s?iA("minimize","Minimize"):iA("maximize","Maximize"),onClick:u,children:s?(0,pl.jsx)(D$.Xj,{}):(0,pl.jsx)(D$.hz,{})}),c&&!i?(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("hide","Hide"),onClick:()=>Db("hidden"),children:(0,pl.jsx)(p$,{})}):(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("close","Close"),onClick:()=>m?.(),children:(0,pl.jsx)(pq,{})})]}),"tablet"===r&&c&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("close","Close"),onClick:()=>m?.(),children:(0,pl.jsx)(DN.d3,{})})]})]}),(0,pl.jsx)("div",{className:pc()("-esm-openconceptlab__workspace-module__workspaceContent___FFe+u",{"-esm-openconceptlab__workspace-module__marginWorkspaceContent___SEV31":!!p}),children:(0,pl.jsx)(DK,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let Dq="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),DJ=new Uint8Array(16),DX=[];for(let e=0;e<256;++e)DX.push((e+256).toString(16).slice(1));let DQ=function(e,t,n){if(Dq&&!t&&!e)return Dq();let r=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(DJ)}();if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(DX[e[t+0]]+DX[e[t+1]]+DX[e[t+2]]+DX[e[t+3]]+"-"+DX[e[t+4]]+DX[e[t+5]]+"-"+DX[e[t+6]]+DX[e[t+7]]+"-"+DX[e[t+8]]+DX[e[t+9]]+"-"+DX[e[t+10]]+DX[e[t+11]]+DX[e[t+12]]+DX[e[t+13]]+DX[e[t+14]]+DX[e[t+15]]).toLowerCase()}(r)};async function D0(e,t){let{openedGroup:n}=u1.getState();if(n){if(n.groupName===e&&D2(n.props,t))return!0;else if(!await D3({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return u1.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function D1(e){let{openedGroup:t,openedWindows:n}=u1.getState();if(t){if(n.length>0&&!(e||await D3({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;u1.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function D4(e,t=null,n=null,r=null){let a=u1.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=u4(e);if(!o)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=a,{name:s}=o,l=u2(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=u3(e);if(i&&(i.groupName!==l.name||!D2(i.props,r)))return!!await D3({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(u1.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[D7(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let r=a.openedWindows[u],o=a.openedGroup?.props??{},i=a.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=r;if(D2(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&D2(d.props,t)?((i||u!==a.openedWindows.length-1)&&u1.setState(D6.restoreWindow(a,s)),!0):!!await D3({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(u1.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[D7(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await D3({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(u1.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[D7(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(u1.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[D7(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await D3({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(u1.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[D7(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function D2(e,t){return null==e||null==t||T(e,t)}function D3(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let a=e.openedWorkspaces[r];if(a.hasUnsavedChanges&&n.push(a),t&&a.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=u1.getState(),a=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":a=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":a=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===a.length?Promise.resolve(!0):new Promise(e=>{let t=xM("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:a.map(e=>r[e.workspaceName])})})}let D6={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),a=[...e.openedWindows],o={...a[r],maximized:n};return a[r]=o,{...e,openedWindows:a}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],a=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=u3(t);if(n<0)return e;let r={...e.openedWindows[n]},a=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),o=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,a);let i=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;o.splice(n,1),t&&o.length>0&&(i=!1)}else o[n]=r;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,t,n,r){let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);if(o.window!==a.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);let i=e.openedWindows.findIndex(e=>e.windowName===a.window);if(-1==i)throw Error(`Cannot open child workspace ${n} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${n} 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==i?{...e,openedWorkspaces:[...u,D7(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=u3(t);if(r<0)return e;let a={...e.openedWindows[r]},o=a.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(o<0)return e;a.openedWorkspaces[o]={...a.openedWorkspaces[o],hasUnsavedChanges:n};let i=[...e.openedWindows];return i[r]=a,{...e,openedWindows:i}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function D5(){return ch(u1,D6)}let D9=()=>(0,ci.useContext)(cO),D8=()=>Object.keys(u1.getState().registeredWorkspacesByName);function D7(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:DQ()}}let Se={workspaceOuterContainer:"-esm-openconceptlab__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-openconceptlab__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-openconceptlab__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-openconceptlab__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-openconceptlab__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-openconceptlab__workspace2-module__maximized___aKCbE",hidden:"-esm-openconceptlab__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-openconceptlab__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-openconceptlab__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-openconceptlab__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-openconceptlab__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-openconceptlab__workspace2-module__header___MXXx9",headerButtons:"-esm-openconceptlab__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-openconceptlab__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-openconceptlab__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-openconceptlab__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-openconceptlab__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-openconceptlab__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-openconceptlab__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-openconceptlab__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},St=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=dN(),{setWindowMaximized:a,hideWindow:o,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:m,isMostRecentlyOpenedWindowHidden:f}=D5(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=D9(),b=u3(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,ci.useEffect)(()=>{E?.hasUnsavedChanges!=n&&i(h,n??!1)},[E?.hasUnsavedChanges,n,h,i]),(0,ci.useEffect)(()=>{p[h]!==e&&m(h,e)},[p,h,e,m]),b<0||null==l||null==E)return null;let x=u[l.groupName];if(!x)throw Error(`Cannot find registered workspace group ${l.groupName}`);let _=d[h].window,D=c[_];if(!D)throw Error(`Cannot find registered workspace window ${_}`);let{icon:S,canMaximize:k}=D,C="closable"===x.persistence,P=!!S&&!C,{maximized:R}=w,T=D?.width??"narrow",O=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),$=b<s.length-1||f;return(0,pl.jsxs)("div",{className:pc()(Se.workspaceOuterContainer,{[Se.narrowWorkspace]:"narrow"===T,[Se.widerWorkspace]:"wider"===T,[Se.extraWideWorkspace]:"extra-wide"===T,[Se.isActionMenuOpened]:O}),children:[(0,pl.jsx)("div",{className:pc()(Se.workspaceSpacer,{[Se.hidden]:$})}),(0,pl.jsx)("div",{className:pc()(Se.workspaceMiddleContainer,{[Se.maximized]:R,[Se.hidden]:$,[Se.isRootWorkspace]:g,[Se.showActionMenu]:v}),children:(0,pl.jsxs)("div",{className:pc()(Se.workspaceInnerContainer,{[Se.maximized]:R,[Se.hidden]:$,[Se.isRootWorkspace]:g}),children:[(0,pl.jsxs)(ph.Header,{"aria-label":iA("workspaceHeader"),className:Se.header,children:[(0,pl.jsx)(ph.HeaderName,{prefix:"",children:e}),(0,pl.jsx)("div",{className:Se.overlayHeaderSpacer}),(0,pl.jsx)(ph.HeaderGlobalBar,{className:Se.headerButtons,children:dj(r)?(0,pl.jsxs)(pl.Fragment,{children:[(k||R)&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":R?iA("minimize"):iA("maximize"),onClick:()=>a(_,!R),children:R?(0,pl.jsx)(D$.Xj,{}):(0,pl.jsx)(D$.hz,{})}),P&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("hide"),onClick:()=>o(),children:(0,pl.jsx)(p$,{})}),!C&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("close"),onClick:()=>y({closeWindow:!0}),children:(0,pl.jsx)(pq,{})})]}):(0,pl.jsxs)(pl.Fragment,{children:[P&&(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("hide"),onClick:()=>o(),children:(0,pl.jsx)(DN.d3,{})}),(0,pl.jsx)(ph.HeaderGlobalAction,{"aria-label":iA("close"),onClick:()=>{C?D1():y({closeWindow:!0})},children:(0,pl.jsx)(pq,{})})]})})]}),(0,pl.jsx)("div",{className:pc()(Se.workspaceContent),children:t})]})})]})},Sn="-esm-openconceptlab__action-menu-button2-module__container___pahg-",Sr="-esm-openconceptlab__action-menu-button2-module__elementContainer___PzOdc",Sa="-esm-openconceptlab__action-menu-button2-module__active___4O4Bs",So="-esm-openconceptlab__action-menu-button2-module__focused___+k5kD";function Si({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,pl.jsxs)(pl.Fragment,{children:[e({size:16}),t?(0,pl.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,pl.jsx)("span",{className:"-esm-openconceptlab__action-menu-button2-module__countTag___rb5CW",children:n})]})}let Ss=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a})=>{let o=dN(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=D5(),{extension:c}=(0,ci.useContext)(cl),d=i.findIndex(e=>e.windowName===c?.extensionId),p=i[d],m=null!=p,f=m&&(d<i.length-1||u),h=m&&!f,g=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(m)f?s(p.windowName):l();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;D4(e,t,n)}};return"tablet"===o||"phone"===o?(0,pl.jsxs)(ph.Button,{className:pc()(Sn,{[Sa]:m&&!h,[So]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,pl.jsx)("span",{className:Sr,children:(0,pl.jsx)(Si,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,pl.jsx)("span",{children:t})]}):(0,pl.jsx)(ph.IconButton,{align:"left","aria-label":t,className:pc()(Sn,{[Sa]:m&&!h,[So]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,pl.jsx)("div",{className:Sr,children:(0,pl.jsx)(Si,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function Sl({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,pl.jsx)(ph.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?pY:pK,children:e?iA("showLess","Show less"):iA("showMore","Show more")})}let Su={contactDetails:"-esm-openconceptlab__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-openconceptlab__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-openconceptlab__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-openconceptlab__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-openconceptlab__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-openconceptlab__patient-banner-contact-details-module__relationship___CZmay"},Sc=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${iY}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=cU()(t,iQ),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,ci.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsxs)("p",{className:Su.heading,children:[iA("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,pl.jsx)(ph.InlineLoading,{description:`${iA("loading","Loading")} ...`,role:"progressbar"}):(0,pl.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EC(e?.startDate).getTime()-EC(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,pl.jsx)("li",{children:(0,pl.jsx)(cu,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,pl.jsx)("li",{children:"--"})})(),t.length>3&&(0,pl.jsx)("li",{className:Su.link,children:(0,pl.jsx)(cu,{to:`${window.spaBase}/home/patient-lists`,children:iA("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Sd=({patientId:e})=>{let{patient:t,isLoading:n}=dz(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,pl.jsx)(ph.InlineLoading,{description:`${iA("loading","Loading")} ...`,role:"progressbar"}):(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)("p",{className:Su.heading,children:iA("address","Address")}),(0,pl.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,pl.jsxs)("li",{children:[iA(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,pl.jsxs)("li",{children:[iA(e,e),": ",t]},`address-${e}`)):(0,pl.jsx)("li",{children:"--"})})]})},Sp=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=di({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=dc()(`${iY}/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)))`,iQ);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,ci.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,ci.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?iA(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)("p",{className:Su.heading,children:iA("contactDetails","Contact Details")}),t?(0,pl.jsx)(ph.InlineLoading,{description:`${iA("loading","Loading")} ...`,role:"progressbar"}):(0,pl.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,pl.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,pl.jsx)("li",{children:"--"})})]})},Sm=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${iY}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:a,isValidating:o}=cU()(e?t:null,iQ),i=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?i:null,error:r,isLoading:a,isValidating:o}}(e);return(0,pl.jsxs)(pl.Fragment,{children:[(0,pl.jsx)("p",{className:Su.heading,children:iA("relationships","Relationships")}),n?(0,pl.jsx)(ph.InlineLoading,{description:`${iA("loading","Loading")} ...`,role:"progressbar"}):(0,pl.jsx)("ul",{children:t&&t.length>0?(0,pl.jsx)(pl.Fragment,{children:t.map(e=>(0,pl.jsxs)("li",{className:Su.relationship,children:[(0,pl.jsx)("div",{children:(0,pl.jsx)(cu,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,pl.jsx)("div",{children:e.relationshipType}),(0,pl.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?iA("yearAbbreviation","yr"):iA("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,pl.jsx)("li",{children:"--"})})]})};function Sf({patientId:e,deceased:t}){return(0,pl.jsxs)("div",{className:pc()(Su.contactDetails,{[Su.deceased]:t}),children:[(0,pl.jsxs)("div",{className:Su.row,children:[(0,pl.jsx)("div",{className:Su.col,children:(0,pl.jsx)(Sd,{patientId:e})}),(0,pl.jsx)("div",{className:Su.col,children:(0,pl.jsx)(Sp,{patientUuid:e})})]}),(0,pl.jsxs)("div",{className:Su.row,children:[(0,pl.jsx)("div",{className:Su.col,children:(0,pl.jsx)(Sm,{patientId:e})}),(0,pl.jsx)("div",{className:Su.col,children:(0,pl.jsx)(Sc,{patientUuid:e})})]})]})}function Sh(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}let Sg="-esm-openconceptlab__action-menu2-module__container___5s3CM";function Sy({workspaceGroup:e,groupProps:t}){let n=dN(),{persistence:r}=e;return(0,pl.jsx)("aside",{className:"-esm-openconceptlab__action-menu2-module__sideRail___qwAz4",children:(0,pl.jsxs)("div",{className:Sg,children:["closable"==r&&dj(n)&&(0,pl.jsx)(ph.IconButton,{align:"left",onClick:()=>D1(),label:iA("close"),kind:"ghost",children:(0,pl.jsx)(pq,{})}),(0,pl.jsx)(cl.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,pl.jsx)(cD,{className:Sg,name:e.name,state:{groupProps:t}})})]})})}function Sv(e){let t=new URL(e,window.location.origin).pathname,n=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,r=n.endsWith("/")?n.slice(0,-1):n,a=null;return r?r===t?a="/":t.startsWith(`${r}/`)&&(a=t.slice(r.length)):a=t,{full:t,spaRelative:a}}let Sb=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:a,showActionMenu:o})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=D5(),u=(0,ci.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:a=!1}=e;return r?!!(a||await D3({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(a||await D3({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let a=t.workspaceName,{openedWorkspaces:o}=n,i=o.findIndex(e=>e.workspaceName===a);-1===i||i!==o.length-1&&o.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await D3({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:o[i+1].workspaceName})||l(a,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:i&&i.props?i.props:null,workspaceMeta:u1.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:a,windowName:n.windowName,showActionMenu:o},[t,s,i,n]);if(!e){let{registeredWorkspacesByName:e}=u1.getState(),n=e[t.workspaceName],a=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=u1.getState(),l=a?s[a]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,pl.jsxs)("div",{className:pc()(Se.workspaceOuterContainer,{[Se.narrowWorkspace]:"narrow"===u,[Se.widerWorkspace]:"wider"===u,[Se.extraWideWorkspace]:"extra-wide"===u,[Se.isActionMenuOpened]:c}),children:[(0,pl.jsx)("div",{className:Se.workspaceSpacer}),(0,pl.jsx)("div",{className:pc()(Se.workspaceMiddleContainer,{[Se.isRootWorkspace]:r,[Se.showActionMenu]:o}),children:(0,pl.jsx)("div",{className:pc()(Se.workspaceInnerContainer,{[Se.isRootWorkspace]:r}),children:(0,pl.jsx)(ph.InlineLoading,{className:Se.loader,description:`${iA("loading")} ...`})})})]})}return(0,pl.jsx)(Dz,{config:e,mountParcel:ca,...u},t.workspaceName)},Sw=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,a]=(0,ci.useState)({}),{registeredWorkspacesByName:o}=u1.getState();return(0,ci.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=o[e.workspaceName];return[e.uuid,await d9(t,n)]})).then(t=>{e||a(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,pl.jsx)(pl.Fragment,{children:n.map((a,o)=>(0,pl.jsx)(Sb,{openedWorkspace:a,openedWindow:e,lifeCycle:r[a.uuid],isRootWorkspace:0===o,isLeafWorkspace:o===n.length-1,showActionMenu:t},a.uuid))})};function SE(e){e&&(0,cS.createRoot)(e).render((0,pl.jsx)(Sx,{}))}function Sx(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=D5();if((0,ci.useEffect)(()=>lo("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(D1().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=Sv(t),o=Sv(n);if(null===a.spaRelative||null===o.spaRelative)return!0;let i=r.exec(a.spaRelative),s=r.exec(o.spaRelative);if(i&&s||(i=r.exec(a.full),s=r.exec(o.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,o,i)&&a(D1().then(e=>!e))}),[e,n]),!e)return null;let a=n[e.groupName],o=t.some(e=>e.maximized),{name:i}=a,s=Object.values(r).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,pl.jsxs)("div",{className:pc()("-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-openconceptlab__workspace-windows-and-menu-module__overlay___fqI+X":a.overlay,"-esm-openconceptlab__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":o}),children:[(0,pl.jsx)("div",{className:"-esm-openconceptlab__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,pl.jsx)(Sw,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,pl.jsx)(Sy,{workspaceGroup:a,groupProps:e.props})]})}function S_(e,t,n){if(null==e)return n;let r=wX(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=wX(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}a.push({canonical:t,original:e})}let o=r;for(;o;){let e=a.find(e=>e.canonical===o);if(e)return e.original;let t=o+"-",n=a.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===o){o="fr-HT";continue}let r=o.lastIndexOf("-");if(-1===r)break;let i=(o=o.slice(0,r)).lastIndexOf("-");-1!==i&&o.length-i==2&&(o=o.slice(0,i))}return n}function SD(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function SS(e){return!!e&&e.constructor===Object}var Sk=n(7229);function SC(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function SP(e,t){return Sk(function(e){let t=e.indexOf("-");if(t>=0){let n=SC(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return SC(e)}(t),e,{includePrerelease:!0})}async function SR(e,t={}){let n,{shouldRetry:r,getDelay:a,onError:o}=t;r=r??(e=>e<=5),a=a??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await ST(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function ST(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function SO(e,t,n,r){}function S$(e){}function SN(e){return Promise.resolve([])}function Sj(e){return Promise.resolve([])}function SI(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function SA(e){return()=>{}}function SM(){return!0}},254(e,t,n){"use strict";n.d(t,{A:()=>r});let r=function(e){return null==e}}}]);
|