@openmrs/esm-fast-data-entry-app 1.5.1-pre.945 → 1.5.1-pre.947

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/dist/8986.js CHANGED
@@ -1,4 +1,4 @@
1
- (globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["8986"],{1154(e,t,n){"use strict";function r(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,a;r=t,a=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,{A:()=>m});var i=["width","height","viewBox"],s=["tabindex"],l={focusable:"false",preserveAspectRatio:"xMidYMid meet"},u=n(5556),c=n.n(u),d=n(7979),f=n.n(d);let m=f().forwardRef(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:u="xMidYMid meet",...c},d){let{tabindex:m,...p}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,u=void 0===r?"0 0 ".concat(t," ").concat(n):r,c=o(e,i),d=c.tabindex,f=o(c,s),m=a(a(a({},l),f),{},{width:t,height:n,viewBox:u});return m["aria-label"]||m["aria-labelledby"]||m.title?(m.role="img",null!=d&&(m.focusable="true",m.tabindex=d)):m["aria-hidden"]=!0,m}({...c,tabindex:n});return e&&(p.className=e),null!=m&&("number"==typeof m?p.tabIndex=m:p.tabIndex=Number(n)),d&&(p.ref=d),r&&(p.xmlns=r),u&&(p.preserveAspectRatio=u),f().createElement("svg",p,t)});m.displayName="Icon",m.propTypes={"aria-hidden":c().oneOfType([c().bool,c().oneOf(["true","false"])]),"aria-label":c().string,"aria-labelledby":c().string,children:c().node,className:c().string,height:c().oneOfType([c().number,c().string]),preserveAspectRatio:c().string,tabIndex:c().oneOfType([c().number,c().string]),viewBox:c().string,width:c().oneOfType([c().number,c().string]),xmlns:c().string}},6734(e){e.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",a="week",o="month",i="quarter",s="year",l="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m="en",p={};p[m]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};var h="$isDayjsObject",g=function(e){return e instanceof w||!(!e||!e[h])},y=function e(t,n,r){var a;if(!t)return m;if("string"==typeof t){var o=t.toLowerCase();p[o]&&(a=o),n&&(p[o]=n,a=o);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=t.name;p[s]=t,a=s}return!r&&a&&(m=a),a||!r&&m},v=function(e,t){if(g(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new w(n)},b={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,o),i=n-a<0,s=t.clone().add(r+(i?-1:1),o);return+(-(r+(n-a)/(i?a-s:s-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(u){return({M:o,y:s,w:a,d:"day",D:l,h:r,m:n,s:t,ms:e,Q:i})[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=y,b.i=g,b.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function f(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[h]=!0}var m=f.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(c);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return this.$d.toString()!==u},m.isSame=function(e,t){var n=v(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return v(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<v(e)},m.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,i){var u=this,c=!!b.u(i)||i,d=b.p(e),f=function(e,t){var n=b.w(u.$u?Date.UTC(u.$y,t,e):new Date(u.$y,t,e),u);return c?n:n.endOf("day")},m=function(e,t){return b.w(u.toDate()[e].apply(u.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),u)},p=this.$W,h=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case s:return c?f(1,0):f(31,11);case o:return c?f(1,h):f(0,h+1);case a:var v=this.$locale().weekStart||0,w=(p<v?p+7:p)-v;return f(c?g-w:g+(6-w),h);case"day":case l:return m(y+"Hours",0);case r:return m(y+"Minutes",1);case n:return m(y+"Seconds",2);case t:return m(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(a,i){var u,c=b.p(a),d="set"+(this.$u?"UTC":""),f=((u={}).day=d+"Date",u[l]=d+"Date",u[o]=d+"Month",u[s]=d+"FullYear",u[r]=d+"Hours",u[n]=d+"Minutes",u[t]=d+"Seconds",u[e]=d+"Milliseconds",u)[c],m="day"===c?this.$D+(i-this.$W):i;if(c===o||c===s){var p=this.clone().set(l,1);p.$d[f](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[b.p(e)]()},m.add=function(e,i){var l,u=this;e=Number(e);var c=b.p(i),d=function(t){var n=v(u);return b.w(n.date(n.date()+Math.round(t*e)),u)};if(c===o)return this.set(o,this.$M+e);if(c===s)return this.set(s,this.$y+e);if("day"===c)return d(1);if(c===a)return d(7);var f=((l={})[n]=6e4,l[r]=36e5,l[t]=1e3,l)[c]||1,m=this.$d.getTime()+e*f;return b.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||u;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=b.z(this),o=this.$H,i=this.$m,s=this.$M,l=n.weekdays,c=n.months,f=n.meridiem,m=function(e,n,a,o){return e&&(e[n]||e(t,r))||a[n].slice(0,o)},p=function(e){return b.s(o%12||12,e,"0")},h=f||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return s+1;case"MM":return b.s(s+1,2,"0");case"MMM":return m(n.monthsShort,s,c,3);case"MMMM":return m(c,s);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return m(n.weekdaysMin,t.$W,l,2);case"ddd":return m(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return b.s(o,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return h(o,i,!0);case"A":return h(o,i,!1);case"m":return String(i);case"mm":return b.s(i,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},m.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},m.diff=function(e,l,u){var c,d=this,f=b.p(l),m=v(e),p=(m.utcOffset()-this.utcOffset())*6e4,h=this-m,g=function(){return b.m(d,m)};switch(f){case s:c=g()/12;break;case o:c=g();break;case i:c=g()/3;break;case a:c=(h-p)/6048e5;break;case"day":c=(h-p)/864e5;break;case r:c=h/36e5;break;case n:c=h/6e4;break;case t:c=h/1e3;break;default:c=h}return u?c:b.a(c)},m.daysInMonth=function(){return this.endOf(o).$D},m.$locale=function(){return p[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=y(e,t,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},f}(),E=w.prototype;return v.prototype=E,[["$ms",e],["$s",t],["$m",n],["$H",r],["$W","day"],["$M",o],["$y",s],["$D",l]].forEach(function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,w,v),e.$i=!0),v},v.locale=y,v.isDayjs=g,v.unix=function(e){return v(1e3*e)},v.en=p[m],v.Ls=p,v.p={},v}()},7581(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)}}},5238(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,f=o.second||0,m=o.millisecond||0;return a?new Date(Date.UTC(l,u,s,c,d,f,m)):new Date(l,u,s,c,d,f,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)}}},1445(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 f=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),a=o(e).local();return f.call(r,a,t,n)}}}()},2849(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}},6767(e,t,n){!function(t){"use strict";var r=n(6974);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)},2467(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(",")+")"}}},6974(e,t,n){"use strict";var r=n(2849),a=n(2467),o=n(6743),i=n(8502),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 f(e){return e%2==0?"#ddd":"#222"}function m(e){return d(e,0,15,.02,.15)}var p=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=f(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=f(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=f(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]})}p.prototype.toSvg=function(){return this.svg.toString()},p.prototype.toString=function(){return this.toSvg()},p.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},p.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},p.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},p.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)})},p.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)]()},p.prototype.geoHexagons=function(){var e,t,n,r,a,o,i,s,l,p=d(c(this.hash,0),0,15,8,60),h=p*Math.sqrt(3),g=2*p,y=(s=p/2,[0,l=Math.sin(60*Math.PI/180)*p,s,0,s+p,0,2*p,l,s+p,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*p),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:f(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,r).transform({translate:[o*p*1.5-g/2,e-h/2]}),0===o&&this.svg.polyline(y,r).transform({translate:[6*p*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*p*1.5-g/2,e-h/2]})),0===o&&0===i&&this.svg.polyline(y,r).transform({translate:[6*p*1.5-g/2,5*h+h/2]}),t++},p.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=f(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]})},p.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),p=(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:f(a),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[o*s,i*l*.66-l/2]}).polyline(p).end(),0===i&&this.svg.group(r).transform({translate:[o*s,6*l*.66-l/2]}).polyline(p).end(),t+=1},p.prototype.geoPlusSigns=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,10,25),p=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=f(o),e=+(s%2!=0),a={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(a).transform({translate:[i*p-i*l+e*l-l,s*p-s*l-p/2]}).rect(g).end(),0===i&&this.svg.group(a).transform({translate:[4*p-i*l+e*l-l,s*p-s*l-p/2]}).rect(g).end(),0===s&&this.svg.group(a).transform({translate:[i*p-i*l+e*l-l,4*p-s*l-p/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(a).transform({translate:[4*p-i*l+e*l-l,4*p-s*l-p/2]}).rect(g).end(),n++},p.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:f(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++},p.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:f(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++},p.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=f(a),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,i*s]}),n+=1},p.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=f(r),this.svg.rect(a*i,o*i,i,i,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},p.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=f(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=f(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},p.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:f(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},p.prototype.geoTriangles=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,15,80),p=l/2*Math.sqrt(3),h=[s=l/2,0,l,p,0,p,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*p),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=m(a=c(this.hash,e)),r={fill:f(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,p*i],rotate:[n,l/2,p/2]}),0===o&&this.svg.polyline(h,r).transform({translate:[6*l*.5-l/2,p*i],rotate:[n,l/2,p/2]}),e+=1},p.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),p=[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:f(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(p,r).transform({translate:[o*s-s/2+e,l/2*i-l/2]}),0===o&&this.svg.polyline(p,r).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(p,r).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===i&&this.svg.polyline(p,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},p.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:f(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:f(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},p.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},p.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=f(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=f(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)},p.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(","),p=3*a+2*s,h=2*o+2*a;for(this.svg.setWidth(p),this.svg.setHeight(h),e=0;e<20;e++)switch(t=m(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:f(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-a/2,-a/2,a,a,n),this.svg.rect(p-a/2,-a/2,a,a,n),this.svg.rect(-a/2,h-a/2,a,a,n),this.svg.rect(p-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(p-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:[p-a/2,-a/2],rotate:[0,a/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[p-a/2,h+a/2],rotate:[0,a/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[p/2+a/2,o/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[p-p/2-a/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[p/2+a/2,h-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[p-p/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:[p-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:[-p+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:[-p+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:[-p+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:[-p+a/2,-h+a/2],rotate:[-30,0,0]})}}},6743(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,f=t,m=n,p=r,h=a;for(u=0;u<80;u++){u<20?(s=p^f&(m^p),l=0x5a827999):u<40?(s=f^m^p,l=0x6ed9eba1):u<60?(s=f&m|p&(f|m),l=0x8f1bbcdc):(s=f^m^p,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|o[u]);h=p,p=m,m=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,n=n+m|0,r=r+p|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()}},8502(e,t,n){"use strict";var r=n(2849),a=n(6541);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}},6541(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("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,m=[],p=[];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,f=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[f++];if(a.type===n)break;if("char"===a.type||"escape"===a.type){let e=a.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];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,[]))p.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=`^(?:${p.join("|")})`;return f&&(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}}},2694(e,t,n){"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338(e,t,n){"use strict";var r=n(539);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},3904(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(968),{safeRe:i,t:s}=n(9718),l=n(2111),u=n(7272),c=n(3908),d=n(8311)},8311(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,O(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],m)),l("caret trim",e=e.replace(c[d.CARETTRIM],p));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(T(this.set[t],e,this.options))return!0;return!1}}e.exports=a;let o=new(n(8794)),i=n(968),s=n(3904),l=n(7272),u=n(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:m,caretTrimReplace:p}=n(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=n(6874),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=_(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=>D(e,t)).join(" "),D=(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})},_=(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],"")),O=e=>(t,n,r,a,o,i,s,l,u,c,d,f)=>(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`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${n} ${l}`.trim()),T=(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}},3908(e,t,n){"use strict";let r=n(7272),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(6874),{safeRe:i,t:s}=n(9718),l=n(968),{compareIdentifiers:u}=n(1123);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},2111(e,t,n){"use strict";let r=n(4641),a=n(3999),o=n(5580),i=n(4089),s=n(7059),l=n(5200);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}`)}}},560(e,t,n){"use strict";let r=n(3908);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},4641(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0===r(e,t,n)},5580(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>r(e,t,n)>0},4089(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>r(e,t,n)>=0},7059(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0>r(e,t,n)},5200(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0>=r(e,t,n)},3999(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0!==r(e,t,n)},7638(e,t,n){"use strict";let r=n(8311);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},6874(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}},7272(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):()=>{}},1123(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)}},8794(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}}},968(e){"use strict";let t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},9718(e,t,n){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(6874),i=n(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,m="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[m,a]],h=(e,t,n)=>{let r=(e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=f++;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*$")},6369(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},3029(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},2901(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6192);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(0,r.A)(a.key),a)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6192);function a(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6562(e,t,n){"use strict";function r(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},6192(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(2284);function a(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=(0,r.A)(a))return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},2284(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{A:()=>r})},3612(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{A:()=>a})},8992(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,f,m,p;n.r(t),n.d(t,{GenderUnknownIcon:()=>cn,evaluateAsNumber:()=>o$,getImportMapOverrideMap:()=>aO,StockManagementPictogram:()=>Ey,ChemistryIcon:()=>uZ,BabyIcon:()=>uj,DashboardExtension:()=>dn,openmrsComponentDecorator:()=>sq,tryRegisterExtension:()=>ur,pictogramIds:()=>w1,ActivityIcon:()=>uT,compile:()=>oj,removeRouteMapOverride:()=>a5,TableBatchActions:()=>uw,getAsyncLifecycle:()=>sX,subscribeOpenmrsEvent:()=>ol,PasswordIcon:()=>ck,Assessment2Pictogram:()=>w6,CloseIcon:()=>uQ,setupRouteMapOverrides:()=>a7,getWorkspaceGroupRegistration:()=>i3,registerWorkspace:()=>i0,useFeatureFlag:()=>lw,reset:()=>iz,LabOrderIcon:()=>cf,VisitMode:()=>op,useLocations:()=>lV,getLifecycle:()=>sJ,formatDatetime:()=>bu,getVisitsForPatient:()=>ox,formatPartialDate:()=>bo,CustomOverflowMenu:()=>uC,LocationIcon:()=>cp,GroupIcon:()=>ca,createUseStore:()=>sw,VisitStatus:()=>oh,getSessionLocation:()=>ao,getCurrentImportMap:()=>aU,usePatient:()=>lZ,useRenderableExtensions:()=>lq,getOpenedWindowIndexByWorkspace:()=>i8,setLeftNav:()=>iG,clearHistory:()=>rZ,clearConfigErrors:()=>e7,formatTime:()=>bl,isDevEnabled:()=>ap,closeWorkspaceGroup2:()=>xx,getCurrentRouteMap:()=>a1,ConfigurableLink:()=>sm,sessionStore:()=>r3,setSessionLocale:()=>as,subscribeSnackbarShown:()=>k,getLoggedInUser:()=>aa,GenderMaleIcon:()=>ce,getExtensionSlotConfigFromStore:()=>ef,evaluateAsNumberAsync:()=>oI,getImportMapDefaultMap:()=>aP,unregisterExtensionRendering:()=>ic,implementerToolsConfigStore:()=>ek,Type:()=>X,InPatientPictogram:()=>Eo,cleanupObsoleteFeatureFlags:()=>o6,getAttachmentsUrl:()=>or,showSnackbar:()=>ET,PatientBannerActionsMenu:()=>wZ,PatientSearchPictogram:()=>Ec,DocumentAttachmentIcon:()=>u4,Snackbar:()=>Ek,CardiologyPictogram:()=>w9,ImageMedicalIcon:()=>cs,ActionableNotificationComponent:()=>wm,DiagnosisTags:()=>b0,iconIds:()=>uO,PatientsPictogram:()=>Ed,interpolateUrl:()=>rB,setupHistory:()=>rz,subscribeToastShown:()=>S,detachAll:()=>iB,convertToLocaleCalendar:()=>bc,DocumentIcon:()=>u2,configInternalStore:()=>ei,ActionMenuButton2:()=>xL,setupDynamicOfflineDataHandler:()=>x7,makeUrl:()=>r1,oneOf:()=>ti,selectPreferredName:()=>wA,launchWorkspaceGroup:()=>function e(t,n){let r=i3(t),{state:a,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:i,workspaceToLaunch:s}=n,l=function(){return EJ}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?EF(r?.name,()=>{e(t,n)}):E1(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:i}})),E5(t,a),o?.(),s&&EV(s.name,s.additionalProps??{})},MobileCheckIcon:()=>cw,createErrorHandler:()=>R,parseDate:()=>v7,getAttachmentByUuid:()=>ot,LeftNavMenu:()=>b5,getExtensionRegistration:()=>iA,ShoppingCartAddItemIcon:()=>c7,ReferralOrderIcon:()=>cN,ReportIcon:()=>cI,dispatchToastShown:()=>x,getImportMapNextPageMap:()=>aR,registerExtension:()=>ij,setupOfflineSync:()=>x8,DownloadIcon:()=>u3,useConnectivity:()=>Da,provide:()=>eU,ShoppingCartArrowDownIcon:()=>cV,featureFlagsStore:()=>o4,promptBeforeClosing:()=>EH,jsep:()=>o_,GeriatricsPictogram:()=>Er,SearchIcon:()=>cj,reportError:()=>P,slugify:()=>aF,isOmrsDateToday:()=>v5,getExtensionStore:()=>id,BloodBankPictogram:()=>w5,TriagePictogram:()=>Eb,Workspace2:()=>xN,refetchCurrentUser:()=>at,CheckmarkOutlineIcon:()=>uG,registerExtensionSlot:()=>iH,AllergiesIcon:()=>c6,ArrowDownIcon:()=>u$,useOpenmrsInfinite:()=>lR,getExtensionConfigFromExtensionSlotStore:()=>eg,OpenmrsDatePicker:()=>bX,getExtensionConfigFromStore:()=>eh,getDynamicOfflineDataEntries:()=>De,getLocaleDisplayName:()=>vk,messageOmrsServiceWorker:()=>Dn,navigate:()=>rU,launchWorkspace2:()=>xD,getGroupByWindowName:()=>i9,CustomOverflowMenuItem:()=>uP,isUrl:()=>to,CaretDownIcon:()=>uB,ArrowLeftIcon:()=>uI,FacilityPictogram:()=>En,ViewOffIcon:()=>c2,updateInternalExtensionStore:()=>ia,dispatchActionableNotificationShown:()=>w,resetRouteMapOverrides:()=>a9,formatDurationBetween:()=>bv,defaultVisitCustomRepresentation:()=>og,getBreadcrumbsFor:()=>th,useOpenmrsPagination:()=>lx,Pagination:()=>wT,CheckmarkFilledIcon:()=>uK,clearCurrentUser:()=>an,showModal:()=>wc,ChevronUpIcon:()=>uX,saveVisit:()=>ow,useAttachments:()=>lo,Pictogram:()=>E_,useExtensionSlot:()=>sk,ChevronDownIcon:()=>uY,OpenmrsDateRangePicker:()=>bQ,deleteAttachmentPermanently:()=>oo,getVisitTypes:()=>om,OverflowMenuHorizontalIcon:()=>c_,EventScheduleIcon:()=>u9,getSessionStore:()=>r7,ActionMenu:()=>xp,ProcedureOrderIcon:()=>cO,preloadImport:()=>aV,registerWorkspaceWindows2:()=>se,useOnVisible:()=>lW,setSessionLocation:()=>ai,userHasAccess:()=>ar,ChartAverageIcon:()=>uH,getFeatureFlag:()=>o5,UserAvatarIcon:()=>cX,renderExtension:()=>su,useFhirInfinite:()=>lI,toVisitTypeObject:()=>od,useSession:()=>lJ,EmergencyDepartmentPictogram:()=>Et,Notification:()=>wd,dispatchSnackbarShown:()=>E,navigateAndLaunchWorkspace:()=>EU,formatDate:()=>bi,workspace2StoreActions:()=>xk,SwitcherIcon:()=>cF,esmStyleGuideSchema:()=>uy,getImportMapDisabledOverrides:()=>aT,useAssignedExtensionIds:()=>lr,CaretRightIcon:()=>uU,evaluateAsType:()=>oM,PageHeader:()=>wR,TranslateIcon:()=>cZ,setUserProperties:()=>al,MovementIcon:()=>cD,renderInlineNotifications:()=>ww,subscribePrecacheStaticDependencies:()=>Dr,PaymentsDeskPictogram:()=>Ef,usePrimaryIdentifierCode:()=>lY,useLayoutType:()=>lA,getCurrentUser:()=>r8,XrayPictogram:()=>Ew,CaretUpIcon:()=>uW,renderActionableNotifications:()=>wx,OpenmrsAppContext:()=>s8,setupModals:()=>wu,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(x2(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;x2(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>H,recordConfigDerivationError:()=>e_,useAbortController:()=>le,Extension:()=>sp,getFhirServerPaginationHandlers:()=>lk,useConnectedExtensions:()=>lc,registerApp:()=>uo,HospitalBedIcon:()=>ci,useExtensionInternalStore:()=>ly,configExtensionStore:()=>el,getSynchronizationItems:()=>Dt,getExtensionSlotsConfigStore:()=>ec,registerExtensionRendering:()=>iu,RenderIfValueIsTruthy:()=>s7,registerFeatureFlag:()=>o3,useFhirFetchAll:()=>l$,restBaseUrl:()=>rX,CalendarHeatMapIcon:()=>uL,getWorkspaceRegistration:()=>i4,isImportMapOverrideDisabled:()=>aN,resetConfigSystem:()=>te,getExtensionInternalStore:()=>it,registerGlobalStore:()=>U,evaluateAsBoolean:()=>oT,PatientBannerPatientInfo:()=>wK,addRouteMapOverride:()=>a6,getDefaultCalendar:()=>br,SettingsIcon:()=>cL,DrugOrderIcon:()=>u6,ProgramsIcon:()=>cT,useAssignedExtensions:()=>sS,CloseFilledIcon:()=>u0,canAccessStorage:()=>x1,registerDefaultCalendar:()=>bn,TreeViewAltIcon:()=>cq,OverflowMenuVerticalIcon:()=>cS,clearConfigDerivationError:()=>eS,getConfigStore:()=>eu,registerWorkspaceGroup:()=>i1,InformationSquareIcon:()=>cc,EmptyCard:()=>b4,ChevronLeftIcon:()=>uq,RadiologyIcon:()=>c8,useCandidateExtensions:()=>la,renderToasts:()=>EA,isDesktop:()=>lj,integrateBreakpoints:()=>uc,RegistrationPictogram:()=>Eh,CardHeader:()=>up,getExtensionRegistrationFrom:()=>iM,InformationIcon:()=>cl,TrashCanIcon:()=>cY,useShallowStableValue:()=>sh,useOpenmrsSWR:()=>lH,Assessment1Pictogram:()=>w3,finishRegisteringAllApps:()=>ui,importDynamic:()=>aB,useFhirPagination:()=>lS,useVisitContextStore:()=>l6,ArrowUpIcon:()=>uA,showActionableNotification:()=>wD,useForceUpdate:()=>lE,useVisit:()=>l5,updateWorkspaceWindowState:()=>EQ,PatientBannerPatientIdentifiers:()=>wU,WorkspaceNotification:()=>xa,TransferPictogram:()=>Ev,usePagination:()=>lz,Breakpoint:()=>us,PatientBannerToggleContactDetailsButton:()=>xF,CloseOutlineIcon:()=>u1,ObstetricsPictogram:()=>Eu,parseDateInput:()=>bf,getConfig:()=>eH,attach:()=>iL,getLocale:()=>vC,ActionMenuButton:()=>xt,isUrlWithTemplateParameters:()=>ta,useEmrConfiguration:()=>lh,useLeftNav:()=>lL,ToolsIcon:()=>cG,ErrorState:()=>b3,detach:()=>iF,setCurrentVisit:()=>ob,ConditionsIcon:()=>c9,SaveIcon:()=>cA,useWorkspaces:()=>E2,resetWorkspaceStore:()=>E6,useConfig:()=>lu,validator:()=>Q,CalendarIcon:()=>uF,getHistory:()=>rK,StickyNoteAddIcon:()=>cU,useWorkspace2Store:()=>xC,getPatientName:()=>wN,getVisitStore:()=>ov,getCoreTranslation:()=>rF,registerModuleWithConfigSystem:()=>eL,registerModuleLoad:()=>eF,getBreadcrumbs:()=>tf,extractVariableNames:()=>o0,translateFrom:()=>rL,useStoreWithActions:()=>sb,EditIcon:()=>u5,getCandidateExtensions:()=>iW,shallowEqual:()=>T,subscribeNotificationShown:()=>D,MaximizeIcon:()=>cg,promptForClosingWorkspaces:()=>xS,WarningIcon:()=>c3,closeAllWorkspaces:()=>E1,fhirBaseUrl:()=>rQ,matchLocale:()=>x0,registerBreadcrumb:()=>tc,usePatientPhoto:()=>wJ,EventsIcon:()=>u8,createGlobalStore:()=>V,workspaceStore:()=>EJ,subscribeToFeatureFlag:()=>o9,useExtensionStore:()=>lb,closeWorkspace:()=>EZ,createAttachment:()=>oa,useLeftNavStore:()=>lF,TableIcon:()=>cz,Icon:()=>dt,InformationFilledIcon:()=>cu,getCurrentPageMap:()=>aC,LaboratoryPictogram:()=>Ei,temporaryConfigStore:()=>es,getPromptBeforeClosingFcn:()=>Ez,toDateObjectStrict:()=>v9,defineConfigSchema:()=>ej,filterBreadcrumbs:()=>tp,invalidateImplementerToolsConfig:()=>ex,PatientBannerContactDetails:()=>xz,getAssignedExtensions:()=>iU,PatientPhoto:()=>w0,MaterialOrderIcon:()=>ch,MicroscopeIcon:()=>cb,visitTypesUrl:()=>of,scheduleRecomputation:()=>iy,PharmacyPictogram:()=>Em,AttachmentIcon:()=>c5,MoneyIcon:()=>cE,getAttachments:()=>on,getWorkspaceGroupStore:()=>E5,PageHeaderContent:()=>wO,MedicationIcon:()=>cy,PrinterIcon:()=>cR,PatientListsPictogram:()=>Ex,useAppContext:()=>lt,isOpenmrsRoutes:()=>az,AppointmentsAltPictogram:()=>w4,GenericOrderTypeIcon:()=>cr,batchExtensionUpdates:()=>ih,useExtensionSlotStore:()=>sD,ViewIcon:()=>c4,formattedName:()=>wM,sessionEndpoint:()=>r0,duration:()=>bg,resetImportMapOverrides:()=>aM,TableOfContentsIcon:()=>cH,CaretLeftIcon:()=>uV,getTranslationOverrides:()=>ez,isVersionSatisfied:()=>x6,EmptyCardIllustration:()=>b2,PenIcon:()=>cP,getWorkspaceStore:()=>EX,validators:()=>ts,setupImportMapOverrides:()=>aL,showToast:()=>Ej,useDefineAppContext:()=>s9,verifyTotpCode:()=>au,getGlobalStore:()=>W,useOnClickOutside:()=>lU,getWindowByWorkspaceName:()=>i5,ArrowRightIcon:()=>uM,loadLifeCycles:()=>ue,registerBreadcrumbs:()=>td,MotherIcon:()=>cx,fetchCurrentPatient:()=>oi,Toast:()=>EN,MessageQueueIcon:()=>cv,TwoFactorAuthenticationIcon:()=>cJ,Pharmacy2Pictogram:()=>Ep,goBackInHistory:()=>rG,GroupAccessIcon:()=>co,getExtensionRenderingsStore:()=>ir,setImplementerToolsConfigRecomputer:()=>eE,getAsyncExtensionLifecycle:()=>s0,setupApiModule:()=>ag,renderLoadingSpinner:()=>xK,WorkspaceContainer:()=>xh,showNotification:()=>wE,getModalRegistration:()=>iJ,ListCheckedIcon:()=>cm,ResponsiveWrapper:()=>ES,GynaecologyPictogram:()=>Ea,ShoppingCartIcon:()=>cB,getRouteMapNextPageMap:()=>a4,MetadataExportPictogram:()=>El,updateVisit:()=>oE,backendDependencies:()=>ah,MaybePictogram:()=>ED,createParcelMounter:()=>ss,openmrsFetch:()=>r2,useStore:()=>sv,isOpenmrsAppRoutes:()=>aH,HomePictogram:()=>EE,DentistryPictogram:()=>w7,ServiceQueuesPictogram:()=>Eg,toLanguageTag:()=>vS,launchWorkspace:()=>EV,setFeatureFlag:()=>o8,DigitalTrustPictogram:()=>Ee,NumericObservation:()=>wC,attachmentUrl:()=>oe,interpolateString:()=>rV,inRange:()=>tr,useExtensionSlotMeta:()=>lv,AppointmentsPictogram:()=>w2,renderSnackbars:()=>EO,getRegisteredWorkspace2Names:()=>xR,logout:()=>ac,toLocationObject:()=>ou,ChartLineIcon:()=>uz,UserHasAccess:()=>lX,evaluateAsBooleanAsync:()=>oN,changeWorkspaceContext:()=>EY,createDashboard:()=>dr,getLocations:()=>oc,useExtensionContext:()=>lg,canCloseWorkspaceWithoutPrompting:()=>EL,getExtensionsConfigStore:()=>em,getRouteMapDefaultMap:()=>a2,age:()=>wL,isOmrsDateStrict:()=>v6,registerWorkspaceGroups2:()=>i7,usePaginationInfo:()=>lK,evaluateAsync:()=>oO,useOpenmrsFetchAll:()=>lT,removeImportMapOverride:()=>aI,showWorkspacePrompts:()=>E4,useVisitTypes:()=>l8,ageAsDuration:()=>wj,getExtensionNameFromId:()=>iI,renderParcel:()=>si,useWorkspace2Context:()=>xP,ResetIcon:()=>cM,RenewIcon:()=>c$,subscribeActionableNotificationShown:()=>_,ErrorCard:()=>b6,GenderFemaleIcon:()=>u7,enableImportMapOverride:()=>aA,retry:()=>x5,ComponentContext:()=>sf,ExtensionSlot:()=>sP,unsetLeftNav:()=>iZ,addImportMapOverride:()=>a$,MaybeIcon:()=>de,useCustomOverflowMenu:()=>uk,PedestrianFamilyIcon:()=>cC,cancelPrompt:()=>EK,CtScanPictogram:()=>w8,dispatchNotificationShown:()=>b,leftNavStore:()=>iK,OpenmrsFetchError:()=>r4,UserFollowIcon:()=>cQ,launchWorkspaceGroup2:()=>xE,ChevronRightIcon:()=>uJ,UserXrayIcon:()=>c0,GenderOtherIcon:()=>ct,formatDuration:()=>bd,toOmrsIsoString:()=>v8,Labs2Pictogram:()=>Es,workspace2Store:()=>i6,setUserLanguage:()=>ae,useBodyScrollLock:()=>li,getExtensionConfig:()=>ep,SyringeIcon:()=>cW,LocationPicker:()=>b9,useDebounce:()=>ld,TimeIcon:()=>cK,getExtensionSlotConfig:()=>ed,AddIcon:()=>uN,getRouteMapOverrideMap:()=>a3,processConfig:()=>eK,InventoryManagementIcon:()=>cd,registerWorkspaces2:()=>st,UserIcon:()=>c1,formatPatientName:()=>wI,fireOpenmrsEvent:()=>os,registerModal:()=>iq,registerTranslationNamespace:()=>eB,displayName:()=>w$,evaluate:()=>oR,defineExtensionConfigSchema:()=>eV,renderWorkspaceWindowsAndMenu:()=>xX,getSyncLifecycle:()=>sQ,evaluateAsTypeAsync:()=>oA});let h="openmrs:notification-shown",g="openmrs:actionable-notification-shown",y="openmrs:toast-shown",v="openmrs:snack-bar-shown";function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(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){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}function C(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function P(e){let t=O(e);setTimeout(()=>{throw t})}function R(){let e=Error();return t=>{let n=O(t);n.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["8986"],{1154(e,t,n){"use strict";function r(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,a;r=t,a=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,{A:()=>m});var i=["width","height","viewBox"],s=["tabindex"],l={focusable:"false",preserveAspectRatio:"xMidYMid meet"},u=n(5556),c=n.n(u),d=n(7979),f=n.n(d);let m=f().forwardRef(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:u="xMidYMid meet",...c},d){let{tabindex:m,...p}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,u=void 0===r?"0 0 ".concat(t," ").concat(n):r,c=o(e,i),d=c.tabindex,f=o(c,s),m=a(a(a({},l),f),{},{width:t,height:n,viewBox:u});return m["aria-label"]||m["aria-labelledby"]||m.title?(m.role="img",null!=d&&(m.focusable="true",m.tabindex=d)):m["aria-hidden"]=!0,m}({...c,tabindex:n});return e&&(p.className=e),null!=m&&("number"==typeof m?p.tabIndex=m:p.tabIndex=Number(n)),d&&(p.ref=d),r&&(p.xmlns=r),u&&(p.preserveAspectRatio=u),f().createElement("svg",p,t)});m.displayName="Icon",m.propTypes={"aria-hidden":c().oneOfType([c().bool,c().oneOf(["true","false"])]),"aria-label":c().string,"aria-labelledby":c().string,children:c().node,className:c().string,height:c().oneOfType([c().number,c().string]),preserveAspectRatio:c().string,tabIndex:c().oneOfType([c().number,c().string]),viewBox:c().string,width:c().oneOfType([c().number,c().string]),xmlns:c().string}},6734(e){e.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",a="week",o="month",i="quarter",s="year",l="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m="en",p={};p[m]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};var h="$isDayjsObject",g=function(e){return e instanceof w||!(!e||!e[h])},y=function e(t,n,r){var a;if(!t)return m;if("string"==typeof t){var o=t.toLowerCase();p[o]&&(a=o),n&&(p[o]=n,a=o);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=t.name;p[s]=t,a=s}return!r&&a&&(m=a),a||!r&&m},v=function(e,t){if(g(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new w(n)},b={s:f,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(n/60),2,"0")+":"+f(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,o),i=n-a<0,s=t.clone().add(r+(i?-1:1),o);return+(-(r+(n-a)/(i?a-s:s-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(u){return({M:o,y:s,w:a,d:"day",D:l,h:r,m:n,s:t,ms:e,Q:i})[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=y,b.i=g,b.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function f(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[h]=!0}var m=f.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(c);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return this.$d.toString()!==u},m.isSame=function(e,t){var n=v(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return v(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<v(e)},m.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,i){var u=this,c=!!b.u(i)||i,d=b.p(e),f=function(e,t){var n=b.w(u.$u?Date.UTC(u.$y,t,e):new Date(u.$y,t,e),u);return c?n:n.endOf("day")},m=function(e,t){return b.w(u.toDate()[e].apply(u.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),u)},p=this.$W,h=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case s:return c?f(1,0):f(31,11);case o:return c?f(1,h):f(0,h+1);case a:var v=this.$locale().weekStart||0,w=(p<v?p+7:p)-v;return f(c?g-w:g+(6-w),h);case"day":case l:return m(y+"Hours",0);case r:return m(y+"Minutes",1);case n:return m(y+"Seconds",2);case t:return m(y+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(a,i){var u,c=b.p(a),d="set"+(this.$u?"UTC":""),f=((u={}).day=d+"Date",u[l]=d+"Date",u[o]=d+"Month",u[s]=d+"FullYear",u[r]=d+"Hours",u[n]=d+"Minutes",u[t]=d+"Seconds",u[e]=d+"Milliseconds",u)[c],m="day"===c?this.$D+(i-this.$W):i;if(c===o||c===s){var p=this.clone().set(l,1);p.$d[f](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[b.p(e)]()},m.add=function(e,i){var l,u=this;e=Number(e);var c=b.p(i),d=function(t){var n=v(u);return b.w(n.date(n.date()+Math.round(t*e)),u)};if(c===o)return this.set(o,this.$M+e);if(c===s)return this.set(s,this.$y+e);if("day"===c)return d(1);if(c===a)return d(7);var f=((l={})[n]=6e4,l[r]=36e5,l[t]=1e3,l)[c]||1,m=this.$d.getTime()+e*f;return b.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||u;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=b.z(this),o=this.$H,i=this.$m,s=this.$M,l=n.weekdays,c=n.months,f=n.meridiem,m=function(e,n,a,o){return e&&(e[n]||e(t,r))||a[n].slice(0,o)},p=function(e){return b.s(o%12||12,e,"0")},h=f||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return s+1;case"MM":return b.s(s+1,2,"0");case"MMM":return m(n.monthsShort,s,c,3);case"MMMM":return m(c,s);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return m(n.weekdaysMin,t.$W,l,2);case"ddd":return m(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return b.s(o,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return h(o,i,!0);case"A":return h(o,i,!1);case"m":return String(i);case"mm":return b.s(i,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},m.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},m.diff=function(e,l,u){var c,d=this,f=b.p(l),m=v(e),p=(m.utcOffset()-this.utcOffset())*6e4,h=this-m,g=function(){return b.m(d,m)};switch(f){case s:c=g()/12;break;case o:c=g();break;case i:c=g()/3;break;case a:c=(h-p)/6048e5;break;case"day":c=(h-p)/864e5;break;case r:c=h/36e5;break;case n:c=h/6e4;break;case t:c=h/1e3;break;default:c=h}return u?c:b.a(c)},m.daysInMonth=function(){return this.endOf(o).$D},m.$locale=function(){return p[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=y(e,t,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},f}(),E=w.prototype;return v.prototype=E,[["$ms",e],["$s",t],["$m",n],["$H",r],["$W","day"],["$M",o],["$y",s],["$D",l]].forEach(function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,w,v),e.$i=!0),v},v.locale=y,v.isDayjs=g,v.unix=function(e){return v(1e3*e)},v.en=p[m],v.Ls=p,v.p={},v}()},7581(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)}}},5238(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,f=o.second||0,m=o.millisecond||0;return a?new Date(Date.UTC(l,u,s,c,d,f,m)):new Date(l,u,s,c,d,f,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)}}},1445(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 f=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),a=o(e).local();return f.call(r,a,t,n)}}}()},2849(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}},6767(e,t,n){!function(t){"use strict";var r=n(6974);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)},2467(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(",")+")"}}},6974(e,t,n){"use strict";var r=n(2849),a=n(2467),o=n(6743),i=n(8502),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 f(e){return e%2==0?"#ddd":"#222"}function m(e){return d(e,0,15,.02,.15)}var p=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=f(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=f(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=f(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]})}p.prototype.toSvg=function(){return this.svg.toString()},p.prototype.toString=function(){return this.toSvg()},p.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},p.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},p.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},p.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)})},p.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)]()},p.prototype.geoHexagons=function(){var e,t,n,r,a,o,i,s,l,p=d(c(this.hash,0),0,15,8,60),h=p*Math.sqrt(3),g=2*p,y=(s=p/2,[0,l=Math.sin(60*Math.PI/180)*p,s,0,s+p,0,2*p,l,s+p,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*p),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:f(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,r).transform({translate:[o*p*1.5-g/2,e-h/2]}),0===o&&this.svg.polyline(y,r).transform({translate:[6*p*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*p*1.5-g/2,e-h/2]})),0===o&&0===i&&this.svg.polyline(y,r).transform({translate:[6*p*1.5-g/2,5*h+h/2]}),t++},p.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=f(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]})},p.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),p=(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:f(a),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[o*s,i*l*.66-l/2]}).polyline(p).end(),0===i&&this.svg.group(r).transform({translate:[o*s,6*l*.66-l/2]}).polyline(p).end(),t+=1},p.prototype.geoPlusSigns=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,10,25),p=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=f(o),e=+(s%2!=0),a={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(a).transform({translate:[i*p-i*l+e*l-l,s*p-s*l-p/2]}).rect(g).end(),0===i&&this.svg.group(a).transform({translate:[4*p-i*l+e*l-l,s*p-s*l-p/2]}).rect(g).end(),0===s&&this.svg.group(a).transform({translate:[i*p-i*l+e*l-l,4*p-s*l-p/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(a).transform({translate:[4*p-i*l+e*l-l,4*p-s*l-p/2]}).rect(g).end(),n++},p.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:f(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++},p.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:f(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++},p.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=f(a),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,i*s]}),n+=1},p.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=f(r),this.svg.rect(a*i,o*i,i,i,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},p.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=f(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=f(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},p.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:f(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},p.prototype.geoTriangles=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,15,80),p=l/2*Math.sqrt(3),h=[s=l/2,0,l,p,0,p,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*p),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=m(a=c(this.hash,e)),r={fill:f(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,p*i],rotate:[n,l/2,p/2]}),0===o&&this.svg.polyline(h,r).transform({translate:[6*l*.5-l/2,p*i],rotate:[n,l/2,p/2]}),e+=1},p.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),p=[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:f(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(p,r).transform({translate:[o*s-s/2+e,l/2*i-l/2]}),0===o&&this.svg.polyline(p,r).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(p,r).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===i&&this.svg.polyline(p,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},p.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:f(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:f(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},p.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},p.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=f(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=f(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)},p.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(","),p=3*a+2*s,h=2*o+2*a;for(this.svg.setWidth(p),this.svg.setHeight(h),e=0;e<20;e++)switch(t=m(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:f(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-a/2,-a/2,a,a,n),this.svg.rect(p-a/2,-a/2,a,a,n),this.svg.rect(-a/2,h-a/2,a,a,n),this.svg.rect(p-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(p-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:[p-a/2,-a/2],rotate:[0,a/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[p-a/2,h+a/2],rotate:[0,a/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[p/2+a/2,o/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[p-p/2-a/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[p/2+a/2,h-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[p-p/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:[p-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:[-p+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:[-p+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:[-p+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:[-p+a/2,-h+a/2],rotate:[-30,0,0]})}}},6743(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,f=t,m=n,p=r,h=a;for(u=0;u<80;u++){u<20?(s=p^f&(m^p),l=0x5a827999):u<40?(s=f^m^p,l=0x6ed9eba1):u<60?(s=f&m|p&(f|m),l=0x8f1bbcdc):(s=f^m^p,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|o[u]);h=p,p=m,m=f<<30|f>>>2,f=d,d=g}for(u=0,e=e+d|0,t=t+f|0,n=n+m|0,r=r+p|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()}},8502(e,t,n){"use strict";var r=n(2849),a=n(6541);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}},6541(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("")}},8067(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,m=[],p=[];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,f=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[f++];if(a.type===n)break;if("char"===a.type||"escape"===a.type){let e=a.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];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,[]))p.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=`^(?:${p.join("|")})`;return f&&(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}}},2694(e,t,n){"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338(e,t,n){"use strict";var r=n(539);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},3904(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(968),{safeRe:i,t:s}=n(9718),l=n(2111),u=n(7272),c=n(3908),d=n(8311)},8311(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,O(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[d.TILDETRIM],m)),l("caret trim",e=e.replace(c[d.CARETTRIM],p));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(T(this.set[t],e,this.options))return!0;return!1}}e.exports=a;let o=new(n(8794)),i=n(968),s=n(3904),l=n(7272),u=n(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:m,caretTrimReplace:p}=n(9718),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=n(6874),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=_(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=>D(e,t)).join(" "),D=(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})},_=(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],"")),O=e=>(t,n,r,a,o,i,s,l,u,c,d,f)=>(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`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${n} ${l}`.trim()),T=(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}},3908(e,t,n){"use strict";let r=n(7272),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(6874),{safeRe:i,t:s}=n(9718),l=n(968),{compareIdentifiers:u}=n(1123);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},2111(e,t,n){"use strict";let r=n(4641),a=n(3999),o=n(5580),i=n(4089),s=n(7059),l=n(5200);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}`)}}},560(e,t,n){"use strict";let r=n(3908);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},4641(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0===r(e,t,n)},5580(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>r(e,t,n)>0},4089(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>r(e,t,n)>=0},7059(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0>r(e,t,n)},5200(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0>=r(e,t,n)},3999(e,t,n){"use strict";let r=n(560);e.exports=(e,t,n)=>0!==r(e,t,n)},7638(e,t,n){"use strict";let r=n(8311);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},6874(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}},7272(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):()=>{}},1123(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)}},8794(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}}},968(e){"use strict";let t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},9718(e,t,n){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(6874),i=n(7272),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,m="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[m,a]],h=(e,t,n)=>{let r=(e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),a=f++;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*$")},6369(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},3029(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{A:()=>r})},2901(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6192);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(0,r.A)(a.key),a)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6192);function a(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6562(e,t,n){"use strict";function r(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},6192(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(2284);function a(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=(0,r.A)(a))return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},2284(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{A:()=>r})},3612(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{A:()=>a})},8992(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,f,m,p;n.r(t),n.d(t,{GenderUnknownIcon:()=>cn,evaluateAsNumber:()=>o$,getImportMapOverrideMap:()=>aO,StockManagementPictogram:()=>Ev,ChemistryIcon:()=>uZ,BabyIcon:()=>uj,DashboardExtension:()=>dn,openmrsComponentDecorator:()=>sq,tryRegisterExtension:()=>ur,pictogramIds:()=>w1,ActivityIcon:()=>uT,compile:()=>oj,removeRouteMapOverride:()=>a5,TableBatchActions:()=>uw,getAsyncLifecycle:()=>sX,subscribeOpenmrsEvent:()=>ol,PasswordIcon:()=>ck,Assessment2Pictogram:()=>w6,CloseIcon:()=>uQ,setupRouteMapOverrides:()=>a7,getWorkspaceGroupRegistration:()=>i3,registerWorkspace:()=>i0,useFeatureFlag:()=>lw,reset:()=>iz,LabOrderIcon:()=>cf,VisitMode:()=>op,useLocations:()=>lV,getLifecycle:()=>sJ,formatDatetime:()=>bu,getVisitsForPatient:()=>ox,formatPartialDate:()=>bo,CustomOverflowMenu:()=>uC,LocationIcon:()=>cp,GroupIcon:()=>ca,createUseStore:()=>sw,VisitStatus:()=>oh,getSessionLocation:()=>ao,getCurrentImportMap:()=>aU,usePatient:()=>lZ,useRenderableExtensions:()=>lq,getOpenedWindowIndexByWorkspace:()=>i8,setLeftNav:()=>iG,clearHistory:()=>rZ,clearConfigErrors:()=>e7,formatTime:()=>bl,isDevEnabled:()=>ap,closeWorkspaceGroup2:()=>xD,getCurrentRouteMap:()=>a1,ConfigurableLink:()=>sm,sessionStore:()=>r3,setSessionLocale:()=>as,subscribeSnackbarShown:()=>k,getLoggedInUser:()=>aa,GenderMaleIcon:()=>ce,getExtensionSlotConfigFromStore:()=>ef,evaluateAsNumberAsync:()=>oI,getImportMapDefaultMap:()=>aP,unregisterExtensionRendering:()=>ic,implementerToolsConfigStore:()=>ek,Type:()=>X,InPatientPictogram:()=>Eo,cleanupObsoleteFeatureFlags:()=>o6,getAttachmentsUrl:()=>or,showSnackbar:()=>EN,PatientBannerActionsMenu:()=>wZ,PatientSearchPictogram:()=>Ed,DocumentAttachmentIcon:()=>u4,Snackbar:()=>EC,CardiologyPictogram:()=>w9,ImageMedicalIcon:()=>cs,ActionableNotificationComponent:()=>wm,DiagnosisTags:()=>b0,iconIds:()=>uO,PatientsPictogram:()=>Ef,interpolateUrl:()=>rB,setupHistory:()=>rz,subscribeToastShown:()=>S,detachAll:()=>iB,convertToLocaleCalendar:()=>bc,DocumentIcon:()=>u2,configInternalStore:()=>ei,ActionMenuButton2:()=>xF,setupDynamicOfflineDataHandler:()=>De,makeUrl:()=>r1,oneOf:()=>ti,selectPreferredName:()=>wA,launchWorkspaceGroup:()=>function e(t,n){let r=i3(t),{state:a,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:i,workspaceToLaunch:s}=n,l=function(){return EX}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?EB(r?.name,()=>{e(t,n)}):E2(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:i}})),E9(t,a),o?.(),s&&EU(s.name,s.additionalProps??{})},MobileCheckIcon:()=>cw,createErrorHandler:()=>R,parseDate:()=>v7,getAttachmentByUuid:()=>ot,LeftNavMenu:()=>b5,getExtensionRegistration:()=>iA,ShoppingCartAddItemIcon:()=>c7,ReferralOrderIcon:()=>cN,ReportIcon:()=>cI,dispatchToastShown:()=>x,getImportMapNextPageMap:()=>aR,registerExtension:()=>ij,setupOfflineSync:()=>x7,DownloadIcon:()=>u3,useConnectivity:()=>Do,provide:()=>eU,ShoppingCartArrowDownIcon:()=>cV,featureFlagsStore:()=>o4,promptBeforeClosing:()=>Ez,jsep:()=>o_,GeriatricsPictogram:()=>Er,SearchIcon:()=>cj,reportError:()=>P,slugify:()=>aF,isOmrsDateToday:()=>v5,getExtensionStore:()=>id,BloodBankPictogram:()=>w5,TriagePictogram:()=>Ew,Workspace2:()=>x$,refetchCurrentUser:()=>at,CheckmarkOutlineIcon:()=>uG,registerExtensionSlot:()=>iH,AllergiesIcon:()=>c6,ArrowDownIcon:()=>u$,useOpenmrsInfinite:()=>lR,getExtensionConfigFromExtensionSlotStore:()=>eg,OpenmrsDatePicker:()=>bX,getExtensionConfigFromStore:()=>eh,getDynamicOfflineDataEntries:()=>Dt,getLocaleDisplayName:()=>vk,messageOmrsServiceWorker:()=>Dr,navigate:()=>rU,launchWorkspace2:()=>x_,getGroupByWindowName:()=>i9,CustomOverflowMenuItem:()=>uP,isUrl:()=>to,CaretDownIcon:()=>uB,ArrowLeftIcon:()=>uI,FacilityPictogram:()=>En,ViewOffIcon:()=>c2,updateInternalExtensionStore:()=>ia,dispatchActionableNotificationShown:()=>w,resetRouteMapOverrides:()=>a9,formatDurationBetween:()=>bv,defaultVisitCustomRepresentation:()=>og,getBreadcrumbsFor:()=>th,useOpenmrsPagination:()=>lx,Pagination:()=>wT,CheckmarkFilledIcon:()=>uK,clearCurrentUser:()=>an,showModal:()=>wc,ChevronUpIcon:()=>uX,saveVisit:()=>ow,useAttachments:()=>lo,Pictogram:()=>ES,useExtensionSlot:()=>sk,ChevronDownIcon:()=>uY,OpenmrsDateRangePicker:()=>bQ,deleteAttachmentPermanently:()=>oo,getVisitTypes:()=>om,OverflowMenuHorizontalIcon:()=>c_,EventScheduleIcon:()=>u9,getSessionStore:()=>r7,ActionMenu:()=>xh,ProcedureOrderIcon:()=>cO,preloadImport:()=>aV,registerWorkspaceWindows2:()=>se,useOnVisible:()=>lW,setSessionLocation:()=>ai,userHasAccess:()=>ar,ChartAverageIcon:()=>uH,getFeatureFlag:()=>o5,UserAvatarIcon:()=>cX,renderExtension:()=>su,useFhirInfinite:()=>lI,toVisitTypeObject:()=>od,useSession:()=>lJ,EmergencyDepartmentPictogram:()=>Et,Notification:()=>wd,dispatchSnackbarShown:()=>E,navigateAndLaunchWorkspace:()=>EW,formatDate:()=>bi,workspace2StoreActions:()=>xC,SwitcherIcon:()=>cF,esmStyleGuideSchema:()=>uy,getImportMapDisabledOverrides:()=>aT,useAssignedExtensionIds:()=>lr,CaretRightIcon:()=>uU,evaluateAsType:()=>oM,PageHeader:()=>wR,TranslateIcon:()=>cZ,setUserProperties:()=>al,MovementIcon:()=>cD,renderInlineNotifications:()=>ww,subscribePrecacheStaticDependencies:()=>Da,PaymentsDeskPictogram:()=>Em,usePrimaryIdentifierCode:()=>lY,useLayoutType:()=>lA,getCurrentUser:()=>r8,XrayPictogram:()=>EE,CaretUpIcon:()=>uW,renderActionableNotifications:()=>wx,OpenmrsAppContext:()=>s8,setupModals:()=>wu,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(x4(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;x4(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>H,recordConfigDerivationError:()=>e_,useAbortController:()=>le,Extension:()=>sp,getFhirServerPaginationHandlers:()=>lk,useConnectedExtensions:()=>lc,registerApp:()=>uo,HospitalBedIcon:()=>ci,useExtensionInternalStore:()=>ly,configExtensionStore:()=>el,getSynchronizationItems:()=>Dn,getExtensionSlotsConfigStore:()=>ec,registerExtensionRendering:()=>iu,RenderIfValueIsTruthy:()=>s7,registerFeatureFlag:()=>o3,useFhirFetchAll:()=>l$,restBaseUrl:()=>rX,CalendarHeatMapIcon:()=>uL,getWorkspaceRegistration:()=>i4,isImportMapOverrideDisabled:()=>aN,resetConfigSystem:()=>te,getExtensionInternalStore:()=>it,registerGlobalStore:()=>U,evaluateAsBoolean:()=>oT,PatientBannerPatientInfo:()=>wK,addRouteMapOverride:()=>a6,getDefaultCalendar:()=>br,SettingsIcon:()=>cL,DrugOrderIcon:()=>u6,ProgramsIcon:()=>cT,useAssignedExtensions:()=>sS,CloseFilledIcon:()=>u0,canAccessStorage:()=>x2,registerDefaultCalendar:()=>bn,TreeViewAltIcon:()=>cq,OverflowMenuVerticalIcon:()=>cS,clearConfigDerivationError:()=>eS,getConfigStore:()=>eu,registerWorkspaceGroup:()=>i1,InformationSquareIcon:()=>cc,EmptyCard:()=>b4,ChevronLeftIcon:()=>uq,RadiologyIcon:()=>c8,useCandidateExtensions:()=>la,renderToasts:()=>Ej,isDesktop:()=>lj,integrateBreakpoints:()=>uc,RegistrationPictogram:()=>Eg,CardHeader:()=>up,getExtensionRegistrationFrom:()=>iM,InformationIcon:()=>cl,TrashCanIcon:()=>cY,useShallowStableValue:()=>sh,PatientDocumentsPictogram:()=>Ec,useOpenmrsSWR:()=>lH,Assessment1Pictogram:()=>w3,finishRegisteringAllApps:()=>ui,importDynamic:()=>aB,useFhirPagination:()=>lS,useVisitContextStore:()=>l6,ArrowUpIcon:()=>uA,showActionableNotification:()=>wD,useForceUpdate:()=>lE,useVisit:()=>l5,updateWorkspaceWindowState:()=>E0,PatientBannerPatientIdentifiers:()=>wU,WorkspaceNotification:()=>xo,TransferPictogram:()=>Eb,usePagination:()=>lz,Breakpoint:()=>us,PatientBannerToggleContactDetailsButton:()=>xB,CloseOutlineIcon:()=>u1,ObstetricsPictogram:()=>Eu,parseDateInput:()=>bf,getConfig:()=>eH,attach:()=>iL,getLocale:()=>vC,ActionMenuButton:()=>xn,isUrlWithTemplateParameters:()=>ta,useEmrConfiguration:()=>lh,useLeftNav:()=>lL,ToolsIcon:()=>cG,ErrorState:()=>b3,detach:()=>iF,setCurrentVisit:()=>ob,ConditionsIcon:()=>c9,SaveIcon:()=>cA,useWorkspaces:()=>E4,resetWorkspaceStore:()=>E5,useConfig:()=>lu,validator:()=>Q,CalendarIcon:()=>uF,getHistory:()=>rK,StickyNoteAddIcon:()=>cU,useWorkspace2Store:()=>xP,getPatientName:()=>wN,getVisitStore:()=>ov,getCoreTranslation:()=>rF,registerModuleWithConfigSystem:()=>eL,registerModuleLoad:()=>eF,getBreadcrumbs:()=>tf,extractVariableNames:()=>o0,translateFrom:()=>rL,useStoreWithActions:()=>sb,EditIcon:()=>u5,getCandidateExtensions:()=>iW,shallowEqual:()=>T,subscribeNotificationShown:()=>D,MaximizeIcon:()=>cg,promptForClosingWorkspaces:()=>xk,WarningIcon:()=>c3,closeAllWorkspaces:()=>E2,fhirBaseUrl:()=>rQ,matchLocale:()=>x1,registerBreadcrumb:()=>tc,usePatientPhoto:()=>wJ,EventsIcon:()=>u8,createGlobalStore:()=>V,workspaceStore:()=>EX,subscribeToFeatureFlag:()=>o9,useExtensionStore:()=>lb,closeWorkspace:()=>EY,createAttachment:()=>oa,useLeftNavStore:()=>lF,TableIcon:()=>cz,Icon:()=>dt,InformationFilledIcon:()=>cu,getCurrentPageMap:()=>aC,LaboratoryPictogram:()=>Ei,temporaryConfigStore:()=>es,getPromptBeforeClosingFcn:()=>EK,toDateObjectStrict:()=>v9,defineConfigSchema:()=>ej,filterBreadcrumbs:()=>tp,invalidateImplementerToolsConfig:()=>ex,PatientBannerContactDetails:()=>xK,getAssignedExtensions:()=>iU,PatientPhoto:()=>w0,MaterialOrderIcon:()=>ch,MicroscopeIcon:()=>cb,visitTypesUrl:()=>of,scheduleRecomputation:()=>iy,PharmacyPictogram:()=>Ep,AttachmentIcon:()=>c5,MoneyIcon:()=>cE,getAttachments:()=>on,getWorkspaceGroupStore:()=>E9,PageHeaderContent:()=>wO,MedicationIcon:()=>cy,PrinterIcon:()=>cR,PatientListsPictogram:()=>ED,useAppContext:()=>lt,isOpenmrsRoutes:()=>az,AppointmentsAltPictogram:()=>w4,GenericOrderTypeIcon:()=>cr,batchExtensionUpdates:()=>ih,useExtensionSlotStore:()=>sD,ViewIcon:()=>c4,formattedName:()=>wM,sessionEndpoint:()=>r0,duration:()=>bg,resetImportMapOverrides:()=>aM,TableOfContentsIcon:()=>cH,CaretLeftIcon:()=>uV,getTranslationOverrides:()=>ez,isVersionSatisfied:()=>x5,EmptyCardIllustration:()=>b2,PenIcon:()=>cP,getWorkspaceStore:()=>EQ,validators:()=>ts,setupImportMapOverrides:()=>aL,showToast:()=>EL,useDefineAppContext:()=>s9,verifyTotpCode:()=>au,getGlobalStore:()=>W,useOnClickOutside:()=>lU,getWindowByWorkspaceName:()=>i5,ArrowRightIcon:()=>uM,loadLifeCycles:()=>ue,registerBreadcrumbs:()=>td,MotherIcon:()=>cx,fetchCurrentPatient:()=>oi,Toast:()=>E$,MessageQueueIcon:()=>cv,TwoFactorAuthenticationIcon:()=>cJ,Pharmacy2Pictogram:()=>Eh,goBackInHistory:()=>rG,GroupAccessIcon:()=>co,getExtensionRenderingsStore:()=>ir,setImplementerToolsConfigRecomputer:()=>eE,getAsyncExtensionLifecycle:()=>s0,setupApiModule:()=>ag,renderLoadingSpinner:()=>xG,WorkspaceContainer:()=>xg,showNotification:()=>wE,getModalRegistration:()=>iJ,ListCheckedIcon:()=>cm,ResponsiveWrapper:()=>Ek,GynaecologyPictogram:()=>Ea,ShoppingCartIcon:()=>cB,getRouteMapNextPageMap:()=>a4,MetadataExportPictogram:()=>El,updateVisit:()=>oE,backendDependencies:()=>ah,MaybePictogram:()=>E_,createParcelMounter:()=>ss,openmrsFetch:()=>r2,useStore:()=>sv,isOpenmrsAppRoutes:()=>aH,HomePictogram:()=>Ex,DentistryPictogram:()=>w7,ServiceQueuesPictogram:()=>Ey,toLanguageTag:()=>vS,launchWorkspace:()=>EU,setFeatureFlag:()=>o8,DigitalTrustPictogram:()=>Ee,NumericObservation:()=>wC,attachmentUrl:()=>oe,interpolateString:()=>rV,inRange:()=>tr,useExtensionSlotMeta:()=>lv,AppointmentsPictogram:()=>w2,renderSnackbars:()=>ET,getRegisteredWorkspace2Names:()=>xO,logout:()=>ac,toLocationObject:()=>ou,ChartLineIcon:()=>uz,UserHasAccess:()=>lX,evaluateAsBooleanAsync:()=>oN,changeWorkspaceContext:()=>Eq,createDashboard:()=>dr,getLocations:()=>oc,useExtensionContext:()=>lg,canCloseWorkspaceWithoutPrompting:()=>EF,getExtensionsConfigStore:()=>em,getRouteMapDefaultMap:()=>a2,age:()=>wL,isOmrsDateStrict:()=>v6,registerWorkspaceGroups2:()=>i7,usePaginationInfo:()=>lK,evaluateAsync:()=>oO,useOpenmrsFetchAll:()=>lT,removeImportMapOverride:()=>aI,showWorkspacePrompts:()=>E3,useVisitTypes:()=>l8,ageAsDuration:()=>wj,getExtensionNameFromId:()=>iI,renderParcel:()=>si,useWorkspace2Context:()=>xR,ResetIcon:()=>cM,RenewIcon:()=>c$,subscribeActionableNotificationShown:()=>_,ErrorCard:()=>b6,GenderFemaleIcon:()=>u7,enableImportMapOverride:()=>aA,retry:()=>x9,ComponentContext:()=>sf,ExtensionSlot:()=>sP,unsetLeftNav:()=>iZ,addImportMapOverride:()=>a$,MaybeIcon:()=>de,useCustomOverflowMenu:()=>uk,PedestrianFamilyIcon:()=>cC,cancelPrompt:()=>EG,CtScanPictogram:()=>w8,dispatchNotificationShown:()=>b,leftNavStore:()=>iK,OpenmrsFetchError:()=>r4,UserFollowIcon:()=>cQ,launchWorkspaceGroup2:()=>xx,ChevronRightIcon:()=>uJ,UserXrayIcon:()=>c0,GenderOtherIcon:()=>ct,formatDuration:()=>bd,toOmrsIsoString:()=>v8,Labs2Pictogram:()=>Es,workspace2Store:()=>i6,setUserLanguage:()=>ae,useBodyScrollLock:()=>li,getExtensionConfig:()=>ep,SyringeIcon:()=>cW,LocationPicker:()=>b9,useDebounce:()=>ld,TimeIcon:()=>cK,getExtensionSlotConfig:()=>ed,AddIcon:()=>uN,getRouteMapOverrideMap:()=>a3,processConfig:()=>eK,InventoryManagementIcon:()=>cd,registerWorkspaces2:()=>st,UserIcon:()=>c1,formatPatientName:()=>wI,fireOpenmrsEvent:()=>os,registerModal:()=>iq,registerTranslationNamespace:()=>eB,displayName:()=>w$,evaluate:()=>oR,defineExtensionConfigSchema:()=>eV,renderWorkspaceWindowsAndMenu:()=>xQ,getSyncLifecycle:()=>sQ,evaluateAsTypeAsync:()=>oA});let h="openmrs:notification-shown",g="openmrs:actionable-notification-shown",y="openmrs:toast-shown",v="openmrs:snack-bar-shown";function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function E(e){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function D(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(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){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}function C(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function P(e){let t=O(e);setTimeout(()=>{throw t})}function R(){let e=Error();return t=>{let n=O(t);n.stack+=`
2
2
  Async stacktrace:
3
3
  ${e.stack}`,P(t)}}function O(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 N(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),x({description:C(a??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),x({description:C(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)}}},I=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},M=e=>e?I(e):I;function A(){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 j={},L=Symbol.for("openmrs.esm-state.instanceCount"),F=globalThis,B=(F[L]??0)+1;function V(e,t,n="none"){let r=j[e];if(r)return r.active?A()||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=z(e,t,n);return j[e]={value:r,active:!0},r}}function U(e,t){let n=j[e];return n?(n.active?A()||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):(j[e]={value:t,active:!0},t)}function W(e,t,n="none"){let r=j[e];if(!r){let r=z(e,t??{},n);return j[e]={value:r,active:!1},r}return r.value}function H(...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 z(e,t,n){return"sessionStorage"===n?M()(((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),f=()=>{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),f()};let p=e((...e)=>{n(...e),f()},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:p),!0),f()}).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||p};return(n,r,a)=>{let o,i={storage:N(()=>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})},f=a.setState;a.setState=(e,t)=>{f(e,t),d()};let m=e((...e)=>{n(...e),d()},r,a);a.getInitialState=()=>m;let p=()=>{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:()=>p(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||p(),o||m}})(()=>t,{name:e,storage:N(()=>sessionStorage)})):M()(()=>t)}F[L]=B,B>1&&!A()&&console.error(`Detected ${B} 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=j)},1e3);var K,G,Z,Y,q,J=n(1881),X=((K={}).Array="Array",K.Boolean="Boolean",K.ConceptUuid="ConceptUuid",K.Number="Number",K.Object="Object",K.String="String",K.UUID="UUID",K.PersonAttributeTypeUuid="PersonAttributeTypeUuid",K.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",K);function Q(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let ee=Q(e=>Array.isArray(e),"must be an array"),et=Q(e=>"boolean"==typeof e,"must be a boolean"),en=Q(e=>"number"==typeof e,"must be a number"),er=Q(e=>"string"==typeof e,"must be a string"),ea=Q(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),eo=Q(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string"),ei=V("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),es=V("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});es.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let el=V("config-store-of-extension-state",{mountedExtensions:[]});function eu(e){return W(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function ec(){return W("config-extension-slots",{slots:{}})}function ed(e){return ef(ec().getState(),e)}function ef(e,t){return e.slots[t]??{loaded:!1,config:{}}}function em(){return W("config-extensions",{configs:{}})}function ep(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=em(),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 eh(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function eg(e,t,n){return e.configure?.[n]??null}let ey=M()(()=>({config:{}})),ev=0,eb=!0,ew=!1;function eE(e){r=e}function ex(){eb=!0,ev>0&&eD()}function eD(){if(eb&&r&&!ew){ew=!0,eb=!1;try{r()}catch(e){eb=!0,e_(e),console.error("Failed to derive the implementer tools config",e)}finally{ew=!1}}}function e_(e){ey.setState({derivationError:e instanceof Error?e.message:String(e)})}function eS(){ey.getState().derivationError&&ey.setState({derivationError:void 0})}let ek=U("config-implementer-tools",{...ey,getState:()=>(0===ev&&eD(),ey.getState()),setState:(...e)=>(eb=!1,ey.setState(...e)),subscribe(e){ev++,eD();let t=ey.subscribe(e),n=!1;return()=>{!n&&(n=!0,ev--),t()}}});function eC(e,t){if(Array.isArray(t))return t}function eP(e,t){return(0,J.mergeWith)({},e,t,eC)}let eR=[];function eO(){let e=ei.getState(),t=es.getState(),n=el.getState();if(eT?.configState===e&&eT.tempConfigState===t)return void eA(e,n,t,eT.slotConfigs,!0);!function(e,t){for(let n of Object.keys(e.schemas)){let r,a=eu(n),o=e.schemas[n],i=!!e.moduleLoaded[n],s=eM.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=eX(e,eq(t,n));e0(r,a,e);let o=e3(r,a);return e1(r,o,e),delete o.extensionSlots,o}(n,e,t):function(e,t,n){let r=e3(tn,eX(e,eq(t,n)));return e1(tn,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:i,config:a},eM.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&&(0,J.isEqual)(l.config,r.config)||a.setState(r)}}(e,t);let r=function(e,t){let n=eQ(eq(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&&e8(r,a+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||e8(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)||e8(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)||e8(r,a+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!e5(e.configure)&&e8(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]:eQ(t);o[e].configure!==n&&(o[e]={...o[e],configure:n})}return o}(e,t);(function(e){let t=ec(),n=t.getState().slots,r={},a=!1;for(let[t,o]of Object.entries(e)){let e=n[t];e?.loaded&&(0,J.isEqual)(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),eA(e,n,t,r,!1),eT={configState:e,tempConfigState:t,slotConfigs:r},ex()}let eT=null,eN=new WeakMap;function e$(){r=()=>{var e,t;let n,r;return e=ei.getState(),t=es.getState(),n=ek.getState(),r={config:function(e,t){let n=function(e){let t={};for(let[n,r]of Object.entries(e)){let e=eY.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"}:e5(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}((0,J.cloneDeep)(r));eY.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=eZ.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=eP(l,function e(t,n){return e5(t)?Object.keys(t).reduce((r,a)=>(r[a]=e(t[a],n),r),{}):{_value:t,_source:n}}(n,e)))}),eZ.set(e,{annotatedSchema:t,configSlices:a,sources:i,result:l}),o[e]=l}return o}(e,t)},void((0,J.isEqual)(n.config,r.config)||ek.setState(r))},eO(),eR.push(ei.subscribe(eI),es.subscribe(eI),el.subscribe(eI))}function eI(){eS();try{eO()}catch(e){e_(e),console.error("Failed to recompute the configuration",e)}}e$();let eM=new Map;function eA(e,t,n,r,a){let o=em(),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&&eN.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=eG.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,f=eq(a,o),m=i?.configure?.[r]??{},p=eX(e,f),h=p?.extensionSlots?.[n]?.configure?.[r]??{},g=eQ([eX(d,f),m,h]),y=l??a.schemas[t];e0(y,g,d);let v=e3(y,g);return e1(y,v,d),delete v.extensionSlots,eG.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&&(0,J.isEqual)(c.config,a)?c:{config:a,loaded:!0}}eN.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 ej(e,t){eJ(e,t);let n=eP(t,tn);ei.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function eL(e){ei.setState(t=>({...t,schemas:{...t.schemas,[e]:tn}}))}function eF(e){ei.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function eB(e){ei.setState(t=>({...t,schemas:{...t.schemas,[e]:tt}}))}function eV(e,t){eJ(e,t);let n=eP(t,tn);ei.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.`),ei.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function eU(e,t="provided"){ei.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function eW(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 eH(e){return eW(eu(e),e=>!!(e.loaded&&e.config),e=>(0,J.omit)(e.config,["Display conditions","Translation overrides"]))}function ez(e,t,n){let r=[eW(eu(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&n&&r.push(eW(ep(t,n),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(r)}function eK(e,t,n){e0(e,t,n);let r=e3(e,t);return e1(e,r,n),r}let eG=new Map,eZ=new Map,eY=new Map;function eq(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function eJ(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}`),!e5(i)){console.error(`${e} has bad config schema definition for key '${o}'. ${r}`);continue}i.hasOwnProperty("_default")||eJ(e,i,o);let s=i._elements;if(e6(s)&&eJ(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
4
 
@@ -40,4 +40,4 @@ To fix this, ensure that you define the "component" field inside the page defini
40
40
  * {
41
41
  overscroll-behavior: contain;
42
42
  }
43
- }`.trim(),document.head.prepend(r),o=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&yJ(t);o.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||y2(this,n)},i=dl(y1(document,"touchstart",t=>{let r=dZ(t);e=p2(r)?r:p4(r,!0),n=!1;let a=r.ownerDocument.defaultView.getSelection();a&&!a.isCollapsed&&a.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),y1(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),y1(document,"blur",e=>{let t=dZ(e),n=e.relatedTarget;if(n&&yJ(n))n.focus({preventScroll:!0}),y2(n,yJ(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),i(),r.remove(),HTMLElement.prototype.focus=o}):dl((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?y0(document.documentElement,"scrollbarGutter","stable"):y0(document.documentElement,"paddingRight",`${s}px`)),y0(document.documentElement,"overflow","hidden"))),()=>{0==--yQ&&c()}}},[t])}({isDisabled:o||!t.isOpen}),(0,sc.useEffect)(()=>{if(t.isOpen&&r.current)if(o){var e,n,i=a?.current??r.current;let t=yk[yk.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}else{let t,o,i,s,l,u,c,d,f,m,p;return e=[a?.current??r.current],o=(n={shouldUseInert:!0})instanceof(t=dK(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&y_,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(dG(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=gl(dz(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&f(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)f(e),e=n.nextNode()}},f=e=>{let n=yS.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),yS.set(e,n+1))},yk.length&&yk[yk.length-1].disconnect(),d(i),(m=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>dG(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(i,{childList:!0,subtree:!0}),p={visibleNodes:l,hiddenNodes:u,observe(){m.observe(i,{childList:!0,subtree:!0})},disconnect(){m.disconnect()}},yk.push(p),()=>{for(let e of(m.disconnect(),u)){let t=yS.get(e);null!=t&&(1===t?(c(e,!1),yS.delete(e)):yS.set(e,t-1))}p===yk[yk.length-1]?(yk.pop(),yk.length&&yk[yk.length-1].observe()):yk.splice(yk.indexOf(p),1)}}},[o,t.isOpen,r,a]),{popoverProps:d_(d,m),arrowProps:p,underlayProps:f,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:f?d:u},e),y=r.popoverRef,v=function(e,t=!0){let[n,r]=(0,sc.useState)(!0),a=n&&t;return du(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),y5(e,a,(0,sc.useCallback)(()=>r(!1),[])),a}(y,!!g)||r.isEntering||!1,b=dC({...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,sc.useState)(!1);du(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,sc.useEffect)(()=>{var e;let t,n;E&&y.current&&!y.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=dz(e=y.current)),"virtual"===y9?fO(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&dW(e)}):dW(e))},[E,y]);let D={...m.style,...b.style},_=sd().createElement("div",{...d_(dU(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:D,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!r.isNonModal&&sd().createElement(y6,{onDismiss:e.close}),sd().createElement(yD.Provider,{value:{...h,placement:g,ref:i}},b.children),sd().createElement(y6,{onDismiss:e.close}));return f?sd().createElement(ym,{...r,shouldContainFocus:E,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):sd().createElement(ym,{...r,shouldContainFocus:E,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&sd().createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),sd().createElement("div",{ref:u,style:{display:"contents"}},sd().createElement(vf.Provider,{value:u},_)))}function vh(e){return e?.start!=null&&null!=e.end}let vg=(0,sc.createContext)(null),vy=(0,sc.createContext)(null),vv=(0,sc.createContext)(null),vb=(0,sc.createContext)(null),vw=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,vg);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=vc(e),[n,r]=hq(e.value,e.defaultValue||null,e.onChange),[a]=(0,sc.useState)(n),o=n||e.placeholderValue||null,[i,s]=g3(o,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=e.shouldCloseOnSelect??!0,[d,f]=(0,sc.useState)(null),[m,p]=(0,sc.useState)(null);if(n&&(d=n,"hour"in n&&(m=n)),o&&!(i in o))throw Error("Invalid granularity "+i+" for value "+o.toString());let h=n?.calendar.identifier==="gregory"&&"BC"===n.era,g=(0,sc.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,sc.useMemo)(()=>gX(n,y,v,b,g),[n,y,v,b,g]),E=gz({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(pD(e)):p_(e,t)),f(null),p(null),E.commitValidation()};return{...E,value:n,defaultValue:e.defaultValue??a,setValue:r,dateValue:d,timeValue:m,setDateValue:n=>{let a="function"==typeof c?c():c;u?m||a?_(n,m||g2(e.defaultValue||e.placeholderValue)):f(n):(r(n),E.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):p(e)},granularity:i,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&_(d,m||g2(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new mN(e,g1(t,g)).format(l):"",getDateFormatter:(e,t)=>new mN(e,g1({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,sc.useRef)(null),[l,u]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:m,dialogProps:p,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r;let a=dE(),o=dE(),i=dE(),s=mG((r=gR)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:m,errorMessageProps:p}=gN({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=gO(t,n),g=f["aria-labelledby"]||f.id,{locale:y}=mS(),v=t.formatValue(y,{month:"long"}),b=p7(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=dU(e),x=(0,sc.useMemo)(()=>g_(n),[n]),D=(0,sc.useRef)(!1),{focusWithinProps:_}=f9({...e,isDisabled:t.isOpen,onBlurWithin:t=>{dG(document.getElementById(o),t.relatedTarget)||(D.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{D.current||(D.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:d_(E,h,f,b,_,{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:{...f,id:i,[gA]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[gH]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:m,errorMessageProps:p,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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...dT(e),label:u,validationBehavior:o},i,s),[b,w]=(0,sc.useState)(null),E=(0,sc.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);yK({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=f8({within:!0}),S=dC({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=dU(e);return delete k.id,sd().createElement(dk,{values:[[vv,i],[ga,{...c,ref:s,isInvalid:i.isInvalid}],[ya,f],[ms,{...m,isPressed:i.isOpen}],[yE,{...d,ref:l,elementType:"span"}],[h2,h],[yh,i],[vd,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[yp,p],[mc,{slots:{description:g,errorMessage:y}}],[yy,v]]},sd().createElement("div",{...x,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),vE=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,vy);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=vc(e),[n,r]=hq(e.value,e.defaultValue||null,e.onChange),[a]=(0,sc.useState)(n),[o,i]=(0,sc.useState)(()=>n||{start:null,end:null});null==n&&o.start&&o.end&&i(o={start:null,end:null});let s=n||o,l=e=>{i(s=e||{start:null,end:null}),vh(s)?r(s):r(null)},[u,c]=g3(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,f=e.shouldCloseOnSelect??!0,[m,p]=(0,sc.useState)(null),[h,g]=(0,sc.useState)(null);s&&vh(s)&&(m=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(pD(e.start)):p_(e.start,t.start),end:"timeZone"in t.end?t.end.set(pD(e.end)):p_(e.end,t.end)}),p(null),g(null),k.commitValidation()},v=n=>{let r="function"==typeof f?f():f;d?vh(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||g2(e.placeholderValue),end:h?.end||g2(e.placeholderValue)}):p(n):vh(n)?(l(n),k.commitValidation()):p(n),r&&t.setOpen(!1)},b=e=>{vh(m)&&vh(e)?y(m,e):g(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,E=(0,sc.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:x,maxValue:D,isDateUnavailable:_}=e,S=(0,sc.useMemo)(()=>{var e;let t;return e=s,t=gY(gX(e?.start??null,x,D,_,E),gX(e?.end??null,x,D,_,E)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=gY(t,{isInvalid:!0,validationErrors:[(mV.getGlobalDictionaryForPackage("@react-stately/datepicker")||gq).getStringForLocale("rangeReversed",gJ())],validationDetails:{...gB,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,x,D,_,E]),k=gz({...e,value:n,name:(0,sc.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),C=k.displayValidation.isInvalid,P=e.validationState||(C?"invalid":null);return{...k,value:s,defaultValue:e.defaultValue??a,setValue:l,dateRange:m,timeRange:h,granularity:u,hasTime:d,setDate(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setTime(e,t){"start"===e?b({start:t,end:h?.end??null}):b({start:h?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:v,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&vh(m)&&d&&y(m,{start:h?.start||g2(e.placeholderValue),end:h?.end||g2(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:C,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let a="timeZone"in s.start?s.start.timeZone:void 0,o=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),i="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=g1(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(a||"UTC"),d=s.end.toDate(i||"UTC"),f=new mN(t,u);if(a===i&&o===l&&0!==s.start.compare(s.end)){try{let e=f.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=f}else r=new mN(t,g1(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new mN(e,g1({},{...E,...t}))}}({...e,validationBehavior:o}),s=(0,sc.useRef)(null),[l,u]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:m,buttonProps:p,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,n){var r;let a=mG((r=gR)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=gN({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),f=u["aria-labelledby"]||u.id,{locale:m}=mS(),p=t.formatValue(m,{month:"long"}),h=p7(p?a.format("selectedRangeDescription",{startDate:p.start,endDate:p.end}):""),g={"aria-label":a.format("startDate"),"aria-labelledby":f},y={"aria-label":a.format("endDate"),"aria-labelledby":f},v=dE(),b=dE(),w=gO(t,n),E=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=(0,sc.useMemo)(()=>g_(n,{accept:e=>e.id!==v}),[n,v]),D={[gj]:x,[gA]:"presentation","aria-describedby":E,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},_=dU(e),S=(0,sc.useRef)(!1),{focusWithinProps:k}=f9({...e,isDisabled:t.isOpen,onBlurWithin:t=>{dG(document.getElementById(b),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,sc.useRef)(gU),P=(0,sc.useRef)(gU);return{groupProps:d_(_,w,u,h,k,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{x.focusFirst()}},buttonProps:{...h,id:v,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${v} ${f}`,"aria-describedby":E,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:b,"aria-labelledby":`${v} ${f}`},startFieldProps:{...g,...D,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[gH]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(gY(e,P.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...y,...D,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[gH]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(gY(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:o,validationErrors:i,validationDetails:s}}({...dT(e),label:u,validationBehavior:o},i,s),[w,E]=(0,sc.useState)(null),x=(0,sc.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);yK({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=f8({within:!0}),k=dC({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=dU(e);return delete C.id,sd().createElement(dk,{values:[[vb,i],[ga,{...c,ref:s,isInvalid:i.isInvalid}],[ms,{...p,isPressed:i.isOpen}],[yE,{...d,ref:l,elementType:"span"}],[h4,g],[yh,i],[vd,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[yp,h],[ya,{slots:{start:f,end:m}}],[mc,{slots:{description:y,errorMessage:v}}],[yy,b]]},sd().createElement("div",{...D,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||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 vx(e){return sd().createElement(m_,e)}function vD(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 pd||e instanceof pm||e instanceof pp)return t?pS(e,t):e;{let n=l0()(e).toDate(),r=new pd(n.getFullYear(),n.getMonth()+1,n.getDate());return t?pS(r,t):r}}function v_(e){if(e)return e.toDate(pj())}function vS(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function vk(e){let t=e??"",n=vS(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function vC(){let e=window.i18next.language,t=vS(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;q=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;q=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var vP=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(q||"en-US"),vR=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},vO={};for(let e=1;e<100;e++)vO[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var vT={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},vN="[1234567890一二三四五六七八九〇\\d]",v$={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},vI={},vM={"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},vA={zone:vM,year:vO,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:{}},vj={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(vM).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,}"},vL={...vj,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}"},vF={},vB=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=vP){return vF[t.toLowerCase()]||(vF[t.toLowerCase()]=new e(t)),vF[t.toLowerCase()]}constructor(e=vP){this.locale=e,this.lookups={...vA},this.vars={...vj};const 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=v$: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(vI[e])return vI[e];if("fullwide"===e||"hanidec"===e)return{group:vN,lookup:{...v$}};let t=vT[e];if(!t)return{group:"\\d",lookup:{...v$}};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 vI[e]={group:`[${n}-${r}]`,lookup:a},vI[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,vL)vL.hasOwnProperty(n)&&(this.vars[n]=vL[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")}},vV=["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"],vU={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},vW=()=>new Date;function vH(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 vz=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)}},vK=["year","month","day","hour","minute","second","millisecond","offset"],vG={};function vZ(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 vY=[[/([^\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"]],vq={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," "],...vY],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:vY,id:vY,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function vJ(e,t=vP){let n=function(e){if(!vG[e]){var t,n;let r,a,o=vB.factory(e);vG[e]=new vz({doneChecker:vZ,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:vH(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:vH(["","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:vH(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${vN}{2,4})\\s*\u5E74\\s*(${vN}{1,2})\\s*\u6708\\s*(${vN}{1,2})\\s*\u65E5$`),handler:vH(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:vH(["","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:vH(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=vW(),n=e[0].toLowerCase(),r={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==r&&t.setTime(t.getTime()+r);let a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...a,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:a}},{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?vU[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=vW();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:vH(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:vH(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:vH(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:vH(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:vH(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:vH(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:vH(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:vH(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:vH(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:vH(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:vH(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:vH(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:vH(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:vH(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:vH(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:vH(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:vH(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:vH(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:vH(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:vH(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:vH(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:vH(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:vH(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:vH(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:vH(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:vH(["zone"])},{name:"onlyOffset",regex:o.compile("_OFFSET_"),handler:vH(["offset"])}],a=o.baseName.slice(0,5),vV.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(vK.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=vO[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return vG[e]}(t),r=function(e,t){let n=vq[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 vX(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new vR(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 vR(t.valueOf()-60*e.offset*1e3):t}function vQ(e,t=vP){let n=vJ(e,t),r=n.invalid?new vR(NaN):vX(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function v0(e,t=vP){return e instanceof Date?new vR(e.valueOf()):"number"==typeof e?new vR(e):vQ(e,t)}Date.fromString=vR.fromString=vQ,Date.fromAny=vR.fromAny=v0,"u">typeof window&&(window.anyDateParser={fromString:vQ,fromAny:v0,fromObject:vX,attempt:vJ});var v1=n(5238),v2=n(1445);function v4(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}lQ.extend(l1),lQ.extend(v2),lQ.extend(v1);let v3="YYYY-MM-DDTHH:mm:ss.SSSZZ";function v6(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&lQ(e,v3).isValid()}function v5(e){return lQ(e).isToday()}function v9(e){return v6(e)?lQ(e,v3).toDate():null}function v8(e,t=!1){let n=lQ(e);return t&&(n=n.utc()),n.format(v3)}function v7(e){return lQ(e).toDate()}var be=new WeakMap;let bt=new class{register(e,t){v4(this,be).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(v4(this,be).has(t))return v4(this,be).get(t)}if(e.language&&v4(this,be).has(e.language))return v4(this,be).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return v4(this,be).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,be,{writable:!0,value:new Map})}};function bn(e,t){bt.register(e,t)}function br(e){let t=e??vC();return bt.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let ba={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function bo(e,t={}){let n=vJ(e,vC());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,J.isNil)(n.day)&&(0,J.isNil)(n.month)&&(n=Object.assign({},(0,J.omit)(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},(0,J.omit)(n,"day"),{date:n.day}));let r=lQ().set(n).toDate();return(0,J.isNil)(n.year)&&(t.year=!1),(0,J.isNil)(n.month)&&(t.month=!1),(0,J.isNil)(n.date)&&(t.day=!1),bi(r,t)}function bi(e,t){let n,r=t?.locale??vC(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...ba,...{noToday:"am"===a.language},...t},m={calendar:o??br(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},p=lQ(e).isToday();if(p&&!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(bs("-"))),"wide"==i&&(t=t.map(bs(" — "))),"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||p&&"for today"===s)&&(n+=`, ${bl(e)}`),n}let bs=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function bl(e){return e.toLocaleTimeString(vC(),{hour:"2-digit",minute:"2-digit"})}function bu(e,t){return bi(e,{...t,time:!0})}function bc(e,t){let n=br("string"==typeof t?new Intl.Locale(t):t);return n?pS(e,hV(n)):e}function bd(e,t){return new Intl.DurationFormat(vC(),t).format(e)}function bf(e,t){if(null==e)return null;if("string"==typeof e){let n=vJ(e,vC());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...(0,J.omit)(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...(0,J.omit)(n,"day"),...{date:n.day}}),lQ(t).set(n))}return lQ(e)}let bm=["years","months","days","hours","minutes","seconds"],bp={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},bh={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function bg(e,t=lQ(),n){let r,a=lQ(t),o=bf(e,a);if(null==o)return null;if("string"==typeof n){let e=bp[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?bp[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=bm.indexOf(n);for(let a=0;a<bm.length;a++){let o=bm[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):bp[s]??s,function(e,t,n,r){let a=bm.indexOf(n),o=bm.indexOf(r),i=bm.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={...bh};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[bp[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 by={style:"short",localeMatcher:"lookup"};function bv(e,t=lQ(),n){let r=bg(e,t,n);return null==r?null:bd(r,"object"==typeof n&&n.formatOptions?{...by,...n.formatOptions}:by)}let bb=(0,sc.createContext)(null);function bw(){let e=lu({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,sc.useMemo)(()=>{let t=vC();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,sc.useMemo)(()=>{let e=br(t);return void 0!==e?hV(e):void 0},[t]),r=(0,sc.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,sc.useMemo)(()=>n?pS(p$(pj()),n):p$(pj()),[n]);return{calendar:n,intlLocale:r,today_:a}}let bE=new pd(1793,1,1);var bx={};function bD(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function b_(e={}){let{locale:t}=mS();return(0,sc.useMemo)(()=>new(0,g7.K)(t,e),[t,e])}bx={"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 bS={};bS={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let bk=()=>{};function bC(e){var t;let n=(0,sc.useRef)(void 0),{value:r,textValue:a,minValue:o,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:m,onDecrementToMin:p,onIncrementToMax:h}=e,g=mG((t=bS)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,sc.useRef)(!1),v=(0,sc.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=fK(()=>{v()});(0,sc.useEffect)(()=>()=>b(),[]);let w=(0,sc.useRef)(!1),E=()=>{w.current=!0},x=()=>{w.current=!1},D=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,sc.useEffect)(()=>{w.current&&(mk&&mk.clear("assertive"),mC(D,"assertive"))},[D]);let _=(0,sc.useCallback)(()=>{v()},[v]),S=fK(c??bk),k=fK(f??bk),C=fK(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=fK(e=>{b(),y.current=!0,n.current=window.setTimeout(C,e)}),R=fK(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(k(),O(60))}),O=fK(e=>{b(),y.current=!0,n.current=window.setTimeout(R,e)}),T=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:$}=fG(),I=(0,sc.useRef)(!1),[M,A]=(0,sc.useState)(null);(0,sc.useEffect)(()=>{"touch"===M?P(600):M&&P(400)},[M]);let[j,L]=(0,sc.useState)(null);return(0,sc.useEffect)(()=>{"touch"===j?O(600):j&&O(400)},[j]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":D,"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&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(m){e.preventDefault(),m?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":p&&(e.preventDefault(),p?.());break;case"End":h&&(e.preventDefault(),h?.())}},onFocus:E,onBlur:x},incrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(c?.(),A("mouse")):(N(window,"pointercancel",_,{capture:!0}),I.current=!1,A("touch")),N(window,"contextmenu",T)},onPressUp:e=>{v(),"touch"===e.pointerType&&(I.current=!0),$(),A(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&I.current&&c?.(),I.current=!1,A(null)},onFocus:E,onBlur:x},decrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(f?.(),L("mouse")):(N(window,"pointercancel",_,{capture:!0}),I.current=!1,L("touch"))},onPressUp:e=>{v(),"touch"===e.pointerType&&(I.current=!0),$(),L(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&I.current&&f?.(),I.current=!1,L(null)},onFocus:E,onBlur:x}}}let bP=null;var bR=n(6284);function bO(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 bT=(0,sc.createContext)(null),bN=(0,sc.createContext)(null),b$=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,bT);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=mS(),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,commitBehavior:d="snap"}=e;null===o&&(o=NaN);let f=(0,sc.useCallback)(e=>void 0===r||isNaN(r)?yC(e,t,n):yR(e,t,n,r),[r,t,n]);void 0===o||isNaN(o)||"snap"!==d||(o=f(o)),isNaN(i)||"snap"!==d||(i=f(i));let[m,p]=hq(o,isNaN(i)?NaN:i,s),[h]=(0,sc.useState)(m),[g,y]=(0,sc.useState)(()=>isNaN(m)?"":new(0,g7.K)(l,a).format(m)),v=(0,sc.useMemo)(()=>new(0,bR.d)(l,a),[l,a]),b=(0,sc.useMemo)(()=>v.getNumberingSystem(g),[v,g]),w=(0,sc.useMemo)(()=>new(0,g7.K)(l,{...a,numberingSystem:b}),[l,a,b]),E=(0,sc.useMemo)(()=>w.resolvedOptions(),[w]),x=(0,sc.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),D=gz({...e,value:m}),_=void 0===r||isNaN(r)?1:r;"percent"===E.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,k]=(0,sc.useState)(m),[C,P]=(0,sc.useState)(l),[R,O]=(0,sc.useState)(a);Object.is(m,S)&&l===C&&a===R||(y(x(m)),k(m),P(l),O(a));let T=(0,sc.useMemo)(()=>v.parse(g),[v,g]),N=(e,r=0)=>{if(isNaN(T))return yR(isNaN(r)?0:r,t,n,_);{let r=yR(T,t,n,_);return"+"===e&&r>T||"-"===e&&r<T?r:yR(bO(e,T,_),t,n,_)}},$=(0,sc.useMemo)(()=>!u&&!c&&(isNaN(T)||void 0===n||isNaN(n)||yR(T,t,n,_)>T||bO("+",T,_)<=n),[u,c,t,n,_,T]),I=(0,sc.useMemo)(()=>!u&&!c&&(isNaN(T)||void 0===t||isNaN(t)||yR(T,t,n,_)<T||bO("-",T,_)>=t),[u,c,t,n,_,T]);return{...D,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=N("+",t);e===m&&y(x(e)),p(e),D.commitValidation()},incrementToMax:()=>{null!=n&&(p(yR(n,t,n,_)),D.commitValidation())},decrement:()=>{let e=N("-",n);e===m&&y(x(e)),p(e),D.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),D.commitValidation())},canIncrement:$,canDecrement:I,minValue:t,maxValue:n,numberValue:T,defaultNumberValue:isNaN(i)?h:i,setNumberValue:p,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=T;if(void 0!==e&&(n=v.parse(t)),!t.length){p(NaN),y(void 0===o?"":x(m));return}if(isNaN(n))return void y(x(m));let r="snap"===d?f(n):n,a=(r=v.parse(x(r)))!==m;p(r),y(x(void 0===o?r:m)),a&&D.commitValidation()}}}({...e,locale:i,validationBehavior:o}),l=(0,sc.useRef)(null),[u,c]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:m,incrementButtonProps:p,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r,a,o,i,s,l,u,c,d;let f,{id:m,decrementAriaLabel:p,incrementAriaLabel:h,isDisabled:g,isReadOnly:y,isRequired:v,minValue:b,maxValue:w,autoFocus:E,label:x,formatOptions:D,onBlur:_=()=>{},onFocus:S,onFocusChange:k,onKeyDown:C,onKeyUp:P,description:R,errorMessage:O,isWheelDisabled:T,...N}=e,{increment:$,incrementToMax:I,decrement:M,decrementToMin:A,numberValue:j,inputValue:L,commit:F,commitValidation:B}=t,V=mG((r=bx)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,sc.useCallback)(()=>{let e=n.current?.value??"";(0,fZ.flushSync)(()=>{F()}),n.current?.value!==e&&mC(n.current?.value??"","assertive")},[F,n]),W=dE(m),{focusProps:H}=fN({onBlur(){U()}}),z=b_(D),K=(0,sc.useMemo)(()=>z.resolvedOptions(),[z]),G=b_({...D,currencySign:void 0}),Z=(0,sc.useMemo)(()=>isNaN(j)?"":G.format(j),[G,j]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=bC({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:I,onDecrement:M,onDecrementToMin:A,value:j,textValue:Z}),[X,Q]=(0,sc.useState)(!1),{focusWithinProps:ee}=f9({isDisabled:g,onFocusWithinChange:Q});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,sc.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);p1(t,"wheel",r?void 0:a)}({onScroll:(0,sc.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?$():e.deltaY<0&&M())},[M,$]),isDisabled:T||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";fn()?en?er="text":et&&(er="decimal"):fs()&&(en?er="numeric":et&&(er="decimal"));let ea=dU(e),eo=(0,sc.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,fZ.flushSync)(()=>{F()}),B()):e.continuePropagation())},[F,B]),{isInvalid:ei,validationErrors:es,validationDetails:el}=t.displayValidation,{labelProps:eu,inputProps:ec,descriptionProps:ed,errorMessageProps:ef}=function(e,t,n){let r=fK(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,sc.useEffect)(()=>{if(!bD()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=bD()?null:e=>{let n=dZ(e).value.slice(0,dZ(e).selectionStart)+e.data+dZ(e).value.slice(dZ(e).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]=hq(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=fA(e,t),d=gz({...e,value:l}),{isInvalid:f,validationErrors:m,validationDetails:p}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=gN({...e,isInvalid:f,errorMessage:e.errorMessage||m}),b=dU(e,{labelable:!0}),w={type:i,pattern:e.pattern},[E]=(0,sc.useState)(l);return g$(t,e.defaultValue??E,u),gI(e,d,t),{labelProps:h,inputProps:d_(b,"input"===n?w:void 0,{disabled:r,readOnly:o,required:a&&"native"===s,"aria-required":a&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(dZ(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(sd().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:f,validationErrors:m,validationDetails:p}}(e,n),c=(0,sc.useRef)(null);return{inputProps:d_(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}}({...N,...ea,name:void 0,form:void 0,label:x,autoFocus:E,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[gH]:t,value:L,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:W,type:"text",inputMode:er,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:_,onFocus:S,onFocusChange:k,onKeyDown:(0,sc.useMemo)(()=>dl(eo,C),[eo,C]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=dZ(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),F(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:R,errorMessage:O},t,n);g$(n,t.defaultNumberValue,t.setNumberValue),a=t,o=e.validationBehavior,i=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,du(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!bP&&"u">typeof document&&((bP=document.createElement("input")).type="number"),!bP))return;bP.min=null==l||isNaN(l)?"":String(l),bP.max=null==u||isNaN(u)?"":String(u),bP.step=null==c||isNaN(c)?"":String(c),bP.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&bP.validity.valid,n=e.validationMessage||bP.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:bP.validity.rangeOverflow,rangeUnderflow:bP.validity.rangeUnderflow,stepMismatch:bP.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};a.updateValidation(r),"native"!==o||bP.validity.valid||e.setCustomValidity(bP.validationMessage)});let em=d_(Y,H,ec,{role:null,"aria-roledescription":fa()?null:V.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(em["aria-required"]=void 0);let ep=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},eh=e["aria-label"]||("string"==typeof e.label?e.label:"");eh||(f=null!=e.label?eu.id:e["aria-labelledby"]);let eg=dE(),ey=dE(),ev=d_(q,{"aria-label":h||V.format("increase",{fieldLabel:eh}).trim(),id:f&&!h?eg:null,"aria-labelledby":f&&!h?`${eg} ${f}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ep}),eb=d_(J,{"aria-label":p||V.format("decrease",{fieldLabel:eh}).trim(),id:f&&!p?ey:null,"aria-labelledby":f&&!p?`${ey} ${f}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ep});return{groupProps:{...ee,role:"group","aria-disabled":g,"aria-invalid":ei?"true":void 0},labelProps:eu,inputProps:em,incrementButtonProps:ev,decrementButtonProps:eb,errorMessageProps:ef,descriptionProps:ed,isInvalid:ei,validationErrors:es,validationDetails:el}}({...dT(e),label:c,validationBehavior:o},s,l),b=dC({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=dU(e);return delete w.id,sd().createElement(dk,{values:[[bN,s],[ga,f],[gi,{...m,ref:l}],[yE,{...d,ref:u}],[ms,{slots:{increment:p,decrement:h}}],[mc,{slots:{description:g,errorMessage:y}}],[yy,v]]},sd().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&&sd().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function bI(e,t){return Number.parseInt(bi(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let bM=(0,sc.forwardRef)(function(e,t){let{className:n}=e,r=(0,sc.useContext)(h3),a=(0,sc.useContext)(h6),o=r??a,i=(0,sc.useContext)(bb),s=pj(),l=bi(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=bI(o.visibleRange.start.toDate(s),i),c=o.maxValue?bI(o.maxValue.toDate(s),i):void 0,d=o.minValue?bI(o.minValue.toDate(s),i):void 0,f=(0,sc.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,ud.jsxs)("span",{ref:t,className:n,children:[(0,ud.jsx)("span",{children:l}),(0,ud.jsxs)(b$,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,ud.jsx)(gs,{}),(0,ud.jsxs)(go,{children:[(0,ud.jsx)(ml,{slot:"increment",children:(0,ud.jsx)(uW,{size:8})}),(0,ud.jsx)(ml,{slot:"decrement",children:(0,ud.jsx)(uB,{size:8})})]})]})]})}),bA="-esm-fast-data-entry__datepicker-module__inputGroup___-wpzr",bj="-esm-fast-data-entry__datepicker-module__inputSegment___ocu7L",bL="-esm-fast-data-entry__datepicker-module__dateInputWrapper___909Km",bF="-esm-fast-data-entry__datepicker-module__invalidText___oHJHi",bB="-esm-fast-data-entry__datepicker-module__flatButton___i9LDo",bV="-esm-fast-data-entry__datepicker-module__flatButtonMd___VZMkc",bU="-esm-fast-data-entry__datepicker-module__flatButtonSm___VA5wy",bW="-esm-fast-data-entry__datepicker-module__flatButtonLg___MnYLl";function bH({children:e}){let t=(0,sc.useContext)(vv),n=(0,sc.useContext)(vb),r=t??n,a=lU(()=>r?.close());return(0,ud.jsx)(yg,{className:"-esm-fast-data-entry__datepicker-module__dialog___2pADb",ref:a,children:e})}let bz=(0,sc.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,ud.jsx)(vm,{ref:a,className:"-esm-fast-data-entry__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,ud.jsx)(bH,{children:(0,ud.jsxs)(o?h9:h5,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,ud.jsxs)("header",{className:"-esm-fast-data-entry__datepicker-module__header___+fi16",children:[(0,ud.jsx)(ml,{className:um()(bB,bV),slot:"previous",children:(0,ud.jsx)(uq,{size:16})}),(0,ud.jsx)(bM,{className:"-esm-fast-data-entry__datepicker-module__monthYear___mGhot"}),(0,ud.jsx)(ml,{className:um()(bB,bV),slot:"next",children:(0,ud.jsx)(uJ,{size:16})})]}),(0,ud.jsx)(h7,{className:"-esm-fast-data-entry__datepicker-module__calendarGrid___z07wV",children:e=>(0,ud.jsx)(gr,{className:um()("cds--date-picker__day",{"-esm-fast-data-entry__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),bK=(0,sc.forwardRef)(function(e,t){let n=(0,sc.useContext)(vv),[r,a]=dR({slot:e.slot},t,ya),{locale:o}=mS(),i=yr({...r,locale:o,createCalendar:hV}),s=(0,sc.useRef)(null),{fieldProps:l,inputProps:u}=gL({...r,inputRef:s},i,a),c=(0,sc.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,ud.jsxs)(dk,{values:[[yo,i],[gi,{...u,ref:s}],[ga,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,ud.jsx)(go,{...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,sc.cloneElement)(e.children(t),{key:n}))}),(0,ud.jsx)(gs,{})]})}),bG=(0,sc.forwardRef)(function(e,t){let n=(0,sc.useContext)(vv),r=(0,sc.useContext)(vb);return(n??r).isInvalid?(0,ud.jsx)(c3,{ref:t,size:16,...e}):(0,ud.jsx)(uF,{ref:t,size:16,...e})});class bZ{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let bY=new Map,bq=(0,sc.forwardRef)(function({segment:e,...t},n){let r=(0,sc.useContext)(yo),a=da(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,sc.useRef)(""),{locale:l,direction:u}=mS(),c=function(){var e;let{locale:t}=mS(),n=mK((e=gR)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,sc.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new bZ(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:m,focusManager:p}=gM.get(t),h=e.isPlaceholder?"":e.text,g=(0,sc.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=mj({month:"long",timeZone:g.timeZone}),v=mj({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}=bC({value:e.value??void 0,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="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,sc.useMemo)(()=>new(0,bR.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&p.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===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}=mS(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(bY.has(n))return bY.get(n);let r=new Intl.Collator(t,e);return bY.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,sc.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,sc.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,sc.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,sc.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),D=mj({hour:"numeric",hour12:!0}),_=(0,sc.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,sc.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),k=mj({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,sc.useMemo)(()=>{if("era"!==e.type)return[];let n=pS(new pd(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(_,n))t.setSegment("dayPeriod",0);else if(x(S,n))t.setSegment("dayPeriod",1);else break;p.focusNext();break;case"era":{let e=C.find(e=>x(e.formatted,n));e&&(t.setSegment("era",e.era),p.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;if(void 0!==e.maxValue&&a>e.maxValue&&(o=w.parse(n)),isNaN(a))return;t.setSegment(e.type,o),void 0!==e.maxValue&&(Number(a+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",p.focusNext()):s.current=r}}};p1((0,sc.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&dG(n.current,e?.anchorNode)&&e.collapse(n.current)});let R=(0,sc.useRef)("");p1(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)}}),p1(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=R.current),null!=r&&(x(_,r)||x(S,r))&&P(r))}),du(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(p.focusPrevious()||p.focusNext())}},[n,p]);let O=fa()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,sc.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(m=void 0);let T=dE(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),I=pq({"aria-label":`${$}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let M={caretColor:"transparent"};if("rtl"===u){M.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(M.direction="ltr")}return{segmentProps:d_(b,I,{id:T,...O,"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:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(sd().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(ft()?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&&p5(n.current,{containingElement:p4(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:M,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,a),{focusProps:i,isFocused:s,isFocusVisible:l}=f8(),{hoverProps:u,isHovered:c}=mr({...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,sc.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}),f=(0,sc.useCallback)(e=>{e.stopPropagation()},[]);return(0,ud.jsx)("span",{...d_(dU(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:f})}),bJ={short:!1,size:"md"},bX=(0,sc.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:f,onChange:m,onChangeRaw:p,short:h,size:g,value:y,...v}={...bJ,...e},{calendar:b,intlLocale:w,today_:E}=bw(),x=(0,sc.useId)(),D=!!(u??l),_=(0,sc.useMemo)(()=>vD(r,b),[r,b]),S=(0,sc.useMemo)(()=>vD(y,b,!0),[y,b]),k=(0,sc.useMemo)(()=>vD(d,b),[d,b]),C=(0,sc.useMemo)(()=>vD(f??bE,b),[f,b]),P=(0,sc.useMemo)(()=>o||s,[o,s]),R=(0,sc.useMemo)(()=>(p&&m&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>m?.(v_(e)))),[p,m]);return(0,ud.jsx)(vx,{locale:w.toString(),children:(0,ud.jsx)("div",{className:um()("cds--form-item",n),children:(0,ud.jsx)(dk,{values:[[bb,w]],children:(0,ud.jsxs)(vw,{className:um()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:R,children:[(0,ud.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,ud.jsx)(yx,{className:um()("cds--label",{"cds--label--disabled":a}),htmlFor:x,children:u??l}),(0,ud.jsxs)(go,{className:bA,children:[(0,ud.jsx)(bK,{id:D?x:void 0,ref:t,className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__inputWrapper___MHJAy",{"-esm-fast-data-entry__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-fast-data-entry__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-fast-data-entry__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,ud.jsx)(bq,{className:bj,segment:e}):(0,ud.jsx)(sd().Fragment,{})}),(0,ud.jsx)(ml,{className:um()(bB,{[bU]:"sm"===g,[bV]:"md"===g||!g||0===g.length,[bW]:"lg"===g}),children:(0,ud.jsx)(bG,{})})]}),(0,ud.jsx)(yv,{className:bF,children:i})]}),(0,ud.jsx)(bz,{variant:"single",today_:E})]})})})})}),bQ=(0,sc.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:f,size:m="md",value:p,...h},g){let{calendar:y,intlLocale:v,today_:b}=bw(),w=(0,sc.useId)(),E=!!(s??i),x=(0,sc.useMemo)(()=>{if(p)return{start:vD(p[0],y,!1),end:vD(p[1],y,!1)}},[p,y]),D=(0,sc.useMemo)(()=>{if(t)return{start:vD(t[0],y,!1),end:vD(t[1],y,!1)}},[t,y]),_=(0,sc.useMemo)(()=>vD(c??bE,y,!0),[c,y]),S=(0,sc.useMemo)(()=>vD(u,y,!0),[u,y]),k=(0,sc.useMemo)(()=>n||o,[n,o]),C=(0,sc.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([v_(e.start),v_(e.end)]))),[f,d]);return(0,ud.jsx)(vx,{locale:v.toString(),children:(0,ud.jsx)("div",{className:um()("cds--form-item",e),children:(0,ud.jsx)(dk,{values:[[bb,v]],children:(0,ud.jsx)(vE,{id:E?w:void 0,className:um()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:a,...h,onChange:C,children:(0,ud.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,ud.jsx)(yx,{className:um()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,ud.jsxs)(go,{className:bA,children:[(0,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__datepicker-module__inputsWrapper___UyGoG",{"-esm-fast-data-entry__datepicker-module__inputsWrapperSm___qrGsA":"sm"===m,"-esm-fast-data-entry__datepicker-module__inputsWrapperMd___pofu4":"md"===m||!m||0===m.length,"-esm-fast-data-entry__datepicker-module__inputsWrapperLg___eF1Im":"lg"===m}),children:[(0,ud.jsx)(ys,{className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__startInput___C8vnM",bL),slot:"start",children:e=>(0,ud.jsx)(bq,{className:bj,segment:e})}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__datepicker-module__separator___vHLFZ",children:(0,ud.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,ud.jsx)(ys,{className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__endInput___25OF9",bL),slot:"end",children:e=>(0,ud.jsx)(bq,{className:bj,segment:e})})]}),(0,ud.jsx)(ml,{className:um()(bB,{[bU]:"sm"===m,[bV]:"md"===m||!m||0===m.length,[bW]:"lg"===m}),children:(0,ud.jsx)(bG,{})})]}),(0,ud.jsx)(yv,{className:bF,children:r}),(0,ud.jsx)(bz,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),b0=({diagnoses:e})=>{let{diagnosisTags:t}=lu({externalModuleName:"@openmrs/esm-styleguide"});return(0,ud.jsx)("div",{className:"-esm-fast-data-entry__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:n,uuid:r,display:a}=e,o=t[1===n?"primaryColor":"secondaryColor"];return(0,ud.jsx)(uv.Tag,{type:o,children:a},r)})})},b1={action:"-esm-fast-data-entry__empty-card-module__action___l4wUo",content:"-esm-fast-data-entry__empty-card-module__content___XbsSJ",desktopHeading:"-esm-fast-data-entry__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-fast-data-entry__empty-card-module__tabletHeading___unl1F",tile:"-esm-fast-data-entry__empty-card-module__tile___vS3Sj"},b2=({width:e="64",height:t="64"})=>(0,ud.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,ud.jsx)("use",{href:"#omrs-empty-data-illustration"})}),b4=e=>{let t="tablet"===lA(),n=e.launchForm;return(0,ud.jsx)(uv.Layer,{className:b1.layer,children:(0,ud.jsxs)(uv.Tile,{className:b1.tile,children:[(0,ud.jsx)("div",{className:t?b1.tabletHeading:b1.desktopHeading,children:(0,ud.jsx)("h4",{children:e.headerTitle})}),(0,ud.jsx)(b2,{}),(0,ud.jsx)("p",{className:b1.content,children:rF("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,ud.jsx)("p",{className:b1.action,children:n&&(0,ud.jsx)(uv.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:rF("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},b3=({error:e,headerTitle:t})=>{let n="tablet"===lA();return(0,ud.jsx)(uv.Layer,{children:(0,ud.jsxs)(uv.Tile,{className:"-esm-fast-data-entry__error-state-module__tile___hHM56",children:[(0,ud.jsx)("div",{className:n?"-esm-fast-data-entry__error-state-module__tabletHeading___W7a4U":"-esm-fast-data-entry__error-state-module__desktopHeading___VL8Rv",children:(0,ud.jsx)("h4",{children:t})}),(0,ud.jsxs)("p",{className:"-esm-fast-data-entry__error-state-module__errorMessage___IytZy",children:[rF("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,ud.jsx)("p",{className:"-esm-fast-data-entry__error-state-module__errorCopy___E1yZO",children:rF("errorCopy")})]})})},b6=b3,b5=sd().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=lF(),i=window.location??{pathname:""},s=sS(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,ud.jsxs)(uv.SideNav,{"aria-label":rF("leftNavigation","Left navigation"),className:"-esm-fast-data-entry__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,ud.jsx)(sP,{name:"global-nav-menu-slot"}),n?(0,ud.jsx)(s7,{value:a,fallback:(0,ud.jsx)(sP,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,ud.jsx)(sf.Provider,{value:a,children:(0,ud.jsx)(sP,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),b9=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,sc.useState)(""),s=(0,sc.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=lm()(t,r2,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,sc.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:f,error:m,setPage:p}=function(e,t=0,n=""){let r=ld(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=lP()(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=`${rQ}/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()},r2);return(0,sc.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,sc.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,sc.useCallback)(e=>{a(),i(e.trim())},[a]),y=lW((0,sc.useCallback)(()=>{!f&&d&&p(e=>e+1)},[f,d,p])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)(uv.Search,{"aria-describedby":m?`${s}-error`:void 0,labelText:rF("searchForLocation"),id:s,placeholder:rF("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),m&&(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,ud.jsx)(uv.InlineNotification,{kind:"error",subtitle:rF("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:rF("error","Error")})}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__searchResults___aCL93",children:c?(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,ud.jsx)(uv.RadioButtonSkeleton,{className:"-esm-fast-data-entry__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,ud.jsx)(uv.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,ud.jsx)(uv.RadioButton,{className:"-esm-fast-data-entry__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,ud.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__emptyState___qiPqQ",children:(0,ud.jsx)("p",{className:"-esm-fast-data-entry__location-picker-module__locationNotFound___tKDOJ",children:rF("noResultsToDisplay")})})}),f&&(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingIcon___PGwvc",children:(0,ud.jsx)(uv.InlineLoading,{description:rF("loading")})})]})})]})},b8=V("modalState",{modalContainer:null,modalStack:[]}),b7=0;async function we(e,t,n={}){let r=iJ(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=b7++;a=await si({...i,name:`${t}-${s}`},{...n,domElement:e})}else P(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function wt(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function wn(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function wr(e){return e.find(e=>!wt(e))}function wa(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let wo=window.getComputedStyle(document.body).overflow;function wi({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",wl),document.body.style.overflow="hidden",t.style.visibility="unset");let n=wr(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",we(n,e.modalName,e.props).then(r=>{wt(e)?wn(e.modalName,r):r?(e.parcel=r,t.prepend(n),wa(e,wr(b8.getState().modalStack)===e),r.mountPromise.then(()=>{wt(e)||(e.state="MOUNTED")},t=>{P(t),e.parcel=null,ws(e)})):ws(e)},t=>{P(t),ws(e)});break}case"MOUNTING":case"MOUNTED":wa(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),wn(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=b8.getState();b8.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=wo,removeEventListener("keydown",wl)}function ws(e){if(wt(e))return;e.state="TO_BE_DELETED";let t=b8.getState();b8.setState({...t,modalStack:[...t.modalStack]})}function wl(e){"Escape"===e.key&&function(){let[e]=b8.getState().modalStack;e&&ws(e)}()}function wu(e){b8.subscribe(wi),b8.setState({...b8.getState(),modalContainer:e})}function wc(e,t={},n=()=>{}){let r=()=>{let e=b8.getState().modalStack.find(e=>e.onClose===n);e&&ws(e)};if(iJ(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=b8.getState()).modalStack],b8.setState({...o,modalStack:i})}else P(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let wd=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},wf=({subject:e})=>{let[t,n]=(0,sc.useState)([]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(wd,{notification:e},e.id))})},wm=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,sc.useState)(t);return(0,ud.jsx)(uv.ActionableNotification,{kind:a||"info",actionButtonLabel:c,ariaLabel:rF("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:rF("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},wp=({subject:e})=>{let[t,n]=(0,sc.useState)([]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(wm,{notification:e},e.id))})};class wh{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 wg=new wh,wy=0,wv=new wh,wb=0;function ww(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(wf,{subject:wg}))}function wE(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,J.isEmpty)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{wg.next({...e,id:wy++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function wx(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(wp,{subject:wv}))}function wD(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,J.isEmpty)(t))?setTimeout(()=>{wv.next({...e,id:wb++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let w_=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],wS=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],wk={container:"-esm-fast-data-entry__numeric-observation-module__container___+Kqi9",card:"-esm-fast-data-entry__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-fast-data-entry__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-fast-data-entry__numeric-observation-module__critical-value___nSKSX",cell:"-esm-fast-data-entry__numeric-observation-module__cell___wc90e","critically-high":"-esm-fast-data-entry__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-fast-data-entry__numeric-observation-module__critically-low___h9797",high:"-esm-fast-data-entry__numeric-observation-module__high___0-YpP",low:"-esm-fast-data-entry__numeric-observation-module__low___TuqAk","label-container":"-esm-fast-data-entry__numeric-observation-module__label-container___FtozC","value-container":"-esm-fast-data-entry__numeric-observation-module__value-container___R9qoY",label:"-esm-fast-data-entry__numeric-observation-module__label___0DGA5",value:"-esm-fast-data-entry__numeric-observation-module__value___ohqoh",units:"-esm-fast-data-entry__numeric-observation-module__units___xvMd3","pad-right":"-esm-fast-data-entry__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-fast-data-entry__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-fast-data-entry__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-fast-data-entry__numeric-observation-module__arrow___Agoh9"},wC=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,sc.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${rX}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${rX}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=lm()(n,r2),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,f=(0,sc.useMemo)(()=>{if(r)return r?"--"===r?"normal":w_.includes(r)?r.toLowerCase():wS.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"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,p="normal"!==f,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:rF("notAvailable","Not available"),w=um()({[wk["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[wk["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[wk.low]:"low"===f,[wk.high]:"high"===f,[wk["off-scale-low"]]:"off_scale_low"===f,[wk["off-scale-high"]]:"off_scale_high"===f}),E=um()({[wk.container]:!0,[wk.card]:!0,[wk["critical-value"]]:m,[wk["abnormal-value"]]:p&&!m}),x=um()({[wk.cell]:!0,[w]:!0});return"cell"===i?(0,ud.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,ud.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[n&&(0,ud.jsxs)("div",{className:wk["label-container"],children:[(0,ud.jsx)("span",{id:h,className:wk.label,children:n}),p&&(0,ud.jsx)("span",{className:wk[f.replace("_","-")],title:rF("abnormalValue","Abnormal value")})]}),(0,ud.jsxs)("div",{className:wk["value-container"],children:[(0,ud.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:wk.value,children:b}),v&&t&&(0,ud.jsx)("span",{id:y,className:wk.units,children:t})]})]})},wP="-esm-fast-data-entry__page-header-module__pageHeader___XNJYe",wR=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,ud.jsx)("div",{className:um()(wP,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,ud.jsx)("div",{className:um()(wP,r),...a,children:(0,ud.jsx)(wO,{title:t,illustration:n})})}},wO=({title:e,illustration:t,className:n})=>{let[r,a]=(0,sc.useState)(null);return(0,sc.useEffect)(()=>{eH("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__page-header-module__pageHeaderContent___V-mTz",n),children:[t,(0,ud.jsxs)("div",{className:"-esm-fast-data-entry__page-header-module__pageLabels___vGJvg",children:[r?.implementationName&&(0,ud.jsx)("p",{children:rF(r.implementationName)}),(0,ud.jsx)("p",{className:"-esm-fast-data-entry__page-header-module__pageName___+eYMc",children:e})]})]})},wT=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=lK(t,e,r,o),u="tablet"===lA(),c=rF("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,ud.jsx)(ud.Fragment,{children:e>0&&(0,ud.jsxs)("div",{className:um()({"-esm-fast-data-entry__pagination-module__tablet___DdaYk":u,"-esm-fast-data-entry__pagination-module__desktop___rSwlo":!u}),children:[(0,ud.jsxs)("div",{children:[c,a&&(0,ud.jsx)(sm,{to:a,className:"-esm-fast-data-entry__pagination-module__configurableLink___cTCLf",children:i??rF("seeAll","See all")})]}),(0,ud.jsx)(uv.Pagination,{className:"-esm-fast-data-entry__pagination-module__pagination___U6anZ",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>rF("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function wN(e){return wI(wA(e,"usual","official"))}function w$(e){return wN(e)}function wI(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function wM(e){return wI(e)}function wA(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 wj(e,t=lQ()){let n=lQ(t),r=bf(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 wL(e,t=lQ()){let n=wj(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),bd(n,r)}let wF={container:"-esm-fast-data-entry__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-fast-data-entry__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-fast-data-entry__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-fast-data-entry__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-fast-data-entry__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-fast-data-entry__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-fast-data-entry__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-fast-data-entry__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-fast-data-entry__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-fast-data-entry__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-fast-data-entry__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-fast-data-entry__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-fast-data-entry__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-fast-data-entry__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-fast-data-entry__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-fast-data-entry__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-fast-data-entry__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-fast-data-entry__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-fast-data-entry__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-fast-data-entry__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-fast-data-entry__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-fast-data-entry__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function wB({showIdentifierLabel:e,type:t,value:n}){return(0,ud.jsx)("span",{className:wF.primaryIdentifier,children:(0,ud.jsxs)(uv.Tag,{className:wF.tag,type:"gray",children:[e&&t?.text&&(0,ud.jsxs)("span",{className:wF.label,children:[t.text,": "]}),(0,ud.jsx)("span",{className:wF.value,children:n})]})})}function wV({showIdentifierLabel:e,type:t,value:n}){return(0,ud.jsxs)(uv.FormLabel,{className:wF.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,ud.jsxs)("span",{className:wF.label,children:[t?.text,": "]}),(0,ud.jsx)("span",{className:wF.value,children:n})]})}function wU({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=lu(),{primaryIdentifierCode:r}=lY(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,ud.jsx)(ud.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,ud.jsxs)(sd().Fragment,{children:[(0,ud.jsx)("span",{className:wF.identifier,children:n?.coding?.[0]?.code===r?(0,ud.jsx)(wB,{showIdentifierLabel:t,type:n,value:e}):(0,ud.jsx)(wV,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"})]},e)):""})}let wW={Female:u7,Male:ce,Other:ct,Unknown:cn},wH=({gender:e})=>{let t=wW[e];return t?(0,ud.jsx)(t,{fill:"#525252"}):null},wz={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function wK({patient:e,renderedFrom:t}){var n;let r,a,o=wN(e),i=e?.gender&&(a=wz[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:rF(r,n),iconKey:a}),s=(0,sc.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,ud.jsxs)("div",{className:wF.patientInfo,children:[(0,ud.jsx)("div",{className:um()(wF.row,wF.patientNameRow),children:(0,ud.jsxs)("div",{className:wF.flexRow,children:[(0,ud.jsx)("span",{className:wF.patientName,children:o}),i&&(0,ud.jsxs)("div",{className:wF.gender,children:[(0,ud.jsx)(wH,{gender:i.iconKey}),(0,ud.jsx)("span",{children:i.displayText})]}),(0,ud.jsx)(sP,{className:wF.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,ud.jsxs)("div",{className:wF.demographics,children:[e.birthDate&&(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("span",{children:wL(e.birthDate)}),(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"}),(0,ud.jsx)("span",{children:bo(e.birthDate,{time:!1})}),(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"})]}),(0,ud.jsx)(wU,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,ud.jsx)(sP,{className:wF.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var wG=n(1673);function wZ({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,sc.useState)(!1),{extensions:i}=sk(n),s="tablet"===lA(),l=lU(()=>o(!1),a),u=(0,sc.useRef)(null),c=(0,sc.useRef)(null),d=(0,sc.useId)(),f=`patient-actions-menu-trigger-${d}`,m=`patient-actions-menu-${d}`,p=(0,sc.useCallback)(()=>o(e=>!e),[]),h=(0,sc.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,sc.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,sc.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,sc.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,ud.jsx)("div",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,ud.jsxs)("div",{"data-overflow-menu":!0,className:um()("cds--overflow-menu",uE),ref:l,children:[(0,ud.jsxs)("button",{className:um()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},u_),"aria-controls":m,"aria-expanded":a,"aria-haspopup":"true",id:f,onClick:p,onKeyDown:g,ref:u,children:[(0,ud.jsx)("span",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:rF("actions","Actions")})," ",(0,ud.jsx)(wG.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,ud.jsxs)("div",{className:um()("cds--overflow-menu-options","cds--overflow-menu--flip",ux,{[uD]:a}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:m,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,ud.jsx)("ul",{className:um()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,ud.jsx)(sP,{name:n,state:y},n)}),(0,ud.jsx)("span",{})]})]})})}var wY=n(6767),wq=n.n(wY);function wJ(e){let{patientPhotoConceptUuid:t}=lu({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${rX}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=sz()(e?n:null,r2),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let wX=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,sW.useTranslation)();return(0,ud.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,ud.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,ud.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"})]})},wQ="-esm-fast-data-entry__patient-photo-module__avatar___R93LX";function w0({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=wJ(e),[o,i]=(0,sc.useState)(null),[s,l]=(0,sc.useState)(!1),u=(0,sc.useMemo)(()=>wq().generate(e),[e]);(0,sc.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,sc.useMemo)(()=>n||(o?rF("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):rF("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,ud.jsx)(uv.SkeletonIcon,{className:"-esm-fast-data-entry__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,ud.jsx)(wX,{"aria-label":rF("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,ud.jsx)("div",{"aria-label":c,children:(0,ud.jsx)("img",{className:wQ,src:o,alt:c,title:t})}):(0,ud.jsx)("div",{"aria-label":c,children:(0,ud.jsx)("div",{className:wQ,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,ud.jsx)("span",{className:"-esm-fast-data-entry__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let w1=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],w2=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),w4=w2,w3=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),w6=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),w5=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),w9=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),w8=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),w7=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ee=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Et=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),En=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Er=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Ea=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Eo=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ei=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Es=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),El=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Eu=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Ec=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Ed=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Ef=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),Em=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Ep=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Eh=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Eg=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Ey=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Ev=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Eb=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Ew=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(E_,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),EE=En,Ex=Ed,ED=(0,sc.memo)((0,sc.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,sc.useRef)(document.getElementById(e));return(0,sc.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,ud.jsx)(s7,{value:a.current,fallback:t,children:(0,ud.jsx)(E_,{ref:r,pictogram:e,pictogramProps:n})})})),E_=(0,sc.memo)((0,sc.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,ud.jsx)("svg",{ref:n,className:um()("-esm-fast-data-entry__pictograms-module__pictogram___LTPzD",r),height:a,width:a,children:(0,ud.jsx)("use",{href:`#${e}`})})})),ES=({children:e})=>"tablet"===lA()?(0,ud.jsx)(uv.Layer,{children:e}):(0,ud.jsx)(ud.Fragment,{children:e}),Ek=({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,...f}=e,[m,p]=(0,sc.useState)(n),[h,g]=(0,sc.useState)(!0),[y,v]=(0,sc.useState)(!1),b=(0,sc.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,sc.useCallback)(()=>{v(!0),b()},[b]);return(0,sc.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,sc.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:m,"aria-label":rF("closeSnackbar","Close snackbar"),className:um()("-esm-fast-data-entry__snackbar-module__slideIn___TqSN-",{"-esm-fast-data-entry__snackbar-module__animated___+XPKT":h,"-esm-fast-data-entry__snackbar-module__slideOut___1cFIY":y}),kind:r,lowContrast:o,onActionButtonClick:()=>{a(),w(),i&&p(i)},onClose:b,statusIconDescription:rF("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},EC=({subject:e})=>{let[t,n]=(0,sc.useState)([]),r=(0,sc.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(Ek,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},EP=new wh,ER=0;function EO(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(EC,{subject:EP}))}function ET(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{EP.next({...e,id:ER++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let EN=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,sc.useCallback)(()=>{s(),t()},[t,s]);return(0,ud.jsx)("div",{children:(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},E$=({subject:e})=>{let[t,n]=(0,sc.useState)([]),r=(0,sc.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(EN,{toast:e,closeToast:()=>r(e)},e.id))})},EI=new wh,EM=0;function EA(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(E$,{subject:EI}))}function Ej(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,J.isEmpty)(t))?setTimeout(()=>{EI.next({...e,id:EM++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function EL(e,t=!1){if(t)return!0;let n=EW[e];return!n||!n()}function EF(e,t){let n=EJ.getState()?.workspaceGroup,r=n?.name;r&&e===r&&E1(()=>{let r=E5(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),EJ.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function EB(e,t){let{name:n,additionalProps:r}=t;i4(n);let a=()=>{EZ(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>EV(n,r),closeWorkspaceGroup:!1})};EL(e.name)?a():E4("closing-workspace-launching-new-workspace",a,e.title??e.name)}function EV(e,t){let n=i4(e),r=EJ.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void EF(r.name,()=>{EV(e,t)});let a=EJ.getState().workspaceGroup?.name,o={...n,title:E3(n,t),closeWorkspace:(t={})=>EZ(e,t),closeWorkspaceWithSavedChanges:t=>EZ(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(EW[n]=r)},setTitle:(t,n)=>{o.title=t,o.titleNode=n,EJ.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){EJ.setState(n=>{let r=[e,...t??n.openWorkspaces],a=E0(e);return{...n,openWorkspaces:r,workspaceWindowState:a}})}a&&E5(a,t);let s=EJ.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===E3(t,t.additionalProps)&&{title:E3(o,o.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,EJ.getState().openWorkspaces.filter(e=>e.type!=o.type)),EB(u,{name:e,additionalProps:t})):i(o);else EB(s[0],{name:e,additionalProps:t})}function EU({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){EY(t),EV(n,r),rU({to:e})}let EW={};function EH(e,t){EW[e]=t}function Ez(e){return EW[e]}function EK(){let e=EJ.getState();EJ.setState({...e,prompt:null})}let EG={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function EZ(e,t={}){t={...EG,...t};let n=()=>{let n=EJ.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),a=EJ.getState().workspaceGroup?.name;a&&t.closeWorkspaceGroup&&EF(a),EW[e]=()=>!1,EJ.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:E0(r?.[0])})),t?.onWorkspaceClose?.()};return EL(e,t?.ignoreChanges)?(n(),!0):(E4("closing-workspace",n,i4(e).title??e),!1)}function EY(e){EJ.getState().context!=e&&EJ.setState({context:e,openWorkspaces:[],prompt:null})}let Eq={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},EJ=V("workspace",Eq);function EX(){return EJ}function EQ(e){let t=EJ.getState();EJ.setState({...t,workspaceWindowState:e})}function E0(e){return e?.preferredWindowSize??"normal"}function E1(e=()=>{},t=()=>!0){let n=EJ.getState().openWorkspaces.filter(t).every(({name:e})=>EL(e)),r=()=>{E6(),e?.()};n?r():E4("closing-all-workspaces",r)}function E2(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=sv(EJ);return(0,sc.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function E4(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:rF("unsavedChangesTitleText","Unsaved changes"),body:rF("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:rF("discard","Discard")};break;case"closing-all-workspaces":{let e=EJ.getState().openWorkspaces.filter(({name:e})=>!EL(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:rF("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:rF("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:rF("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:rF("unsavedChangesTitleText","Unsaved changes"),body:rF("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{EJ.setState(e=>({...e,prompt:null})),t?.()},confirmText:rF("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}EJ.setState(e=>({...e,prompt:r}))}function E3(e,t){return t?.workspaceTitle??e.title}function E6(){EJ.setState(Eq)}function E5(e,t={}){if(!e||"default"===e)return;let n=W(e,{});return t&&n.setState(e=>({...e,...t})),n}let E9="-esm-fast-data-entry__action-menu-button-module__container___Uwne-",E8="-esm-fast-data-entry__action-menu-button-module__elementContainer___vWkQO",E7="-esm-fast-data-entry__action-menu-button-module__active___D7Idw";function xe({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,ud.jsxs)(ud.Fragment,{children:[e({size:16}),t?(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__countTag___XJRiM",children:n})]})}let xt=({getIcon:e,label:t,iconDescription:n,handler:r,type:a,tagContent:o})=>{let i=lA(),{workspaces:s,workspaceWindowState:l}=E2(),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,ud.jsxs)(uv.Button,{className:um()(E9,{[E7]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,ud.jsx)("span",{className:E8,children:(0,ud.jsx)(xe,{formOpenInTheBackground:d,getIcon:e,tagContent:o})}),(0,ud.jsx)("span",{children:t})]}):(0,ud.jsx)(uv.IconButton,{align:"left","aria-label":n,className:um()(E9,{[E7]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,ud.jsx)("div",{className:E8,children:(0,ud.jsx)(xe,{formOpenInTheBackground:d,getIcon:e,tagContent:o})})})};var xn=n(4535),xr=n(771);function xa({contextKey:e}){let{prompt:t}=E2();return(0,sc.useEffect)(()=>{RegExp(`/${(0,J.escapeRegExp)(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,sc.useEffect)(()=>(EY(e),()=>{EY(null)}),[e]),(0,sc.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,a=RegExp(`/${(0,J.escapeRegExp)(e)}(/|$)`),o=new URL(r),i=a.test(o.pathname),s=EJ.getState().openWorkspaces.every(({name:e})=>EL(e));i||(s?E6():(n?.(),E1(()=>{rU({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,ud.jsxs)(uv.ComposedModal,{open:!0,onClose:EK,children:[(0,ud.jsx)(uv.ModalHeader,{title:t.title}),(0,ud.jsx)(uv.ModalBody,{children:(0,ud.jsx)("p",{className:"-esm-fast-data-entry__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,ud.jsxs)(uv.ModalFooter,{children:[(0,ud.jsx)(uv.Button,{kind:"secondary",onClick:EK,children:t.cancelText??rF("cancel")}),(0,ud.jsx)(uv.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??rF("confirm")})]})]}):null}function xo(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 xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(n),!0).forEach(function(t){xl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xs(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 xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xu(e){return(xu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xc(e,t){return(xc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xd(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xf=function(e){var t=sc.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&&xc(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=xu(i);e=n?Reflect.construct(t,arguments,xu(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 xd(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),xl(xd(t=o.call(this,e)),"handleRef",function(e){t.el=e}),xl(xd(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}))}),xl(xd(t),"getParcelProps",function(){var e=xi(xi({},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,xi({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 sM&&sM.Consumer?sc.createElement(sM.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=sM&&sM.Consumer?sc.createElement(sM.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return sc.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],xs(i.prototype,r),a&&xs(i,a),i}();xl(xf,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function xm({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,sc.useState)(),a=function(e){let[t,n]=(0,sc.useState)({}),[r,a]=(0,sc.useState)(e);return(0,sc.useEffect)(()=>{r!==e&&a(e)},[e]),(0,sc.useEffect)(()=>{let e,t=E5(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,sc.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let o=(0,sc.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...a,...e.additionalProps},[e,t,a]);return n?(0,ud.jsx)(xf,{config:n,mountParcel:sl,...o},e.name):(0,ud.jsx)(uv.InlineLoading,{className:"-esm-fast-data-entry__workspace-module__loader___v7QFg",description:`${rF("loading","Loading")} ...`})}function xp({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,a]=(0,sc.useState)(!1),o=(0,sc.useRef)(window.innerHeight),{featureName:i}=(0,sc.useContext)(sf),s=lA();(0,sc.useEffect)(()=>{let e=()=>{a(!lj(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,ud.jsx)("aside",{className:um()("-esm-fast-data-entry__action-menu-module__sideRail___Aa96v",{"-esm-fast-data-entry__action-menu-module__withinWorkspace___2bJET":e,"-esm-fast-data-entry__action-menu-module__sideRailHidden___Yb0w9":r,"-esm-fast-data-entry__action-menu-module__sideRailVisible___XIAk7":!r}),children:(0,ud.jsx)("div",{className:"-esm-fast-data-entry__action-menu-module__container___mzfAh",children:(0,ud.jsx)(sP,{className:"-esm-fast-data-entry__action-menu-module__chartExtensions___DiJtm",name:l,state:n})})})}function xh({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:a}){let o=lA(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=E2(),u=l?.name,c=i[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),m=(0,sc.useMemo)(()=>n||u&&!d,[u,d,n]);return li(!d&&!lj(o)),(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)("div",{className:n?"-esm-fast-data-entry__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-fast-data-entry__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,ud.jsx)("aside",{className:um()(t?"-esm-fast-data-entry__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-fast-data-entry__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-fast-data-entry__workspace-module__hiddenRelative___qqT-4":d,"-esm-fast-data-entry__workspace-module__narrowWorkspace___MMI1u":"narrow"===f,"-esm-fast-data-entry__workspace-module__widerWorkspace___be-UT":"wider"===f,"-esm-fast-data-entry__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===f}),children:(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-fast-data-entry__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-fast-data-entry__workspace-module__hiddenFixed___48wS9":d}),children:i.map((e,t)=>(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-fast-data-entry__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,ud.jsx)(sc.Suspense,{fallback:null,children:(0,ud.jsx)(sW.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,ud.jsx)(xg,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,ud.jsx)(xa,{contextKey:e})]}),m&&(0,ud.jsx)(xp,{name:u,isWithinWorkspace:!n,actionMenuProps:a})]})}function xg({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,sW.useTranslation)(),r=lA(),{workspaceWindowState:a,workspaceGroup:o}=E2(),i=o?.name,s="maximized"===a;(0,sc.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,sc.useContext)(sf),u=(0,sc.useCallback)(()=>{EQ(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:m}=(0,sc.useMemo)(()=>e??{},[e]),p=(0,sc.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)(uv.Header,{"aria-label":rF("workspaceHeader","Workspace Header"),className:"-esm-fast-data-entry__workspace-module__header___nACZO",children:[!lj(r)&&!c&&(0,ud.jsx)(uv.HeaderMenuButton,{"aria-label":rF("close","Close"),renderMenuIcon:(0,ud.jsx)(uI,{}),onClick:()=>m()}),(0,ud.jsx)(uv.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,ud.jsxs)(uv.HeaderGlobalBar,{className:"-esm-fast-data-entry__workspace-module__headerButtons___heP0Q",children:[(0,ud.jsx)(sP,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:p}),(0,ud.jsx)(sP,{name:`workspace-header-type-${e.type}-slot`,state:p}),(0,ud.jsx)(sP,{name:`workspace-header-${l}-slot`,state:p}),lj(r)&&(0,ud.jsxs)(ud.Fragment,{children:[(d||s)&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":s?rF("minimize","Minimize"):rF("maximize","Maximize"),onClick:u,children:s?(0,ud.jsx)(xn.Xj,{}):(0,ud.jsx)(xn.hz,{})}),c&&!i?(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide","Hide"),onClick:()=>EQ("hidden"),children:(0,ud.jsx)(uM,{})}):(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close","Close"),onClick:()=>m?.(),children:(0,ud.jsx)(uQ,{})})]}),"tablet"===r&&c&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close","Close"),onClick:()=>m?.(),children:(0,ud.jsx)(xr.d3,{})})]})]}),(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceContent___oYdxI",{"-esm-fast-data-entry__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,ud.jsx)(xm,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let xy="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xv=new Uint8Array(16),xb=[];for(let e=0;e<256;++e)xb.push((e+256).toString(16).slice(1));let xw=function(e,t,n){if(xy&&!t&&!e)return xy();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(xv)}();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(xb[e[t+0]]+xb[e[t+1]]+xb[e[t+2]]+xb[e[t+3]]+"-"+xb[e[t+4]]+xb[e[t+5]]+"-"+xb[e[t+6]]+xb[e[t+7]]+"-"+xb[e[t+8]]+xb[e[t+9]]+"-"+xb[e[t+10]]+xb[e[t+11]]+xb[e[t+12]]+xb[e[t+13]]+xb[e[t+14]]+xb[e[t+15]]).toLowerCase()}(r)};async function xE(e,t){let{openedGroup:n}=i6.getState();if(n){if(n.groupName===e&&x_(n.props,t))return!0;else if(!await xS({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return i6.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function xx(e){let{openedGroup:t,openedWindows:n}=i6.getState();if(t){if(n.length>0&&!(e||await xS({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;i6.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function xD(e,t=null,n=null,r=null){let a=i6.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=i5(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=i9(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=i8(e);if(i&&(i.groupName!==l.name||!x_(i.props,r)))return!!await xS({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[xO(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(x_(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&x_(d.props,t)?((i||u!==a.openedWindows.length-1)&&i6.setState(xk.restoreWindow(a,s)),!0):!!await xS({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[xO(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await xS({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[xO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(i6.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[xO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await xS({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[xO(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function x_(e,t){return null==e||null==t||T(e,t)}function xS(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}=i6.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=wc("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:a.map(e=>r[e.workspaceName])})})}let xk={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=i8(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,xO(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=i8(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 xC(){return sb(i6,xk)}let xP=()=>(0,sc.useContext)(sM),xR=()=>Object.keys(i6.getState().registeredWorkspacesByName);function xO(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:xw()}}let xT={workspaceOuterContainer:"-esm-fast-data-entry__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-fast-data-entry__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-fast-data-entry__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-fast-data-entry__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-fast-data-entry__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-fast-data-entry__workspace2-module__maximized___-yo9l",hidden:"-esm-fast-data-entry__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-fast-data-entry__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-fast-data-entry__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-fast-data-entry__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-fast-data-entry__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-fast-data-entry__workspace2-module__header___p0kuD",headerButtons:"-esm-fast-data-entry__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-fast-data-entry__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-fast-data-entry__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-fast-data-entry__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-fast-data-entry__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-fast-data-entry__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-fast-data-entry__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-fast-data-entry__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-fast-data-entry__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},xN=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=lA(),{setWindowMaximized:a,hideWindow:o,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:m,isMostRecentlyOpenedWindowHidden:p}=xC(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=xP(),b=i8(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,sc.useEffect)(()=>{E?.hasUnsavedChanges!=n&&i(h,n??!1)},[E?.hasUnsavedChanges,n,h,i]),(0,sc.useEffect)(()=>{f[h]!==e&&m(h,e)},[f,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=d[h].window,_=c[D];if(!_)throw Error(`Cannot find registered workspace window ${D}`);let{icon:S,canMaximize:k}=_,C="closable"===x.persistence,P=!!S&&!C,{maximized:R}=w,O=_?.width??"narrow",T=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=b<s.length-1||p;return(0,ud.jsxs)("div",{className:um()(xT.workspaceOuterContainer,{[xT.narrowWorkspace]:"narrow"===O,[xT.widerWorkspace]:"wider"===O,[xT.extraWideWorkspace]:"extra-wide"===O,[xT.isActionMenuOpened]:T}),children:[(0,ud.jsx)("div",{className:um()(xT.workspaceSpacer,{[xT.hidden]:N})}),(0,ud.jsx)("div",{className:um()(xT.workspaceMiddleContainer,{[xT.maximized]:R,[xT.hidden]:N,[xT.isRootWorkspace]:g,[xT.showActionMenu]:v}),children:(0,ud.jsxs)("div",{className:um()(xT.workspaceInnerContainer,{[xT.maximized]:R,[xT.hidden]:N,[xT.isRootWorkspace]:g}),children:[(0,ud.jsxs)(uv.Header,{"aria-label":rF("workspaceHeader"),className:xT.header,children:[(0,ud.jsx)(uv.HeaderName,{prefix:"",children:e}),(0,ud.jsx)("div",{className:xT.overlayHeaderSpacer}),(0,ud.jsx)(uv.HeaderGlobalBar,{className:xT.headerButtons,children:lj(r)?(0,ud.jsxs)(ud.Fragment,{children:[(k||R)&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":R?rF("minimize"):rF("maximize"),onClick:()=>a(D,!R),children:R?(0,ud.jsx)(xn.Xj,{}):(0,ud.jsx)(xn.hz,{})}),P&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide"),onClick:()=>o(),children:(0,ud.jsx)(uM,{})}),!C&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close"),onClick:()=>y({closeWindow:!0}),children:(0,ud.jsx)(uQ,{})})]}):(0,ud.jsxs)(ud.Fragment,{children:[P&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide"),onClick:()=>o(),children:(0,ud.jsx)(xr.d3,{})}),(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close"),onClick:()=>{C?xx():y({closeWindow:!0})},children:(0,ud.jsx)(uQ,{})})]})})]}),(0,ud.jsx)("div",{className:um()(xT.workspaceContent),children:t})]})})]})},x$="-esm-fast-data-entry__action-menu-button2-module__container___gYRoa",xI="-esm-fast-data-entry__action-menu-button2-module__elementContainer___vBViO",xM="-esm-fast-data-entry__action-menu-button2-module__active___uRJRA",xA="-esm-fast-data-entry__action-menu-button2-module__focused___D4VYB";function xj({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,ud.jsxs)(ud.Fragment,{children:[e({size:16}),t?(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__countTag___l8lfc",children:n})]})}let xL=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a})=>{let o=lA(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=xC(),{extension:c}=(0,sc.useContext)(sf),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],m=null!=f,p=m&&(d<i.length-1||u),h=m&&!p,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(m)p?s(f.windowName):l();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;xD(e,t,n)}};return"tablet"===o||"phone"===o?(0,ud.jsxs)(uv.Button,{className:um()(x$,{[xM]:m&&!h,[xA]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,ud.jsx)("span",{className:xI,children:(0,ud.jsx)(xj,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,ud.jsx)("span",{children:t})]}):(0,ud.jsx)(uv.IconButton,{align:"left","aria-label":t,className:um()(x$,{[xM]:m&&!h,[xA]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,ud.jsx)("div",{className:xI,children:(0,ud.jsx)(xj,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function xF({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,ud.jsx)(uv.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?uX:uY,children:e?rF("showLess","Show less"):rF("showMore","Show more")})}let xB={contactDetails:"-esm-fast-data-entry__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-fast-data-entry__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-fast-data-entry__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-fast-data-entry__patient-banner-contact-details-module__row___8JcKK",col:"-esm-fast-data-entry__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-fast-data-entry__patient-banner-contact-details-module__relationship___GTTsg"},xV=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${rX}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=sz()(t,r2),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,sc.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)("p",{className:xB.heading,children:[rF("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>v7(e?.startDate).getTime()-v7(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,ud.jsx)("li",{children:(0,ud.jsx)(sm,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,ud.jsx)("li",{children:"--"})})(),t.length>3&&(0,ud.jsx)("li",{className:xB.link,children:(0,ud.jsx)(sm,{to:`${window.spaBase}/home/patient-lists`,children:rF("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},xU=({patientId:e})=>{let{patient:t,isLoading:n}=lZ(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xB.heading,children:rF("address","Address")}),(0,ud.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,ud.jsxs)("li",{children:[rF(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,ud.jsxs)("li",{children:[rF(e,e),": ",t]},`address-${e}`)):(0,ud.jsx)("li",{children:"--"})})]})},xW=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=lu({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=lm()(`${rX}/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)))`,r2);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,sc.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,sc.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?rF(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xB.heading,children:rF("contactDetails","Contact Details")}),t?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,ud.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,ud.jsx)("li",{children:"--"})})]})},xH=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${rX}/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}=sz()(e?t:null,r2),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,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xB.heading,children:rF("relationships","Relationships")}),n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsx)("ul",{children:t&&t.length>0?(0,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsxs)("li",{className:xB.relationship,children:[(0,ud.jsx)("div",{children:(0,ud.jsx)(sm,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,ud.jsx)("div",{children:e.relationshipType}),(0,ud.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?rF("yearAbbreviation","yr"):rF("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,ud.jsx)("li",{children:"--"})})]})};function xz({patientId:e,deceased:t}){return(0,ud.jsxs)("div",{className:um()(xB.contactDetails,{[xB.deceased]:t}),children:[(0,ud.jsxs)("div",{className:xB.row,children:[(0,ud.jsx)("div",{className:xB.col,children:(0,ud.jsx)(xU,{patientId:e})}),(0,ud.jsx)("div",{className:xB.col,children:(0,ud.jsx)(xW,{patientUuid:e})})]}),(0,ud.jsxs)("div",{className:xB.row,children:[(0,ud.jsx)("div",{className:xB.col,children:(0,ud.jsx)(xH,{patientId:e})}),(0,ud.jsx)("div",{className:xB.col,children:(0,ud.jsx)(xV,{patientUuid:e})})]})]})}function xK(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 xG="-esm-fast-data-entry__action-menu2-module__container___4aX3S";function xZ({workspaceGroup:e,groupProps:t}){let n=lA(),{persistence:r}=e;return(0,ud.jsx)("aside",{className:"-esm-fast-data-entry__action-menu2-module__sideRail___a7qg9",children:(0,ud.jsxs)("div",{className:xG,children:["closable"==r&&lj(n)&&(0,ud.jsx)(uv.IconButton,{align:"left",onClick:()=>xx(),label:rF("close"),kind:"ghost",children:(0,ud.jsx)(uQ,{})}),(0,ud.jsx)(sf.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,ud.jsx)(sP,{className:xG,name:e.name,state:{groupProps:t}})})]})})}function xY(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 xq=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:a,showActionMenu:o})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=xC(),u=(0,sc.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:a=!1}=e;return r?!!(a||await xS({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(a||await xS({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 xS({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:i6.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:a,windowName:n.windowName,showActionMenu:o},[t,s,i,n]);if(!e){let{registeredWorkspacesByName:e}=i6.getState(),n=e[t.workspaceName],a=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=i6.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,ud.jsxs)("div",{className:um()(xT.workspaceOuterContainer,{[xT.narrowWorkspace]:"narrow"===u,[xT.widerWorkspace]:"wider"===u,[xT.extraWideWorkspace]:"extra-wide"===u,[xT.isActionMenuOpened]:c}),children:[(0,ud.jsx)("div",{className:xT.workspaceSpacer}),(0,ud.jsx)("div",{className:um()(xT.workspaceMiddleContainer,{[xT.isRootWorkspace]:r,[xT.showActionMenu]:o}),children:(0,ud.jsx)("div",{className:um()(xT.workspaceInnerContainer,{[xT.isRootWorkspace]:r}),children:(0,ud.jsx)(uv.InlineLoading,{className:xT.loader,description:`${rF("loading")} ...`})})})]})}return(0,ud.jsx)(xf,{config:e,mountParcel:sl,...u},t.workspaceName)},xJ=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,a]=(0,sc.useState)({}),{registeredWorkspacesByName:o}=i6.getState();return(0,sc.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=o[e.workspaceName];return[e.uuid,await ue(t,n)]})).then(t=>{e||a(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,ud.jsx)(ud.Fragment,{children:n.map((a,o)=>(0,ud.jsx)(xq,{openedWorkspace:a,openedWindow:e,lifeCycle:r[a.uuid],isRootWorkspace:0===o,isLeafWorkspace:o===n.length-1,showActionMenu:t},a.uuid))})};function xX(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(xQ,{}))}function xQ(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=xC();if((0,sc.useEffect)(()=>ol("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(xx().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=xY(t),o=xY(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(xx().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,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-fast-data-entry__workspace-windows-and-menu-module__overlay___FCMKG":a.overlay,"-esm-fast-data-entry__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":o}),children:[(0,ud.jsx)("div",{className:"-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,ud.jsx)(xJ,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,ud.jsx)(xZ,{workspaceGroup:a,groupProps:e.props})]})}function x0(e,t,n){if(null==e)return n;let r=vS(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=vS(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 x1(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function x2(e){return!!e&&e.constructor===Object}var x4=n(7638);function x3(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function x6(e,t){return x4(function(e){let t=e.indexOf("-");if(t>=0){let n=x3(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return x3(e)}(t),e,{includePrerelease:!0})}async function x5(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 x9(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function x9(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function x8(e,t,n,r){}function x7(e){}function De(e){return Promise.resolve([])}function Dt(e){return Promise.resolve([])}function Dn(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 Dr(e){return()=>{}}function Da(){return!0}}}]);
43
+ }`.trim(),document.head.prepend(r),o=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&yJ(t);o.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||y2(this,n)},i=dl(y1(document,"touchstart",t=>{let r=dZ(t);e=p2(r)?r:p4(r,!0),n=!1;let a=r.ownerDocument.defaultView.getSelection();a&&!a.isCollapsed&&a.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),y1(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),y1(document,"blur",e=>{let t=dZ(e),n=e.relatedTarget;if(n&&yJ(n))n.focus({preventScroll:!0}),y2(n,yJ(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),i(),r.remove(),HTMLElement.prototype.focus=o}):dl((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?y0(document.documentElement,"scrollbarGutter","stable"):y0(document.documentElement,"paddingRight",`${s}px`)),y0(document.documentElement,"overflow","hidden"))),()=>{0==--yQ&&c()}}},[t])}({isDisabled:o||!t.isOpen}),(0,sc.useEffect)(()=>{if(t.isOpen&&r.current)if(o){var e,n,i=a?.current??r.current;let t=yk[yk.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}else{let t,o,i,s,l,u,c,d,f,m,p;return e=[a?.current??r.current],o=(n={shouldUseInert:!0})instanceof(t=dK(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&y_,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(dG(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=gl(dz(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&f(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)f(e),e=n.nextNode()}},f=e=>{let n=yS.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),yS.set(e,n+1))},yk.length&&yk[yk.length-1].disconnect(),d(i),(m=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>dG(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(i,{childList:!0,subtree:!0}),p={visibleNodes:l,hiddenNodes:u,observe(){m.observe(i,{childList:!0,subtree:!0})},disconnect(){m.disconnect()}},yk.push(p),()=>{for(let e of(m.disconnect(),u)){let t=yS.get(e);null!=t&&(1===t?(c(e,!1),yS.delete(e)):yS.set(e,t-1))}p===yk[yk.length-1]?(yk.pop(),yk.length&&yk[yk.length-1].observe()):yk.splice(yk.indexOf(p),1)}}},[o,t.isOpen,r,a]),{popoverProps:d_(d,m),arrowProps:p,underlayProps:f,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:f?d:u},e),y=r.popoverRef,v=function(e,t=!0){let[n,r]=(0,sc.useState)(!0),a=n&&t;return du(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),y5(e,a,(0,sc.useCallback)(()=>r(!1),[])),a}(y,!!g)||r.isEntering||!1,b=dC({...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,sc.useState)(!1);du(()=>{y.current&&x(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,sc.useEffect)(()=>{var e;let t,n;E&&y.current&&!y.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=dz(e=y.current)),"virtual"===y9?fO(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&dW(e)}):dW(e))},[E,y]);let D={...m.style,...b.style},_=sd().createElement("div",{...d_(dU(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:D,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!r.isNonModal&&sd().createElement(y6,{onDismiss:e.close}),sd().createElement(yD.Provider,{value:{...h,placement:g,ref:i}},b.children),sd().createElement(y6,{onDismiss:e.close}));return f?sd().createElement(ym,{...r,shouldContainFocus:E,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):sd().createElement(ym,{...r,shouldContainFocus:E,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&sd().createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),sd().createElement("div",{ref:u,style:{display:"contents"}},sd().createElement(vf.Provider,{value:u},_)))}function vh(e){return e?.start!=null&&null!=e.end}let vg=(0,sc.createContext)(null),vy=(0,sc.createContext)(null),vv=(0,sc.createContext)(null),vb=(0,sc.createContext)(null),vw=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,vg);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=vc(e),[n,r]=hq(e.value,e.defaultValue||null,e.onChange),[a]=(0,sc.useState)(n),o=n||e.placeholderValue||null,[i,s]=g3(o,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=e.shouldCloseOnSelect??!0,[d,f]=(0,sc.useState)(null),[m,p]=(0,sc.useState)(null);if(n&&(d=n,"hour"in n&&(m=n)),o&&!(i in o))throw Error("Invalid granularity "+i+" for value "+o.toString());let h=n?.calendar.identifier==="gregory"&&"BC"===n.era,g=(0,sc.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,sc.useMemo)(()=>gX(n,y,v,b,g),[n,y,v,b,g]),E=gz({...e,value:n,builtinValidation:w}),x=E.displayValidation.isInvalid,D=e.validationState||(x?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(pD(e)):p_(e,t)),f(null),p(null),E.commitValidation()};return{...E,value:n,defaultValue:e.defaultValue??a,setValue:r,dateValue:d,timeValue:m,setDateValue:n=>{let a="function"==typeof c?c():c;u?m||a?_(n,m||g2(e.defaultValue||e.placeholderValue)):f(n):(r(n),E.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):p(e)},granularity:i,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&_(d,m||g2(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:D,isInvalid:x,formatValue:(e,t)=>l?new mN(e,g1(t,g)).format(l):"",getDateFormatter:(e,t)=>new mN(e,g1({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,sc.useRef)(null),[l,u]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:m,dialogProps:p,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r;let a=dE(),o=dE(),i=dE(),s=mG((r=gR)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:m,errorMessageProps:p}=gN({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=gO(t,n),g=f["aria-labelledby"]||f.id,{locale:y}=mS(),v=t.formatValue(y,{month:"long"}),b=p7(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=dU(e),x=(0,sc.useMemo)(()=>g_(n),[n]),D=(0,sc.useRef)(!1),{focusWithinProps:_}=f9({...e,isDisabled:t.isOpen,onBlurWithin:t=>{dG(document.getElementById(o),t.relatedTarget)||(D.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{D.current||(D.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:d_(E,h,f,b,_,{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:{...f,id:i,[gA]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[gH]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:m,errorMessageProps:p,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(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...dT(e),label:u,validationBehavior:o},i,s),[b,w]=(0,sc.useState)(null),E=(0,sc.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);yK({ref:s,onResize:E});let{focusProps:x,isFocused:D,isFocusVisible:_}=f8({within:!0}),S=dC({...e,values:{state:i,isFocusWithin:D,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=dU(e);return delete k.id,sd().createElement(dk,{values:[[vv,i],[ga,{...c,ref:s,isInvalid:i.isInvalid}],[ya,f],[ms,{...m,isPressed:i.isOpen}],[yE,{...d,ref:l,elementType:"span"}],[h2,h],[yh,i],[vd,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[yp,p],[mc,{slots:{description:g,errorMessage:y}}],[yy,v]]},sd().createElement("div",{...x,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),vE=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,vy);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=vc(e),[n,r]=hq(e.value,e.defaultValue||null,e.onChange),[a]=(0,sc.useState)(n),[o,i]=(0,sc.useState)(()=>n||{start:null,end:null});null==n&&o.start&&o.end&&i(o={start:null,end:null});let s=n||o,l=e=>{i(s=e||{start:null,end:null}),vh(s)?r(s):r(null)},[u,c]=g3(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,f=e.shouldCloseOnSelect??!0,[m,p]=(0,sc.useState)(null),[h,g]=(0,sc.useState)(null);s&&vh(s)&&(m=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(pD(e.start)):p_(e.start,t.start),end:"timeZone"in t.end?t.end.set(pD(e.end)):p_(e.end,t.end)}),p(null),g(null),k.commitValidation()},v=n=>{let r="function"==typeof f?f():f;d?vh(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||g2(e.placeholderValue),end:h?.end||g2(e.placeholderValue)}):p(n):vh(n)?(l(n),k.commitValidation()):p(n),r&&t.setOpen(!1)},b=e=>{vh(m)&&vh(e)?y(m,e):g(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,E=(0,sc.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:x,maxValue:D,isDateUnavailable:_}=e,S=(0,sc.useMemo)(()=>{var e;let t;return e=s,t=gY(gX(e?.start??null,x,D,_,E),gX(e?.end??null,x,D,_,E)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=gY(t,{isInvalid:!0,validationErrors:[(mV.getGlobalDictionaryForPackage("@react-stately/datepicker")||gq).getStringForLocale("rangeReversed",gJ())],validationDetails:{...gB,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,x,D,_,E]),k=gz({...e,value:n,name:(0,sc.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),C=k.displayValidation.isInvalid,P=e.validationState||(C?"invalid":null);return{...k,value:s,defaultValue:e.defaultValue??a,setValue:l,dateRange:m,timeRange:h,granularity:u,hasTime:d,setDate(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setTime(e,t){"start"===e?b({start:t,end:h?.end??null}):b({start:h?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:v,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&vh(m)&&d&&y(m,{start:h?.start||g2(e.placeholderValue),end:h?.end||g2(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:C,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let a="timeZone"in s.start?s.start.timeZone:void 0,o=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),i="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=g1(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(a||"UTC"),d=s.end.toDate(i||"UTC"),f=new mN(t,u);if(a===i&&o===l&&0!==s.start.compare(s.end)){try{let e=f.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=f}else r=new mN(t,g1(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new mN(e,g1({},{...E,...t}))}}({...e,validationBehavior:o}),s=(0,sc.useRef)(null),[l,u]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:m,buttonProps:p,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,n){var r;let a=mG((r=gR)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=gN({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),f=u["aria-labelledby"]||u.id,{locale:m}=mS(),p=t.formatValue(m,{month:"long"}),h=p7(p?a.format("selectedRangeDescription",{startDate:p.start,endDate:p.end}):""),g={"aria-label":a.format("startDate"),"aria-labelledby":f},y={"aria-label":a.format("endDate"),"aria-labelledby":f},v=dE(),b=dE(),w=gO(t,n),E=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=(0,sc.useMemo)(()=>g_(n,{accept:e=>e.id!==v}),[n,v]),D={[gj]:x,[gA]:"presentation","aria-describedby":E,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},_=dU(e),S=(0,sc.useRef)(!1),{focusWithinProps:k}=f9({...e,isDisabled:t.isOpen,onBlurWithin:t=>{dG(document.getElementById(b),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,sc.useRef)(gU),P=(0,sc.useRef)(gU);return{groupProps:d_(_,w,u,h,k,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{x.focusFirst()}},buttonProps:{...h,id:v,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${v} ${f}`,"aria-describedby":E,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:b,"aria-labelledby":`${v} ${f}`},startFieldProps:{...g,...D,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[gH]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(gY(e,P.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...y,...D,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[gH]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(gY(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:o,validationErrors:i,validationDetails:s}}({...dT(e),label:u,validationBehavior:o},i,s),[w,E]=(0,sc.useState)(null),x=(0,sc.useCallback)(()=>{s.current&&E(s.current.offsetWidth+"px")},[]);yK({ref:s,onResize:x});let{focusProps:D,isFocused:_,isFocusVisible:S}=f8({within:!0}),k=dC({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=dU(e);return delete C.id,sd().createElement(dk,{values:[[vb,i],[ga,{...c,ref:s,isInvalid:i.isInvalid}],[ms,{...p,isPressed:i.isOpen}],[yE,{...d,ref:l,elementType:"span"}],[h4,g],[yh,i],[vd,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[yp,h],[ya,{slots:{start:f,end:m}}],[mc,{slots:{description:y,errorMessage:v}}],[yy,b]]},sd().createElement("div",{...D,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||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 vx(e){return sd().createElement(m_,e)}function vD(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 pd||e instanceof pm||e instanceof pp)return t?pS(e,t):e;{let n=l0()(e).toDate(),r=new pd(n.getFullYear(),n.getMonth()+1,n.getDate());return t?pS(r,t):r}}function v_(e){if(e)return e.toDate(pj())}function vS(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function vk(e){let t=e??"",n=vS(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function vC(){let e=window.i18next.language,t=vS(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;q=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;q=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var vP=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(q||"en-US"),vR=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},vO={};for(let e=1;e<100;e++)vO[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var vT={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},vN="[1234567890一二三四五六七八九〇\\d]",v$={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},vI={},vM={"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},vA={zone:vM,year:vO,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:{}},vj={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(vM).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,}"},vL={...vj,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}"},vF={},vB=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=vP){return vF[t.toLowerCase()]||(vF[t.toLowerCase()]=new e(t)),vF[t.toLowerCase()]}constructor(e=vP){this.locale=e,this.lookups={...vA},this.vars={...vj};const 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=v$: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(vI[e])return vI[e];if("fullwide"===e||"hanidec"===e)return{group:vN,lookup:{...v$}};let t=vT[e];if(!t)return{group:"\\d",lookup:{...v$}};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 vI[e]={group:`[${n}-${r}]`,lookup:a},vI[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,vL)vL.hasOwnProperty(n)&&(this.vars[n]=vL[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")}},vV=["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"],vU={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},vW=()=>new Date;function vH(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 vz=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)}},vK=["year","month","day","hour","minute","second","millisecond","offset"],vG={};function vZ(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 vY=[[/([^\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"]],vq={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," "],...vY],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:vY,id:vY,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function vJ(e,t=vP){let n=function(e){if(!vG[e]){var t,n;let r,a,o=vB.factory(e);vG[e]=new vz({doneChecker:vZ,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:vH(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:vH(["","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:vH(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${vN}{2,4})\\s*\u5E74\\s*(${vN}{1,2})\\s*\u6708\\s*(${vN}{1,2})\\s*\u65E5$`),handler:vH(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:vH(["","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:vH(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=vW(),n=e[0].toLowerCase(),r={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[n];0!==r&&t.setTime(t.getTime()+r);let a={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===n?{...a,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:a}},{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?vU[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=vW();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:vH(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:vH(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:vH(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:vH(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:vH(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:vH(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:vH(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:vH(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:vH(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:vH(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:vH(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:vH(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:vH(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:vH(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:vH(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:vH(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:vH(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:vH(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:vH(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:vH(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:vH(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:vH(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:vH(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:vH(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:vH(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:vH(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:vH(["zone"])},{name:"onlyOffset",regex:o.compile("_OFFSET_"),handler:vH(["offset"])}],a=o.baseName.slice(0,5),vV.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(vK.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=vO[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return vG[e]}(t),r=function(e,t){let n=vq[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 vX(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new vR(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 vR(t.valueOf()-60*e.offset*1e3):t}function vQ(e,t=vP){let n=vJ(e,t),r=n.invalid?new vR(NaN):vX(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function v0(e,t=vP){return e instanceof Date?new vR(e.valueOf()):"number"==typeof e?new vR(e):vQ(e,t)}Date.fromString=vR.fromString=vQ,Date.fromAny=vR.fromAny=v0,"u">typeof window&&(window.anyDateParser={fromString:vQ,fromAny:v0,fromObject:vX,attempt:vJ});var v1=n(5238),v2=n(1445);function v4(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}lQ.extend(l1),lQ.extend(v2),lQ.extend(v1);let v3="YYYY-MM-DDTHH:mm:ss.SSSZZ";function v6(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&lQ(e,v3).isValid()}function v5(e){return lQ(e).isToday()}function v9(e){return v6(e)?lQ(e,v3).toDate():null}function v8(e,t=!1){let n=lQ(e);return t&&(n=n.utc()),n.format(v3)}function v7(e){return lQ(e).toDate()}var be=new WeakMap;let bt=new class{register(e,t){v4(this,be).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(v4(this,be).has(t))return v4(this,be).get(t)}if(e.language&&v4(this,be).has(e.language))return v4(this,be).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return v4(this,be).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,be,{writable:!0,value:new Map})}};function bn(e,t){bt.register(e,t)}function br(e){let t=e??vC();return bt.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let ba={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function bo(e,t={}){let n=vJ(e,vC());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,J.isNil)(n.day)&&(0,J.isNil)(n.month)&&(n=Object.assign({},(0,J.omit)(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},(0,J.omit)(n,"day"),{date:n.day}));let r=lQ().set(n).toDate();return(0,J.isNil)(n.year)&&(t.year=!1),(0,J.isNil)(n.month)&&(t.month=!1),(0,J.isNil)(n.date)&&(t.day=!1),bi(r,t)}function bi(e,t){let n,r=t?.locale??vC(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:f}={...ba,...{noToday:"am"===a.language},...t},m={calendar:o??br(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:f},p=lQ(e).isToday();if(p&&!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(bs("-"))),"wide"==i&&(t=t.map(bs(" — "))),"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||p&&"for today"===s)&&(n+=`, ${bl(e)}`),n}let bs=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function bl(e){return e.toLocaleTimeString(vC(),{hour:"2-digit",minute:"2-digit"})}function bu(e,t){return bi(e,{...t,time:!0})}function bc(e,t){let n=br("string"==typeof t?new Intl.Locale(t):t);return n?pS(e,hV(n)):e}function bd(e,t){return new Intl.DurationFormat(vC(),t).format(e)}function bf(e,t){if(null==e)return null;if("string"==typeof e){let n=vJ(e,vC());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...(0,J.omit)(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...(0,J.omit)(n,"day"),...{date:n.day}}),lQ(t).set(n))}return lQ(e)}let bm=["years","months","days","hours","minutes","seconds"],bp={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},bh={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function bg(e,t=lQ(),n){let r,a=lQ(t),o=bf(e,a);if(null==o)return null;if("string"==typeof n){let e=bp[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?bp[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=bm.indexOf(n);for(let a=0;a<bm.length;a++){let o=bm[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):bp[s]??s,function(e,t,n,r){let a=bm.indexOf(n),o=bm.indexOf(r),i=bm.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={...bh};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[bp[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 by={style:"short",localeMatcher:"lookup"};function bv(e,t=lQ(),n){let r=bg(e,t,n);return null==r?null:bd(r,"object"==typeof n&&n.formatOptions?{...by,...n.formatOptions}:by)}let bb=(0,sc.createContext)(null);function bw(){let e=lu({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,sc.useMemo)(()=>{let t=vC();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,sc.useMemo)(()=>{let e=br(t);return void 0!==e?hV(e):void 0},[t]),r=(0,sc.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,sc.useMemo)(()=>n?pS(p$(pj()),n):p$(pj()),[n]);return{calendar:n,intlLocale:r,today_:a}}let bE=new pd(1793,1,1);var bx={};function bD(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function b_(e={}){let{locale:t}=mS();return(0,sc.useMemo)(()=>new(0,g7.K)(t,e),[t,e])}bx={"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 bS={};bS={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let bk=()=>{};function bC(e){var t;let n=(0,sc.useRef)(void 0),{value:r,textValue:a,minValue:o,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:m,onDecrementToMin:p,onIncrementToMax:h}=e,g=mG((t=bS)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,sc.useRef)(!1),v=(0,sc.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=fK(()=>{v()});(0,sc.useEffect)(()=>()=>b(),[]);let w=(0,sc.useRef)(!1),E=()=>{w.current=!0},x=()=>{w.current=!1},D=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,sc.useEffect)(()=>{w.current&&(mk&&mk.clear("assertive"),mC(D,"assertive"))},[D]);let _=(0,sc.useCallback)(()=>{v()},[v]),S=fK(c??bk),k=fK(f??bk),C=fK(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=fK(e=>{b(),y.current=!0,n.current=window.setTimeout(C,e)}),R=fK(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(k(),O(60))}),O=fK(e=>{b(),y.current=!0,n.current=window.setTimeout(R,e)}),T=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:$}=fG(),I=(0,sc.useRef)(!1),[M,A]=(0,sc.useState)(null);(0,sc.useEffect)(()=>{"touch"===M?P(600):M&&P(400)},[M]);let[j,L]=(0,sc.useState)(null);return(0,sc.useEffect)(()=>{"touch"===j?O(600):j&&O(400)},[j]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":D,"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&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(m){e.preventDefault(),m?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":p&&(e.preventDefault(),p?.());break;case"End":h&&(e.preventDefault(),h?.())}},onFocus:E,onBlur:x},incrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(c?.(),A("mouse")):(N(window,"pointercancel",_,{capture:!0}),I.current=!1,A("touch")),N(window,"contextmenu",T)},onPressUp:e=>{v(),"touch"===e.pointerType&&(I.current=!0),$(),A(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&I.current&&c?.(),I.current=!1,A(null)},onFocus:E,onBlur:x},decrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(f?.(),L("mouse")):(N(window,"pointercancel",_,{capture:!0}),I.current=!1,L("touch"))},onPressUp:e=>{v(),"touch"===e.pointerType&&(I.current=!0),$(),L(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&I.current&&f?.(),I.current=!1,L(null)},onFocus:E,onBlur:x}}}let bP=null;var bR=n(6284);function bO(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 bT=(0,sc.createContext)(null),bN=(0,sc.createContext)(null),b$=(0,sc.forwardRef)(function(e,t){var n,r;[e,t]=dR(e,t,bT);let{validationBehavior:a}=dP(yw)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=mS(),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,commitBehavior:d="snap"}=e;null===o&&(o=NaN);let f=(0,sc.useCallback)(e=>void 0===r||isNaN(r)?yC(e,t,n):yR(e,t,n,r),[r,t,n]);void 0===o||isNaN(o)||"snap"!==d||(o=f(o)),isNaN(i)||"snap"!==d||(i=f(i));let[m,p]=hq(o,isNaN(i)?NaN:i,s),[h]=(0,sc.useState)(m),[g,y]=(0,sc.useState)(()=>isNaN(m)?"":new(0,g7.K)(l,a).format(m)),v=(0,sc.useMemo)(()=>new(0,bR.d)(l,a),[l,a]),b=(0,sc.useMemo)(()=>v.getNumberingSystem(g),[v,g]),w=(0,sc.useMemo)(()=>new(0,g7.K)(l,{...a,numberingSystem:b}),[l,a,b]),E=(0,sc.useMemo)(()=>w.resolvedOptions(),[w]),x=(0,sc.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),D=gz({...e,value:m}),_=void 0===r||isNaN(r)?1:r;"percent"===E.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,k]=(0,sc.useState)(m),[C,P]=(0,sc.useState)(l),[R,O]=(0,sc.useState)(a);Object.is(m,S)&&l===C&&a===R||(y(x(m)),k(m),P(l),O(a));let T=(0,sc.useMemo)(()=>v.parse(g),[v,g]),N=(e,r=0)=>{if(isNaN(T))return yR(isNaN(r)?0:r,t,n,_);{let r=yR(T,t,n,_);return"+"===e&&r>T||"-"===e&&r<T?r:yR(bO(e,T,_),t,n,_)}},$=(0,sc.useMemo)(()=>!u&&!c&&(isNaN(T)||void 0===n||isNaN(n)||yR(T,t,n,_)>T||bO("+",T,_)<=n),[u,c,t,n,_,T]),I=(0,sc.useMemo)(()=>!u&&!c&&(isNaN(T)||void 0===t||isNaN(t)||yR(T,t,n,_)<T||bO("-",T,_)>=t),[u,c,t,n,_,T]);return{...D,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=N("+",t);e===m&&y(x(e)),p(e),D.commitValidation()},incrementToMax:()=>{null!=n&&(p(yR(n,t,n,_)),D.commitValidation())},decrement:()=>{let e=N("-",n);e===m&&y(x(e)),p(e),D.commitValidation()},decrementToMin:()=>{null!=t&&(p(t),D.commitValidation())},canIncrement:$,canDecrement:I,minValue:t,maxValue:n,numberValue:T,defaultNumberValue:isNaN(i)?h:i,setNumberValue:p,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=T;if(void 0!==e&&(n=v.parse(t)),!t.length){p(NaN),y(void 0===o?"":x(m));return}if(isNaN(n))return void y(x(m));let r="snap"===d?f(n):n,a=(r=v.parse(x(r)))!==m;p(r),y(x(void 0===o?r:m)),a&&D.commitValidation()}}}({...e,locale:i,validationBehavior:o}),l=(0,sc.useRef)(null),[u,c]=dO(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:m,incrementButtonProps:p,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r,a,o,i,s,l,u,c,d;let f,{id:m,decrementAriaLabel:p,incrementAriaLabel:h,isDisabled:g,isReadOnly:y,isRequired:v,minValue:b,maxValue:w,autoFocus:E,label:x,formatOptions:D,onBlur:_=()=>{},onFocus:S,onFocusChange:k,onKeyDown:C,onKeyUp:P,description:R,errorMessage:O,isWheelDisabled:T,...N}=e,{increment:$,incrementToMax:I,decrement:M,decrementToMin:A,numberValue:j,inputValue:L,commit:F,commitValidation:B}=t,V=mG((r=bx)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,sc.useCallback)(()=>{let e=n.current?.value??"";(0,fZ.flushSync)(()=>{F()}),n.current?.value!==e&&mC(n.current?.value??"","assertive")},[F,n]),W=dE(m),{focusProps:H}=fN({onBlur(){U()}}),z=b_(D),K=(0,sc.useMemo)(()=>z.resolvedOptions(),[z]),G=b_({...D,currencySign:void 0}),Z=(0,sc.useMemo)(()=>isNaN(j)?"":G.format(j),[G,j]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=bC({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:I,onDecrement:M,onDecrementToMin:A,value:j,textValue:Z}),[X,Q]=(0,sc.useState)(!1),{focusWithinProps:ee}=f9({isDisabled:g,onFocusWithinChange:Q});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,sc.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);p1(t,"wheel",r?void 0:a)}({onScroll:(0,sc.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?$():e.deltaY<0&&M())},[M,$]),isDisabled:T||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";fn()?en?er="text":et&&(er="decimal"):fs()&&(en?er="numeric":et&&(er="decimal"));let ea=dU(e),eo=(0,sc.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,fZ.flushSync)(()=>{F()}),B()):e.continuePropagation())},[F,B]),{isInvalid:ei,validationErrors:es,validationDetails:el}=t.displayValidation,{labelProps:eu,inputProps:ec,descriptionProps:ed,errorMessageProps:ef}=function(e,t,n){let r=fK(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,sc.useEffect)(()=>{if(!bD()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=bD()?null:e=>{let n=dZ(e).value.slice(0,dZ(e).selectionStart)+e.data+dZ(e).value.slice(dZ(e).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]=hq(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=fA(e,t),d=gz({...e,value:l}),{isInvalid:f,validationErrors:m,validationDetails:p}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=gN({...e,isInvalid:f,errorMessage:e.errorMessage||m}),b=dU(e,{labelable:!0}),w={type:i,pattern:e.pattern},[E]=(0,sc.useState)(l);return g$(t,e.defaultValue??E,u),gI(e,d,t),{labelProps:h,inputProps:d_(b,"input"===n?w:void 0,{disabled:r,readOnly:o,required:a&&"native"===s,"aria-required":a&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(dZ(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(sd().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:f,validationErrors:m,validationDetails:p}}(e,n),c=(0,sc.useRef)(null);return{inputProps:d_(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}}({...N,...ea,name:void 0,form:void 0,label:x,autoFocus:E,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[gH]:t,value:L,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:W,type:"text",inputMode:er,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:_,onFocus:S,onFocusChange:k,onKeyDown:(0,sc.useMemo)(()=>dl(eo,C),[eo,C]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=dZ(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),F(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:R,errorMessage:O},t,n);g$(n,t.defaultNumberValue,t.setNumberValue),a=t,o=e.validationBehavior,i=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,du(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!bP&&"u">typeof document&&((bP=document.createElement("input")).type="number"),!bP))return;bP.min=null==l||isNaN(l)?"":String(l),bP.max=null==u||isNaN(u)?"":String(u),bP.step=null==c||isNaN(c)?"":String(c),bP.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&bP.validity.valid,n=e.validationMessage||bP.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:bP.validity.rangeOverflow,rangeUnderflow:bP.validity.rangeUnderflow,stepMismatch:bP.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};a.updateValidation(r),"native"!==o||bP.validity.valid||e.setCustomValidity(bP.validationMessage)});let em=d_(Y,H,ec,{role:null,"aria-roledescription":fa()?null:V.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(em["aria-required"]=void 0);let ep=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},eh=e["aria-label"]||("string"==typeof e.label?e.label:"");eh||(f=null!=e.label?eu.id:e["aria-labelledby"]);let eg=dE(),ey=dE(),ev=d_(q,{"aria-label":h||V.format("increase",{fieldLabel:eh}).trim(),id:f&&!h?eg:null,"aria-labelledby":f&&!h?`${eg} ${f}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ep}),eb=d_(J,{"aria-label":p||V.format("decrease",{fieldLabel:eh}).trim(),id:f&&!p?ey:null,"aria-labelledby":f&&!p?`${ey} ${f}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ep});return{groupProps:{...ee,role:"group","aria-disabled":g,"aria-invalid":ei?"true":void 0},labelProps:eu,inputProps:em,incrementButtonProps:ev,decrementButtonProps:eb,errorMessageProps:ef,descriptionProps:ed,isInvalid:ei,validationErrors:es,validationDetails:el}}({...dT(e),label:c,validationBehavior:o},s,l),b=dC({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=dU(e);return delete w.id,sd().createElement(dk,{values:[[bN,s],[ga,f],[gi,{...m,ref:l}],[yE,{...d,ref:u}],[ms,{slots:{increment:p,decrement:h}}],[mc,{slots:{description:g,errorMessage:y}}],[yy,v]]},sd().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&&sd().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function bI(e,t){return Number.parseInt(bi(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let bM=(0,sc.forwardRef)(function(e,t){let{className:n}=e,r=(0,sc.useContext)(h3),a=(0,sc.useContext)(h6),o=r??a,i=(0,sc.useContext)(bb),s=pj(),l=bi(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=bI(o.visibleRange.start.toDate(s),i),c=o.maxValue?bI(o.maxValue.toDate(s),i):void 0,d=o.minValue?bI(o.minValue.toDate(s),i):void 0,f=(0,sc.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,ud.jsxs)("span",{ref:t,className:n,children:[(0,ud.jsx)("span",{children:l}),(0,ud.jsxs)(b$,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:u,children:[(0,ud.jsx)(gs,{}),(0,ud.jsxs)(go,{children:[(0,ud.jsx)(ml,{slot:"increment",children:(0,ud.jsx)(uW,{size:8})}),(0,ud.jsx)(ml,{slot:"decrement",children:(0,ud.jsx)(uB,{size:8})})]})]})]})}),bA="-esm-fast-data-entry__datepicker-module__inputGroup___-wpzr",bj="-esm-fast-data-entry__datepicker-module__inputSegment___ocu7L",bL="-esm-fast-data-entry__datepicker-module__dateInputWrapper___909Km",bF="-esm-fast-data-entry__datepicker-module__invalidText___oHJHi",bB="-esm-fast-data-entry__datepicker-module__flatButton___i9LDo",bV="-esm-fast-data-entry__datepicker-module__flatButtonMd___VZMkc",bU="-esm-fast-data-entry__datepicker-module__flatButtonSm___VA5wy",bW="-esm-fast-data-entry__datepicker-module__flatButtonLg___MnYLl";function bH({children:e}){let t=(0,sc.useContext)(vv),n=(0,sc.useContext)(vb),r=t??n,a=lU(()=>r?.close());return(0,ud.jsx)(yg,{className:"-esm-fast-data-entry__datepicker-module__dialog___2pADb",ref:a,children:e})}let bz=(0,sc.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,ud.jsx)(vm,{ref:a,className:"-esm-fast-data-entry__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,ud.jsx)(bH,{children:(0,ud.jsxs)(o?h9:h5,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,ud.jsxs)("header",{className:"-esm-fast-data-entry__datepicker-module__header___+fi16",children:[(0,ud.jsx)(ml,{className:um()(bB,bV),slot:"previous",children:(0,ud.jsx)(uq,{size:16})}),(0,ud.jsx)(bM,{className:"-esm-fast-data-entry__datepicker-module__monthYear___mGhot"}),(0,ud.jsx)(ml,{className:um()(bB,bV),slot:"next",children:(0,ud.jsx)(uJ,{size:16})})]}),(0,ud.jsx)(h7,{className:"-esm-fast-data-entry__datepicker-module__calendarGrid___z07wV",children:e=>(0,ud.jsx)(gr,{className:um()("cds--date-picker__day",{"-esm-fast-data-entry__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),bK=(0,sc.forwardRef)(function(e,t){let n=(0,sc.useContext)(vv),[r,a]=dR({slot:e.slot},t,ya),{locale:o}=mS(),i=yr({...r,locale:o,createCalendar:hV}),s=(0,sc.useRef)(null),{fieldProps:l,inputProps:u}=gL({...r,inputRef:s},i,a),c=(0,sc.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,ud.jsxs)(dk,{values:[[yo,i],[gi,{...u,ref:s}],[ga,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,ud.jsx)(go,{...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,sc.cloneElement)(e.children(t),{key:n}))}),(0,ud.jsx)(gs,{})]})}),bG=(0,sc.forwardRef)(function(e,t){let n=(0,sc.useContext)(vv),r=(0,sc.useContext)(vb);return(n??r).isInvalid?(0,ud.jsx)(c3,{ref:t,size:16,...e}):(0,ud.jsx)(uF,{ref:t,size:16,...e})});class bZ{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let bY=new Map,bq=(0,sc.forwardRef)(function({segment:e,...t},n){let r=(0,sc.useContext)(yo),a=da(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,sc.useRef)(""),{locale:l,direction:u}=mS(),c=function(){var e;let{locale:t}=mS(),n=mK((e=gR)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,sc.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new bZ(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:m,focusManager:p}=gM.get(t),h=e.isPlaceholder?"":e.text,g=(0,sc.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=mj({month:"long",timeZone:g.timeZone}),v=mj({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}=bC({value:e.value??void 0,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="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,sc.useMemo)(()=>new(0,bR.d)(l,{maximumFractionDigits:0}),[l]),E=()=>{if(e.text===e.placeholder&&p.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===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}=mS(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(bY.has(n))return bY.get(n);let r=new Intl.Collator(t,e);return bY.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,sc.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,sc.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,sc.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,sc.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),D=mj({hour:"numeric",hour12:!0}),_=(0,sc.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),S=(0,sc.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),k=mj({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,sc.useMemo)(()=>{if("era"!==e.type)return[];let n=pS(new pd(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(_,n))t.setSegment("dayPeriod",0);else if(x(S,n))t.setSegment("dayPeriod",1);else break;p.focusNext();break;case"era":{let e=C.find(e=>x(e.formatted,n));e&&(t.setSegment("era",e.era),p.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;if(void 0!==e.maxValue&&a>e.maxValue&&(o=w.parse(n)),isNaN(a))return;t.setSegment(e.type,o),void 0!==e.maxValue&&(Number(a+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",p.focusNext()):s.current=r}}};p1((0,sc.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&dG(n.current,e?.anchorNode)&&e.collapse(n.current)});let R=(0,sc.useRef)("");p1(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)}}),p1(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=R.current),null!=r&&(x(_,r)||x(S,r))&&P(r))}),du(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(p.focusPrevious()||p.focusNext())}},[n,p]);let O=fa()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,sc.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(m=void 0);let T=dE(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),I=pq({"aria-label":`${$}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let M={caretColor:"transparent"};if("rtl"===u){M.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(M.direction="ltr")}return{segmentProps:d_(b,I,{id:T,...O,"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:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(sd().version,10)>=17?"enterKeyHint":"enterkeyhint"]:N?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!N?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(ft()?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&&p5(n.current,{containingElement:p4(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:M,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,a),{focusProps:i,isFocused:s,isFocusVisible:l}=f8(),{hoverProps:u,isHovered:c}=mr({...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,sc.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}),f=(0,sc.useCallback)(e=>{e.stopPropagation()},[]);return(0,ud.jsx)("span",{...d_(dU(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:f})}),bJ={short:!1,size:"md"},bX=(0,sc.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:f,onChange:m,onChangeRaw:p,short:h,size:g,value:y,...v}={...bJ,...e},{calendar:b,intlLocale:w,today_:E}=bw(),x=(0,sc.useId)(),D=!!(u??l),_=(0,sc.useMemo)(()=>vD(r,b),[r,b]),S=(0,sc.useMemo)(()=>vD(y,b,!0),[y,b]),k=(0,sc.useMemo)(()=>vD(d,b),[d,b]),C=(0,sc.useMemo)(()=>vD(f??bE,b),[f,b]),P=(0,sc.useMemo)(()=>o||s,[o,s]),R=(0,sc.useMemo)(()=>(p&&m&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>m?.(v_(e)))),[p,m]);return(0,ud.jsx)(vx,{locale:w.toString(),children:(0,ud.jsx)("div",{className:um()("cds--form-item",n),children:(0,ud.jsx)(dk,{values:[[bb,w]],children:(0,ud.jsxs)(vw,{className:um()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:R,children:[(0,ud.jsxs)("div",{className:"cds--date-picker-container",children:[D&&(0,ud.jsx)(yx,{className:um()("cds--label",{"cds--label--disabled":a}),htmlFor:x,children:u??l}),(0,ud.jsxs)(go,{className:bA,children:[(0,ud.jsx)(bK,{id:D?x:void 0,ref:t,className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__inputWrapper___MHJAy",{"-esm-fast-data-entry__datepicker-module__inputWrapperSm___esx4E":"sm"===g,"-esm-fast-data-entry__datepicker-module__inputWrapperMd___VQbzP":"md"===g||!g||0===g.length,"-esm-fast-data-entry__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===g}),children:e=>"era"!==e.type?(0,ud.jsx)(bq,{className:bj,segment:e}):(0,ud.jsx)(sd().Fragment,{})}),(0,ud.jsx)(ml,{className:um()(bB,{[bU]:"sm"===g,[bV]:"md"===g||!g||0===g.length,[bW]:"lg"===g}),children:(0,ud.jsx)(bG,{})})]}),(0,ud.jsx)(yv,{className:bF,children:i})]}),(0,ud.jsx)(bz,{variant:"single",today_:E})]})})})})}),bQ=(0,sc.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:f,size:m="md",value:p,...h},g){let{calendar:y,intlLocale:v,today_:b}=bw(),w=(0,sc.useId)(),E=!!(s??i),x=(0,sc.useMemo)(()=>{if(p)return{start:vD(p[0],y,!1),end:vD(p[1],y,!1)}},[p,y]),D=(0,sc.useMemo)(()=>{if(t)return{start:vD(t[0],y,!1),end:vD(t[1],y,!1)}},[t,y]),_=(0,sc.useMemo)(()=>vD(c??bE,y,!0),[c,y]),S=(0,sc.useMemo)(()=>vD(u,y,!0),[u,y]),k=(0,sc.useMemo)(()=>n||o,[n,o]),C=(0,sc.useMemo)(()=>(f&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>d?.([v_(e.start),v_(e.end)]))),[f,d]);return(0,ud.jsx)(vx,{locale:v.toString(),children:(0,ud.jsx)("div",{className:um()("cds--form-item",e),children:(0,ud.jsx)(dk,{values:[[bb,v]],children:(0,ud.jsx)(vE,{id:E?w:void 0,className:um()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:x,defaultValue:D,ref:g,isDisabled:a,...h,onChange:C,children:(0,ud.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,ud.jsx)(yx,{className:um()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,ud.jsxs)(go,{className:bA,children:[(0,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__datepicker-module__inputsWrapper___UyGoG",{"-esm-fast-data-entry__datepicker-module__inputsWrapperSm___qrGsA":"sm"===m,"-esm-fast-data-entry__datepicker-module__inputsWrapperMd___pofu4":"md"===m||!m||0===m.length,"-esm-fast-data-entry__datepicker-module__inputsWrapperLg___eF1Im":"lg"===m}),children:[(0,ud.jsx)(ys,{className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__startInput___C8vnM",bL),slot:"start",children:e=>(0,ud.jsx)(bq,{className:bj,segment:e})}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__datepicker-module__separator___vHLFZ",children:(0,ud.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,ud.jsx)(ys,{className:um()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__endInput___25OF9",bL),slot:"end",children:e=>(0,ud.jsx)(bq,{className:bj,segment:e})})]}),(0,ud.jsx)(ml,{className:um()(bB,{[bU]:"sm"===m,[bV]:"md"===m||!m||0===m.length,[bW]:"lg"===m}),children:(0,ud.jsx)(bG,{})})]}),(0,ud.jsx)(yv,{className:bF,children:r}),(0,ud.jsx)(bz,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),b0=({diagnoses:e})=>{let{diagnosisTags:t}=lu({externalModuleName:"@openmrs/esm-styleguide"});return(0,ud.jsx)("div",{className:"-esm-fast-data-entry__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:n,uuid:r,display:a}=e,o=t[1===n?"primaryColor":"secondaryColor"];return(0,ud.jsx)(uv.Tag,{type:o,children:a},r)})})},b1={action:"-esm-fast-data-entry__empty-card-module__action___l4wUo",content:"-esm-fast-data-entry__empty-card-module__content___XbsSJ",desktopHeading:"-esm-fast-data-entry__empty-card-module__desktopHeading___0EPXX",tabletHeading:"-esm-fast-data-entry__empty-card-module__tabletHeading___unl1F",tile:"-esm-fast-data-entry__empty-card-module__tile___vS3Sj"},b2=({width:e="64",height:t="64"})=>(0,ud.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,ud.jsx)("use",{href:"#omrs-empty-data-illustration"})}),b4=e=>{let t="tablet"===lA(),n=e.launchForm;return(0,ud.jsx)(uv.Layer,{className:b1.layer,children:(0,ud.jsxs)(uv.Tile,{className:b1.tile,children:[(0,ud.jsx)("div",{className:t?b1.tabletHeading:b1.desktopHeading,children:(0,ud.jsx)("h4",{children:e.headerTitle})}),(0,ud.jsx)(b2,{}),(0,ud.jsx)("p",{className:b1.content,children:rF("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,ud.jsx)("p",{className:b1.action,children:n&&(0,ud.jsx)(uv.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:rF("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},b3=({error:e,headerTitle:t})=>{let n="tablet"===lA();return(0,ud.jsx)(uv.Layer,{children:(0,ud.jsxs)(uv.Tile,{className:"-esm-fast-data-entry__error-state-module__tile___hHM56",children:[(0,ud.jsx)("div",{className:n?"-esm-fast-data-entry__error-state-module__tabletHeading___W7a4U":"-esm-fast-data-entry__error-state-module__desktopHeading___VL8Rv",children:(0,ud.jsx)("h4",{children:t})}),(0,ud.jsxs)("p",{className:"-esm-fast-data-entry__error-state-module__errorMessage___IytZy",children:[rF("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,ud.jsx)("p",{className:"-esm-fast-data-entry__error-state-module__errorCopy___E1yZO",children:rF("errorCopy")})]})})},b6=b3,b5=sd().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=lF(),i=window.location??{pathname:""},s=sS(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,ud.jsxs)(uv.SideNav,{"aria-label":rF("leftNavigation","Left navigation"),className:"-esm-fast-data-entry__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,ud.jsx)(sP,{name:"global-nav-menu-slot"}),n?(0,ud.jsx)(s7,{value:a,fallback:(0,ud.jsx)(sP,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,ud.jsx)(sf.Provider,{value:a,children:(0,ud.jsx)(sP,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),b9=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,sc.useState)(""),s=(0,sc.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=lm()(t,r2,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,sc.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:f,error:m,setPage:p}=function(e,t=0,n=""){let r=ld(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=lP()(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=`${rQ}/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()},r2);return(0,sc.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,sc.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,sc.useCallback)(e=>{a(),i(e.trim())},[a]),y=lW((0,sc.useCallback)(()=>{!f&&d&&p(e=>e+1)},[f,d,p])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)(uv.Search,{"aria-describedby":m?`${s}-error`:void 0,labelText:rF("searchForLocation"),id:s,placeholder:rF("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),m&&(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,ud.jsx)(uv.InlineNotification,{kind:"error",subtitle:rF("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:rF("error","Error")})}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__searchResults___aCL93",children:c?(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,ud.jsx)(uv.RadioButtonSkeleton,{className:"-esm-fast-data-entry__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__locationResultsContainer___5yuvs",children:h.length>0?(0,ud.jsx)(uv.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,ud.jsx)(uv.RadioButton,{className:"-esm-fast-data-entry__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,ud.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__emptyState___qiPqQ",children:(0,ud.jsx)("p",{className:"-esm-fast-data-entry__location-picker-module__locationNotFound___tKDOJ",children:rF("noResultsToDisplay")})})}),f&&(0,ud.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingIcon___PGwvc",children:(0,ud.jsx)(uv.InlineLoading,{description:rF("loading")})})]})})]})},b8=V("modalState",{modalContainer:null,modalStack:[]}),b7=0;async function we(e,t,n={}){let r=iJ(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=b7++;a=await si({...i,name:`${t}-${s}`},{...n,domElement:e})}else P(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function wt(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function wn(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function wr(e){return e.find(e=>!wt(e))}function wa(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let wo=window.getComputedStyle(document.body).overflow;function wi({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",wl),document.body.style.overflow="hidden",t.style.visibility="unset");let n=wr(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",we(n,e.modalName,e.props).then(r=>{wt(e)?wn(e.modalName,r):r?(e.parcel=r,t.prepend(n),wa(e,wr(b8.getState().modalStack)===e),r.mountPromise.then(()=>{wt(e)||(e.state="MOUNTED")},t=>{P(t),e.parcel=null,ws(e)})):ws(e)},t=>{P(t),ws(e)});break}case"MOUNTING":case"MOUNTED":wa(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),wn(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=b8.getState();b8.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=wo,removeEventListener("keydown",wl)}function ws(e){if(wt(e))return;e.state="TO_BE_DELETED";let t=b8.getState();b8.setState({...t,modalStack:[...t.modalStack]})}function wl(e){"Escape"===e.key&&function(){let[e]=b8.getState().modalStack;e&&ws(e)}()}function wu(e){b8.subscribe(wi),b8.setState({...b8.getState(),modalContainer:e})}function wc(e,t={},n=()=>{}){let r=()=>{let e=b8.getState().modalStack.find(e=>e.onClose===n);e&&ws(e)};if(iJ(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=b8.getState()).modalStack],b8.setState({...o,modalStack:i})}else P(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let wd=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},wf=({subject:e})=>{let[t,n]=(0,sc.useState)([]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(wd,{notification:e},e.id))})},wm=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,sc.useState)(t);return(0,ud.jsx)(uv.ActionableNotification,{kind:a||"info",actionButtonLabel:c,ariaLabel:rF("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:rF("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},wp=({subject:e})=>{let[t,n]=(0,sc.useState)([]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(wm,{notification:e},e.id))})};class wh{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 wg=new wh,wy=0,wv=new wh,wb=0;function ww(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(wf,{subject:wg}))}function wE(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,J.isEmpty)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{wg.next({...e,id:wy++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function wx(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(wp,{subject:wv}))}function wD(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,J.isEmpty)(t))?setTimeout(()=>{wv.next({...e,id:wb++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let w_=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],wS=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],wk={container:"-esm-fast-data-entry__numeric-observation-module__container___+Kqi9",card:"-esm-fast-data-entry__numeric-observation-module__card___Q-ECG","abnormal-value":"-esm-fast-data-entry__numeric-observation-module__abnormal-value___bx1h9","critical-value":"-esm-fast-data-entry__numeric-observation-module__critical-value___nSKSX",cell:"-esm-fast-data-entry__numeric-observation-module__cell___wc90e","critically-high":"-esm-fast-data-entry__numeric-observation-module__critically-high___fmZfJ","critically-low":"-esm-fast-data-entry__numeric-observation-module__critically-low___h9797",high:"-esm-fast-data-entry__numeric-observation-module__high___0-YpP",low:"-esm-fast-data-entry__numeric-observation-module__low___TuqAk","label-container":"-esm-fast-data-entry__numeric-observation-module__label-container___FtozC","value-container":"-esm-fast-data-entry__numeric-observation-module__value-container___R9qoY",label:"-esm-fast-data-entry__numeric-observation-module__label___0DGA5",value:"-esm-fast-data-entry__numeric-observation-module__value___ohqoh",units:"-esm-fast-data-entry__numeric-observation-module__units___xvMd3","pad-right":"-esm-fast-data-entry__numeric-observation-module__pad-right___umcen","off-scale-low":"-esm-fast-data-entry__numeric-observation-module__off-scale-low___my+0i","off-scale-high":"-esm-fast-data-entry__numeric-observation-module__off-scale-high___so9dv",arrow:"-esm-fast-data-entry__numeric-observation-module__arrow___Agoh9"},wC=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,sc.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${rX}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${rX}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=lm()(n,r2),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,f=(0,sc.useMemo)(()=>{if(r)return r?"--"===r?"normal":w_.includes(r)?r.toLowerCase():wS.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"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,p="normal"!==f,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:rF("notAvailable","Not available"),w=um()({[wk["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[wk["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[wk.low]:"low"===f,[wk.high]:"high"===f,[wk["off-scale-low"]]:"off_scale_low"===f,[wk["off-scale-high"]]:"off_scale_high"===f}),E=um()({[wk.container]:!0,[wk.card]:!0,[wk["critical-value"]]:m,[wk["abnormal-value"]]:p&&!m}),x=um()({[wk.cell]:!0,[w]:!0});return"cell"===i?(0,ud.jsxs)("div",{className:x,children:[b,v&&t?` ${t}`:""]}):(0,ud.jsxs)("section",{className:E,"data-testid":"numeric-observation-card",children:[n&&(0,ud.jsxs)("div",{className:wk["label-container"],children:[(0,ud.jsx)("span",{id:h,className:wk.label,children:n}),p&&(0,ud.jsx)("span",{className:wk[f.replace("_","-")],title:rF("abnormalValue","Abnormal value")})]}),(0,ud.jsxs)("div",{className:wk["value-container"],children:[(0,ud.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:wk.value,children:b}),v&&t&&(0,ud.jsx)("span",{id:y,className:wk.units,children:t})]})]})},wP="-esm-fast-data-entry__page-header-module__pageHeader___XNJYe",wR=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,ud.jsx)("div",{className:um()(wP,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,ud.jsx)("div",{className:um()(wP,r),...a,children:(0,ud.jsx)(wO,{title:t,illustration:n})})}},wO=({title:e,illustration:t,className:n})=>{let[r,a]=(0,sc.useState)(null);return(0,sc.useEffect)(()=>{eH("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__page-header-module__pageHeaderContent___V-mTz",n),children:[t,(0,ud.jsxs)("div",{className:"-esm-fast-data-entry__page-header-module__pageLabels___vGJvg",children:[r?.implementationName&&(0,ud.jsx)("p",{children:rF(r.implementationName)}),(0,ud.jsx)("p",{className:"-esm-fast-data-entry__page-header-module__pageName___+eYMc",children:e})]})]})},wT=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=lK(t,e,r,o),u="tablet"===lA(),c=rF("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,ud.jsx)(ud.Fragment,{children:e>0&&(0,ud.jsxs)("div",{className:um()({"-esm-fast-data-entry__pagination-module__tablet___DdaYk":u,"-esm-fast-data-entry__pagination-module__desktop___rSwlo":!u}),children:[(0,ud.jsxs)("div",{children:[c,a&&(0,ud.jsx)(sm,{to:a,className:"-esm-fast-data-entry__pagination-module__configurableLink___cTCLf",children:i??rF("seeAll","See all")})]}),(0,ud.jsx)(uv.Pagination,{className:"-esm-fast-data-entry__pagination-module__pagination___U6anZ",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>rF("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function wN(e){return wI(wA(e,"usual","official"))}function w$(e){return wN(e)}function wI(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function wM(e){return wI(e)}function wA(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 wj(e,t=lQ()){let n=lQ(t),r=bf(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 wL(e,t=lQ()){let n=wj(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),bd(n,r)}let wF={container:"-esm-fast-data-entry__patient-banner-patient-info-module__container___WV40g",activePatientContainer:"-esm-fast-data-entry__patient-banner-patient-info-module__activePatientContainer___YBgYK",patientBanner:"-esm-fast-data-entry__patient-banner-patient-info-module__patientBanner___o-DQc",patientName:"-esm-fast-data-entry__patient-banner-patient-info-module__patientName___KWLAJ",patientAvatar:"-esm-fast-data-entry__patient-banner-patient-info-module__patientAvatar___gG4I3",patientAvatarButton:"-esm-fast-data-entry__patient-banner-patient-info-module__patientAvatarButton___by4L9",patientInfo:"-esm-fast-data-entry__patient-banner-patient-info-module__patientInfo___VU1fL",demographics:"-esm-fast-data-entry__patient-banner-patient-info-module__demographics___xDHsd",row:"-esm-fast-data-entry__patient-banner-patient-info-module__row___MlVwp",flexRow:"-esm-fast-data-entry__patient-banner-patient-info-module__flexRow___9Aj3s",tagsSlot:"-esm-fast-data-entry__patient-banner-patient-info-module__tagsSlot___PqCHJ",identifiers:"-esm-fast-data-entry__patient-banner-patient-info-module__identifiers___bbREn",identifier:"-esm-fast-data-entry__patient-banner-patient-info-module__identifier___HQzz8",primaryIdentifier:"-esm-fast-data-entry__patient-banner-patient-info-module__primaryIdentifier___ocKCs",secondaryIdentifier:"-esm-fast-data-entry__patient-banner-patient-info-module__secondaryIdentifier___4MLDH",value:"-esm-fast-data-entry__patient-banner-patient-info-module__value___tkQTC",tag:"-esm-fast-data-entry__patient-banner-patient-info-module__tag___u7Kco",gender:"-esm-fast-data-entry__patient-banner-patient-info-module__gender___7eQuO",separator:"-esm-fast-data-entry__patient-banner-patient-info-module__separator___CZBA8",tooltipPadding:"-esm-fast-data-entry__patient-banner-patient-info-module__tooltipPadding___UQr5s",tooltipSmallText:"-esm-fast-data-entry__patient-banner-patient-info-module__tooltipSmallText___MRUhY",actionsButtonText:"-esm-fast-data-entry__patient-banner-patient-info-module__actionsButtonText___8ZC1R"};function wB({showIdentifierLabel:e,type:t,value:n}){return(0,ud.jsx)("span",{className:wF.primaryIdentifier,children:(0,ud.jsxs)(uv.Tag,{className:wF.tag,type:"gray",children:[e&&t?.text&&(0,ud.jsxs)("span",{className:wF.label,children:[t.text,": "]}),(0,ud.jsx)("span",{className:wF.value,children:n})]})})}function wV({showIdentifierLabel:e,type:t,value:n}){return(0,ud.jsxs)(uv.FormLabel,{className:wF.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,ud.jsxs)("span",{className:wF.label,children:[t?.text,": "]}),(0,ud.jsx)("span",{className:wF.value,children:n})]})}function wU({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=lu(),{primaryIdentifierCode:r}=lY(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,ud.jsx)(ud.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,ud.jsxs)(sd().Fragment,{children:[(0,ud.jsx)("span",{className:wF.identifier,children:n?.coding?.[0]?.code===r?(0,ud.jsx)(wB,{showIdentifierLabel:t,type:n,value:e}):(0,ud.jsx)(wV,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"})]},e)):""})}let wW={Female:u7,Male:ce,Other:ct,Unknown:cn},wH=({gender:e})=>{let t=wW[e];return t?(0,ud.jsx)(t,{fill:"#525252"}):null},wz={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function wK({patient:e,renderedFrom:t}){var n;let r,a,o=wN(e),i=e?.gender&&(a=wz[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:rF(r,n),iconKey:a}),s=(0,sc.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,ud.jsxs)("div",{className:wF.patientInfo,children:[(0,ud.jsx)("div",{className:um()(wF.row,wF.patientNameRow),children:(0,ud.jsxs)("div",{className:wF.flexRow,children:[(0,ud.jsx)("span",{className:wF.patientName,children:o}),i&&(0,ud.jsxs)("div",{className:wF.gender,children:[(0,ud.jsx)(wH,{gender:i.iconKey}),(0,ud.jsx)("span",{children:i.displayText})]}),(0,ud.jsx)(sP,{className:wF.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,ud.jsxs)("div",{className:wF.demographics,children:[e.birthDate&&(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("span",{children:wL(e.birthDate)}),(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"}),(0,ud.jsx)("span",{children:bo(e.birthDate,{time:!1})}),(0,ud.jsx)("span",{className:wF.separator,children:"\xb7"})]}),(0,ud.jsx)(wU,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,ud.jsx)(sP,{className:wF.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var wG=n(1673);function wZ({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,sc.useState)(!1),{extensions:i}=sk(n),s="tablet"===lA(),l=lU(()=>o(!1),a),u=(0,sc.useRef)(null),c=(0,sc.useRef)(null),d=(0,sc.useId)(),f=`patient-actions-menu-trigger-${d}`,m=`patient-actions-menu-${d}`,p=(0,sc.useCallback)(()=>o(e=>!e),[]),h=(0,sc.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,sc.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,sc.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,sc.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,ud.jsx)("div",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,ud.jsxs)("div",{"data-overflow-menu":!0,className:um()("cds--overflow-menu",uE),ref:l,children:[(0,ud.jsxs)("button",{className:um()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},u_),"aria-controls":m,"aria-expanded":a,"aria-haspopup":"true",id:f,onClick:p,onKeyDown:g,ref:u,children:[(0,ud.jsx)("span",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:rF("actions","Actions")})," ",(0,ud.jsx)(wG.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,ud.jsxs)("div",{className:um()("cds--overflow-menu-options","cds--overflow-menu--flip",ux,{[uD]:a}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:m,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,ud.jsx)("ul",{className:um()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,ud.jsx)(sP,{name:n,state:y},n)}),(0,ud.jsx)("span",{})]})]})})}var wY=n(6767),wq=n.n(wY);function wJ(e){let{patientPhotoConceptUuid:t}=lu({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${rX}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=sz()(e?n:null,r2),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let wX=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,sW.useTranslation)();return(0,ud.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,ud.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,ud.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"})]})},wQ="-esm-fast-data-entry__patient-photo-module__avatar___R93LX";function w0({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=wJ(e),[o,i]=(0,sc.useState)(null),[s,l]=(0,sc.useState)(!1),u=(0,sc.useMemo)(()=>wq().generate(e),[e]);(0,sc.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,sc.useMemo)(()=>n||(o?rF("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):rF("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,ud.jsx)(uv.SkeletonIcon,{className:"-esm-fast-data-entry__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,ud.jsx)(wX,{"aria-label":rF("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,ud.jsx)("div",{"aria-label":c,children:(0,ud.jsx)("img",{className:wQ,src:o,alt:c,title:t})}):(0,ud.jsx)("div",{"aria-label":c,children:(0,ud.jsx)("div",{className:wQ,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,ud.jsx)("span",{className:"-esm-fast-data-entry__patient-photo-module__initials___JnUBD",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let w1=["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"],w2=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),w4=w2,w3=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),w6=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),w5=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),w9=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),w8=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),w7=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ee=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Et=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),En=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Er=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Ea=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Eo=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ei=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Es=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),El=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Eu=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Ec=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-patient-documents",pictogramProps:e})})),Ed=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Ef=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Em=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),Ep=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Eh=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Eg=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Ey=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Ev=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Eb=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Ew=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),EE=(0,sc.memo)((0,sc.forwardRef)(function(e,t){return(0,ud.jsx)(ES,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Ex=En,ED=Ef,E_=(0,sc.memo)((0,sc.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,sc.useRef)(document.getElementById(e));return(0,sc.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,ud.jsx)(s7,{value:a.current,fallback:t,children:(0,ud.jsx)(ES,{ref:r,pictogram:e,pictogramProps:n})})})),ES=(0,sc.memo)((0,sc.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,ud.jsx)("svg",{ref:n,className:um()("-esm-fast-data-entry__pictograms-module__pictogram___LTPzD",r),height:a,width:a,children:(0,ud.jsx)("use",{href:`#${e}`})})})),Ek=({children:e})=>"tablet"===lA()?(0,ud.jsx)(uv.Layer,{children:e}):(0,ud.jsx)(ud.Fragment,{children:e}),EC=({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,...f}=e,[m,p]=(0,sc.useState)(n),[h,g]=(0,sc.useState)(!0),[y,v]=(0,sc.useState)(!1),b=(0,sc.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,sc.useCallback)(()=>{v(!0),b()},[b]);return(0,sc.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,sc.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:m,"aria-label":rF("closeSnackbar","Close snackbar"),className:um()("-esm-fast-data-entry__snackbar-module__slideIn___TqSN-",{"-esm-fast-data-entry__snackbar-module__animated___+XPKT":h,"-esm-fast-data-entry__snackbar-module__slideOut___1cFIY":y}),kind:r,lowContrast:o,onActionButtonClick:()=>{a(),w(),i&&p(i)},onClose:b,statusIconDescription:rF("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},EP=({subject:e})=>{let[t,n]=(0,sc.useState)([]),r=(0,sc.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(EC,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},ER=new wh,EO=0;function ET(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(EP,{subject:ER}))}function EN(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{ER.next({...e,id:EO++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let E$=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,sc.useCallback)(()=>{s(),t()},[t,s]);return(0,ud.jsx)("div",{children:(0,ud.jsx)(uv.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},EI=({subject:e})=>{let[t,n]=(0,sc.useState)([]),r=(0,sc.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,sc.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,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsx)(E$,{toast:e,closeToast:()=>r(e)},e.id))})},EM=new wh,EA=0;function Ej(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(EI,{subject:EM}))}function EL(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,J.isEmpty)(t))?setTimeout(()=>{EM.next({...e,id:EA++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function EF(e,t=!1){if(t)return!0;let n=EH[e];return!n||!n()}function EB(e,t){let n=EX.getState()?.workspaceGroup,r=n?.name;r&&e===r&&E2(()=>{let r=E9(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),EX.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function EV(e,t){let{name:n,additionalProps:r}=t;i4(n);let a=()=>{EY(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>EU(n,r),closeWorkspaceGroup:!1})};EF(e.name)?a():E3("closing-workspace-launching-new-workspace",a,e.title??e.name)}function EU(e,t){let n=i4(e),r=EX.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void EB(r.name,()=>{EU(e,t)});let a=EX.getState().workspaceGroup?.name,o={...n,title:E6(n,t),closeWorkspace:(t={})=>EY(e,t),closeWorkspaceWithSavedChanges:t=>EY(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(EH[n]=r)},setTitle:(t,n)=>{o.title=t,o.titleNode=n,EX.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){EX.setState(n=>{let r=[e,...t??n.openWorkspaces],a=E1(e);return{...n,openWorkspaces:r,workspaceWindowState:a}})}a&&E9(a,t);let s=EX.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===E6(t,t.additionalProps)&&{title:E6(o,o.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,EX.getState().openWorkspaces.filter(e=>e.type!=o.type)),EV(u,{name:e,additionalProps:t})):i(o);else EV(s[0],{name:e,additionalProps:t})}function EW({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Eq(t),EU(n,r),rU({to:e})}let EH={};function Ez(e,t){EH[e]=t}function EK(e){return EH[e]}function EG(){let e=EX.getState();EX.setState({...e,prompt:null})}let EZ={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function EY(e,t={}){t={...EZ,...t};let n=()=>{let n=EX.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),a=EX.getState().workspaceGroup?.name;a&&t.closeWorkspaceGroup&&EB(a),EH[e]=()=>!1,EX.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:E1(r?.[0])})),t?.onWorkspaceClose?.()};return EF(e,t?.ignoreChanges)?(n(),!0):(E3("closing-workspace",n,i4(e).title??e),!1)}function Eq(e){EX.getState().context!=e&&EX.setState({context:e,openWorkspaces:[],prompt:null})}let EJ={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},EX=V("workspace",EJ);function EQ(){return EX}function E0(e){let t=EX.getState();EX.setState({...t,workspaceWindowState:e})}function E1(e){return e?.preferredWindowSize??"normal"}function E2(e=()=>{},t=()=>!0){let n=EX.getState().openWorkspaces.filter(t).every(({name:e})=>EF(e)),r=()=>{E5(),e?.()};n?r():E3("closing-all-workspaces",r)}function E4(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=sv(EX);return(0,sc.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function E3(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:rF("unsavedChangesTitleText","Unsaved changes"),body:rF("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:rF("discard","Discard")};break;case"closing-all-workspaces":{let e=EX.getState().openWorkspaces.filter(({name:e})=>!EF(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:rF("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:rF("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:rF("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:rF("unsavedChangesTitleText","Unsaved changes"),body:rF("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{EX.setState(e=>({...e,prompt:null})),t?.()},confirmText:rF("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}EX.setState(e=>({...e,prompt:r}))}function E6(e,t){return t?.workspaceTitle??e.title}function E5(){EX.setState(EJ)}function E9(e,t={}){if(!e||"default"===e)return;let n=W(e,{});return t&&n.setState(e=>({...e,...t})),n}let E8="-esm-fast-data-entry__action-menu-button-module__container___Uwne-",E7="-esm-fast-data-entry__action-menu-button-module__elementContainer___vWkQO",xe="-esm-fast-data-entry__action-menu-button-module__active___D7Idw";function xt({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,ud.jsxs)(ud.Fragment,{children:[e({size:16}),t?(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__countTag___XJRiM",children:n})]})}let xn=({getIcon:e,label:t,iconDescription:n,handler:r,type:a,tagContent:o})=>{let i=lA(),{workspaces:s,workspaceWindowState:l}=E4(),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,ud.jsxs)(uv.Button,{className:um()(E8,{[xe]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,ud.jsx)("span",{className:E7,children:(0,ud.jsx)(xt,{formOpenInTheBackground:d,getIcon:e,tagContent:o})}),(0,ud.jsx)("span",{children:t})]}):(0,ud.jsx)(uv.IconButton,{align:"left","aria-label":n,className:um()(E8,{[xe]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,ud.jsx)("div",{className:E7,children:(0,ud.jsx)(xt,{formOpenInTheBackground:d,getIcon:e,tagContent:o})})})};var xr=n(4535),xa=n(771);function xo({contextKey:e}){let{prompt:t}=E4();return(0,sc.useEffect)(()=>{RegExp(`/${(0,J.escapeRegExp)(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,sc.useEffect)(()=>(Eq(e),()=>{Eq(null)}),[e]),(0,sc.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,a=RegExp(`/${(0,J.escapeRegExp)(e)}(/|$)`),o=new URL(r),i=a.test(o.pathname),s=EX.getState().openWorkspaces.every(({name:e})=>EF(e));i||(s?E5():(n?.(),E2(()=>{rU({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,ud.jsxs)(uv.ComposedModal,{open:!0,onClose:EG,children:[(0,ud.jsx)(uv.ModalHeader,{title:t.title}),(0,ud.jsx)(uv.ModalBody,{children:(0,ud.jsx)("p",{className:"-esm-fast-data-entry__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,ud.jsxs)(uv.ModalFooter,{children:[(0,ud.jsx)(uv.Button,{kind:"secondary",onClick:EG,children:t.cancelText??rF("cancel")}),(0,ud.jsx)(uv.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??rF("confirm")})]})]}):null}function xi(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 xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xi(Object(n),!0).forEach(function(t){xu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xl(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 xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xc(e){return(xc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xm=function(e){var t=sc.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&&xd(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=xc(i);e=n?Reflect.construct(t,arguments,xc(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 xf(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),xu(xf(t=o.call(this,e)),"handleRef",function(e){t.el=e}),xu(xf(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}))}),xu(xf(t),"getParcelProps",function(){var e=xs(xs({},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,xs({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 sM&&sM.Consumer?sc.createElement(sM.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=sM&&sM.Consumer?sc.createElement(sM.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return sc.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],xl(i.prototype,r),a&&xl(i,a),i}();xu(xm,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function xp({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,sc.useState)(),a=function(e){let[t,n]=(0,sc.useState)({}),[r,a]=(0,sc.useState)(e);return(0,sc.useEffect)(()=>{r!==e&&a(e)},[e]),(0,sc.useEffect)(()=>{let e,t=E9(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,sc.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let o=(0,sc.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...a,...e.additionalProps},[e,t,a]);return n?(0,ud.jsx)(xm,{config:n,mountParcel:sl,...o},e.name):(0,ud.jsx)(uv.InlineLoading,{className:"-esm-fast-data-entry__workspace-module__loader___v7QFg",description:`${rF("loading","Loading")} ...`})}function xh({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,a]=(0,sc.useState)(!1),o=(0,sc.useRef)(window.innerHeight),{featureName:i}=(0,sc.useContext)(sf),s=lA();(0,sc.useEffect)(()=>{let e=()=>{a(!lj(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,ud.jsx)("aside",{className:um()("-esm-fast-data-entry__action-menu-module__sideRail___Aa96v",{"-esm-fast-data-entry__action-menu-module__withinWorkspace___2bJET":e,"-esm-fast-data-entry__action-menu-module__sideRailHidden___Yb0w9":r,"-esm-fast-data-entry__action-menu-module__sideRailVisible___XIAk7":!r}),children:(0,ud.jsx)("div",{className:"-esm-fast-data-entry__action-menu-module__container___mzfAh",children:(0,ud.jsx)(sP,{className:"-esm-fast-data-entry__action-menu-module__chartExtensions___DiJtm",name:l,state:n})})})}function xg({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:a}){let o=lA(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=E4(),u=l?.name,c=i[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),m=(0,sc.useMemo)(()=>n||u&&!d,[u,d,n]);return li(!d&&!lj(o)),(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)("div",{className:n?"-esm-fast-data-entry__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-fast-data-entry__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,ud.jsx)("aside",{className:um()(t?"-esm-fast-data-entry__workspace-module__workspaceOverlayOuterContainer___4y++2":"-esm-fast-data-entry__workspace-module__workspaceWindowSpacer___6kF9R",{"-esm-fast-data-entry__workspace-module__hiddenRelative___qqT-4":d,"-esm-fast-data-entry__workspace-module__narrowWorkspace___MMI1u":"narrow"===f,"-esm-fast-data-entry__workspace-module__widerWorkspace___be-UT":"wider"===f,"-esm-fast-data-entry__workspace-module__extraWideWorkspace___JmWmj":"extra-wide"===f}),children:(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceFixedContainer___TfJP7",{"-esm-fast-data-entry__workspace-module__maximizedWindow___71jv4":"maximized"===s,"-esm-fast-data-entry__workspace-module__hiddenFixed___48wS9":d}),children:i.map((e,t)=>(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-fast-data-entry__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,ud.jsx)(sc.Suspense,{fallback:null,children:(0,ud.jsx)(sW.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,ud.jsx)(xy,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,ud.jsx)(xo,{contextKey:e})]}),m&&(0,ud.jsx)(xh,{name:u,isWithinWorkspace:!n,actionMenuProps:a})]})}function xy({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,sW.useTranslation)(),r=lA(),{workspaceWindowState:a,workspaceGroup:o}=E4(),i=o?.name,s="maximized"===a;(0,sc.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,sc.useContext)(sf),u=(0,sc.useCallback)(()=>{E0(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:m}=(0,sc.useMemo)(()=>e??{},[e]),p=(0,sc.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)(uv.Header,{"aria-label":rF("workspaceHeader","Workspace Header"),className:"-esm-fast-data-entry__workspace-module__header___nACZO",children:[!lj(r)&&!c&&(0,ud.jsx)(uv.HeaderMenuButton,{"aria-label":rF("close","Close"),renderMenuIcon:(0,ud.jsx)(uI,{}),onClick:()=>m()}),(0,ud.jsx)(uv.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,ud.jsx)("div",{className:"-esm-fast-data-entry__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,ud.jsxs)(uv.HeaderGlobalBar,{className:"-esm-fast-data-entry__workspace-module__headerButtons___heP0Q",children:[(0,ud.jsx)(sP,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:p}),(0,ud.jsx)(sP,{name:`workspace-header-type-${e.type}-slot`,state:p}),(0,ud.jsx)(sP,{name:`workspace-header-${l}-slot`,state:p}),lj(r)&&(0,ud.jsxs)(ud.Fragment,{children:[(d||s)&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":s?rF("minimize","Minimize"):rF("maximize","Maximize"),onClick:u,children:s?(0,ud.jsx)(xr.Xj,{}):(0,ud.jsx)(xr.hz,{})}),c&&!i?(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide","Hide"),onClick:()=>E0("hidden"),children:(0,ud.jsx)(uM,{})}):(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close","Close"),onClick:()=>m?.(),children:(0,ud.jsx)(uQ,{})})]}),"tablet"===r&&c&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close","Close"),onClick:()=>m?.(),children:(0,ud.jsx)(xa.d3,{})})]})]}),(0,ud.jsx)("div",{className:um()("-esm-fast-data-entry__workspace-module__workspaceContent___oYdxI",{"-esm-fast-data-entry__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,ud.jsx)(xp,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let xv="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xb=new Uint8Array(16),xw=[];for(let e=0;e<256;++e)xw.push((e+256).toString(16).slice(1));let xE=function(e,t,n){if(xv&&!t&&!e)return xv();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(xb)}();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(xw[e[t+0]]+xw[e[t+1]]+xw[e[t+2]]+xw[e[t+3]]+"-"+xw[e[t+4]]+xw[e[t+5]]+"-"+xw[e[t+6]]+xw[e[t+7]]+"-"+xw[e[t+8]]+xw[e[t+9]]+"-"+xw[e[t+10]]+xw[e[t+11]]+xw[e[t+12]]+xw[e[t+13]]+xw[e[t+14]]+xw[e[t+15]]).toLowerCase()}(r)};async function xx(e,t){let{openedGroup:n}=i6.getState();if(n){if(n.groupName===e&&xS(n.props,t))return!0;else if(!await xk({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return i6.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function xD(e){let{openedGroup:t,openedWindows:n}=i6.getState();if(t){if(n.length>0&&!(e||await xk({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;i6.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function x_(e,t=null,n=null,r=null){let a=i6.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=i5(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=i9(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=i8(e);if(i&&(i.groupName!==l.name||!xS(i.props,r)))return!!await xk({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[xT(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(xS(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&xS(d.props,t)?((i||u!==a.openedWindows.length-1)&&i6.setState(xC.restoreWindow(a,s)),!0):!!await xk({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[xT(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await xk({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[xT(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(i6.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[xT(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await xk({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(i6.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[xT(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function xS(e,t){return null==e||null==t||T(e,t)}function xk(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}=i6.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=wc("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:a.map(e=>r[e.workspaceName])})})}let xC={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=i8(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,xT(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=i8(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 xP(){return sb(i6,xC)}let xR=()=>(0,sc.useContext)(sM),xO=()=>Object.keys(i6.getState().registeredWorkspacesByName);function xT(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:xE()}}let xN={workspaceOuterContainer:"-esm-fast-data-entry__workspace2-module__workspaceOuterContainer___DLiCR",narrowWorkspace:"-esm-fast-data-entry__workspace2-module__narrowWorkspace___VL0kF",widerWorkspace:"-esm-fast-data-entry__workspace2-module__widerWorkspace___3QgrA",extraWideWorkspace:"-esm-fast-data-entry__workspace2-module__extraWideWorkspace___s7nnh",workspaceMiddleContainer:"-esm-fast-data-entry__workspace2-module__workspaceMiddleContainer___mTGNN",maximized:"-esm-fast-data-entry__workspace2-module__maximized___-yo9l",hidden:"-esm-fast-data-entry__workspace2-module__hidden___K2ryM",workspaceInnerContainer:"-esm-fast-data-entry__workspace2-module__workspaceInnerContainer___o3zVl",workspaceSpacer:"-esm-fast-data-entry__workspace2-module__workspaceSpacer___N6-ox",loader:"-esm-fast-data-entry__workspace2-module__loader___29hpw",hiddenExtraWorkspace:"-esm-fast-data-entry__workspace2-module__hiddenExtraWorkspace___-W7TY",header:"-esm-fast-data-entry__workspace2-module__header___p0kuD",headerButtons:"-esm-fast-data-entry__workspace2-module__headerButtons___hMydG",workspaceContent:"-esm-fast-data-entry__workspace2-module__workspaceContent___uROr7",overlayHeaderSpacer:"-esm-fast-data-entry__workspace2-module__overlayHeaderSpacer___zdrhx",isActionMenuOpened:"-esm-fast-data-entry__workspace2-module__isActionMenuOpened___Wc1Il",showActionMenu:"-esm-fast-data-entry__workspace2-module__showActionMenu___qCVQ-",marginWorkspaceContent:"-esm-fast-data-entry__workspace2-module__marginWorkspaceContent___A+20C",workspaceContainerWithActionMenu:"-esm-fast-data-entry__workspace2-module__workspaceContainerWithActionMenu___S98dq",workspaceFixedContainer:"-esm-fast-data-entry__workspace2-module__workspaceFixedContainer___c9Uny",workspaceContainerWithoutActionMenu:"-esm-fast-data-entry__workspace2-module__workspaceContainerWithoutActionMenu___u8FbT"},x$=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=lA(),{setWindowMaximized:a,hideWindow:o,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:m,isMostRecentlyOpenedWindowHidden:p}=xP(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=xR(),b=i8(h),w=s[b],E=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,sc.useEffect)(()=>{E?.hasUnsavedChanges!=n&&i(h,n??!1)},[E?.hasUnsavedChanges,n,h,i]),(0,sc.useEffect)(()=>{f[h]!==e&&m(h,e)},[f,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=d[h].window,_=c[D];if(!_)throw Error(`Cannot find registered workspace window ${D}`);let{icon:S,canMaximize:k}=_,C="closable"===x.persistence,P=!!S&&!C,{maximized:R}=w,O=_?.width??"narrow",T=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),N=b<s.length-1||p;return(0,ud.jsxs)("div",{className:um()(xN.workspaceOuterContainer,{[xN.narrowWorkspace]:"narrow"===O,[xN.widerWorkspace]:"wider"===O,[xN.extraWideWorkspace]:"extra-wide"===O,[xN.isActionMenuOpened]:T}),children:[(0,ud.jsx)("div",{className:um()(xN.workspaceSpacer,{[xN.hidden]:N})}),(0,ud.jsx)("div",{className:um()(xN.workspaceMiddleContainer,{[xN.maximized]:R,[xN.hidden]:N,[xN.isRootWorkspace]:g,[xN.showActionMenu]:v}),children:(0,ud.jsxs)("div",{className:um()(xN.workspaceInnerContainer,{[xN.maximized]:R,[xN.hidden]:N,[xN.isRootWorkspace]:g}),children:[(0,ud.jsxs)(uv.Header,{"aria-label":rF("workspaceHeader"),className:xN.header,children:[(0,ud.jsx)(uv.HeaderName,{prefix:"",children:e}),(0,ud.jsx)("div",{className:xN.overlayHeaderSpacer}),(0,ud.jsx)(uv.HeaderGlobalBar,{className:xN.headerButtons,children:lj(r)?(0,ud.jsxs)(ud.Fragment,{children:[(k||R)&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":R?rF("minimize"):rF("maximize"),onClick:()=>a(D,!R),children:R?(0,ud.jsx)(xr.Xj,{}):(0,ud.jsx)(xr.hz,{})}),P&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide"),onClick:()=>o(),children:(0,ud.jsx)(uM,{})}),!C&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close"),onClick:()=>y({closeWindow:!0}),children:(0,ud.jsx)(uQ,{})})]}):(0,ud.jsxs)(ud.Fragment,{children:[P&&(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("hide"),onClick:()=>o(),children:(0,ud.jsx)(xa.d3,{})}),(0,ud.jsx)(uv.HeaderGlobalAction,{"aria-label":rF("close"),onClick:()=>{C?xD():y({closeWindow:!0})},children:(0,ud.jsx)(uQ,{})})]})})]}),(0,ud.jsx)("div",{className:um()(xN.workspaceContent),children:t})]})})]})},xI="-esm-fast-data-entry__action-menu-button2-module__container___gYRoa",xM="-esm-fast-data-entry__action-menu-button2-module__elementContainer___vBViO",xA="-esm-fast-data-entry__action-menu-button2-module__active___uRJRA",xj="-esm-fast-data-entry__action-menu-button2-module__focused___D4VYB";function xL({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,ud.jsxs)(ud.Fragment,{children:[e({size:16}),t?(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,ud.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__countTag___l8lfc",children:n})]})}let xF=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a})=>{let o=lA(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=xP(),{extension:c}=(0,sc.useContext)(sf),d=i.findIndex(e=>e.windowName===c?.extensionId),f=i[d],m=null!=f,p=m&&(d<i.length-1||u),h=m&&!p,g=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(m)p?s(f.windowName):l();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;x_(e,t,n)}};return"tablet"===o||"phone"===o?(0,ud.jsxs)(uv.Button,{className:um()(xI,{[xA]:m&&!h,[xj]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,ud.jsx)("span",{className:xM,children:(0,ud.jsx)(xL,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,ud.jsx)("span",{children:t})]}):(0,ud.jsx)(uv.IconButton,{align:"left","aria-label":t,className:um()(xI,{[xA]:m&&!h,[xj]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,ud.jsx)("div",{className:xM,children:(0,ud.jsx)(xL,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function xB({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,ud.jsx)(uv.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?uX:uY,children:e?rF("showLess","Show less"):rF("showMore","Show more")})}let xV={contactDetails:"-esm-fast-data-entry__patient-banner-contact-details-module__contactDetails___AvROu",deceased:"-esm-fast-data-entry__patient-banner-contact-details-module__deceased___DDd39",heading:"-esm-fast-data-entry__patient-banner-contact-details-module__heading___GGJyV",row:"-esm-fast-data-entry__patient-banner-contact-details-module__row___8JcKK",col:"-esm-fast-data-entry__patient-banner-contact-details-module__col___ct1O9",relationship:"-esm-fast-data-entry__patient-banner-contact-details-module__relationship___GTTsg"},xU=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${rX}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=sz()(t,r2),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,sc.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsxs)("p",{className:xV.heading,children:[rF("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>v7(e?.startDate).getTime()-v7(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,ud.jsx)("li",{children:(0,ud.jsx)(sm,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,ud.jsx)("li",{children:"--"})})(),t.length>3&&(0,ud.jsx)("li",{className:xV.link,children:(0,ud.jsx)(sm,{to:`${window.spaBase}/home/patient-lists`,children:rF("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},xW=({patientId:e})=>{let{patient:t,isLoading:n}=lZ(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xV.heading,children:rF("address","Address")}),(0,ud.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,ud.jsxs)("li",{children:[rF(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,ud.jsxs)("li",{children:[rF(e,e),": ",t]},`address-${e}`)):(0,ud.jsx)("li",{children:"--"})})]})},xH=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=lu({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=lm()(`${rX}/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)))`,r2);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,sc.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,sc.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?rF(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xV.heading,children:rF("contactDetails","Contact Details")}),t?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,ud.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,ud.jsx)("li",{children:"--"})})]})},xz=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${rX}/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}=sz()(e?t:null,r2),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,ud.jsxs)(ud.Fragment,{children:[(0,ud.jsx)("p",{className:xV.heading,children:rF("relationships","Relationships")}),n?(0,ud.jsx)(uv.InlineLoading,{description:`${rF("loading","Loading")} ...`,role:"progressbar"}):(0,ud.jsx)("ul",{children:t&&t.length>0?(0,ud.jsx)(ud.Fragment,{children:t.map(e=>(0,ud.jsxs)("li",{className:xV.relationship,children:[(0,ud.jsx)("div",{children:(0,ud.jsx)(sm,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,ud.jsx)("div",{children:e.relationshipType}),(0,ud.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?rF("yearAbbreviation","yr"):rF("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,ud.jsx)("li",{children:"--"})})]})};function xK({patientId:e,deceased:t}){return(0,ud.jsxs)("div",{className:um()(xV.contactDetails,{[xV.deceased]:t}),children:[(0,ud.jsxs)("div",{className:xV.row,children:[(0,ud.jsx)("div",{className:xV.col,children:(0,ud.jsx)(xW,{patientId:e})}),(0,ud.jsx)("div",{className:xV.col,children:(0,ud.jsx)(xH,{patientUuid:e})})]}),(0,ud.jsxs)("div",{className:xV.row,children:[(0,ud.jsx)("div",{className:xV.col,children:(0,ud.jsx)(xz,{patientId:e})}),(0,ud.jsx)("div",{className:xV.col,children:(0,ud.jsx)(xU,{patientUuid:e})})]})]})}function xG(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 xZ="-esm-fast-data-entry__action-menu2-module__container___4aX3S";function xY({workspaceGroup:e,groupProps:t}){let n=lA(),{persistence:r}=e;return(0,ud.jsx)("aside",{className:"-esm-fast-data-entry__action-menu2-module__sideRail___a7qg9",children:(0,ud.jsxs)("div",{className:xZ,children:["closable"==r&&lj(n)&&(0,ud.jsx)(uv.IconButton,{align:"left",onClick:()=>xD(),label:rF("close"),kind:"ghost",children:(0,ud.jsx)(uQ,{})}),(0,ud.jsx)(sf.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,ud.jsx)(sP,{className:xZ,name:e.name,state:{groupProps:t}})})]})})}function xq(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 xJ=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:a,showActionMenu:o})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=xP(),u=(0,sc.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:a=!1}=e;return r?!!(a||await xk({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(a||await xk({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 xk({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:i6.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:a,windowName:n.windowName,showActionMenu:o},[t,s,i,n]);if(!e){let{registeredWorkspacesByName:e}=i6.getState(),n=e[t.workspaceName],a=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=i6.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,ud.jsxs)("div",{className:um()(xN.workspaceOuterContainer,{[xN.narrowWorkspace]:"narrow"===u,[xN.widerWorkspace]:"wider"===u,[xN.extraWideWorkspace]:"extra-wide"===u,[xN.isActionMenuOpened]:c}),children:[(0,ud.jsx)("div",{className:xN.workspaceSpacer}),(0,ud.jsx)("div",{className:um()(xN.workspaceMiddleContainer,{[xN.isRootWorkspace]:r,[xN.showActionMenu]:o}),children:(0,ud.jsx)("div",{className:um()(xN.workspaceInnerContainer,{[xN.isRootWorkspace]:r}),children:(0,ud.jsx)(uv.InlineLoading,{className:xN.loader,description:`${rF("loading")} ...`})})})]})}return(0,ud.jsx)(xm,{config:e,mountParcel:sl,...u},t.workspaceName)},xX=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,a]=(0,sc.useState)({}),{registeredWorkspacesByName:o}=i6.getState();return(0,sc.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=o[e.workspaceName];return[e.uuid,await ue(t,n)]})).then(t=>{e||a(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,ud.jsx)(ud.Fragment,{children:n.map((a,o)=>(0,ud.jsx)(xJ,{openedWorkspace:a,openedWindow:e,lifeCycle:r[a.uuid],isRootWorkspace:0===o,isLeafWorkspace:o===n.length-1,showActionMenu:t},a.uuid))})};function xQ(e){e&&(0,sR.createRoot)(e).render((0,ud.jsx)(x0,{}))}function x0(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=xP();if((0,sc.useEffect)(()=>ol("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(xD().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=xq(t),o=xq(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(xD().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,ud.jsxs)("div",{className:um()("-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-fast-data-entry__workspace-windows-and-menu-module__overlay___FCMKG":a.overlay,"-esm-fast-data-entry__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":o}),children:[(0,ud.jsx)("div",{className:"-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,ud.jsx)(xX,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,ud.jsx)(xY,{workspaceGroup:a,groupProps:e.props})]})}function x1(e,t,n){if(null==e)return n;let r=vS(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=vS(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 x2(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function x4(e){return!!e&&e.constructor===Object}var x3=n(7638);function x6(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function x5(e,t){return x3(function(e){let t=e.indexOf("-");if(t>=0){let n=x6(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return x6(e)}(t),e,{includePrerelease:!0})}async function x9(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 x8(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function x8(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function x7(e,t,n,r){}function De(e){}function Dt(e){return Promise.resolve([])}function Dn(e){return Promise.resolve([])}function Dr(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 Da(e){return()=>{}}function Do(){return!0}}}]);