@openmrs/esm-fast-data-entry-app 1.5.1-pre.910 → 1.5.1-pre.912

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/2657.js CHANGED
@@ -1,4 +1,4 @@
1
- (globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["2657"],{1154(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,o;n=t,o=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{A:()=>p});var a=["width","height","viewBox"],s=["tabindex"],u={focusable:"false",preserveAspectRatio:"xMidYMid meet"},l=r(5556),c=r.n(l),d=r(7979),f=r.n(d);let p=f().forwardRef(function({className:e,children:t,tabIndex:r,xmlns:n="http://www.w3.org/2000/svg",preserveAspectRatio:l="xMidYMid meet",...c},d){let{tabindex:p,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=e.height,n=e.viewBox,l=void 0===n?"0 0 ".concat(t," ").concat(r):n,c=i(e,a),d=c.tabindex,f=i(c,s),p=o(o(o({},u),f),{},{width:t,height:r,viewBox:l});return p["aria-label"]||p["aria-labelledby"]||p.title?(p.role="img",null!=d&&(p.focusable="true",p.tabindex=d)):p["aria-hidden"]=!0,p}({...c,tabindex:r});return e&&(h.className=e),null!=p&&("number"==typeof p?h.tabIndex=p:h.tabIndex=Number(r)),d&&(h.ref=d),n&&(h.xmlns=n),l&&(h.preserveAspectRatio=l),f().createElement("svg",h,t)});p.displayName="Icon",p.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",r="minute",n="hour",o="week",i="month",a="quarter",s="year",u="date",l="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,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",h={};h[p]={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"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var m="$isDayjsObject",y=function(e){return e instanceof w||!(!e||!e[m])},g=function e(t,r,n){var o;if(!t)return p;if("string"==typeof t){var i=t.toLowerCase();h[i]&&(o=i),r&&(h[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;h[s]=t,o=s}return!n&&o&&(p=o),o||!n&&p},b=function(e,t){if(y(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new w(r)},v={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(r/60),2,"0")+":"+f(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,i),a=r-o<0,s=t.clone().add(n+(a?-1:1),i);return+(-(n+(r-o)/(a?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(l){return({M:i,y:s,w:o,d:"day",D:u,h:n,m:r,s:t,ms:e,Q:a})[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};v.l=g,v.i=y,v.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function f(e){this.$L=g(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var p=f.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(v.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(c);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},p.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()},p.$utils=function(){return v},p.isValid=function(){return this.$d.toString()!==l},p.isSame=function(e,t){var r=b(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return b(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<b(e)},p.$g=function(e,t,r){return v.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,a){var l=this,c=!!v.u(a)||a,d=v.p(e),f=function(e,t){var r=v.w(l.$u?Date.UTC(l.$y,t,e):new Date(l.$y,t,e),l);return c?r:r.endOf("day")},p=function(e,t){return v.w(l.toDate()[e].apply(l.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),l)},h=this.$W,m=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case s:return c?f(1,0):f(31,11);case i:return c?f(1,m):f(0,m+1);case o:var b=this.$locale().weekStart||0,w=(h<b?h+7:h)-b;return f(c?y-w:y+(6-w),m);case"day":case u:return p(g+"Hours",0);case n:return p(g+"Minutes",1);case r:return p(g+"Seconds",2);case t:return p(g+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(o,a){var l,c=v.p(o),d="set"+(this.$u?"UTC":""),f=((l={}).day=d+"Date",l[u]=d+"Date",l[i]=d+"Month",l[s]=d+"FullYear",l[n]=d+"Hours",l[r]=d+"Minutes",l[t]=d+"Seconds",l[e]=d+"Milliseconds",l)[c],p="day"===c?this.$D+(a-this.$W):a;if(c===i||c===s){var h=this.clone().set(u,1);h.$d[f](p),h.init(),this.$d=h.set(u,Math.min(this.$D,h.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[v.p(e)]()},p.add=function(e,a){var u,l=this;e=Number(e);var c=v.p(a),d=function(t){var r=b(l);return v.w(r.date(r.date()+Math.round(t*e)),l)};if(c===i)return this.set(i,this.$M+e);if(c===s)return this.set(s,this.$y+e);if("day"===c)return d(1);if(c===o)return d(7);var f=((u={})[r]=6e4,u[n]=36e5,u[t]=1e3,u)[c]||1,p=this.$d.getTime()+e*f;return v.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=v.z(this),i=this.$H,a=this.$m,s=this.$M,u=r.weekdays,c=r.months,f=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},h=function(e){return v.s(i%12||12,e,"0")},m=f||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(d,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return v.s(t.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return p(r.monthsShort,s,c,3);case"MMMM":return p(c,s);case"D":return t.$D;case"DD":return v.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,u,2);case"ddd":return p(r.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(i);case"HH":return v.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return v.s(a,2,"0");case"s":return String(t.$s);case"ss":return v.s(t.$s,2,"0");case"SSS":return v.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,u,l){var c,d=this,f=v.p(u),p=b(e),h=(p.utcOffset()-this.utcOffset())*6e4,m=this-p,y=function(){return v.m(d,p)};switch(f){case s:c=y()/12;break;case i:c=y();break;case a:c=y()/3;break;case o:c=(m-h)/6048e5;break;case"day":c=(m-h)/864e5;break;case n:c=m/36e5;break;case r:c=m/6e4;break;case t:c=m/1e3;break;default:c=m}return l?c:v.a(c)},p.daysInMonth=function(){return this.endOf(i).$D},p.$locale=function(){return h[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=g(e,t,!0);return n&&(r.$L=n),r},p.clone=function(){return v.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},f}(),x=w.prototype;return b.prototype=x,[["$ms",e],["$s",t],["$m",r],["$H",n],["$W","day"],["$M",i],["$y",s],["$D",u]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,w,b),e.$i=!0),b},b.locale=g,b.isDayjs=y,b.unix=function(e){return b(1e3*e)},b.en=h[p],b.Ls=h,b.p={},b}()},7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),u=i.year||a.year(),l=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,f=i.second||0,p=i.millisecond||0;return o?new Date(Date.UTC(u,l,s,c,d,f,p)):new Date(u,l,s,c,d,f,p)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,u=n.subtract,l=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?l.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?l.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?l.bind(this)(s,e,t,-1):u.bind(this)(e,t)}}},1445(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=i(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,s,u=arguments[0]||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=arguments[1]||{},l=2),"object"!=typeof u&&"function"!=typeof u&&(u={});l<c;l++)if(null!=(t=arguments[l]))for(r in t)o=u[r],u!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},u[r]=e(d,s,i)):void 0!==i&&(u[r]=i));return u}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var i=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},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,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),u=(a+s)/2;if(a===s)t=r=0;else{var l=a-s;switch(r=u>.5?l/(2-a-s):l/(a+s),a){case n:t=(o-i)/l+6*(o<i);break;case o:t=(i-n)/l+2;break;case i:t=(n-o)/l+4}t/=6}return{h:t,s:r,l:u}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var u=s<.5?s*(1+a):s+a-s*a,l=2*s-u;r=t(l,u,i+1/3),n=t(l,u,i),o=t(l,u,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),i=r(6743),a=r(8502),s={baseColor:"#933c3c"},u=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],l="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=p(o[0]),s=f(o[0]),u={stroke:l,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,u).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,u).transform({translate:[t+n,r+2*n],scale:[1,-1]}),u={stroke:l,"stroke-opacity":.02,"fill-opacity":a=p(o[1]),fill:s=f(o[1])},e.polyline(i,u).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,u).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=p(o),a=f(o),s=y(n),u={stroke:l,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,u).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,u).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,u).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,u).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>u.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=u[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,u,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,u=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,u,s+h,2*u,s,2*u,0,u].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:l,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),u=Math.floor(d(c(this.hash,1),0,15,30,100)),l=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*l),t=0;t<36;t++)r=p(i=c(this.hash,t)),e=f(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+l+"px"},n="M0 "+u+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+u+" S "+(s-a)+" "+2*u+", "+s+" "+u+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+u,this.svg.path(n,o).transform({translate:[-s/4,l*t-1.5*u]}),this.svg.path(n,o).transform({translate:[-s/4,l*t-1.5*u+36*l]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),u=d(c(this.hash,0),0,15,30,80),h=(e=.66*u,[[0,0,s/2,u-e,s/2,u,0,e,0,0],[s/2,u-e,s,0,s,e,s/2,u,s/2,u-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*u*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={stroke:l,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*u*.66-u/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*u*.66-u/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,u=d(c(this.hash,0),0,15,10,25),h=3*u,y=m(u);for(this.svg.setWidth(12*u),this.svg.setHeight(12*u),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=p(i=c(this.hash,r)),t=f(i),e=+(s%2!=0),o={fill:t,stroke:l,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*u+e*u-u,s*h-s*u-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*u+e*u-u,s*h-s*u-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*u+e*u-u,4*h-s*u-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*u+e*u-u,4*h-s*u-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),u=m(s),l=3*s*.943;for(this.svg.setWidth(3*l),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),e=i%2==0?a*l-.5*l:a*l-.5*l+l/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[i*l/2-l/2,e-a*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===i&&this.svg.group(n).transform({translate:[6*l/2-l/2,e-a*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===a&&(e=i%2==0?6*l-l/2:6*l-l/2+l/4,this.svg.group(n).transform({translate:[i*l/2-l/2,e-6*l/2],rotate:[45,l/2,l/2]}).rect(u).end()),5===a&&this.svg.group(n).transform({translate:[i*l/2-l/2,e-11*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*l/2-l/2,e-6*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),u=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(u,{fill:t,"fill-opacity":n,stroke:l,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:l,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,u=d(c(this.hash,0),0,15,15,80),h=u/2*Math.sqrt(3),m=[s=u/2,0,u,h,0,h,s,0].join(",");for(this.svg.setWidth(3*u),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:l,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*u*.5-u/2,h*a],rotate:[r,u/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*u*.5-u/2,h*a],rotate:[r,u/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),u=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,u/2,s/2,u,0,u/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:l,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,u/2*a-u/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,u/2*a-u/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,u/2*6-u/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,u/2*6-u/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),u=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:l,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(u,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(u,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(u,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(u,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(u,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(u,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(u,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(u,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(u,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(u,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,u=0;function l(){for(var s,u,l=16;l<80;l++){var c=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=c<<1|c>>>31}var d=e,f=t,p=r,h=n,m=o;for(l=0;l<80;l++){l<20?(s=h^f&(p^h),u=0x5a827999):l<40?(s=f^p^h,u=0x6ed9eba1):l<60?(s=f&p|h&(f|p),u=0x8f1bbcdc):(s=f^p^h,u=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+u+(0|i[l]);m=h,h=p,p=f<<30|f>>>2,f=d,d=y}for(l=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+h|0,o=o+m|0,a=0;l<16;l++)i[l]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&l()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;u+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;u+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&l(),a=14,s=24,c(0),c(0),c(u>0xffffffffff?u/0x10000000000:0),c(u>0xffffffff?u/0x100000000:0);for(var i=24;i>=0;i-=8)c(u>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var u=o("rect");return this.currentContext().appendChild(u),this.setAttributes(u,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},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:l="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],h=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:a=r}=t,l=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(l[d]))do t+=l[d++];while(o.test(l[d]));else if('"'===l[d]){let r=d;for(;d++<l.length;){if('"'===l[d]){d++,r=0;break}"\\"===l[d]&&d++,t+=l[d]}if(r)throw new u(`Unterminated quote at index ${r}`,e)}if(!t)throw new u(`Missing parameter name at index ${d}`,e);return t}for(;d<l.length;){let e=l[d],t=i[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:l[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:a(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new u(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var l,c;if(!s&&!i)throw new u(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${l=t,(c=s?"":i).length<2?l.length<2?`[^${a(l+c)}]`:`(?:(?!${a(l)})[^${a(c)}])`:l.length<2?`(?:(?!${a(c)})[^${a(l)}])`:`(?:(?!${a(c)}|${a(l)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,l,p,e.originalPath))}let m=`^(?:${h.join("|")})`;return f&&(m+=`(?:${a(l)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(l)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class u extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},2694(e,t,r){"use strict";var n=r(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){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 r={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:i,resetWarningCache:o};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338(e,t,r){"use strict";var n=r(539);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},9850(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(3207);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},466(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(6967);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},4470(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(1396).Subscriber)},6765(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(453),i=r(7795),a=r(1576);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},2515(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4487),o=r(5158),i=r(6676),a=r(8173),s=r(3344);function u(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=u(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=u(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},2544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3344),o=r(4163);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},5905(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(1396).Subscriber)},2173(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5677),s=r(3207),u=r(5495),l=r(6967),c=r(3601);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new l.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new u.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},3849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},2888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2515),a=r(1396),s=r(3207),u=r(6967),l=r(3601),c=r(4421),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var f=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new u.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new u.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new l.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(i.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(f);t.AnonymousSubject=p},3601(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(3207).Subscription)},1396(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3385),a=r(2544),s=r(3207),u=r(4421),l=r(3344),c=r(4163),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new f(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new f(i,r,n,o)}return i}return o(t,e),t.prototype[u.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var f=function(e){function t(t,r,n,o){var s,u=e.call(this)||this;u._parentSubscriber=t;var l=u;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(l=Object.create(r),i.isFunction(l.unsubscribe)&&u.add(l.unsubscribe.bind(l)),l.unsubscribe=u.unsubscribe.bind(u))),u._context=l,u._next=s,u._error=n,u._complete=o,u}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=l.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),l.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!l.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(l.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=f},3207(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(194),i=r(3385),a=r(1245);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,u=this._ctorUnsubscribe,l=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,f=c.length;++d<f;){var p=c[d];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},3344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},4398(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2515),s=r(7092);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},2871(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(2888),s=r(2515),u=r(1396),l=r(3207),c=r(6888),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new l.Subscription).add(this.source.subscribe(new f(this.getSubject(),this))),e.closed&&(this._connection=null,e=l.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new p(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(u.Subscriber)},8072(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2515),a=r(2745),s=r(5390);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},278(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(8244),a=r(4728),s=r(5905),u=r(7849),l=r(5853),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),l.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(u.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=f},5434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7795),o=r(6345);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},3180(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(4098),i=r(453);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},453(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},4098(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(7092),i=r(7315);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},5853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(499),i=r(8822);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},5776(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(8244),i=r(9287),a=r(5853);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,u=e[e.length-1];return(o.isScheduler(u)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof u&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},7795(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8244),o=r(5853),i=r(8822);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},3827(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4728),a=r(5853),s=r(5905),u=r(7849);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new l)};var l=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=l;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=u.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},1576(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},4529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(5190),i=r(5390),a=r(8244);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var u=-1;return i.isNumeric(t)?u=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:u,subscriber:t})})}},887(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5853),a=r(4728),s=r(1396),u=r(7211),l=r(4398);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):"function"==typeof e[u.iterator]?t.push(new f(e[u.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[u.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[u.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return l.innerSubscribe(this.observable,new l.SimpleInnerSubscriber(this))},t}(l.SimpleOuterSubscriber)},8461(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},2392(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(8461),i=r(4529);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},7954(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},647(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=u:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},6327(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(1396),s=r(8244);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new u(e,n,o,r))}};var u=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),l=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(p,r,{subscriber:a,context:s})),a.add(i.schedule(f,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new l;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function f(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(p,r,{subscriber:n,context:i})),this.schedule(e,t))}function p(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},6786(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3207),a=r(7849),s=r(5905);t.bufferToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},1662(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3207),a=r(4398);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},5503(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},4908(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(278);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},9060(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(278),i=r(4098);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},6600(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},6345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9287);t.concatAll=function(){return n.mergeAll(1)}},2248(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},3577(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2248);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},8765(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},3287(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},5685(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.dueTime,this.scheduler))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(l,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function l(e){e.debouncedNext()}},2767(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},6965(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(4465),s=r(1396),u=r(6765);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new l(r,t))}};var l=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(u.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(u.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},9861(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2515),s=r(5905),u=r(7849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new l(e))}:function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=u.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new f(e,this.source))},t}(a.Observable),f=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},7642(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},8820(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},1772(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},5075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1772);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},2399(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7568),o=r(2670),i=r(2056),a=r(2767),s=r(1231);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},2631(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434),o=r(7795);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},7233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},2408(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},1112(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new u(t))}};var u=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},7736(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},2670(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},1258(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(3207);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.callback))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},5063(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},2939(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5063);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},9948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1136),o=r(2670),i=r(1231),a=r(2767),s=r(2056),u=r(4579);t.first=function(e,t){var r=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,r){return e(t,r,l)}):u.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},7784(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(3207),s=r(2515),u=r(2888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new l(e,t,r,n))}};var l=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new u.Subject,n.set(t,o);var i=new f(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new f(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),f=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=f;var p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},6863(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},3371(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},7064(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1136),o=r(2670),i=r(3439),a=r(2056),s=r(2767),u=r(4579);t.last=function(e,t){var r=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,r){return e(t,r,l)}):u.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},6808(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},3353(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},2539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(6765);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},6416(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},1570(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5776);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},9287(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206),o=r(4579);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},5206(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);function u(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(u(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new l(e,r))})}t.mergeMap=u;var l=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=l;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=u},9019(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},2307(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},7198(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},4864(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2871);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},5495(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(6765);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var u=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new l(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=u;var l=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=l},5029(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4098),a=r(4728),s=r(4398);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new u(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new u(e))};var u=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.nextSources))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},7304(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},4236(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5352),o=r(2670);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},1075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6808);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},5485(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2888),o=r(4864);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},91(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(466),o=r(4864);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},3433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9850),o=r(4864);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},9622(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173),o=r(4864);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},6721(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(3827);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},2518(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(253),o=r(3439),i=r(2767),a=r(8173);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},6888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},6483(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(453);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.count,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},283(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.notifier,t))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},3160(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},5508(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.notifier,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},1754(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},1183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.period,this.scheduler))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(l,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function l(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},253(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},5017(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new u(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},3213(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4864),o=r(6888),i=r(2888);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},8614(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,u,l,c,d,f,p,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,l=void 0===(u=t.windowTime)?1/0:u,c=t.refCount,d=t.scheduler,f=0,p=!1,h=!1,function(e){var t;f++,!r||p?(p=!1,t=(r=new n.ReplaySubject(s,l,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){p=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){f--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===f&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},8480(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(1136);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},4775(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},2807(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new u(e,this._skipCount))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},2519(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},4846(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},4558(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434),o=r(8244);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},15(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8072);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},5433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912),o=r(4579);t.switchAll=function(){return n.switchMap(o.identity)}},7912(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new u(t))}};var u=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},7865(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},1231(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568),s=r(453);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new u(e))}};var u=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},3439(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568),s=r(453);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new u(e))}};var u=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},1279(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},6518(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},1451(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7653),s=r(3385);t.tap=function(e,t,r){return function(n){return n.lift(new u(e,t,r))}};var u=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.nextOrObserver,this.error,this.complete))},e}(),l=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},464(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190),s=r(464);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new u(e,t,r.leading,r.trailing))}};var u=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),l=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},2056(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1136),a=r(1396);t.throwIfEmpty=function(e){return void 0===e&&(e=l),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.errorFactory))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function l(){return new i.EmptyError}},5276(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(253),i=r(3180),a=r(6808);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},8673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(3734),i=r(4053),a=r(1576);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},4053(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(4465),s=r(4398);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new u(i,o,t,r))}};var u=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),l=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},8858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(6808);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},9903(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},7544(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new u(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),u=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},1565(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2888);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.windowSize,this.startWindowEvery))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var u=this.count-n+1;if(u>=0&&u%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var l=new a.Subject;o.push(l),r.next(l)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},3877(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5190),s=r(1396),u=r(5390),l=r(8244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return l.isScheduler(arguments[3])&&(t=arguments[3]),l.isScheduler(arguments[2])?t=arguments[2]:u.isNumeric(arguments[2])&&(n=Number(arguments[2])),l.isScheduler(arguments[1])?t=arguments[1]:u.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),f=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(p,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function p(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},5428(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(3207),s=r(5905),u=r(7849);t.windowToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=u.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var l=new i.Subject,c=new a.Subscription,d={window:l,subscription:c};this.contexts.push(d);var f=u.subscribeToResult(this,s,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,c.add(f)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},9284(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5905),s=r(7849);t.windowWhen=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},3564(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5905),a=r(7849);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.observables,this.project))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var u=r[s];o.add(a.subscribeToResult(o,u,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(887);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},3282(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(887);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},8822(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},229(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207),i=r(7211);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},2(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207),i=r(6676);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},7315(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1138),i=r(8822),a=r(229),s=r(6565),u=r(7328),l=r(1087),c=r(2555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(u.isPromise(e))return o.schedulePromise(e,t);else if(l.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},5666(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(3207).Subscription)},2883(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(772);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(1076).AsyncAction)},3728(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(4333).AsyncScheduler)},1076(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(5666).Action)},4333(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3849);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},6847(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(1076).AsyncAction)},5044(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(4333).AsyncScheduler)},2745(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2883);t.asapScheduler=new(r(3728)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},5190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1076);t.asyncScheduler=new(r(4333)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},5677(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6847);t.queueScheduler=new(r(5044)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},7211(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},6676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},4421(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},7568(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},1136(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},772(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},6967(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},3734(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},1245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},4487(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1396);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},4163(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},4579(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},4728(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},1087(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},4465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},3385(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},6565(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6676);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},2555(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7211);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},5390(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},194(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},7328(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},8244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},7653(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},5352(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},8173(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4579);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},7092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(499),o=r(5259),i=r(8190),a=r(1021),s=r(1087),u=r(7328),l=r(194),c=r(7211),d=r(6676);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(u.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(l.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},499(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},8190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7211);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},1021(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6676);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},5259(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4163);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},7849(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4470),o=r(7092),i=r(2515);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},5158(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1396),o=r(4421),i=r(2544);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},6170(e,t,r){"use strict";r(8461).audit,r(2392).auditTime,r(7954).buffer,r(647).bufferCount,r(6327).bufferTime,r(6786).bufferToggle,r(1662).bufferWhen,r(5503).catchError,r(4908).combineAll,r(9060).combineLatest,r(6600).concat,r(6345).concatAll,r(2248).concatMap,r(3577).concatMapTo,r(8765).count,r(3287).debounce,r(5685).debounceTime,r(2767).defaultIfEmpty,r(6965).delay,r(9861).delayWhen,r(7642).dematerialize,r(8820).distinct,r(1772).distinctUntilChanged,r(5075).distinctUntilKeyChanged,r(2399).elementAt,r(2631).endWith,r(7233).every,r(2408).exhaust,r(1112).exhaustMap,r(7736).expand,r(2670).filter,r(1258).finalize,r(5063).find,r(2939).findIndex,r(9948).first,r(7784).groupBy,r(6863).ignoreElements,r(3371).isEmpty,r(7064).last,t.map=r(6808).map,r(3353).mapTo,r(2539).materialize,r(6416).max,r(1570).merge,r(9287).mergeAll;var n=r(5206);n.mergeMap,n.flatMap,r(9019).mergeMapTo,r(2307).mergeScan,r(7198).min,r(4864).multicast,r(5495).observeOn,r(5029).onErrorResumeNext,r(7304).pairwise,r(4236).partition,r(1075).pluck,r(5485).publish,r(91).publishBehavior,r(3433).publishLast,r(9622).publishReplay,r(6721).race,r(2518).reduce,r(6483).repeat,r(283).repeatWhen,r(3160).retry,r(5508).retryWhen,r(6888).refCount,r(1754).sample,r(1183).sampleTime,r(253).scan,r(5017).sequenceEqual,r(3213).share,r(8614).shareReplay,r(8480).single,r(4775).skip,r(2807).skipLast,r(2519).skipUntil,r(4846).skipWhile,r(4558).startWith,r(15).subscribeOn,r(5433).switchAll,r(7912).switchMap,r(7865).switchMapTo,t.take=r(1231).take,r(3439).takeLast,r(1279).takeUntil,r(6518).takeWhile,r(1451).tap,r(464).throttle,r(7661).throttleTime,r(2056).throwIfEmpty,r(5276).timeInterval,r(8673).timeout,r(4053).timeoutWith,r(8858).timestamp,r(9903).toArray,r(7544).window,r(1565).windowCount,r(3877).windowTime,r(5428).windowToggle,r(9284).windowWhen,r(3564).withLatestFrom,r(909).zip,r(3282).zipAll},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;l("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))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=i(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("=")||u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let i=r(968),{safeRe:a,t:s}=r(9718),u=r(2111),l=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(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(n," "),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=>!g(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&&b(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&&m)|(this.options.loose&&y))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];u("hyphen replace",e=e.replace(o,j(this.options.includePrerelease))),u("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),u("tilde trim",e=e.replace(c[d.TILDETRIM],p)),u("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));n&&(a=a.filter(e=>(u("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),u("range list",a);let l=new Map;for(let e of a.map(e=>new s(e,this.options))){if(g(e))return[e];l.set(e.value,e)}l.size>1&&l.has("")&&l.delete("");let b=[...l.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8794)),a=r(968),s=r(3904),u=r(7272),l=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(9718),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(6874),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(u("comp",e=e.replace(c[d.BUILD],""),t),u("caret",e=O(e,t)),u("tildes",e=E(e,t)),u("xrange",e=P(e,t)),u("stars",e=C(e,t)),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return u("tilde",e,t,r,n,o,i),x(r)?a="":x(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:x(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(u("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,u("tilde return",a),a})},O=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{u("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return u("caret",e,t,r,o,i,a),x(r)?s="":x(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:x(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(u("replaceCaret pr",a),s="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(u("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),u("caret return",s),s})},P=(e,t)=>(u("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,i,a,s)=>{u("xRange",e,r,n,o,i,a,s);let l=x(o),c=l||x(i),d=c||x(a);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(i=0),a=0,">"===n?(n=">=",c?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",c?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),u("xRange return",r),r})},C=(e,t)=>(u("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),T=(e,t)=>(u("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),j=e=>(t,r,n,o,i,a,s,u,l,c,d,f)=>(r=x(n)?"":x(o)?`>=${n}.0.0${e?"-0":""}`:x(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,u=x(l)?"":x(c)?`<${+l+1}.0.0-0`:x(d)?`<${l}.${+c+1}.0-0`:f?`<=${l}.${c}.${d}-${f}`:e?`<${l}.${c}.${+d+1}-0`:`<=${u}`,`${r} ${u}`.trim()),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(u(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(6874),{safeRe:a,t:s}=r(9718),u=r(968),{compareIdentifiers:l}=r(1123);class c{constructor(e,t){if(t=u(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>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=r[5]?r[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(n("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 r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return l(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return l(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[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,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);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(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}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},7414(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),i=r(5580),a=r(4089),s=r(7059),u=r(5200);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return i(e,r,l);case">=":return a(e,r,l);case"<":return s(e,r,l);case"<=":return u(e,r,l);default:throw TypeError(`Invalid operator: ${t}`)}}},3789(e,t,r){"use strict";let n=r(3908),o=r(144),{safeRe:i,t:a}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,o=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];for(;(n=o.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),o.lastIndex=n.index+n[1].length+n[2].length;o.lastIndex=-1}else r=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);if(null===r)return null;let s=r[2],u=r[3]||"0",l=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${u}.${l}${c}${d}`,t)}},3290(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>{let o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},1763(e,t,r){"use strict";let n=r(560);e.exports=(e,t)=>n(e,t,!0)},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;let a=i>0,s=a?r:o,u=a?o:r,l=!!s.prerelease.length;if(u.prerelease.length&&!l){if(!u.patch&&!u.minor)return"major";if(0===u.compareMain(s))return u.minor&&!u.patch?"minor":"patch"}let c=l?"pre":"";return r.major!==o.major?c+"major":r.minor!==o.minor?c+"minor":r.patch!==o.patch?c+"patch":"prerelease"}},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},2938(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277(e,t,r){"use strict";let n=r(3290);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927(e,t,r){"use strict";let n=r(3290);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},6953(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},9589(e,t,r){"use strict";let n=r(9718),o=r(6874),i=r(3908),a=r(1123),s=r(144),u=r(6953),l=r(7414),c=r(3007),d=r(1832),f=r(2938),p=r(6254),h=r(4493),m=r(1729),y=r(560),g=r(9970),b=r(1763),v=r(3290),w=r(3927),x=r(4277),E=r(5580),S=r(7059),O=r(4641),D=r(3999),P=r(4089),k=r(5200),C=r(2111),T=r(3789),j=r(3904),R=r(8311),N=r(7638),A=r(7631),M=r(9628),I=r(270),$=r(1261),L=r(3874),F=r(7075),B=r(5571),V=r(5342),U=r(6780);e.exports={parse:s,valid:u,clean:l,inc:c,diff:d,major:f,minor:p,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:O,neq:D,gte:P,lte:k,cmp:C,coerce:T,Comparator:j,Range:R,satisfies:N,toComparators:A,maxSatisfying:M,minSatisfying:I,minVersion:$,validRange:L,outside:F,gtr:B,ltr:V,intersects:U,simplifyRange:r(2525),subset:r(5032),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},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]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(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}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(6874),a=r(7272),s=(t=e.exports={}).re=[],u=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[p,o]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;a(e,o,t),d[e]=o,l[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),u[o]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),m("FULL",`^${l[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),m("LOOSE",`^${l[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),m("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?`+`(?:${l[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",l[d.COERCE],!0),m("COERCERTLFULL",l[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5571(e,t,r){"use strict";let n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342(e,t,r){"use strict";let n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628(e,t,r){"use strict";let n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||-1===a.compare(e))&&(a=new n(i=e,r))}),i}},270(e,t,r){"use strict";let n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||1===a.compare(e))&&(a=new n(i=e,r))}),i}},1261(e,t,r){"use strict";let n=r(3908),o=r(8311),i=r(5580);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let o=e.set[t],a=null;o.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||i(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||i(r,a))&&(r=a)}return r&&e.test(r)?r:null}},7075(e,t,r){"use strict";let n=r(3908),o=r(3904),{ANY:i}=o,a=r(8311),s=r(7638),u=r(5580),l=r(7059),c=r(5200),d=r(4089);e.exports=(e,t,r,f)=>{let p,h,m,y,g;switch(e=new n(e,f),t=new a(t,f),r){case">":p=u,h=c,m=l,y=">",g=">=";break;case"<":p=l,h=d,m=u,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,p(e.semver,a.semver,f)?a=e:m(e.semver,s.semver,f)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0}},2525(e,t,r){"use strict";let n=r(7638),o=r(560);e.exports=(e,t,r)=>{let i=[],a=null,s=null,u=e.sort((e,t)=>o(e,t,r));for(let e of u)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let l=[];for(let[e,t]of i)e===t?l.push(e):t||e!==u[0]?t?e===u[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");let c=l.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},5032(e,t,r){"use strict";let n=r(8311),o=r(3904),{ANY:i}=o,a=r(7638),s=r(560),u=[new o(">=0.0.0-0")],l=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,p,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===i)if(1===t.length&&t[0].semver===i)return!0;else e=r.includePrerelease?u:l;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=l;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=f(o,t,r):g.add(t.semver);if(g.size>1)return null;if(n&&o&&((c=s(n.semver,o.semver,r))>0||0===c&&(">="!==n.operator||"<="!==o.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||o&&!a(e,String(o),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===o.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((p=d(n,e,r))===e&&p!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(o){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=f(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!a(o.semver,String(e),r))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!b&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7631(e,t,r){"use strict";let n=r(8311);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},3874(e,t,r){"use strict";let n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},8414(e,t,r){"use strict";let n;r.d(t,{A:()=>s});let o="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s=function(e,t,r){if(o&&!t&&!e)return o();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(s)}},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},8961(e,t,r){"use strict";let n,o,i,a,s,u,l,c,d,f,p,h;r.r(t),r.d(t,{GenderUnknownIcon:()=>hj,evaluateAsNumber:()=>l8,getImportMapOverrideMap:()=>oK,StockManagementPictogram:()=>OH,ChemistryIcon:()=>hp,BabyIcon:()=>hr,DashboardExtension:()=>mj,openmrsComponentDecorator:()=>fg,tryRegisterExtension:()=>pR,pictogramIds:()=>Ov,ActivityIcon:()=>p5,compile:()=>ct,removeRouteMapOverride:()=>ip,checkStatus:()=>ck,TableBatchActions:()=>pY,getAsyncLifecycle:()=>fv,subscribeOpenmrsEvent:()=>lC,dispatchConnectivityChanged:()=>y,PasswordIcon:()=>h1,Assessment2Pictogram:()=>OE,CloseIcon:()=>hb,setupRouteMapOverrides:()=>iy,getWorkspaceGroupRegistration:()=>dO,registerWorkspace:()=>d_,useFeatureFlag:()=>fJ,reset:()=>df,LabOrderIcon:()=>hV,VisitMode:()=>lV,offlineUuidPrefix:()=>la,useLocations:()=>ps,getLifecycle:()=>fb,formatDatetime:()=>E$,getVisitsForPatient:()=>lY,subscribeConnectivity:()=>b,formatPartialDate:()=>EN,CustomOverflowMenu:()=>p2,LocationIcon:()=>hW,GroupIcon:()=>hN,canBeginEditSynchronizationItemsOfType:()=>lt,VisitStatus:()=>lU,createUseStore:()=>dJ,getCurrentImportMap:()=>o3,getSessionLocation:()=>nD,usePatient:()=>ph,useRenderableExtensions:()=>py,getOpenedWindowIndexByWorkspace:()=>dC,checkStatusFor:()=>cC,clearHistory:()=>na,clearConfigErrors:()=>tw,formatTime:()=>EI,isDevEnabled:()=>nT,setLeftNav:()=>dh,syncOfflinePatientData:()=>lS,closeWorkspaceGroup2:()=>DK,getCurrentRouteMap:()=>is,ConfigurableLink:()=>dH,sessionStore:()=>ng,subscribeSnackbarShown:()=>A,getDynamicOfflineDataEntriesFor:()=>lp,getLoggedInUser:()=>nO,GenderMaleIcon:()=>hC,getExtensionSlotConfigFromStore:()=>eI,evaluateAsNumberAsync:()=>l9,putDynamicOfflineDataFor:()=>lm,getImportMapDefaultMap:()=>oW,unregisterExtensionRendering:()=>cB,implementerToolsConfigStore:()=>eZ,Type:()=>ex,InPatientPictogram:()=>ON,cleanupObsoleteFeatureFlags:()=>cE,showSnackbar:()=>O4,PatientBannerActionsMenu:()=>Of,PatientSearchPictogram:()=>O$,DocumentAttachmentIcon:()=>hx,Snackbar:()=>OQ,CardiologyPictogram:()=>OO,ImageMedicalIcon:()=>hI,ActionableNotificationComponent:()=>SV,DiagnosisTags:()=>Sb,iconIds:()=>p6,PatientsPictogram:()=>OL,interpolateUrl:()=>r9,setupHistory:()=>nn,subscribeToastShown:()=>N,detachAll:()=>ds,convertToLocaleCalendar:()=>EL,DocumentIcon:()=>h_,configInternalStore:()=>eT,ActionMenuButton2:()=>D8,setupDynamicOfflineDataHandler:()=>ld,makeUrl:()=>np,oneOf:()=>tP,selectPreferredName:()=>Oe,launchWorkspaceGroup:()=>function e(t,r){let n=dO(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,u=function(){return Dh}();if(u.getState().openWorkspaces.length){let n=u.getState().workspaceGroup;n?Dr(n?.name,()=>{e(t,r)}):Db(()=>{e(t,r)})}else u.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),DE(t,o),i?.(),s&&Do(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>lv,MobileCheckIcon:()=>hY,createErrorHandler:()=>I,openmrsObservableFetch:()=>nm,parseDate:()=>EP,getAttachmentByUuid:()=>ib,LeftNavMenu:()=>SS,getExtensionRegistration:()=>dr,ShoppingCartAddItemIcon:()=>mk,ReferralOrderIcon:()=>h8,ReportIcon:()=>h7,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>oH,registerExtension:()=>dn,setupOfflineSync:()=>lo,DownloadIcon:()=>hE,useConnectivity:()=>fU,provide:()=>e7,getSynchronizationItemsFor:()=>u5,ShoppingCartArrowDownIcon:()=>ma,featureFlagsStore:()=>c_,promptBeforeClosing:()=>Ds,removeDynamicOfflineDataFor:()=>lg,jsep:()=>lX,GeriatricsPictogram:()=>Oj,SearchIcon:()=>mr,reportError:()=>M,slugify:()=>o0,isOmrsDateToday:()=>ES,getExtensionStore:()=>cV,BloodBankPictogram:()=>OS,TriagePictogram:()=>Oz,Workspace2:()=>D1,refetchCurrentUser:()=>nx,CheckmarkOutlineIcon:()=>hf,registerExtensionSlot:()=>dd,AllergiesIcon:()=>mS,ArrowDownIcon:()=>p9,useOpenmrsInfinite:()=>f5,getExtensionConfigFromExtensionSlotStore:()=>eB,OpenmrsDatePicker:()=>Sy,getExtensionConfigFromStore:()=>eF,getDynamicOfflineDataEntries:()=>lf,getLocaleDisplayName:()=>x0,messageOmrsServiceWorker:()=>iL,navigate:()=>ne,launchWorkspace2:()=>Dz,getGroupByWindowName:()=>dk,CustomOverflowMenuItem:()=>p3,isUrl:()=>tD,CaretDownIcon:()=>hi,ArrowLeftIcon:()=>p7,FacilityPictogram:()=>OT,ViewOffIcon:()=>m_,setCurrentOfflineMode:()=>iz,updateInternalExtensionStore:()=>cA,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>ih,formatDurationBetween:()=>Ez,defaultVisitCustomRepresentation:()=>lW,getBreadcrumbsFor:()=>tI,useOpenmrsPagination:()=>fQ,Pagination:()=>S6,CheckmarkFilledIcon:()=>hd,clearCurrentUser:()=>nE,showModal:()=>SL,ChevronUpIcon:()=>hg,saveVisit:()=>lG,useAttachments:()=>fI,Pictogram:()=>OJ,useExtensionSlot:()=>d3,ChevronDownIcon:()=>hh,OpenmrsDateRangePicker:()=>Sg,deleteAttachmentPermanently:()=>i_,getVisitTypes:()=>lA,OverflowMenuHorizontalIcon:()=>hQ,EventScheduleIcon:()=>hD,getSessionStore:()=>nw,ActionMenu:()=>DV,ProcedureOrderIcon:()=>h6,preloadImport:()=>o2,registerWorkspaceWindows2:()=>dj,useOnVisible:()=>pl,setSessionLocation:()=>nP,userHasAccess:()=>nS,ChartAverageIcon:()=>hl,getFeatureFlag:()=>cS,UserAvatarIcon:()=>mg,renderExtension:()=>dB,useFhirInfinite:()=>pt,toVisitTypeObject:()=>lN,useSession:()=>pg,EmergencyDepartmentPictogram:()=>OC,Notification:()=>SF,dispatchSnackbarShown:()=>C,getSynchronizationItem:()=>le,navigateAndLaunchWorkspace:()=>Di,omrsOfflineCachingStrategyHttpHeaderName:()=>i$,formatDate:()=>EA,workspace2StoreActions:()=>DY,SwitcherIcon:()=>mo,esmStyleGuideSchema:()=>pz,getImportMapDisabledOverrides:()=>oz,useAssignedExtensionIds:()=>fA,CaretRightIcon:()=>hs,evaluateAsType:()=>l7,PageHeader:()=>S3,TranslateIcon:()=>mp,setUserProperties:()=>nk,MovementIcon:()=>hX,renderInlineNotifications:()=>Sq,subscribePrecacheStaticDependencies:()=>x,PaymentsDeskPictogram:()=>OF,usePrimaryIdentifierCode:()=>pm,dispatchPrecacheStaticDependencies:()=>w,getCurrentUser:()=>nv,useLayoutType:()=>pn,XrayPictogram:()=>OG,CaretUpIcon:()=>hu,renderActionableNotifications:()=>SZ,OpenmrsAppContext:()=>fC,setupModals:()=>S$,omrsOfflineResponseBodyHttpHeaderName:()=>iM,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Pm(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Pm(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>J,recordConfigDerivationError:()=>eq,useAbortController:()=>fj,Extension:()=>dK,getFhirServerPaginationHandlers:()=>f3,useConnectedExtensions:()=>fV,registerApp:()=>pA,queueSynchronizationItemFor:()=>u4,HospitalBedIcon:()=>hM,useExtensionInternalStore:()=>fq,configExtensionStore:()=>eR,getSynchronizationItems:()=>u9,getExtensionSlotsConfigStore:()=>eA,registerExtensionRendering:()=>cF,RenderIfValueIsTruthy:()=>fT,registerFeatureFlag:()=>cx,useFhirFetchAll:()=>pe,restBaseUrl:()=>nc,CalendarHeatMapIcon:()=>hn,getWorkspaceRegistration:()=>dS,isImportMapOverrideDisabled:()=>oG,resetConfigSystem:()=>t_,getFullSynchronizationItems:()=>u7,getExtensionInternalStore:()=>cR,registerGlobalStore:()=>Y,runSynchronization:()=>u1,evaluateAsBoolean:()=>l6,PatientBannerPatientInfo:()=>Oc,addRouteMapOverride:()=>id,getDefaultCalendar:()=>Ej,SettingsIcon:()=>mn,DrugOrderIcon:()=>hS,isOnline:()=>cP,ProgramsIcon:()=>h5,useAssignedExtensions:()=>d2,CloseFilledIcon:()=>hv,canAccessStorage:()=>Ph,registerDefaultCalendar:()=>ET,TreeViewAltIcon:()=>mm,OverflowMenuVerticalIcon:()=>h0,clearConfigDerivationError:()=>eY,getConfigStore:()=>eN,registerWorkspaceGroup:()=>dx,InformationSquareIcon:()=>hF,EmptyCard:()=>S_,ChevronLeftIcon:()=>hm,RadiologyIcon:()=>mP,useCandidateExtensions:()=>fM,renderToasts:()=>O7,isDesktop:()=>po,integrateBreakpoints:()=>pF,RegistrationPictogram:()=>OU,CardHeader:()=>pW,getExtensionRegistrationFrom:()=>dt,InformationIcon:()=>h$,TrashCanIcon:()=>mh,useShallowStableValue:()=>dz,useOpenmrsSWR:()=>pc,Assessment1Pictogram:()=>Ox,finishRegisteringAllApps:()=>pM,importDynamic:()=>o1,useFhirPagination:()=>f2,useVisitContextStore:()=>pO,ArrowUpIcon:()=>ht,showActionableNotification:()=>SJ,getDynamicOfflineDataHandlers:()=>lc,useForceUpdate:()=>fX,updateWorkspaceWindowState:()=>Dy,useVisit:()=>pD,PatientBannerPatientIdentifiers:()=>Oa,WorkspaceNotification:()=>Dj,TransferPictogram:()=>OK,usePagination:()=>pd,Breakpoint:()=>pI,PatientBannerToggleContactDetailsButton:()=>D9,CloseOutlineIcon:()=>hw,ObstetricsPictogram:()=>OI,parseDateInput:()=>EB,getConfig:()=>tt,attach:()=>di,getLocale:()=>x1,ActionMenuButton:()=>Dk,isUrlWithTemplateParameters:()=>tO,useEmrConfiguration:()=>fG,useLeftNav:()=>pi,ToolsIcon:()=>mf,ErrorState:()=>Sx,detach:()=>da,setCurrentVisit:()=>lz,registerOmrsServiceWorker:()=>iN,ConditionsIcon:()=>mD,SaveIcon:()=>mt,activateOfflineCapability:()=>iG,useWorkspaces:()=>Dv,resetWorkspaceStore:()=>Dx,useConfig:()=>fB,validator:()=>eE,CalendarIcon:()=>ho,getHistory:()=>no,StickyNoteAddIcon:()=>ms,useWorkspace2Store:()=>DZ,getPatientName:()=>S5,getVisitStore:()=>lK,getCoreTranslation:()=>oj,registerModuleWithConfigSystem:()=>e6,isOfflineUuid:()=>lu,registerModuleLoad:()=>e5,getBreadcrumbs:()=>tN,extractVariableNames:()=>cb,getOfflineSynchronizationStore:()=>u0,translateFrom:()=>oT,EditIcon:()=>hO,useStoreWithActions:()=>dZ,getCandidateExtensions:()=>dc,putDynamicOfflineData:()=>lh,shallowEqual:()=>L,subscribeNotificationShown:()=>j,MaximizeIcon:()=>hK,promptForClosingWorkspaces:()=>Dq,WarningIcon:()=>mE,closeAllWorkspaces:()=>Db,fhirBaseUrl:()=>nd,matchLocale:()=>Pp,registerBreadcrumb:()=>tj,usePatientPhoto:()=>Om,EventsIcon:()=>hP,createGlobalStore:()=>q,workspaceStore:()=>Dh,getCurrentOfflineMode:()=>iK,subscribeToFeatureFlag:()=>cO,useExtensionStore:()=>fZ,closeWorkspace:()=>Dd,createAttachment:()=>iw,useLeftNavStore:()=>pa,TableIcon:()=>mc,Icon:()=>mT,InformationFilledIcon:()=>hL,getCurrentPageMap:()=>oU,LaboratoryPictogram:()=>OA,temporaryConfigStore:()=>ej,getPromptBeforeClosingFcn:()=>Du,toDateObjectStrict:()=>EO,defineConfigSchema:()=>e4,filterBreadcrumbs:()=>tM,invalidateImplementerToolsConfig:()=>ez,PatientBannerContactDetails:()=>Po,getAssignedExtensions:()=>dl,PatientPhoto:()=>Ob,MaterialOrderIcon:()=>hH,MicroscopeIcon:()=>hq,scheduleRecomputation:()=>cz,PharmacyPictogram:()=>OB,AttachmentIcon:()=>mO,MoneyIcon:()=>hZ,getAttachments:()=>iv,getFullSynchronizationItemsFor:()=>u8,PageHeaderContent:()=>S4,MedicationIcon:()=>hz,PrinterIcon:()=>h4,getWorkspaceGroupStore:()=>DE,PatientListsPictogram:()=>OY,useAppContext:()=>fR,isOpenmrsRoutes:()=>o5,AppointmentsAltPictogram:()=>O_,GenericOrderTypeIcon:()=>hR,batchExtensionUpdates:()=>cH,useExtensionSlotStore:()=>d0,ViewIcon:()=>mx,formattedName:()=>S7,sessionEndpoint:()=>nf,duration:()=>EH,resetImportMapOverrides:()=>oZ,TableOfContentsIcon:()=>ml,CaretLeftIcon:()=>ha,getTranslationOverrides:()=>tr,isVersionSatisfied:()=>Pb,EmptyCardIllustration:()=>Sw,PenIcon:()=>h3,getWorkspaceStore:()=>Dm,registerOfflinePatientHandler:()=>lE,setupImportMapOverrides:()=>oQ,showToast:()=>De,useDefineAppContext:()=>fk,validators:()=>tk,getGlobalStore:()=>Z,useOnClickOutside:()=>pu,getWindowByWorkspaceName:()=>dP,ArrowRightIcon:()=>he,loadLifeCycles:()=>pC,registerBreadcrumbs:()=>tR,MotherIcon:()=>hJ,fetchCurrentPatient:()=>lD,Toast:()=>O6,MessageQueueIcon:()=>hG,TwoFactorAuthenticationIcon:()=>my,Pharmacy2Pictogram:()=>OV,goBackInHistory:()=>ni,GroupAccessIcon:()=>hA,getExtensionRenderingsStore:()=>cN,setImplementerToolsConfigRecomputer:()=>eK,getAsyncExtensionLifecycle:()=>f_,setupApiModule:()=>nR,renderLoadingSpinner:()=>Pi,WorkspaceContainer:()=>DU,showNotification:()=>SY,queueSynchronizationItem:()=>u6,getModalRegistration:()=>db,ListCheckedIcon:()=>hU,ResponsiveWrapper:()=>OX,GynaecologyPictogram:()=>OR,ShoppingCartIcon:()=>mi,getRouteMapNextPageMap:()=>il,updateVisit:()=>lq,backendDependencies:()=>nj,MaybePictogram:()=>OZ,beginEditSynchronizationItem:()=>lr,createParcelMounter:()=>dL,getStartedVisit:()=>lZ,omrsOfflineResponseStatusHttpHeaderName:()=>iI,isOpenmrsAppRoutes:()=>o6,openmrsFetch:()=>nh,HomePictogram:()=>Oq,DentistryPictogram:()=>OP,ServiceQueuesPictogram:()=>OW,toLanguageTag:()=>xQ,launchWorkspace:()=>Do,setFeatureFlag:()=>cD,useStore:()=>dY,DigitalTrustPictogram:()=>Ok,NumericObservation:()=>S1,attachmentUrl:()=>ig,interpolateString:()=>r7,inRange:()=>tS,useExtensionSlotMeta:()=>fY,AppointmentsPictogram:()=>Ow,renderSnackbars:()=>O3,getRegisteredWorkspace2Names:()=>DX,toLocationObject:()=>lj,ChartLineIcon:()=>hc,UserHasAccess:()=>pb,evaluateAsBooleanAsync:()=>l5,changeWorkspaceContext:()=>Df,createDashboard:()=>mR,getLocations:()=>lR,getOfflineDb:()=>uZ,canCloseWorkspaceWithoutPrompting:()=>Dt,getExtensionsConfigStore:()=>e$,getRouteMapDefaultMap:()=>iu,age:()=>Or,syncAllDynamicOfflineData:()=>lb,isOmrsDateStrict:()=>EE,registerWorkspaceGroups2:()=>dT,usePaginationInfo:()=>pf,evaluateAsync:()=>l4,useOpenmrsFetchAll:()=>f9,removeImportMapOverride:()=>oY,showWorkspacePrompts:()=>Dw,useVisitTypes:()=>pP,ageAsDuration:()=>Ot,removeDynamicOfflineData:()=>ly,getExtensionNameFromId:()=>de,deleteSynchronizationItem:()=>ln,renderParcel:()=>d$,useWorkspace2Context:()=>DJ,ResetIcon:()=>me,RenewIcon:()=>h9,subscribeActionableNotificationShown:()=>R,ErrorCard:()=>SE,GenderFemaleIcon:()=>hk,enableImportMapOverride:()=>oJ,getOfflinePatientDataStore:()=>lx,retry:()=>Pv,ComponentContext:()=>dW,ExtensionSlot:()=>d6,getOmrsServiceWorker:()=>iA,addImportMapOverride:()=>oq,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>dm,MaybeIcon:()=>mC,useCustomOverflowMenu:()=>p1,PedestrianFamilyIcon:()=>h2,generateOfflineUuid:()=>ls,cancelPrompt:()=>Dl,CtScanPictogram:()=>OD,dispatchNotificationShown:()=>P,leftNavStore:()=>dp,OpenmrsFetchError:()=>ny,UserFollowIcon:()=>mb,launchWorkspaceGroup2:()=>DH,ChevronRightIcon:()=>hy,UserXrayIcon:()=>mv,GenderOtherIcon:()=>hT,formatDuration:()=>EF,toOmrsIsoString:()=>ED,Labs2Pictogram:()=>OM,workspace2Store:()=>dD,setUserLanguage:()=>n_,useBodyScrollLock:()=>f$,getExtensionConfig:()=>eL,SyringeIcon:()=>mu,LocationPicker:()=>SO,useDebounce:()=>fW,TimeIcon:()=>md,getExtensionSlotConfig:()=>eM,AddIcon:()=>p8,getRouteMapOverrideMap:()=>ic,processConfig:()=>tn,InventoryManagementIcon:()=>hB,registerWorkspaces2:()=>dR,UserIcon:()=>mw,formatPatientName:()=>S9,fireOpenmrsEvent:()=>lk,registerModal:()=>dg,registerTranslationNamespace:()=>e8,displayName:()=>S8,evaluate:()=>l3,defineExtensionConfigSchema:()=>e9,renderWorkspaceWindowsAndMenu:()=>Pd,getSyncLifecycle:()=>fw,evaluateAsTypeAsync:()=>ce});let m="openmrs:connectivity-changed";function y(e){window.dispatchEvent(new CustomEvent(m,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e={}){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let E="openmrs:notification-shown",S="openmrs:actionable-notification-shown",O="openmrs:toast-shown",D="openmrs:snack-bar-shown";function P(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function j(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function M(e){let t=$(e);setTimeout(()=>{throw t})}function I(){let e=Error();return t=>{let r=$(t);r.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["2657"],{1154(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,o;n=t,o=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{A:()=>p});var a=["width","height","viewBox"],s=["tabindex"],u={focusable:"false",preserveAspectRatio:"xMidYMid meet"},l=r(5556),c=r.n(l),d=r(7979),f=r.n(d);let p=f().forwardRef(function({className:e,children:t,tabIndex:r,xmlns:n="http://www.w3.org/2000/svg",preserveAspectRatio:l="xMidYMid meet",...c},d){let{tabindex:p,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=e.height,n=e.viewBox,l=void 0===n?"0 0 ".concat(t," ").concat(r):n,c=i(e,a),d=c.tabindex,f=i(c,s),p=o(o(o({},u),f),{},{width:t,height:r,viewBox:l});return p["aria-label"]||p["aria-labelledby"]||p.title?(p.role="img",null!=d&&(p.focusable="true",p.tabindex=d)):p["aria-hidden"]=!0,p}({...c,tabindex:r});return e&&(h.className=e),null!=p&&("number"==typeof p?h.tabIndex=p:h.tabIndex=Number(r)),d&&(h.ref=d),n&&(h.xmlns=n),l&&(h.preserveAspectRatio=l),f().createElement("svg",h,t)});p.displayName="Icon",p.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",r="minute",n="hour",o="week",i="month",a="quarter",s="year",u="date",l="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,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",h={};h[p]={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"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var m="$isDayjsObject",y=function(e){return e instanceof w||!(!e||!e[m])},g=function e(t,r,n){var o;if(!t)return p;if("string"==typeof t){var i=t.toLowerCase();h[i]&&(o=i),r&&(h[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;h[s]=t,o=s}return!n&&o&&(p=o),o||!n&&p},b=function(e,t){if(y(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new w(r)},v={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(r/60),2,"0")+":"+f(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,i),a=r-o<0,s=t.clone().add(n+(a?-1:1),i);return+(-(n+(r-o)/(a?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(l){return({M:i,y:s,w:o,d:"day",D:u,h:n,m:r,s:t,ms:e,Q:a})[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};v.l=g,v.i=y,v.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function f(e){this.$L=g(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var p=f.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(v.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(c);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},p.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()},p.$utils=function(){return v},p.isValid=function(){return this.$d.toString()!==l},p.isSame=function(e,t){var r=b(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return b(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<b(e)},p.$g=function(e,t,r){return v.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,a){var l=this,c=!!v.u(a)||a,d=v.p(e),f=function(e,t){var r=v.w(l.$u?Date.UTC(l.$y,t,e):new Date(l.$y,t,e),l);return c?r:r.endOf("day")},p=function(e,t){return v.w(l.toDate()[e].apply(l.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),l)},h=this.$W,m=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case s:return c?f(1,0):f(31,11);case i:return c?f(1,m):f(0,m+1);case o:var b=this.$locale().weekStart||0,w=(h<b?h+7:h)-b;return f(c?y-w:y+(6-w),m);case"day":case u:return p(g+"Hours",0);case n:return p(g+"Minutes",1);case r:return p(g+"Seconds",2);case t:return p(g+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(o,a){var l,c=v.p(o),d="set"+(this.$u?"UTC":""),f=((l={}).day=d+"Date",l[u]=d+"Date",l[i]=d+"Month",l[s]=d+"FullYear",l[n]=d+"Hours",l[r]=d+"Minutes",l[t]=d+"Seconds",l[e]=d+"Milliseconds",l)[c],p="day"===c?this.$D+(a-this.$W):a;if(c===i||c===s){var h=this.clone().set(u,1);h.$d[f](p),h.init(),this.$d=h.set(u,Math.min(this.$D,h.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[v.p(e)]()},p.add=function(e,a){var u,l=this;e=Number(e);var c=v.p(a),d=function(t){var r=b(l);return v.w(r.date(r.date()+Math.round(t*e)),l)};if(c===i)return this.set(i,this.$M+e);if(c===s)return this.set(s,this.$y+e);if("day"===c)return d(1);if(c===o)return d(7);var f=((u={})[r]=6e4,u[n]=36e5,u[t]=1e3,u)[c]||1,p=this.$d.getTime()+e*f;return v.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=v.z(this),i=this.$H,a=this.$m,s=this.$M,u=r.weekdays,c=r.months,f=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},h=function(e){return v.s(i%12||12,e,"0")},m=f||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(d,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return v.s(t.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return p(r.monthsShort,s,c,3);case"MMMM":return p(c,s);case"D":return t.$D;case"DD":return v.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,u,2);case"ddd":return p(r.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(i);case"HH":return v.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return v.s(a,2,"0");case"s":return String(t.$s);case"ss":return v.s(t.$s,2,"0");case"SSS":return v.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,u,l){var c,d=this,f=v.p(u),p=b(e),h=(p.utcOffset()-this.utcOffset())*6e4,m=this-p,y=function(){return v.m(d,p)};switch(f){case s:c=y()/12;break;case i:c=y();break;case a:c=y()/3;break;case o:c=(m-h)/6048e5;break;case"day":c=(m-h)/864e5;break;case n:c=m/36e5;break;case r:c=m/6e4;break;case t:c=m/1e3;break;default:c=m}return l?c:v.a(c)},p.daysInMonth=function(){return this.endOf(i).$D},p.$locale=function(){return h[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=g(e,t,!0);return n&&(r.$L=n),r},p.clone=function(){return v.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},f}(),x=w.prototype;return b.prototype=x,[["$ms",e],["$s",t],["$m",r],["$H",n],["$W","day"],["$M",i],["$y",s],["$D",u]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,w,b),e.$i=!0),b},b.locale=g,b.isDayjs=y,b.unix=function(e){return b(1e3*e)},b.en=h[p],b.Ls=h,b.p={},b}()},7581(e){e.exports=function(e,t,r){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=r();return this.format(e)===t.format(e)}}},5238(e){e.exports=function(e,t,r){var n=t.prototype,o=function(e){var t=e.date,o=e.utc,i={};if(!(null===t||t instanceof Date||t instanceof Array||n.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var a=o?r.utc():r();Object.keys(t).forEach(function(e){var r;i["date"===(r=n.$utils().p(e))?"day":r]=t[e]});var s=i.day||(i.year||i.month>=0?1:a.date()),u=i.year||a.year(),l=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,f=i.second||0,p=i.millisecond||0;return o?new Date(Date.UTC(u,l,s,c,d,f,p)):new Date(u,l,s,c,d,f,p)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,u=n.subtract,l=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?l.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?l.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?l.bind(this)(s,e,t,-1):u.bind(this)(e,t)}}},1445(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n,s=this;if(o)return s.$offset=a,s.$u=0===n,s;if(0!==n){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),o=i(e).local();return f.call(n,o,t,r)}}}()},2849(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(e){if(!e||"[object Object]"!==r.call(e)||e.nodeType||e.setInterval)return!1;var n,o=t.call(e,"constructor"),i=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)}e.exports=function e(){var t,r,o,i,a,s,u=arguments[0]||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=arguments[1]||{},l=2),"object"!=typeof u&&"function"!=typeof u&&(u={});l<c;l++)if(null!=(t=arguments[l]))for(r in t)o=u[r],u!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},u[r]=e(d,s,i)):void 0!==i&&(u[r]=i));return u}},6767(e,t,r){!function(t){"use strict";var n=r(6974);function o(e){return function(t,r){return"object"==typeof t&&(r=t,t=null),null==t&&(t=new Date().toString()),r||(r={}),e.call(this,t,r)}}var i=e.exports={generate:o(function(e,t){return new n(e,t)})};t&&(t.fn.geopattern=o(function(e,r){return this.each(function(){var n=t(this).attr("data-title-sha");n&&(r=t.extend({hash:n},r));var o=i.generate(e,r);t(this).css("background-image",o.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},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,r,n){return t+t+r+r+n+n});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,r,n=e.r,o=e.g,i=e.b,a=Math.max(n/=255,o/=255,i/=255),s=Math.min(n,o,i),u=(a+s)/2;if(a===s)t=r=0;else{var l=a-s;switch(r=u>.5?l/(2-a-s):l/(a+s),a){case n:t=(o-i)/l+6*(o<i);break;case o:t=(i-n)/l+2;break;case i:t=(n-o)/l+4}t/=6}return{h:t,s:r,l:u}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var u=s<.5?s*(1+a):s+a-s*a,l=2*s-u;r=t(l,u,i+1/3),n=t(l,u,i),o=t(l,u,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),i=r(6743),a=r(8502),s={baseColor:"#933c3c"},u=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],l="#000";function c(e,t,r){return parseInt(e.substr(t,r||1),16)}function d(e,t,r,n,o){return(parseFloat(e)-t)*(o-n)/(r-t)+n}function f(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var h=e.exports=function(e,t){return this.opts=n({},s,t),this.hash=t.hash||i(e),this.svg=new a,this.generateBackground(),this.generatePattern(),this};function m(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function y(e){return[0,0,e,e,0,e,0,0].join(",")}function g(e,t,r,n,o){var i=y(n),a=p(o[0]),s=f(o[0]),u={stroke:l,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,u).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,u).transform({translate:[t+n,r+2*n],scale:[1,-1]}),u={stroke:l,"stroke-opacity":.02,"fill-opacity":a=p(o[1]),fill:s=f(o[1])},e.polyline(i,u).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,u).transform({translate:[t+n,r],scale:[1,1]})}function b(e,t,r,n,o){var i=p(o),a=f(o),s=y(n),u={stroke:l,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,u).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,u).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,u).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,u).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>u.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=u[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,u,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,g=(s=h/2,[0,u=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,u,s+h,2*u,s,2*u,0,u].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=p(o),n={fill:f(o),"fill-opacity":r,stroke:l,"stroke-opacity":.02},this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,e-m/2]}),0===a&&(e=i%2==0?6*m:6*m+m/2,this.svg.polyline(g,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(g,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),u=Math.floor(d(c(this.hash,1),0,15,30,100)),l=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*l),t=0;t<36;t++)r=p(i=c(this.hash,t)),e=f(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+l+"px"},n="M0 "+u+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+u+" S "+(s-a)+" "+2*u+", "+s+" "+u+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+u,this.svg.path(n,o).transform({translate:[-s/4,l*t-1.5*u]}),this.svg.path(n,o).transform({translate:[-s/4,l*t-1.5*u+36*l]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),u=d(c(this.hash,0),0,15,30,80),h=(e=.66*u,[[0,0,s/2,u-e,s/2,u,0,e,0,0],[s/2,u-e,s,0,s,e,s/2,u,s/2,u-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*u*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={stroke:l,"stroke-opacity":.02,fill:f(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*u*.66-u/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*u*.66-u/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,u=d(c(this.hash,0),0,15,10,25),h=3*u,y=m(u);for(this.svg.setWidth(12*u),this.svg.setHeight(12*u),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=p(i=c(this.hash,r)),t=f(i),e=+(s%2!=0),o={fill:t,stroke:l,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*u+e*u-u,s*h-s*u-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*u+e*u-u,s*h-s*u-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*u+e*u-u,4*h-s*u-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*u+e*u-u,4*h-s*u-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),u=m(s),l=3*s*.943;for(this.svg.setWidth(3*l),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),e=i%2==0?a*l-.5*l:a*l-.5*l+l/4,n={fill:f(o),opacity:r},this.svg.group(n).transform({translate:[i*l/2-l/2,e-a*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===i&&this.svg.group(n).transform({translate:[6*l/2-l/2,e-a*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===a&&(e=i%2==0?6*l-l/2:6*l-l/2+l/4,this.svg.group(n).transform({translate:[i*l/2-l/2,e-6*l/2],rotate:[45,l/2,l/2]}).rect(u).end()),5===a&&this.svg.group(n).transform({translate:[i*l/2-l/2,e-11*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*l/2-l/2,e-6*l/2],rotate:[45,l/2,l/2]}).rect(u).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:f(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),u=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=p(o=c(this.hash,r)),t=f(o),this.svg.polyline(u,{fill:t,"fill-opacity":n,stroke:l,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:l,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(n=c(this.hash,t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/2,{fill:"none",stroke:e,opacity:r,"stroke-width":s+"px"}),r=p(n=c(this.hash,39-t)),e=f(n),this.svg.circle(o*a+o*s+(a+s)/2,i*a+i*s+(a+s)/2,a/4,{fill:e,"fill-opacity":r}),t+=1},h.prototype.geoOverlappingRings=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/4;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,u=d(c(this.hash,0),0,15,15,80),h=u/2*Math.sqrt(3),m=[s=u/2,0,u,h,0,h,s,0].join(",");for(this.svg.setWidth(3*u),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=p(o=c(this.hash,e)),n={fill:f(o),"fill-opacity":t,stroke:l,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*u*.5-u/2,h*a],rotate:[r,u/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*u*.5-u/2,h*a],rotate:[r,u/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),u=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,u/2,s/2,u,0,u/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=p(o=c(this.hash,t)),n={fill:f(o),"fill-opacity":r,stroke:l,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,u/2*a-u/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,u/2*a-u/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,u/2*6-u/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,u/2*6-u/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(n=c(this.hash,e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2,i*s+i*a*2+a/2,s,s,r),t=p(n=c(this.hash,39-e)),r={fill:"none",stroke:f(n),opacity:t,"stroke-width":a+"px"},this.svg.rect(o*s+o*a*2+a/2+2*a,i*s+i*a*2+a/2+2*a,3*a,3*a,r),e+=1},h.prototype.geoMosaicSquares=function(){var e,t,r,n=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),e=0,r=0;r<4;r++)for(t=0;t<4;t++)t%2==0?r%2==0?b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?g(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):b(this.svg,t*n*2,r*n*2,n,c(this.hash,e)),e+=1},h.prototype.geoPlaid=function(){var e,t,r,n,o,i,a=0,s=0;for(t=0;t<36;)a+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),n=i+5,this.svg.rect(0,a,"100%",n,{opacity:r,fill:e}),a+=n,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,r=p(i=c(this.hash,t+1)),e=f(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),u=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=p(n=c(this.hash,e)),r={stroke:l,"stroke-opacity":.02,fill:f(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(u,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(u,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(u,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(u,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(u,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(u,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(u,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(u,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(u,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(u,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},6743(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,r=0x98badcfe,n=0x10325476,o=0xc3d2e1f0,i=new Uint32Array(80),a=0,s=24,u=0;function l(){for(var s,u,l=16;l<80;l++){var c=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=c<<1|c>>>31}var d=e,f=t,p=r,h=n,m=o;for(l=0;l<80;l++){l<20?(s=h^f&(p^h),u=0x5a827999):l<40?(s=f^p^h,u=0x6ed9eba1):l<60?(s=f&p|h&(f|p),u=0x8f1bbcdc):(s=f^p^h,u=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+u+(0|i[l]);m=h,h=p,p=f<<30|f>>>2,f=d,d=y}for(l=0,e=e+d|0,t=t+f|0,r=r+p|0,n=n+h|0,o=o+m|0,a=0;l<16;l++)i[l]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&l()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;u+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;u+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&l(),a=14,s=24,c(0),c(0),c(u>0xffffffffff?u/0x10000000000:0),c(u>0xffffffff?u/0x100000000:0);for(var i=24;i>=0;i-=8)c(u>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},8502(e,t,r){"use strict";var n=r(2849),o=r(6541);function i(){return this.width=100,this.height=100,this.svg=o("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=i,i.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},i.prototype.end=function(){return this.context.pop(),this},i.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},i.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},i.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})},i.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},i.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},i.prototype.toString=function(){return this.svg.toString()},i.prototype.rect=function(e,t,r,i,a){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(a))}),this;var u=o("rect");return this.currentContext().appendChild(u),this.setAttributes(u,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},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:l="/",end:c=!0,sensitive:d=!1,trailing:f=!0}=t,p=[],h=[];for(let c of function e(t,r){if(Array.isArray(t))for(let n of t)e(n,r);else r.push(t);return r}(e,[])){let e="object"==typeof c?c:function(e,t={}){let{encodePath:a=r}=t,l=[...e],c=[],d=0,f=0;function p(){let t="";if(n.test(l[d]))do t+=l[d++];while(o.test(l[d]));else if('"'===l[d]){let r=d;for(;d++<l.length;){if('"'===l[d]){d++,r=0;break}"\\"===l[d]&&d++,t+=l[d]}if(r)throw new u(`Unterminated quote at index ${r}`,e)}if(!t)throw new u(`Missing parameter name at index ${d}`,e);return t}for(;d<l.length;){let e=l[d],t=i[e];t?c.push({type:t,index:d++,value:e}):"\\"===e?c.push({type:"escape",index:d++,value:l[d++]}):":"===e?c.push({type:"param",index:d++,value:p()}):"*"===e?c.push({type:"wildcard",index:d++,value:p()}):c.push({type:"char",index:d++,value:e})}return c.push({type:"end",index:d,value:""}),new s(function t(r){let n=[];for(;;){let o=c[f++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=c[f];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=c[++f];n.push({type:"text",value:a(e)});continue}if("param"===o.type||"wildcard"===o.type){n.push({type:o.type,name:o.value});continue}if("{"===o.type){n.push({type:"group",tokens:t("}")});continue}throw new u(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(c,t);for(let t of function* e(t,r,n){if(r===t.length)return yield n;let o=t[r];if("group"===o.type)for(let i of e(o.tokens,0,n.slice()))yield*e(t,r+1,i);else n.push(o);yield*e(t,r+1,n)}(e.tokens,0,[]))h.push(function(e,t,r,n){let o="",i="",s=!0;for(let d of e){if("text"===d.type){o+=a(d.value),i+=d.value,s||(s=d.value.includes(t));continue}if("param"===d.type||"wildcard"===d.type){var l,c;if(!s&&!i)throw new u(`Missing text before "${d.name}" ${d.type}`,n);"param"===d.type?o+=`(${l=t,(c=s?"":i).length<2?l.length<2?`[^${a(l+c)}]`:`(?:(?!${a(l)})[^${a(c)}])`:l.length<2?`(?:(?!${a(c)})[^${a(l)}])`:`(?:(?!${a(c)}|${a(l)})[\\s\\S])`}+)`:o+="([\\s\\S]+)",r.push(d),i="",s=!1;continue}}return o}(t,l,p,e.originalPath))}let m=`^(?:${h.join("|")})`;return f&&(m+=`(?:${a(l)}$)?`),{regexp:new RegExp(m+=c?"$":`(?=${a(l)}|$)`,d?"":"i"),keys:p}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u,i={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class s{constructor(e,t){this.tokens=e,this.originalPath=t}}class u extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}},2694(e,t,r){"use strict";var n=r(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){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 r={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:i,resetWarningCache:o};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338(e,t,r){"use strict";var n=r(539);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},9850(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(3207);t.AsyncSubject=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),a.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),a.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject)},466(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(6967);t.BehaviorSubject=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new a.ObjectUnsubscribedError},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject)},4470(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(r(1396).Subscriber)},6765(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(453),i=r(7795),a=r(1576);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C",t.Notification=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return a.throwError(this.error);case"C":return o.empty()}throw Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},2515(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4487),o=r(5158),i=r(6676),a=r(8173),s=r(3344);function u(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=u(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=u(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},2544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3344),o=r(4163);t.empty={closed:!0,next:function(e){},error:function(e){if(n.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},5905(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(r(1396).Subscriber)},2173(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5677),s=r(3207),u=r(5495),l=r(6967),c=r(3601);t.ReplaySubject=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===1/0?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new l.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new u.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},3849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}()},2888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2515),a=r(1396),s=r(3207),u=r(6967),l=r(3601),c=r(4421),d=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return o(t,e),t}(a.Subscriber);t.SubjectSubscriber=d;var f=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[c.rxSubscriber]=function(){return new d(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new u.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new u.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new u.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new l.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(i.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):s.Subscription.EMPTY},t}(f);t.AnonymousSubject=p},3601(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectSubscription=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(r(3207).Subscription)},1396(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3385),a=r(2544),s=r(3207),u=r(4421),l=r(3344),c=r(4163),d=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=a.empty;break;case 1:if(!r){i.destination=a.empty;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new f(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new f(i,r,n,o)}return i}return o(t,e),t.prototype[u.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var f=function(e){function t(t,r,n,o){var s,u=e.call(this)||this;u._parentSubscriber=t;var l=u;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(l=Object.create(r),i.isFunction(l.unsubscribe)&&u.add(l.unsubscribe.bind(l)),l.unsubscribe=u.unsubscribe.bind(u))),u._context=l,u._next=s,u._error=n,u._complete=o,u}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=l.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};l.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),l.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!l.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(l.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=f},3207(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(194),i=r(3385),a=r(1245);function s(e){return e.reduce(function(e,t){return e.concat(t instanceof a.UnsubscriptionError?t.errors:t)},[])}t.Subscription=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,u=this._ctorUnsubscribe,l=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,f=c.length;++d<f;){var p=c[d];if(o.isObject(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof a.UnsubscriptionError?e=e.concat(s(t.errors)):e.push(t)}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}()},3344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},4398(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2515),s=r(7092);t.SimpleInnerSubscriber=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber),t.ComplexInnerSubscriber=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber),t.SimpleOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber),t.ComplexOuterSubscriber=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,r,n){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber),t.innerSubscribe=function(e,t){var r;if(!t.closed){if(e instanceof a.Observable)return e.subscribe(t);try{r=s.subscribeTo(e)(t)}catch(e){t.error(e)}return r}}},2871(e,t,r){"use strict";var n,o,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var a=r(2888),s=r(2515),u=r(1396),l=r(3207),c=r(6888),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return!e&&(this._isComplete=!1,(e=this._connection=new l.Subscription).add(this.source.subscribe(new f(this.getSubject(),this))),e.closed&&(this._connection=null,e=l.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(a.SubjectSubscriber);(function(e){this.connectable=e}).prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new p(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(u.Subscriber)},8072(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2515),a=r(2745),s=r(5390);t.SubscribeOnObservable=function(e){function t(t,r,n){void 0===r&&(r=0),void 0===n&&(n=a.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=r,o.scheduler=n,(!s.isNumeric(r)||r<0)&&(o.delayTime=0),n&&"function"==typeof n.schedule||(o.scheduler=a.asap),o}return o(t,e),t.create=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=a.asap),new t(e,r,n)},t.dispatch=function(e){var t=e.source,r=e.subscriber;return this.add(t.subscribe(r))},t.prototype._subscribe=function(e){var r=this.delayTime,n=this.source;return this.scheduler.schedule(t.dispatch,r,{source:n,subscriber:e})},t}(i.Observable)},278(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(8244),a=r(4728),s=r(5905),u=r(7849),l=r(5853),c={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return i.isScheduler(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&a.isArray(e[0])&&(e=e[0]),l.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var f=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(u.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=f},5434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7795),o=r(6345);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(n.of.apply(void 0,e))}},3180(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(4098),i=r(453);t.defer=function(e){return new n.Observable(function(t){var r;try{r=e()}catch(e){t.error(e);return}return(r?o.from(r):i.empty()).subscribe(t)})}},453(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515);t.EMPTY=new n.Observable(function(e){return e.complete()}),t.empty=function(e){var r;return e?(r=e,new n.Observable(function(e){return r.schedule(function(){return e.complete()})})):t.EMPTY}},4098(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(7092),i=r(7315);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof n.Observable?e:new n.Observable(o.subscribeTo(e))}},5853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(499),i=r(8822);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new n.Observable(o.subscribeToArray(e))}},5776(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(8244),i=r(9287),a=r(5853);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=1/0,s=null,u=e[e.length-1];return(o.isScheduler(u)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof u&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},7795(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8244),o=r(5853),i=r(8822);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return n.isScheduler(r)?(e.pop(),i.scheduleArray(e,r)):o.fromArray(e)}},3827(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4728),a=r(5853),s=r(5905),u=r(7849);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length)if(!i.isArray(e[0]))return e[0];else e=e[0];return a.fromArray(e,void 0).lift(new l)};var l=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=l;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=u.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},1576(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return new n.Observable(t?function(r){return t.schedule(o,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}},4529(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(5190),i=r(5390),a=r(8244);function s(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}t.timer=function(e,t,r){void 0===e&&(e=0);var u=-1;return i.isNumeric(t)?u=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:u,subscriber:t})})}},887(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5853),a=r(4728),s=r(1396),u=r(7211),l=r(4398);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),i.fromArray(e,void 0).lift(new c(r))};var c=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.ZipOperator=c;var d=function(e){function t(t,r,n){void 0===n&&(n=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;a.isArray(e)?t.push(new p(e)):"function"==typeof e[u.iterator]?t.push(new f(e[u.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var f=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return!!(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[u.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[u.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return l.innerSubscribe(this.observable,new l.SimpleInnerSubscriber(this))},t}(l.SimpleOuterSubscriber)},8461(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.audit=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!r||r.closed?this.clearThrottle():this.add(this.throttled=r)}},t.prototype.clearThrottle=function(){var e=this.value,t=this.hasValue,r=this.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},2392(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(8461),i=r(4529);t.auditTime=function(e,t){return void 0===t&&(t=n.async),o.audit(function(){return i.timer(e,t)})}},7954(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.buffer=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.closingNotifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.buffer=[],n.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(n))),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},647(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,t&&e!==t?this.subscriberClass=u:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},6327(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(1396),s=r(8244);t.bufferTime=function(e){var t=arguments.length,r=i.async;s.isScheduler(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],t--);var n=null;t>=2&&(n=arguments[1]);var o=1/0;return t>=3&&(o=arguments[2]),function(t){return t.lift(new u(e,n,o,r))}};var u=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),l=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(p,r,{subscriber:a,context:s})),a.add(i.schedule(f,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new l;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function f(e){var t=e.bufferCreationInterval,r=e.bufferTimeSpan,n=e.subscriber,o=e.scheduler,i=n.openContext();n.closed||(n.add(i.closeAction=o.schedule(p,r,{subscriber:n,context:i})),this.schedule(e,t))}function p(e){var t=e.subscriber,r=e.context;t.closeContext(r)}},6786(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3207),a=r(7849),s=r(5905);t.bufferToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},1662(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3207),a=r(4398);t.bufferWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},5503(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.catchError=function(e){return function(t){var r=new a(e),n=t.lift(r);return r.caught=n}};var a=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.selector,this.caught))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.selector=r,o.caught=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=void 0;try{r=this.selector(t,this.caught)}catch(t){e.prototype.error.call(this,t);return}this._unsubscribeAndRecycle();var n=new i.SimpleInnerSubscriber(this);this.add(n);var o=i.innerSubscribe(r,n);o!==n&&this.add(o)}},t}(i.SimpleOuterSubscriber)},4908(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(278);t.combineAll=function(e){return function(t){return t.lift(new n.CombineLatestOperator(e))}}},9060(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(278),i=r(4098);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=null;return"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&n.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(r))}}},6600(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.concat.apply(void 0,[t].concat(e)))}}},6345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9287);t.concatAll=function(){return n.mergeAll(1)}},2248(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206);t.concatMap=function(e,t){return n.mergeMap(e,t,1)}},3577(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2248);t.concatMapTo=function(e,t){return n.concatMap(function(){return e},t)}},8765(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.count=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){this.destination.error(e);return}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},3287(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.debounce=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.durationSelector=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var r=this.durationSubscription;this.value=e,this.hasValue=!0,r&&(r.unsubscribe(),this.remove(r)),(r=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!r.closed&&this.add(this.durationSubscription=r)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,r=this.durationSubscription;r&&(this.durationSubscription=void 0,r.unsubscribe(),this.remove(r)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},5685(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190);t.debounceTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.dueTime,this.scheduler))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(l,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function l(e){e.debouncedNext()}},2767(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.defaultValue))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.defaultValue=r,n.isEmpty=!0,n}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},6965(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(4465),s=r(1396),u=r(6765);t.delay=function(e,t){void 0===t&&(t=i.async);var r=a.isDate(e)?e-t.now():Math.abs(e);return function(e){return e.lift(new l(r,t))}};var l=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(u.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(u.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},9861(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2515),s=r(5905),u=r(7849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new l(e))}:function(t){return t.lift(new l(e))}};var l=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=u.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new f(e,this.source))},t}(a.Observable),f=function(e){function t(t,r){var n=e.call(this)||this;return n.parent=t,n.source=r,n.sourceSubscribed=!1,n}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},7642(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.dematerialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},8820(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.distinct=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.keySelector,this.flushes))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=r,o.values=new Set,n&&o.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,r=this.destination;try{t=this.keySelector(e)}catch(e){r.error(e);return}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var r=this.values;r.has(e)||(r.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=s},1772(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.distinctUntilChanged=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compare,this.keySelector))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.keySelector=n,o.hasKey=!1,"function"==typeof r&&(o.compare=r),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){try{var t,r=this.keySelector;t=r?r(e):e}catch(e){return this.destination.error(e)}var n=!1;if(this.hasKey)try{n=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},5075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1772);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}},2399(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7568),o=r(2670),i=r(2056),a=r(2767),s=r(1231);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},2631(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434),o=r(7795);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return n.concat(t,o.of.apply(void 0,e))}}},7233(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.every=function(e,t){return function(r){return r.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.predicate=e,this.thisArg=t,this.source=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg,this.source))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.predicate=r,i.thisArg=n,i.source=o,i.index=0,i.thisArg=n||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){this.destination.error(e);return}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},2408(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.exhaust=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasCompleted=!1,r.hasSubscription=!1,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},1112(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);t.exhaustMap=function e(t,r){return r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new u(t))}};var u=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},7736(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=1>(t||0)?1/0:t,function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.project=e,this.concurrent=t,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.project=r,i.concurrent=n,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,n<1/0&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,r=e.result,n=e.value,o=e.index;t.subscribeToProjection(r,n,o)},t.prototype._next=function(e){var r=this.destination;if(r.closed)return void this._complete();var n=this.index++;if(this.active<this.concurrent){r.next(e);try{var o=(0,this.project)(e,n);this.scheduler?this.destination.add(this.scheduler.schedule(t.dispatch,0,{subscriber:this,result:o,value:e,index:n})):this.subscribeToProjection(o,e,n)}catch(e){r.error(e)}}else this.buffer.push(e)},t.prototype.subscribeToProjection=function(e,t,r){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=s},2670(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.filter=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.thisArg))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}t&&this.destination.next(e)},t}(i.Subscriber)},1258(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(3207);t.finalize=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.callback))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},5063(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.find=function(e,t){if("function"!=typeof e)throw TypeError("predicate is not a function");return function(r){return r.lift(new a(e,r,!1,t))}};var a=function(){function e(e,t,r,n){this.predicate=e,this.source=t,this.yieldIndex=r,this.thisArg=n}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=a;var s=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.predicate=r,a.source=n,a.yieldIndex=o,a.thisArg=i,a.index=0,a}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,r=this.thisArg,n=this.index++;try{t.call(r||this,e,n,this.source)&&this.notifyComplete(this.yieldIndex?n:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=s},2939(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5063);t.findIndex=function(e,t){return function(r){return r.lift(new n.FindValueOperator(e,r,!0,t))}}},9948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1136),o=r(2670),i=r(1231),a=r(2767),s=r(2056),u=r(4579);t.first=function(e,t){var r=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,r){return e(t,r,l)}):u.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},7784(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(3207),s=r(2515),u=r(2888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new l(e,t,r,n))}};var l=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new u.Subject,n.set(t,o);var i=new f(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new f(t,o))}catch(e){this.error(e);return}this.add(a.subscribe(new d(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,r){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),d=function(e){function t(t,r,n){var o=e.call(this,r)||this;return o.key=t,o.group=r,o.parent=n,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),f=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return o(t,e),t.prototype._subscribe=function(e){var t=new a.Subscription,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new p(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=f;var p=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(a.Subscription)},6863(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.ignoreElements=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},3371(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.isEmpty=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},7064(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1136),o=r(2670),i=r(3439),a=r(2056),s=r(2767),u=r(4579);t.last=function(e,t){var r=arguments.length>=2;return function(l){return l.pipe(e?o.filter(function(t,r){return e(t,r,l)}):u.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},6808(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.map=function(e,t){return function(r){if("function"!=typeof e)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.project,this.thisArg))},e}();t.MapOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.Subscriber)},3353(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.mapTo=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.value))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},2539(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(6765);t.materialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new u(e))},e}(),u=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},6416(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);t.max=function(e){return n.reduce("function"==typeof e?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},1570(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5776);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.merge.apply(void 0,[t].concat(e)))}}},9287(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206),o=r(4579);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(o.identity,e)}},5206(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);function u(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(u(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new l(e,r))})}t.mergeMap=u;var l=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=l;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=u},9019(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5206);t.mergeMapTo=function(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},2307(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){this.accumulator=e,this.seed=t,this.concurrent=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=a;var s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i.acc=n,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,r=this.destination,n=void 0;try{n=(0,this.accumulator)(this.acc,e,t)}catch(e){return r.error(e)}this.active++,this._innerSub(n)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=i.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=s},7198(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);t.min=function(e){return n.reduce("function"==typeof e?function(t,r){return 0>e(t,r)?t:r}:function(e,t){return e<t?e:t})}},4864(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2871);t.multicast=function(e,t){return function(r){if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return r.lift(new o(i,t));var i,a=Object.create(r,n.connectableObservableDescriptor);return a.source=r,a.subjectFactory=i,a}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var r=this.selector,n=this.subjectFactory(),o=r(n).subscribe(e);return o.add(t.subscribe(n)),o},e}();t.MulticastOperator=o},5495(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(6765);t.observeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var u=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new l(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=u;var l=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=l},5029(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4098),a=r(4728),s=r(4398);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&a.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new u(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new u(e))};var u=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.nextSources))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},7304(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.pairwise=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new s(e))},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.hasPrev=!1,r}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},4236(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5352),o=r(2670);t.partition=function(e,t){return function(r){return[o.filter(e,t)(r),o.filter(n.not(e,t))(r)]}}},1075(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6808);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw Error("list of properties cannot be empty.");return function(t){var o,i;return n.map((o=e,i=r,function(e){for(var t=e,r=0;r<i;r++){var n=null!=t?t[o[r]]:void 0;if(void 0===n)return;t=n}return t}))(t)}}},5485(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2888),o=r(4864);t.publish=function(e){return e?o.multicast(function(){return new n.Subject},e):o.multicast(new n.Subject)}},91(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(466),o=r(4864);t.publishBehavior=function(e){return function(t){return o.multicast(new n.BehaviorSubject(e))(t)}}},3433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9850),o=r(4864);t.publishLast=function(){return function(e){return o.multicast(new n.AsyncSubject)(e)}}},9622(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173),o=r(4864);t.publishReplay=function(e,t,r,i){r&&"function"!=typeof r&&(i=r);var a="function"==typeof r?r:void 0,s=new n.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return s},a)(e)}}},6721(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728),o=r(3827);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&n.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},2518(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(253),o=r(3439),i=r(2767),a=r(8173);t.reduce=function(e,t){return arguments.length>=2?function(r){return a.pipe(n.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(r)}:function(t){return a.pipe(n.scan(function(t,r,n){return e(t,r,n+1)}),o.takeLast(1))(t)}}},6888(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.refCount=function(){return function(e){return e.lift(new a(e))}};var a=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new s(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(i.Subscriber)},6483(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(453);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?a.empty():e<0?t.lift(new s(-1,t)):t.lift(new s(e-1,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.count,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},283(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.repeatWhen=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.notifier,t))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},3160(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.count,this.source))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.source,n=this.count;if(0===n)return e.prototype.error.call(this,t);n>-1&&(this.count=n-1),r.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},5508(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.retryWhen=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.notifier,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},1754(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.sample=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=t.subscribe(r);return n.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r))),n},e}(),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},1183(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190);t.sampleTime=function(e,t){return void 0===t&&(t=a.async),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.period,this.scheduler))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(l,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function l(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},253(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.scan=function(e,t){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new a(e,t,r))}};var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.accumulator,this.seed,this.hasSeed))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=n,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},5017(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.sequenceEqual=function(e,t){return function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=a;var s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.compareTo=r,o.comparator=n,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(r.subscribe(new u(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},3213(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4864),o=r(6888),i=r(2888);function a(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(n.multicast(a)(e))}}},8614(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2173);t.shareReplay=function(e,t,r){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:r},function(e){var t,r,i,a,s,u,l,c,d,f,p,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,l=void 0===(u=t.windowTime)?1/0:u,c=t.refCount,d=t.scheduler,f=0,p=!1,h=!1,function(e){var t;f++,!r||p?(p=!1,t=(r=new n.ReplaySubject(s,l,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){p=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){f--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===f&&(i.unsubscribe(),i=void 0,r=void 0)})}))}}},8480(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(1136);t.single=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.predicate,this.source))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},4775(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.skip=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.total))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},2807(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568);t.skipLast=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new u(e,this._skipCount))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},2519(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.skipUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.notifier))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;n.hasValue=!1;var o=new i.SimpleInnerSubscriber(n);n.add(o),n.innerSubscription=o;var a=i.innerSubscribe(r,o);return a!==o&&(n.add(a),n.innerSubscription=a),n}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},4846(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.skipWhile=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=!!t}catch(e){this.destination.error(e)}},t}(i.Subscriber)},4558(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5434),o=r(8244);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return o.isScheduler(r)?(e.pop(),function(t){return n.concat(e,t,r)}):function(t){return n.concat(e,t)}}},15(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8072);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new n.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},5433(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912),o=r(4579);t.switchAll=function(){return n.switchMap(o.identity)}},7912(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(6808),a=r(4098),s=r(4398);t.switchMap=function e(t,r){return"function"==typeof r?function(n){return n.pipe(e(function(e,n){return a.from(t(e,n)).pipe(i.map(function(t,o){return r(e,t,n,o)}))}))}:function(e){return e.lift(new u(t))}};var u=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},7865(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7912);t.switchMapTo=function(e,t){return t?n.switchMap(function(){return e},t):n.switchMap(function(){return e})}},1231(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568),s=r(453);t.take=function(e){return function(t){return 0===e?s.empty():t.lift(new u(e))}};var u=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},3439(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7568),s=r(453);t.takeLast=function(e){return function(t){return 0===e?s.empty():t.lift(new u(e))}};var u=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.total))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},1279(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.takeUntil=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var r=new s(e),n=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(r));return n&&!r.seenValue?(r.add(n),t.subscribe(r)):r},e}(),s=function(e){function t(t){var r=e.call(this,t)||this;return r.seenValue=!1,r}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},6518(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(r){return r.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.predicate,this.inclusive))},e}(),s=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.inclusive=n,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,r=this.destination;try{t=this.predicate(e,this.index++)}catch(e){r.error(e);return}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var r=this.destination;t?r.next(e):(this.inclusive&&r.next(e),r.complete())},t}(i.Subscriber)},1451(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(7653),s=r(3385);t.tap=function(e,t,r){return function(n){return n.lift(new u(e,t,r))}};var u=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.nextOrObserver,this.error,this.complete))},e}(),l=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},464(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(4398);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),function(t){return t.lift(new a(e,!!r.leading,!!r.trailing))}};var a=function(){function e(e,t,r){this.durationSelector=e,this.leading=t,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new s(e,this.durationSelector,this.leading,this.trailing))},e}(),s=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=r,i._leading=n,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7661(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(5190),s=r(464);t.throttleTime=function(e,t,r){return void 0===t&&(t=a.async),void 0===r&&(r=s.defaultThrottleConfig),function(n){return n.lift(new u(e,t,r.leading,r.trailing))}};var u=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),l=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},2056(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1136),a=r(1396);t.throwIfEmpty=function(e){return void 0===e&&(e=l),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.errorFactory))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function l(){return new i.EmptyError}},5276(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(253),i=r(3180),a=r(6808);t.timeInterval=function(e){return void 0===e&&(e=n.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,r){var n=t.current;return{value:r,current:e.now(),last:n}},{current:e.now(),value:void 0,last:void 0}),a.map(function(e){var t=e.current,r=e.last;return new s(e.value,t-r)}))})}};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},8673(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(3734),i=r(4053),a=r(1576);t.timeout=function(e,t){return void 0===t&&(t=n.async),i.timeoutWith(e,a.throwError(new o.TimeoutError),t)}},4053(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5190),a=r(4465),s=r(4398);t.timeoutWith=function(e,t,r){return void 0===r&&(r=i.async),function(n){var o=a.isDate(e),i=o?e-r.now():Math.abs(e);return n.lift(new u(i,o,t,r))}};var u=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),l=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},8858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5190),o=r(6808);t.timestamp=function(e){return void 0===e&&(e=n.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},9903(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2518);function o(e,t,r){return 0===r?[t]:(e.push(t),e)}t.toArray=function(){return n.reduce(o,[])}},7544(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(4398);t.window=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var r=new u(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),u=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},1565(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(1396),a=r(2888);t.windowCount=function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new s(e,t))}};var s=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.windowSize,this.startWindowEvery))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var u=this.count-n+1;if(u>=0&&u%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var l=new a.Subject;o.push(l),r.next(l)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},3877(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5190),s=r(1396),u=r(5390),l=r(8244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return l.isScheduler(arguments[3])&&(t=arguments[3]),l.isScheduler(arguments[2])?t=arguments[2]:u.isNumeric(arguments[2])&&(n=Number(arguments[2])),l.isScheduler(arguments[1])?t=arguments[1]:u.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),f=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.destination=t,a.windowTimeSpan=r,a.windowCreationInterval=n,a.maxWindowSize=o,a.scheduler=i,a.windows=[];var s=a.openWindow();return null!==n&&n>=0?(a.add(i.schedule(m,r,{subscriber:a,window:s,context:null})),a.add(i.schedule(h,n,{windowTimeSpan:r,windowCreationInterval:n,subscriber:a,scheduler:i}))):a.add(i.schedule(p,r,{subscriber:a,window:s,windowTimeSpan:r})),a}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,r=t.length,n=0;n<r;n++){var o=t[n];!o.closed&&(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new d;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(s.Subscriber);function p(e){var t=e.subscriber,r=e.windowTimeSpan,n=e.window;n&&t.closeWindow(n),e.window=t.openWindow(),this.schedule(e,r)}function h(e){var t=e.windowTimeSpan,r=e.subscriber,n=e.scheduler,o=e.windowCreationInterval,i=r.openWindow(),a={action:this,subscription:null};a.subscription=n.schedule(m,t,{subscriber:r,window:i,context:a}),this.add(a.subscription),this.schedule(e,o)}function m(e){var t=e.subscriber,r=e.window,n=e.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),t.closeWindow(r)}},5428(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(3207),s=r(5905),u=r(7849);t.windowToggle=function(e,t){return function(r){return r.lift(new l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=u.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var l=new i.Subject,c=new a.Subscription,d={window:l,subscription:c};this.contexts.push(d);var f=u.subscribeToResult(this,s,d);f.closed?this.closeWindow(this.contexts.length-1):(f.context=d,c.add(f)),this.destination.next(l)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},9284(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(2888),a=r(5905),s=r(7849);t.windowWhen=function(e){return function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},3564(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(5905),a=r(7849);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r;return"function"==typeof e[e.length-1]&&(r=e.pop()),t.lift(new s(e,r))}};var s=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.observables,this.project))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var u=r[s];o.add(a.subscribeToResult(o,u,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(887);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(n.zip.apply(void 0,[t].concat(e)))}}},3282(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(887);t.zipAll=function(e){return function(t){return t.lift(new n.ZipOperator(e))}}},8822(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207);t.scheduleArray=function(e,t){return new n.Observable(function(r){var n=new o.Subscription,i=0;return n.add(t.schedule(function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||n.add(this.schedule()))})),n})}},229(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207),i=r(7211);t.scheduleIterable=function(e,t){if(!e)throw Error("Iterable cannot be null");return new n.Observable(function(r){var n,a=new o.Subscription;return a.add(function(){n&&"function"==typeof n.return&&n.return()}),a.add(t.schedule(function(){n=e[i.iterator](),a.add(t.schedule(function(){if(!r.closed){try{var e,t,o=n.next();e=o.value,t=o.done}catch(e){r.error(e);return}t?r.complete():(r.next(e),this.schedule())}}))})),a})}},2(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207),i=r(6676);t.scheduleObservable=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){var o=e[i.observable]();n.add(o.subscribe({next:function(e){n.add(t.schedule(function(){return r.next(e)}))},error:function(e){n.add(t.schedule(function(){return r.error(e)}))},complete:function(){n.add(t.schedule(function(){return r.complete()}))}}))})),n})}},1138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2515),o=r(3207);t.schedulePromise=function(e,t){return new n.Observable(function(r){var n=new o.Subscription;return n.add(t.schedule(function(){return e.then(function(e){n.add(t.schedule(function(){r.next(e),n.add(t.schedule(function(){return r.complete()}))}))},function(e){n.add(t.schedule(function(){return r.error(e)}))})})),n})}},7315(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(1138),i=r(8822),a=r(229),s=r(6565),u=r(7328),l=r(1087),c=r(2555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(u.isPromise(e))return o.schedulePromise(e,t);else if(l.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},5666(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=function(e){function t(t,r){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(3207).Subscription)},2883(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(772);t.AsapAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0)?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(i.Immediate.clearImmediate(r),t.scheduled=void 0)},t}(r(1076).AsyncAction)},3728(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(r(4333).AsyncScheduler)},1076(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(r(5666).Action)},4333(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=r(3849);t.AsyncScheduler=function(e){function t(r,n){void 0===n&&(n=i.Scheduler.now);var o=e.call(this,r,function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(r,n,o){return(void 0===n&&(n=0),t.delegate&&t.delegate!==this)?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t,r=this.actions;if(this.active)return void r.push(e);this.active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this.active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i.Scheduler)},6847(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return o(t,e),t.prototype.schedule=function(t,r){return(void 0===r&&(r=0),r>0)?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(r(1076).AsyncAction)},5044(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(r(4333).AsyncScheduler)},2745(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2883);t.asapScheduler=new(r(3728)).AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},5190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1076);t.asyncScheduler=new(r(4333)).AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},5677(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6847);t.queueScheduler=new(r(5044)).QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},7211(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=r,t.iterator=r(),t.$$iterator=t.iterator},6676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},4421(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},7568(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},1136(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},772(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,n=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return o[t]=!0,n.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},6967(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},3734(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},1245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},4487(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1396);t.canReportError=function(e){for(;e;){var t=e,r=t.closed,o=t.destination,i=t.isStopped;if(r||i)return!1;e=o&&o instanceof n.Subscriber?o:null}return!0}},4163(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},4579(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},4728(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},1087(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},4465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},3385(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},6565(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6676);t.isInteropObservable=function(e){return e&&"function"==typeof e[n.observable]}},2555(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7211);t.isIterable=function(e){return e&&"function"==typeof e[n.iterator]}},5390(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4728);t.isNumeric=function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0}},194(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},7328(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},8244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},7653(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},5352(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}},8173(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4579);function o(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},7092(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(499),o=r(5259),i=r(8190),a=r(1021),s=r(1087),u=r(7328),l=r(194),c=r(7211),d=r(6676);t.subscribeTo=function(e){if(e&&"function"==typeof e[d.observable])return a.subscribeToObservable(e);if(s.isArrayLike(e))return n.subscribeToArray(e);if(u.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(l.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},499(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}}},8190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7211);t.subscribeToIterable=function(e){return function(t){for(var r=e[n.iterator]();;){var o=void 0;try{o=r.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof r.return&&t.add(function(){r.return&&r.return()}),t}}},1021(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6676);t.subscribeToObservable=function(e){return function(t){var r=e[n.observable]();if("function"==typeof r.subscribe)return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")}}},5259(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4163);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,n.hostReportError),t}}},7849(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4470),o=r(7092),i=r(2515);t.subscribeToResult=function(e,t,r,a,s){if(void 0===s&&(s=new n.InnerSubscriber(e,r,a)),!s.closed)return t instanceof i.Observable?t.subscribe(s):o.subscribeTo(t)(s)}},5158(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1396),o=r(4421),i=r(2544);t.toSubscriber=function(e,t,r){if(e){if(e instanceof n.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||r?new n.Subscriber(e,t,r):new n.Subscriber(i.empty)}},6170(e,t,r){"use strict";r(8461).audit,r(2392).auditTime,r(7954).buffer,r(647).bufferCount,r(6327).bufferTime,r(6786).bufferToggle,r(1662).bufferWhen,r(5503).catchError,r(4908).combineAll,r(9060).combineLatest,r(6600).concat,r(6345).concatAll,r(2248).concatMap,r(3577).concatMapTo,r(8765).count,r(3287).debounce,r(5685).debounceTime,r(2767).defaultIfEmpty,r(6965).delay,r(9861).delayWhen,r(7642).dematerialize,r(8820).distinct,r(1772).distinctUntilChanged,r(5075).distinctUntilKeyChanged,r(2399).elementAt,r(2631).endWith,r(7233).every,r(2408).exhaust,r(1112).exhaustMap,r(7736).expand,r(2670).filter,r(1258).finalize,r(5063).find,r(2939).findIndex,r(9948).first,r(7784).groupBy,r(6863).ignoreElements,r(3371).isEmpty,r(7064).last,t.map=r(6808).map,r(3353).mapTo,r(2539).materialize,r(6416).max,r(1570).merge,r(9287).mergeAll;var n=r(5206);n.mergeMap,n.flatMap,r(9019).mergeMapTo,r(2307).mergeScan,r(7198).min,r(4864).multicast,r(5495).observeOn,r(5029).onErrorResumeNext,r(7304).pairwise,r(4236).partition,r(1075).pluck,r(5485).publish,r(91).publishBehavior,r(3433).publishLast,r(9622).publishReplay,r(6721).race,r(2518).reduce,r(6483).repeat,r(283).repeatWhen,r(3160).retry,r(5508).retryWhen,r(6888).refCount,r(1754).sample,r(1183).sampleTime,r(253).scan,r(5017).sequenceEqual,r(3213).share,r(8614).shareReplay,r(8480).single,r(4775).skip,r(2807).skipLast,r(2519).skipUntil,r(4846).skipWhile,r(4558).startWith,r(15).subscribeOn,r(5433).switchAll,r(7912).switchMap,r(7865).switchMapTo,t.take=r(1231).take,r(3439).takeLast,r(1279).takeUntil,r(6518).takeWhile,r(1451).tap,r(464).throttle,r(7661).throttleTime,r(2056).throwIfEmpty,r(5276).timeInterval,r(8673).timeout,r(4053).timeoutWith,r(8858).timestamp,r(9903).toArray,r(7544).window,r(1565).windowCount,r(3877).windowTime,r(5428).windowToggle,r(9284).windowWhen,r(3564).withLatestFrom,r(909).zip,r(3282).zipAll},3904(e,t,r){"use strict";let n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o)if(!!t.loose===e.loose)return e;else e=e.value;l("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))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=i(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("=")||u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let i=r(968),{safeRe:a,t:s}=r(9718),u=r(2111),l=r(7272),c=r(3908),d=r(8311)},8311(e,t,r){"use strict";let n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new o(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(n," "),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=>!g(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&&b(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&&m)|(this.options.loose&&y))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];u("hyphen replace",e=e.replace(o,j(this.options.includePrerelease))),u("comparator trim",e=e.replace(c[d.COMPARATORTRIM],f)),u("tilde trim",e=e.replace(c[d.TILDETRIM],p)),u("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));n&&(a=a.filter(e=>(u("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),u("range list",a);let l=new Map;for(let e of a.map(e=>new s(e,this.options))){if(g(e))return[e];l.set(e.value,e)}l.size>1&&l.has("")&&l.delete("");let b=[...l.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8794)),a=r(968),s=r(3904),u=r(7272),l=r(3908),{safeRe:c,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(9718),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(6874),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(e,t)=>{let r=!0,n=e.slice(),o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},w=(e,t)=>(u("comp",e=e.replace(c[d.BUILD],""),t),u("caret",e=O(e,t)),u("tildes",e=E(e,t)),u("xrange",e=P(e,t)),u("stars",e=C(e,t)),e),x=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,n,o,i)=>{let a;return u("tilde",e,t,r,n,o,i),x(r)?a="":x(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:x(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(u("replaceTilde pr",i),a=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,u("tilde return",a),a})},O=(e,t)=>e.trim().split(/\s+/).map(e=>D(e,t)).join(" "),D=(e,t)=>{u("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return u("caret",e,t,r,o,i,a),x(r)?s="":x(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:x(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(u("replaceCaret pr",a),s="0"===r?"0"===o?`>=${r}.${o}.${i}-${a} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${a} <${+r+1}.0.0-0`):(u("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),u("caret return",s),s})},P=(e,t)=>(u("replaceXRanges",e,t),e.split(/\s+/).map(e=>k(e,t)).join(" ")),k=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,n,o,i,a,s)=>{u("xRange",e,r,n,o,i,a,s);let l=x(o),c=l||x(i),d=c||x(a);return"="===n&&d&&(n=""),s=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(i=0),a=0,">"===n?(n=">=",c?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",c?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):c?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),u("xRange return",r),r})},C=(e,t)=>(u("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),T=(e,t)=>(u("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),j=e=>(t,r,n,o,i,a,s,u,l,c,d,f)=>(r=x(n)?"":x(o)?`>=${n}.0.0${e?"-0":""}`:x(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,u=x(l)?"":x(c)?`<${+l+1}.0.0-0`:x(d)?`<${l}.${+c+1}.0-0`:f?`<=${l}.${c}.${d}-${f}`:e?`<${l}.${c}.${+d+1}-0`:`<=${u}`,`${r} ${u}`.trim()),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(u(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){"use strict";let n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(6874),{safeRe:a,t:s}=r(9718),u=r(968),{compareIdentifiers:l}=r(1123);class c{constructor(e,t){if(t=u(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>o)throw TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=r[5]?r[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(n("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 r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return l(r,o)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return -1;else if(r===o)continue;else return l(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[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,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);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(r);if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}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},7414(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111(e,t,r){"use strict";let n=r(4641),o=r(3999),i=r(5580),a=r(4089),s=r(7059),u=r(5200);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return i(e,r,l);case">=":return a(e,r,l);case"<":return s(e,r,l);case"<=":return u(e,r,l);default:throw TypeError(`Invalid operator: ${t}`)}}},3789(e,t,r){"use strict";let n=r(3908),o=r(144),{safeRe:i,t:a}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n,o=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];for(;(n=o.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),o.lastIndex=n.index+n[1].length+n[2].length;o.lastIndex=-1}else r=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);if(null===r)return null;let s=r[2],u=r[3]||"0",l=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${u}.${l}${c}${d}`,t)}},3290(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>{let o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},1763(e,t,r){"use strict";let n=r(560);e.exports=(e,t)=>n(e,t,!0)},560(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;let a=i>0,s=a?r:o,u=a?o:r,l=!!s.prerelease.length;if(u.prerelease.length&&!l){if(!u.patch&&!u.minor)return"major";if(0===u.compareMain(s))return u.minor&&!u.patch?"minor":"patch"}let c=l?"pre":"";return r.major!==o.major?c+"major":r.minor!==o.minor?c+"minor":r.patch!==o.patch?c+"patch":"prerelease"}},4641(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7059(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>n(e,t,r)},5200(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0>=n(e,t,r)},2938(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144(e,t,r){"use strict";let n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493(e,t,r){"use strict";let n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970(e,t,r){"use strict";let n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277(e,t,r){"use strict";let n=r(3290);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},7638(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927(e,t,r){"use strict";let n=r(3290);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},6953(e,t,r){"use strict";let n=r(144);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},9589(e,t,r){"use strict";let n=r(9718),o=r(6874),i=r(3908),a=r(1123),s=r(144),u=r(6953),l=r(7414),c=r(3007),d=r(1832),f=r(2938),p=r(6254),h=r(4493),m=r(1729),y=r(560),g=r(9970),b=r(1763),v=r(3290),w=r(3927),x=r(4277),E=r(5580),S=r(7059),O=r(4641),D=r(3999),P=r(4089),k=r(5200),C=r(2111),T=r(3789),j=r(3904),R=r(8311),N=r(7638),A=r(7631),M=r(9628),I=r(270),$=r(1261),L=r(3874),F=r(7075),B=r(5571),V=r(5342),U=r(6780);e.exports={parse:s,valid:u,clean:l,inc:c,diff:d,major:f,minor:p,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:b,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:O,neq:D,gte:P,lte:k,cmp:C,coerce:T,Comparator:j,Range:R,satisfies:N,toComparators:A,maxSatisfying:M,minSatisfying:I,minVersion:$,validRange:L,outside:F,gtr:B,ltr:V,intersects:U,simplifyRange:r(2525),subset:r(5032),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},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]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let n=t.test(e),o=t.test(r);return n&&o&&(e*=1,r*=1),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(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}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(6874),a=r(7272),s=(t=e.exports={}).re=[],u=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],d=t.t={},f=0,p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[p,o]],m=(e,t,r)=>{let n=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;a(e,o,t),d[e]=o,l[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),u[o]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[d.NONNUMERICIDENTIFIER]}|${l[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`),m("FULL",`^${l[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`),m("LOOSE",`^${l[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`),m("XRANGE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[d.COERCEPLAIN]+`(?:${l[d.PRERELEASE]})?`+`(?:${l[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",l[d.COERCE],!0),m("COERCERTLFULL",l[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5571(e,t,r){"use strict";let n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780(e,t,r){"use strict";let n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342(e,t,r){"use strict";let n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628(e,t,r){"use strict";let n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||-1===a.compare(e))&&(a=new n(i=e,r))}),i}},270(e,t,r){"use strict";let n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,a=null,s=null;try{s=new o(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!i||1===a.compare(e))&&(a=new n(i=e,r))}),i}},1261(e,t,r){"use strict";let n=r(3908),o=r(8311),i=r(5580);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let o=e.set[t],a=null;o.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||i(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||i(r,a))&&(r=a)}return r&&e.test(r)?r:null}},7075(e,t,r){"use strict";let n=r(3908),o=r(3904),{ANY:i}=o,a=r(8311),s=r(7638),u=r(5580),l=r(7059),c=r(5200),d=r(4089);e.exports=(e,t,r,f)=>{let p,h,m,y,g;switch(e=new n(e,f),t=new a(t,f),r){case">":p=u,h=c,m=l,y=">",g=">=";break;case"<":p=l,h=d,m=u,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,p(e.semver,a.semver,f)?a=e:m(e.semver,s.semver,f)&&(s=e)}),a.operator===y||a.operator===g||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===g&&m(e,s.semver))return!1}return!0}},2525(e,t,r){"use strict";let n=r(7638),o=r(560);e.exports=(e,t,r)=>{let i=[],a=null,s=null,u=e.sort((e,t)=>o(e,t,r));for(let e of u)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let l=[];for(let[e,t]of i)e===t?l.push(e):t||e!==u[0]?t?e===u[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");let c=l.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},5032(e,t,r){"use strict";let n=r(8311),o=r(3904),{ANY:i}=o,a=r(7638),s=r(560),u=[new o(">=0.0.0-0")],l=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,p,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===i)if(1===t.length&&t[0].semver===i)return!0;else e=r.includePrerelease?u:l;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=l;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=f(o,t,r):g.add(t.semver);if(g.size>1)return null;if(n&&o&&((c=s(n.semver,o.semver,r))>0||0===c&&(">="!==n.operator||"<="!==o.operator)))return null;for(let e of g){if(n&&!a(e,String(n),r)||o&&!a(e,String(o),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===o.operator&&0===b.prerelease[0]&&(b=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((p=d(n,e,r))===e&&p!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(o){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((h=f(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!a(o.semver,String(e),r))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!b&&!0},d=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(let n of e.set){for(let e of t.set){let t=c(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7631(e,t,r){"use strict";let n=r(8311);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},3874(e,t,r){"use strict";let n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},8414(e,t,r){"use strict";let n;r.d(t,{A:()=>s});let o="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));let s=function(e,t,r){if(o&&!t&&!e)return o();let s=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return function(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}(s)}},6369(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},2901(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(6192);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,n.A)(o.key),o)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(6192);function o(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},6562(e,t,r){"use strict";function n(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>n})},6192(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(2284);function o(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=(0,n.A)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,r){"use strict";function n(e){return(n="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)}r.d(t,{A:()=>n})},3612(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}r.d(t,{A:()=>o})},8961(e,t,r){"use strict";let n,o,i,a,s,u,l,c,d,f,p,h;r.r(t),r.d(t,{GenderUnknownIcon:()=>hR,evaluateAsNumber:()=>l9,getImportMapOverrideMap:()=>oK,StockManagementPictogram:()=>OK,ChemistryIcon:()=>hh,BabyIcon:()=>hn,DashboardExtension:()=>mR,openmrsComponentDecorator:()=>fb,tryRegisterExtension:()=>pN,pictogramIds:()=>Ow,ActivityIcon:()=>p8,compile:()=>cr,removeRouteMapOverride:()=>ip,checkStatus:()=>cC,TableBatchActions:()=>pZ,getAsyncLifecycle:()=>fw,subscribeOpenmrsEvent:()=>lT,dispatchConnectivityChanged:()=>y,PasswordIcon:()=>h2,Assessment2Pictogram:()=>OS,CloseIcon:()=>hv,setupRouteMapOverrides:()=>iy,getWorkspaceGroupRegistration:()=>dD,registerWorkspace:()=>dx,useFeatureFlag:()=>fX,reset:()=>dp,LabOrderIcon:()=>hU,VisitMode:()=>lU,offlineUuidPrefix:()=>ls,useLocations:()=>pu,getLifecycle:()=>fv,formatDatetime:()=>EL,getVisitsForPatient:()=>lZ,subscribeConnectivity:()=>b,formatPartialDate:()=>EA,CustomOverflowMenu:()=>p3,LocationIcon:()=>hH,GroupIcon:()=>hA,canBeginEditSynchronizationItemsOfType:()=>lr,VisitStatus:()=>lW,createUseStore:()=>dX,getCurrentImportMap:()=>o3,getSessionLocation:()=>nD,usePatient:()=>pm,useRenderableExtensions:()=>pg,getOpenedWindowIndexByWorkspace:()=>dT,checkStatusFor:()=>cT,clearHistory:()=>na,clearConfigErrors:()=>tw,formatTime:()=>E$,isDevEnabled:()=>nT,setLeftNav:()=>dm,syncOfflinePatientData:()=>lO,closeWorkspaceGroup2:()=>Dz,getCurrentRouteMap:()=>is,ConfigurableLink:()=>dK,sessionStore:()=>ng,subscribeSnackbarShown:()=>A,getDynamicOfflineDataEntriesFor:()=>lh,getLoggedInUser:()=>nO,GenderMaleIcon:()=>hT,getExtensionSlotConfigFromStore:()=>eI,evaluateAsNumberAsync:()=>l7,putDynamicOfflineDataFor:()=>ly,getImportMapDefaultMap:()=>oW,unregisterExtensionRendering:()=>cV,implementerToolsConfigStore:()=>eZ,Type:()=>ex,InPatientPictogram:()=>OA,cleanupObsoleteFeatureFlags:()=>cS,getAttachmentsUrl:()=>iw,showSnackbar:()=>O6,PatientBannerActionsMenu:()=>Op,PatientSearchPictogram:()=>OL,DocumentAttachmentIcon:()=>hE,Snackbar:()=>O0,CardiologyPictogram:()=>OD,ImageMedicalIcon:()=>h$,ActionableNotificationComponent:()=>SU,DiagnosisTags:()=>Sv,iconIds:()=>p5,PatientsPictogram:()=>OF,interpolateUrl:()=>r9,setupHistory:()=>nn,subscribeToastShown:()=>N,detachAll:()=>du,convertToLocaleCalendar:()=>EF,DocumentIcon:()=>hx,configInternalStore:()=>eT,ActionMenuButton2:()=>D9,setupDynamicOfflineDataHandler:()=>lf,makeUrl:()=>np,oneOf:()=>tP,selectPreferredName:()=>Ot,launchWorkspaceGroup:()=>function e(t,r){let n=dD(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,u=function(){return Dm}();if(u.getState().openWorkspaces.length){let n=u.getState().workspaceGroup;n?Dn(n?.name,()=>{e(t,r)}):Dv(()=>{e(t,r)})}else u.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),DS(t,o),i?.(),s&&Di(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>lw,MobileCheckIcon:()=>hZ,createErrorHandler:()=>I,openmrsObservableFetch:()=>nm,parseDate:()=>Ek,getAttachmentByUuid:()=>ib,LeftNavMenu:()=>SO,getExtensionRegistration:()=>dn,ShoppingCartAddItemIcon:()=>mC,ReferralOrderIcon:()=>h9,ReportIcon:()=>me,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>oH,registerExtension:()=>di,setupOfflineSync:()=>li,DownloadIcon:()=>hS,useConnectivity:()=>fW,provide:()=>e7,getSynchronizationItemsFor:()=>u8,ShoppingCartArrowDownIcon:()=>ms,featureFlagsStore:()=>cx,promptBeforeClosing:()=>Du,removeDynamicOfflineDataFor:()=>lb,jsep:()=>lQ,GeriatricsPictogram:()=>OR,SearchIcon:()=>mn,reportError:()=>M,slugify:()=>o0,isOmrsDateToday:()=>EO,getExtensionStore:()=>cU,BloodBankPictogram:()=>OO,TriagePictogram:()=>OG,Workspace2:()=>D2,refetchCurrentUser:()=>nx,CheckmarkOutlineIcon:()=>hp,registerExtensionSlot:()=>df,AllergiesIcon:()=>mO,ArrowDownIcon:()=>p7,useOpenmrsInfinite:()=>f8,getExtensionConfigFromExtensionSlotStore:()=>eB,OpenmrsDatePicker:()=>Sg,getExtensionConfigFromStore:()=>eF,getDynamicOfflineDataEntries:()=>lp,getLocaleDisplayName:()=>x1,messageOmrsServiceWorker:()=>iF,navigate:()=>ne,launchWorkspace2:()=>DG,getGroupByWindowName:()=>dC,CustomOverflowMenuItem:()=>p4,isUrl:()=>tD,CaretDownIcon:()=>ha,ArrowLeftIcon:()=>he,FacilityPictogram:()=>Oj,ViewOffIcon:()=>mx,setCurrentOfflineMode:()=>iG,updateInternalExtensionStore:()=>cM,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>ih,formatDurationBetween:()=>EG,defaultVisitCustomRepresentation:()=>lH,getBreadcrumbsFor:()=>tI,useOpenmrsPagination:()=>f0,Pagination:()=>S5,CheckmarkFilledIcon:()=>hf,clearCurrentUser:()=>nE,showModal:()=>SF,ChevronUpIcon:()=>hb,saveVisit:()=>lq,useAttachments:()=>f$,Pictogram:()=>OX,useExtensionSlot:()=>d4,ChevronDownIcon:()=>hm,OpenmrsDateRangePicker:()=>Sb,deleteAttachmentPermanently:()=>ix,getVisitTypes:()=>lM,OverflowMenuHorizontalIcon:()=>h0,EventScheduleIcon:()=>hP,getSessionStore:()=>nw,ActionMenu:()=>DU,ProcedureOrderIcon:()=>h5,preloadImport:()=>o2,registerWorkspaceWindows2:()=>dR,useOnVisible:()=>pc,setSessionLocation:()=>nP,userHasAccess:()=>nS,ChartAverageIcon:()=>hc,getFeatureFlag:()=>cO,UserAvatarIcon:()=>mb,renderExtension:()=>dV,useFhirInfinite:()=>pr,toVisitTypeObject:()=>lA,useSession:()=>pb,EmergencyDepartmentPictogram:()=>OT,Notification:()=>SB,dispatchSnackbarShown:()=>C,getSynchronizationItem:()=>lt,navigateAndLaunchWorkspace:()=>Da,omrsOfflineCachingStrategyHttpHeaderName:()=>iL,formatDate:()=>EM,workspace2StoreActions:()=>DZ,SwitcherIcon:()=>mi,esmStyleGuideSchema:()=>pG,getImportMapDisabledOverrides:()=>oz,useAssignedExtensionIds:()=>fM,CaretRightIcon:()=>hu,evaluateAsType:()=>ce,PageHeader:()=>S4,TranslateIcon:()=>mh,setUserProperties:()=>nk,MovementIcon:()=>hQ,renderInlineNotifications:()=>SY,subscribePrecacheStaticDependencies:()=>x,PaymentsDeskPictogram:()=>OB,usePrimaryIdentifierCode:()=>py,dispatchPrecacheStaticDependencies:()=>w,getCurrentUser:()=>nv,useLayoutType:()=>po,XrayPictogram:()=>Oq,CaretUpIcon:()=>hl,renderActionableNotifications:()=>SJ,OpenmrsAppContext:()=>fT,setupModals:()=>SL,omrsOfflineResponseBodyHttpHeaderName:()=>iI,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(Py(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;Py(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>J,recordConfigDerivationError:()=>eq,useAbortController:()=>fR,Extension:()=>dz,getFhirServerPaginationHandlers:()=>f4,useConnectedExtensions:()=>fU,registerApp:()=>pM,queueSynchronizationItemFor:()=>u6,HospitalBedIcon:()=>hI,useExtensionInternalStore:()=>fY,configExtensionStore:()=>eR,getSynchronizationItems:()=>u7,getExtensionSlotsConfigStore:()=>eA,registerExtensionRendering:()=>cB,RenderIfValueIsTruthy:()=>fj,registerFeatureFlag:()=>cE,useFhirFetchAll:()=>pt,restBaseUrl:()=>nc,CalendarHeatMapIcon:()=>ho,getWorkspaceRegistration:()=>dO,isImportMapOverrideDisabled:()=>oG,resetConfigSystem:()=>t_,getFullSynchronizationItems:()=>le,getExtensionInternalStore:()=>cN,registerGlobalStore:()=>Y,runSynchronization:()=>u2,evaluateAsBoolean:()=>l5,PatientBannerPatientInfo:()=>Od,addRouteMapOverride:()=>id,getDefaultCalendar:()=>ER,SettingsIcon:()=>mo,DrugOrderIcon:()=>hO,isOnline:()=>ck,ProgramsIcon:()=>h8,useAssignedExtensions:()=>d3,CloseFilledIcon:()=>hw,canAccessStorage:()=>Pm,registerDefaultCalendar:()=>Ej,TreeViewAltIcon:()=>my,OverflowMenuVerticalIcon:()=>h1,clearConfigDerivationError:()=>eY,getConfigStore:()=>eN,registerWorkspaceGroup:()=>dE,InformationSquareIcon:()=>hB,EmptyCard:()=>Sx,ChevronLeftIcon:()=>hy,RadiologyIcon:()=>mk,useCandidateExtensions:()=>fI,renderToasts:()=>De,isDesktop:()=>pi,integrateBreakpoints:()=>pB,RegistrationPictogram:()=>OW,CardHeader:()=>pH,getExtensionRegistrationFrom:()=>dr,InformationIcon:()=>hL,TrashCanIcon:()=>mm,useShallowStableValue:()=>dG,useOpenmrsSWR:()=>pd,Assessment1Pictogram:()=>OE,finishRegisteringAllApps:()=>pI,importDynamic:()=>o1,useFhirPagination:()=>f3,useVisitContextStore:()=>pD,ArrowUpIcon:()=>hr,showActionableNotification:()=>SX,getDynamicOfflineDataHandlers:()=>ld,useForceUpdate:()=>fQ,updateWorkspaceWindowState:()=>Dg,useVisit:()=>pP,PatientBannerPatientIdentifiers:()=>Os,WorkspaceNotification:()=>DR,TransferPictogram:()=>Oz,usePagination:()=>pf,Breakpoint:()=>p$,PatientBannerToggleContactDetailsButton:()=>D7,CloseOutlineIcon:()=>h_,ObstetricsPictogram:()=>O$,parseDateInput:()=>EV,getConfig:()=>tt,attach:()=>da,getLocale:()=>x2,ActionMenuButton:()=>DC,isUrlWithTemplateParameters:()=>tO,useEmrConfiguration:()=>fq,useLeftNav:()=>pa,ToolsIcon:()=>mp,ErrorState:()=>SE,detach:()=>ds,setCurrentVisit:()=>lG,registerOmrsServiceWorker:()=>iA,ConditionsIcon:()=>mP,SaveIcon:()=>mr,activateOfflineCapability:()=>iq,useWorkspaces:()=>Dw,resetWorkspaceStore:()=>DE,useConfig:()=>fV,validator:()=>eE,CalendarIcon:()=>hi,getHistory:()=>no,StickyNoteAddIcon:()=>mu,useWorkspace2Store:()=>DJ,getPatientName:()=>S8,getVisitStore:()=>lz,getCoreTranslation:()=>oj,registerModuleWithConfigSystem:()=>e6,isOfflineUuid:()=>ll,registerModuleLoad:()=>e5,getBreadcrumbs:()=>tN,extractVariableNames:()=>cv,getOfflineSynchronizationStore:()=>u1,translateFrom:()=>oT,EditIcon:()=>hD,useStoreWithActions:()=>dJ,getCandidateExtensions:()=>dd,putDynamicOfflineData:()=>lm,shallowEqual:()=>L,subscribeNotificationShown:()=>j,MaximizeIcon:()=>hz,promptForClosingWorkspaces:()=>DY,WarningIcon:()=>mS,closeAllWorkspaces:()=>Dv,fhirBaseUrl:()=>nd,matchLocale:()=>Ph,registerBreadcrumb:()=>tj,usePatientPhoto:()=>Oy,EventsIcon:()=>hk,createGlobalStore:()=>q,workspaceStore:()=>Dm,getCurrentOfflineMode:()=>iz,subscribeToFeatureFlag:()=>cD,useExtensionStore:()=>fJ,closeWorkspace:()=>Df,createAttachment:()=>i_,useLeftNavStore:()=>ps,TableIcon:()=>md,Icon:()=>mj,InformationFilledIcon:()=>hF,getCurrentPageMap:()=>oU,LaboratoryPictogram:()=>OM,temporaryConfigStore:()=>ej,getPromptBeforeClosingFcn:()=>Dl,toDateObjectStrict:()=>ED,defineConfigSchema:()=>e4,filterBreadcrumbs:()=>tM,invalidateImplementerToolsConfig:()=>ez,PatientBannerContactDetails:()=>Pi,getAssignedExtensions:()=>dc,PatientPhoto:()=>Ov,MaterialOrderIcon:()=>hK,MicroscopeIcon:()=>hY,scheduleRecomputation:()=>cG,PharmacyPictogram:()=>OV,AttachmentIcon:()=>mD,MoneyIcon:()=>hJ,getAttachments:()=>iv,getFullSynchronizationItemsFor:()=>u9,PageHeaderContent:()=>S6,MedicationIcon:()=>hG,PrinterIcon:()=>h6,getWorkspaceGroupStore:()=>DS,PatientListsPictogram:()=>OZ,useAppContext:()=>fN,isOpenmrsRoutes:()=>o5,AppointmentsAltPictogram:()=>Ox,GenericOrderTypeIcon:()=>hN,batchExtensionUpdates:()=>cK,useExtensionSlotStore:()=>d1,ViewIcon:()=>mE,formattedName:()=>Oe,sessionEndpoint:()=>nf,duration:()=>EK,resetImportMapOverrides:()=>oZ,TableOfContentsIcon:()=>mc,CaretLeftIcon:()=>hs,getTranslationOverrides:()=>tr,isVersionSatisfied:()=>Pv,EmptyCardIllustration:()=>S_,PenIcon:()=>h4,getWorkspaceStore:()=>Dy,registerOfflinePatientHandler:()=>lS,setupImportMapOverrides:()=>oQ,showToast:()=>Dt,useDefineAppContext:()=>fC,validators:()=>tk,getGlobalStore:()=>Z,useOnClickOutside:()=>pl,getWindowByWorkspaceName:()=>dk,ArrowRightIcon:()=>ht,loadLifeCycles:()=>pT,registerBreadcrumbs:()=>tR,MotherIcon:()=>hX,fetchCurrentPatient:()=>lP,Toast:()=>O5,MessageQueueIcon:()=>hq,TwoFactorAuthenticationIcon:()=>mg,Pharmacy2Pictogram:()=>OU,goBackInHistory:()=>ni,GroupAccessIcon:()=>hM,getExtensionRenderingsStore:()=>cA,setImplementerToolsConfigRecomputer:()=>eK,getAsyncExtensionLifecycle:()=>fx,setupApiModule:()=>nR,renderLoadingSpinner:()=>Pa,WorkspaceContainer:()=>DW,showNotification:()=>SZ,queueSynchronizationItem:()=>u5,getModalRegistration:()=>dv,ListCheckedIcon:()=>hW,ResponsiveWrapper:()=>OQ,GynaecologyPictogram:()=>ON,ShoppingCartIcon:()=>ma,getRouteMapNextPageMap:()=>il,updateVisit:()=>lY,backendDependencies:()=>nj,MaybePictogram:()=>OJ,beginEditSynchronizationItem:()=>ln,createParcelMounter:()=>dF,getStartedVisit:()=>lJ,omrsOfflineResponseStatusHttpHeaderName:()=>i$,isOpenmrsAppRoutes:()=>o6,openmrsFetch:()=>nh,HomePictogram:()=>OY,DentistryPictogram:()=>Ok,ServiceQueuesPictogram:()=>OH,toLanguageTag:()=>x0,launchWorkspace:()=>Di,setFeatureFlag:()=>cP,useStore:()=>dZ,DigitalTrustPictogram:()=>OC,NumericObservation:()=>S2,attachmentUrl:()=>ig,interpolateString:()=>r7,inRange:()=>tS,useExtensionSlotMeta:()=>fZ,AppointmentsPictogram:()=>O_,renderSnackbars:()=>O4,getRegisteredWorkspace2Names:()=>DQ,toLocationObject:()=>lR,ChartLineIcon:()=>hd,UserHasAccess:()=>pv,evaluateAsBooleanAsync:()=>l8,changeWorkspaceContext:()=>Dp,createDashboard:()=>mN,getLocations:()=>lN,getOfflineDb:()=>uJ,canCloseWorkspaceWithoutPrompting:()=>Dr,getExtensionsConfigStore:()=>e$,getRouteMapDefaultMap:()=>iu,age:()=>On,syncAllDynamicOfflineData:()=>lv,isOmrsDateStrict:()=>ES,registerWorkspaceGroups2:()=>dj,usePaginationInfo:()=>pp,evaluateAsync:()=>l6,useOpenmrsFetchAll:()=>f7,removeImportMapOverride:()=>oY,showWorkspacePrompts:()=>D_,useVisitTypes:()=>pk,ageAsDuration:()=>Or,removeDynamicOfflineData:()=>lg,getExtensionNameFromId:()=>dt,deleteSynchronizationItem:()=>lo,renderParcel:()=>dL,useWorkspace2Context:()=>DX,ResetIcon:()=>mt,RenewIcon:()=>h7,subscribeActionableNotificationShown:()=>R,ErrorCard:()=>SS,GenderFemaleIcon:()=>hC,enableImportMapOverride:()=>oJ,getOfflinePatientDataStore:()=>lE,retry:()=>Pw,ComponentContext:()=>dH,ExtensionSlot:()=>d5,getOmrsServiceWorker:()=>iM,addImportMapOverride:()=>oq,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>dy,MaybeIcon:()=>mT,useCustomOverflowMenu:()=>p2,PedestrianFamilyIcon:()=>h3,generateOfflineUuid:()=>lu,cancelPrompt:()=>Dc,CtScanPictogram:()=>OP,dispatchNotificationShown:()=>P,leftNavStore:()=>dh,OpenmrsFetchError:()=>ny,UserFollowIcon:()=>mv,launchWorkspaceGroup2:()=>DK,ChevronRightIcon:()=>hg,UserXrayIcon:()=>mw,GenderOtherIcon:()=>hj,formatDuration:()=>EB,toOmrsIsoString:()=>EP,Labs2Pictogram:()=>OI,workspace2Store:()=>dP,setUserLanguage:()=>n_,useBodyScrollLock:()=>fL,getExtensionConfig:()=>eL,SyringeIcon:()=>ml,LocationPicker:()=>SD,useDebounce:()=>fH,TimeIcon:()=>mf,getExtensionSlotConfig:()=>eM,AddIcon:()=>p9,getRouteMapOverrideMap:()=>ic,processConfig:()=>tn,InventoryManagementIcon:()=>hV,registerWorkspaces2:()=>dN,UserIcon:()=>m_,formatPatientName:()=>S7,fireOpenmrsEvent:()=>lC,registerModal:()=>db,registerTranslationNamespace:()=>e8,displayName:()=>S9,evaluate:()=>l4,defineExtensionConfigSchema:()=>e9,renderWorkspaceWindowsAndMenu:()=>Pf,getSyncLifecycle:()=>f_,evaluateAsTypeAsync:()=>ct});let m="openmrs:connectivity-changed";function y(e){window.dispatchEvent(new CustomEvent(m,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(m,t),()=>window.removeEventListener(m,t)}function b(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let v="openmrs:precache-static-dependencies";function w(e={}){window.dispatchEvent(new CustomEvent(v,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(v,t),()=>window.removeEventListener(v,t)}let E="openmrs:notification-shown",S="openmrs:actionable-notification-shown",O="openmrs:toast-shown",D="openmrs:snack-bar-shown";function P(e){window.dispatchEvent(new CustomEvent(E,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function C(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function j(e){let t=t=>e(t.detail);return window.addEventListener(E,t),()=>window.removeEventListener(E,t)}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function M(e){let t=$(e);setTimeout(()=>{throw t})}function I(){let e=Error();return t=>{let r=$(t);r.stack+=`
2
2
  Async stacktrace:
3
3
  ${e.stack}`,M(t)}}function $(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(r){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function L(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);return r.length===n.length&&r.every(r=>e[r]===t[r])}function F(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}window.onerror=function(e){return console.error("Unexpected error: ",e),T({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),T({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})};let B=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>B(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>B(t)(e)}}},V=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},U=e=>e?V(e):V;function W(){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 H={},K=Symbol.for("openmrs.esm-state.instanceCount"),z=globalThis,G=(z[K]??0)+1;function q(e,t,r="none"){let n=H[e];if(n)return n.active?W()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=X(e,t,r);return H[e]={value:n,active:!0},n}}function Y(e,t){let r=H[e];return r?(r.active?W()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value=t,r.active=!0,r.value):(H[e]={value:t,active:!0},t)}function Z(e,t,r="none"){let n=H[e];if(!n){let n=X(e,t??{},r);return H[e]={value:n,active:!1},n}return n.value}function J(...e){let[t,r,n]=e,o=void 0===n?r:n,i=void 0===n?e=>e:r,a=i(t.getState());return o(a),t.subscribe(e=>{let t=i(e);L(a,t)||(a=t,o(t))})}function X(e,t,r){return"sessionStorage"===r?U()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let i,a,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=new Set,c=new Set;try{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=B(s.serialize),f=()=>{let e,t=d({state:s.partialize({...n()}),version:s.version}).then(e=>i.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=o.setState;o.setState=(e,t)=>{p(e,t),f()};let h=e((...e)=>{r(...e),f()},n,o),m=()=>{var e;if(!i)return;u=!1,l.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return B(i.getItem.bind(i))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=s.merge(e,null!=(t=n())?t:h),!0),f()}).then(()=>{null==t||t(a,void 0),u=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>u,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:F(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,u=new Set,l=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},f=o.setState;o.setState=(e,t)=>{f(e,t),d()};let p=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>p;let h=()=>{var e,t;if(!c)return;s=!1,u.forEach(e=>{var t;return e(null!=(t=n())?t:p)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:p))||void 0;return B(c.getItem.bind(c))(a.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];else{if(a.migrate)return[!0,a.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[o,s]=e;if(r(i=a.merge(s,null!=(t=n())?t:p),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,l.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),i||p}})(()=>t,{name:e,storage:F(()=>sessionStorage)})):U()(()=>t)}z[K]=G,G>1&&!W()&&console.error(`Detected ${G} 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=H)},1e3);var Q,ee,et,er,en,eo=r(1881),ei=function(e,t){return(ei=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function ea(e,t){function r(){this.constructor=e}ei(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function es(e){return"function"==typeof e}var eu=!1,el={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value&&Error().stack,eu=value},get useDeprecatedSynchronousErrorHandling(){return eu}};function ec(e){setTimeout(function(){throw e},0)}var ed={closed:!0,next:function(e){},error:function(e){if(el.useDeprecatedSynchronousErrorHandling)throw e;ec(e)},complete:function(){}},ef=Array.isArray||function(e){return e&&"number"==typeof e.length},ep=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),eh=function(){var e;function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){if(!this.closed){var e,r=this._parentOrParents,n=this._ctorUnsubscribe,o=this._unsubscribe,i=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var a=0;a<r.length;++a)r[a].remove(this);if(es(o)){n&&(this._unsubscribe=void 0);try{o.call(this)}catch(t){e=t instanceof ep?em(t.errors):[t]}}if(ef(i))for(var a=-1,s=i.length;++a<s;){var u=i[a];if(null!==u&&"object"==typeof u)try{u.unsubscribe()}catch(t){e=e||[],t instanceof ep?e=e.concat(em(t.errors)):e.push(t)}}if(e)throw new ep(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+e+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof t){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},t.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},(e=new t).closed=!0,t.EMPTY=e,t}();function em(e){return e.reduce(function(e,t){return e.concat(t instanceof ep?t.errors:t)},[])}var ey="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),eg=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=ed;break;case 1:if(!r){i.destination=ed;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new eb(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new eb(i,r,n,o)}return i}return ea(t,e),t.prototype[ey]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(eh),eb=function(e){function t(t,r,n,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var s=a;return es(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==ed&&(es((s=Object.create(r)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=i,a._error=n,a._complete=o,a}return ea(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;el.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=el.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):ec(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;ec(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};el.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),el.useDeprecatedSynchronousErrorHandling)throw e;ec(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!el.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(el.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return ec(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(eg),ev="function"==typeof Symbol&&Symbol.observable||"@@observable",ew=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,o=function(e,t,r){if(e){if(e instanceof eg)return e;if(e[ey])return e[ey]()}return e||t||r?new eg(e,t,r):new eg(ed)}(e,t,r);if(n?o.add(n.call(o,this.source)):o.add(this.source||el.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),el.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){el.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,r=t.closed,n=t.destination,o=t.isStopped;if(r||o)return!1;e=n&&n instanceof eg?n:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=e_(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[ev]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===e.length?function(e){return e}:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=e_(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function e_(e){if(e||(e=el.Promise||Promise),!e)throw Error("no Promise impl found");return e}var ex=((Q={}).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",Q);function eE(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let eS=eE(e=>Array.isArray(e),"must be an array"),eO=eE(e=>"boolean"==typeof e,"must be a boolean"),eD=eE(e=>"number"==typeof e,"must be a number"),eP=eE(e=>"string"==typeof e,"must be a string"),ek=eE(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),eC=eE(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"),eT=q("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),ej=q("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});ej.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let eR=q("config-store-of-extension-state",{mountedExtensions:[]});function eN(e){return Z(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function eA(){return Z("config-extension-slots",{slots:{}})}function eM(e){return eI(eA().getState(),e)}function eI(e,t){return e.slots[t]??{loaded:!1,config:{}}}function e$(){return Z("config-extensions",{configs:{}})}function eL(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 r=e$(),n=r=>r.configs[e]?.[t];return{getInitialState:()=>n(r.getInitialState()),getState:()=>n(r.getState())??{loaded:!1,config:null},subscribe:e=>r.subscribe((t,r)=>{let o=n(t),i=n(r);L(o,i)||e(o,i)})}}function eF(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function eB(e,t,r){return e.configure?.[r]??null}let eV=U()(()=>({config:{}})),eU=0,eW=!0,eH=!1;function eK(e){n=e}function ez(){eW=!0,eU>0&&eG()}function eG(){if(eW&&n&&!eH){eH=!0,eW=!1;try{n()}catch(e){eW=!0,eq(e),console.error("Failed to derive the implementer tools config",e)}finally{eH=!1}}}function eq(e){eV.setState({derivationError:e instanceof Error?e.message:String(e)})}function eY(){eV.getState().derivationError&&eV.setState({derivationError:void 0})}let eZ=Y("config-implementer-tools",{...eV,getState:()=>(0===eU&&eG(),eV.getState()),setState:(...e)=>(eW=!1,eV.setState(...e)),subscribe(e){eU++,eG();let t=eV.subscribe(e),r=!1;return()=>{!r&&(r=!0,eU--),t()}}});function eJ(e,t){if(Array.isArray(t))return t}function eX(e,t){return(0,eo.mergeWith)({},e,t,eJ)}let eQ=[];function e0(){let e=eT.getState(),t=ej.getState(),r=eR.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=eN(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=e3.get(r);if(s&&s.schema===i&&s.moduleLoaded===a&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)n=s.state;else{let o=a?function(e,t,r){let n=t.schemas[e],o=tl(e,ts(t,r));td(n,o,e);let i=tm(n,o);return tf(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=tm(tE,tl(e,ts(t,r)));return tf(tE,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},e3.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let u=o.getState();u.loaded===n.loaded&&u.translationOverridesLoaded===n.translationOverridesLoaded&&(0,eo.isEqual)(u.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=tc(ts(e,t)),n=Object.keys(r).reduce((e,t)=>(r[t]?.extensionSlots&&(e[t]=r[t]?.extensionSlots),e),{});var o=n;for(let[e,t]of Object.entries(o))for(let[r,n]of Object.entries(t))!function(e,t,r){let n=`${t}.extensionSlots.${r}`,o=`Extension slot config '${n}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&tv(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||tv(n,o+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||tv(n,o+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||tv(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!tg(e.configure)&&tv(n,o+".configure' is invalid. Must be an object with extension IDs for keys")}(n,e,r);let i={},a={};for(let e of Object.values(n))for(let[t,r]of Object.entries(e))i[t]=r,r.configure&&(a[t]??(a[t]=[])).push(r.configure);for(let[e,t]of Object.entries(a)){let r=1===t.length?t[0]:tc(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=eA(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&(0,eo.isEqual)(e.config,i)?n[t]=e:(n[t]={loaded:!0,config:i},o=!0)}(o||Object.keys(r).length!==Object.keys(n).length)&&t.setState({slots:n})})(n),function(e,t,r,n){let o=e$(),i=o.getState().configs,a={},s=!1,u=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),u=o.schemas[s],l=JSON.stringify([r,n,e,t]),c=to.get(l);if(c&&c.extensionSchema===u&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=u?s:t,f=ts(o,i),p=a?.configure?.[n]??{},h=tl(e,f),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=tc([tl(d,f),p,m]),g=u??o.schemas[t];td(g,y,d);let b=tm(g,y);return tf(g,b,d),delete b.extensionSlots,to.set(l,{extensionSchema:u,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:b}),b}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),l=i[o.slotName]?.[o.extensionId],c=l?.loaded&&(0,eo.isEqual)(l.config,t)?l:{config:t,loaded:!0};c!==l&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,u++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==u),s&&o.setState({configs:a})}(e,r,t,n),ez()}function e1(){n=()=>{var e,t;let r,n;return e=eT.getState(),t=ej.getState(),r=eZ.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=ta.get(r);if(e&&e.schema===n)t[r]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:tg(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}((0,eo.cloneDeep)(n));ta.set(r,{schema:n,annotated:e}),t[r]=e}}return t}(e.schemas),n=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],o=new Set(Object.keys(r));for(let[e]of n)for(let t of Object.keys(e))o.add(t);let i={};for(let e of o){let t=r[e],o=n.map(([t])=>t[e]),a=n.map(([,e])=>e),s=ti.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===a[t])){i[e]=s.result;continue}let u=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(u=eX(u,function e(t,r){return tg(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),ti.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:u}),i[e]=u}return i}(e,t)},void((0,eo.isEqual)(r.config,n.config)||eZ.setState(n))},e0(),eQ.push(eT.subscribe(e2),ej.subscribe(e2),eR.subscribe(e2))}function e2(){eY();try{e0()}catch(e){eq(e),console.error("Failed to recompute the configuration",e)}}e1();let e3=new Map;function e4(e,t){tu(e,t);let r=eX(t,tE);eT.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function e6(e){eT.setState(t=>({...t,schemas:{...t.schemas,[e]:tE}}))}function e5(e){eT.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function e8(e){eT.setState(t=>({...t,schemas:{...t.schemas,[e]:tx}}))}function e9(e,t){tu(e,t);let r=eX(t,tE);eT.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.`),eT.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function e7(e,t="provided"){eT.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function te(e,t,r){return new Promise(n=>{let o,i=!1;function a(e){!i&&t(e)&&(i=!0,n(r(e)),o?.())}a(e.getState()),i||(o=e.subscribe(a))})}function tt(e){return te(eN(e),e=>!!(e.loaded&&e.config),e=>(0,eo.omit)(e.config,["Display conditions","Translation overrides"]))}function tr(e,t,r){let n=[te(eN(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(te(eL(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function tn(e,t,r){td(e,t,r);let n=tm(e,t);return tf(e,n,r),n}let to=new Map,ti=new Map,ta=new Map;function ts(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function tu(e,t,r=""){let n="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let o of Object.keys(t).filter(e=>!e.startsWith("_"))){let i=r+(r&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${n}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${n}`),!tg(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||tu(e,a,i);let s=a._elements;if(ty(s)&&tu(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${n}.
4
4
 
@@ -12,32 +12,32 @@ If you're the maintainer: the 'elements' key only works with '_type' equal to 'A
12
12
  ${t}`)}return n}let tm=(e,t)=>{let r=structuredClone(t);if(!e)return r;for(let t of Object.keys(e)){let n=r[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){r.hasOwnProperty(t)||(r[t]=o._default);let e=o._elements;if(n&&ty(e)){if(o._type===ex.Array&&Array.isArray(n)){let o=n.map(t=>tm(e,t));r[t]=o}else if(o._type===ex.Object)for(let t of Object.keys(n))n[t]=tm(e,n[t])}}else if(tg(o)){let e=n??{};tg(e)&&(r[t]=tm(o,e))}}return r};function ty(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function tg(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let tb=new Set;function tv(e,t){let r=`${e}:::${t}`;tb||(tb=new Set),tb.has(r)||(console.error(t),tb.add(r))}function tw(e){e?tb.forEach(t=>{t.startsWith(e)&&tb.delete(t)}):tb.clear()}function t_(){eQ.forEach(e=>e()),eQ.length=0,e3.clear(),to.clear(),ta.clear(),ti.clear(),e1()}let tx={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:ex.Object,_default:{},_validators:[eE(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},tE={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:ex.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:ex.String,_default:void 0}},...tx},tS=(e,t)=>eE(r=>e<=r&&r<=t,`must be between ${e} and ${t}`),tO=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return eE(e=>{if(!e||"string"!=typeof e)return!1;let r=/\${(.*?)}/g,n=r.exec(e);for(;n;){if(!t.includes(n[1]))return!1;n=r.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},tD=tO([]),tP=e=>eE(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),tk={inRange:tS,isUrl:tD,isUrlWithTemplateParameters:tO,oneOf:tP};var tC=r(8067);let tT=q("breadcrumbs",[]);function tj(e){return tR([e])}function tR(e){let t=[...tN(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,tC.pathToRegexp)(e.matcher).regexp:(0,tC.pathToRegexp)(e.path).regexp,settings:e}))];tT.setState(t,!0)}function tN(){return tT.getState()}function tA(e,t){if(t)return function(e,t){let[r]=e.filter(e=>e.matcher.test(t));return r}(e,t)||function(e,t){let r=t.split("/");for(;r.length>1;){r.pop();let t=tA(e,r.join("/"));if(t)return t}}(e,t)}function tM(e,t){if(e.length>0){let r=tA(e,t);if(r){let t=[r],n=tA(e,r.settings.parent);for(;void 0!==n;)t.push(n),n=tA(e,n.settings.parent);return t.reverse()}}return[]}function tI(e){return tM(tN(),e)}var t$=Object.freeze({__proto__:null,get start(){return r8},get ensureJQuerySupport(){return rI},get setBootstrapMaxTime(){return rg},get setMountMaxTime(){return rb},get setUnmountMaxTime(){return rv},get setUnloadMaxTime(){return rw},get registerApplication(){return rG},get unregisterApplication(){return rY},get getMountedApps(){return rW},get getAppStatus(){return rK},get unloadApplication(){return rZ},get checkActivityFunctions(){return rq},get getAppNames(){return rH},get pathToActiveWhen(){return rQ},get navigateToUrl(){return rP},get patchHistoryApi(){return rN},get triggerAppChange(){return r3},get addErrorHandler(){return tU},get removeErrorHandler(){return tW},get mountRootParcel(){return rf},get NOT_LOADED(){return tz},get LOADING_SOURCE_CODE(){return tG},get NOT_BOOTSTRAPPED(){return tq},get BOOTSTRAPPING(){return tY},get NOT_MOUNTED(){return tZ},get MOUNTING(){return tJ},get UPDATING(){return tQ},get LOAD_ERROR(){return t2},get MOUNTED(){return tX},get UNLOADING(){return t1},get UNMOUNTING(){return t0},get SKIP_BECAUSE_BROKEN(){return t3}}),tL=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,tF=!function(){try{var e=new tL("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=!!t.bubbles,r.cancelable=!!t.cancelable,r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}:tL;let tB=[];function tV(e,t,r){let n=tK(e,t,r);tB.length?tB.forEach(e=>e(n)):setTimeout(()=>{throw n})}function tU(e){if("function"!=typeof e)throw Error(tH(28,!1));tB.push(e)}function tW(e){if("function"!=typeof e)throw Error(tH(29,!1));let t=!1;return tB=tB.filter(r=>{let n=r===e;return t=t||n,!n}),t}function tH(e,t,...r){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${r.length?`&arg=${r.join("&arg=")}`:""}`}function tK(e,t,r){let n,o=`${t9(t)} '${t5(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}n=e}else{console.warn(tH(30,!1,t.status,t5(t)));try{n=Error(o+JSON.stringify(e))}catch(t){n=e}}return n.appOrParcelName=t5(t),t.status=r,n}let tz="NOT_LOADED",tG="LOADING_SOURCE_CODE",tq="NOT_BOOTSTRAPPED",tY="BOOTSTRAPPING",tZ="NOT_MOUNTED",tJ="MOUNTING",tX="MOUNTED",tQ="UPDATING",t0="UNMOUNTING",t1="UNLOADING",t2="LOAD_ERROR",t3="SKIP_BECAUSE_BROKEN";function t4(e){return e.status===tX}function t6(e){try{return e.activeWhen(window.location)}catch(t){return tV(t,e,t3),!1}}function t5(e){return e.name}function t8(e){return!!e.unmountThisParcel}function t9(e){return t8(e)?"parcel":"application"}function t7(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function re(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return e[r];return null}function rt(e){return e&&("function"==typeof e||Array.isArray(e)&&!re(e,e=>"function"!=typeof e))}function rr(e,t){let r=e[t]||[];0===(r=Array.isArray(r)?r:[r]).length&&(r=[()=>Promise.resolve()]);let n=t9(e),o=t5(e);return function(e){return r.reduce((r,i,a)=>r.then(()=>{let r=i(e);return rn(r)?r:Promise.reject(tH(15,!1,n,o,t,a))}),Promise.resolve())}}function rn(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let ro=[];function ri(e,t){return Promise.resolve().then(()=>e.status!==tq?e:(e.status=tY,e.bootstrap?r_(e,"bootstrap").then(r).catch(r=>{if(t)throw tK(r,e,t3);return tV(r,e,t3),e}):Promise.resolve().then(r)));function r(){return e.status=tZ,e}}function ra(e,t){return Promise.resolve().then(()=>{if(e.status!==tX)return e;return e.status=t0,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(r,n=>r().then(()=>{let r=Error(n.message);if(t)throw tK(r,e,t3);tV(r,e,t3)})).then(()=>e);function r(){return r_(e,"unmount").then(()=>{e.status=tZ},r=>{if(t)throw tK(r,e,t3);tV(r,e,t3)})}})}let rs=!1,ru=!1;function rl(e,t){return Promise.resolve().then(()=>e.status!==tZ?e:(rs||(window.dispatchEvent(new tF("single-spa:before-first-mount")),rs=!0),e.status=tJ,r_(e,"mount").then(()=>(e.status=tX,ru||(window.dispatchEvent(new tF("single-spa:first-mount")),ru=!0),e)).catch(r=>{return e.status=tX,ra(e,!0).then(n,n);function n(){if(t)throw tK(r,e,t3);return tV(r,e,t3),e}})))}let rc=0,rd={parcels:{}};function rf(){return rp.apply(rd,arguments)}function rp(e,t){let r,n,o,i=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(tH(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(tH(3,!1,typeof e.name));let a=rc++,s=e.name||`parcel-${a}`;if("object"!=typeof t)throw Error(tH(4,!1,s,typeof t));if(!t.domElement)throw Error(tH(5,!1,s));let u="function"==typeof e,l=u?e:()=>Promise.resolve(e),c={id:a,parcels:{},status:u?tG:tq,customProps:t,parentName:t5(i),unmountThisParcel:()=>p.then(()=>{if(c.status!==tX)throw Error(tH(6,!1,s,c.status));return ra(c,!0)}).then(e=>(c.parentName&&delete i.parcels[c.id],e)).then(e=>(n(e),e)).catch(e=>{throw c.status=t3,o(e),e})};i.parcels[a]=c;let d=l();if(!d||"function"!=typeof d.then)throw Error(tH(7,!1));let f=(d=d.then(e=>{if(!e)throw Error(tH(8,!1));if(s=e.name||`parcel-${a}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!rt(e.bootstrap))throw Error(tH(9,!1,s));if(!rt(e.mount))throw Error(tH(10,!1,s));if(!rt(e.unmount))throw Error(tH(11,!1,s));if(e.update&&!rt(e.update))throw Error(tH(12,!1,s));let t=rr(e,"bootstrap"),n=rr(e,"mount"),o=rr(e,"unmount");c.status=tq,c.name=s,c.bootstrap=t,c.mount=n,c.unmount=o,c.timeouts=rx(e.timeouts),e.update&&(c.update=rr(e,"update"),r.update=function(e){return c.customProps=e,rh(Promise.resolve().then(()=>{if(c.status!==tX)throw Error(tH(32,!1,t5(c)));return c.status=tQ,r_(c,"update").then(()=>(c.status=tX,c)).catch(e=>{throw tK(e,c,t3)})}))})})).then(()=>ri(c,!0)),p=f.then(()=>rl(c,!0)),h=new Promise((e,t)=>{n=e,o=t});return r={mount:()=>rh(Promise.resolve().then(()=>{if(c.status!==tZ)throw Error(tH(13,!1,s,c.status));return i.parcels[a]=c,rl(c)})),unmount:()=>rh(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rh(d),bootstrapPromise:rh(f),mountPromise:rh(p),unmountPromise:rh(h)}}function rh(e){return e.then(()=>null)}function rm(e){let t=t5(e),r="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof r||null===r||Array.isArray(r))&&(r={},console.warn(tH(40,!1),t,r));let n=t7({},r,{name:t,mountParcel:rp.bind(e),singleSpa:t$});return t8(e)&&(n.unmountSelf=e.unmountThisParcel),n}let ry={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rg(e,t,r){if("number"!=typeof e||e<=0)throw Error(tH(16,!1));ry.bootstrap={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rb(e,t,r){if("number"!=typeof e||e<=0)throw Error(tH(17,!1));ry.mount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rv(e,t,r){if("number"!=typeof e||e<=0)throw Error(tH(18,!1));ry.unmount={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function rw(e,t,r){if("number"!=typeof e||e<=0)throw Error(tH(19,!1));ry.unload={millis:e,dieOnTimeout:t,warningMillis:r||1e3}}function r_(e,t){let r=e.timeouts[t],n=r.warningMillis,o=t9(e);return new Promise((i,a)=>{let s=!1,u=!1;e[t](rm(e)).then(e=>{s=!0,i(e)}).catch(e=>{s=!0,a(e)}),setTimeout(()=>c(1),n),setTimeout(()=>c(!0),r.millis);let l=tH(31,!1,t,o,t5(e),r.millis);function c(e){s||(!0===e?(u=!0,r.dieOnTimeout?a(Error(l)):console.error(l)):!u&&(console.warn(l),e*n+n<r.millis&&setTimeout(()=>c(e+1),n)))}})}function rx(e){let t={};for(let r in ry)t[r]=t7({},ry[r],e&&e[r]||{});return t}function rE(e){return Promise.resolve().then(()=>{let t,r;return e.loadPromise?e.loadPromise:e.status!==tz&&e.status!==t2?e:(e.status=tG,e.loadPromise=Promise.resolve().then(()=>{let n=e.loadApp(rm(e));if(!rn(n))throw r=!0,Error(tH(33,!1,t5(e)));return n.then(r=>{let n;e.loadErrorTime=null,"object"!=typeof(t=r)&&(n=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!rt(t.bootstrap)&&(n=35),rt(t.mount)||(n=36),rt(t.unmount)||(n=37);let o=t9(t);if(n){let r;try{r=JSON.stringify(t)}catch(e){}return console.error(tH(n,!1,o,t5(e),r),t),tV(void 0,e,t3),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=t7({},e.devtools.overlays,t.devtools.overlays)),e.status=tq,e.bootstrap=rr(t,"bootstrap"),e.mount=rr(t,"mount"),e.unmount=rr(t,"unmount"),e.unload=rr(t,"unload"),e.timeouts=rx(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let n;return delete e.loadPromise,r?n=t3:(n=t2,e.loadErrorTime=(new Date).getTime()),tV(t,e,n),e}))})}let rS="u">typeof window,rO={hashchange:[],popstate:[]},rD=["hashchange","popstate"];function rP(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(tH(14,!1));t=e.currentTarget.href,e.preventDefault()}let r=rA(window.location.href),n=rA(t);0===t.indexOf("#")?window.location.hash=n.hash:r.host!==n.host&&n.host?window.location.href=t:n.pathname===r.pathname&&n.search===r.search?window.location.hash=n.hash:window.history.pushState(null,null,t)}function rk(e){if(e){let t=e[0].type;rD.indexOf(t)>=0&&rO[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rC(){r4([],arguments)}function rT(e,t){return function(){let r=window.location.href,n=e.apply(this,arguments),i=window.location.href;return o&&r===i||window.dispatchEvent(function(e,t){let r;try{r=new PopStateEvent("popstate",{state:e})}catch(t){(r=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return r.singleSpa=!0,r.singleSpaTrigger=t,r}(window.history.state,t)),n}}let rj=null,rR=!1;function rN(e){if(rR)throw Error(tH(43,!1));o=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rR=!0,rj=window.history.replaceState,window.addEventListener("hashchange",rC),window.addEventListener("popstate",rC);let t=window.addEventListener,r=window.removeEventListener;window.addEventListener=function(e,r){if(!("function"==typeof r&&rD.indexOf(e)>=0)||re(rO[e],e=>e===r))return t.apply(this,arguments);rO[e].push(r)},window.removeEventListener=function(e,t){return"function"==typeof t&&rD.indexOf(e)>=0&&(rO[e]=rO[e].filter(e=>e!==t)),r.apply(this,arguments)},window.history.pushState=rT(window.history.pushState,"pushState"),window.history.replaceState=rT(rj,"replaceState")}function rA(e){let t=document.createElement("a");return t.href=e,t}rS&&(window.singleSpaNavigate?console.warn(tH(41,!1)):window.singleSpaNavigate=rP);let rM=!1;function rI(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rM){let t=e.fn.on,r=e.fn.off;e.fn.on=function(e,r){return r$.call(this,t,window.addEventListener,e,r,arguments)},e.fn.off=function(e,t){return r$.call(this,r,window.removeEventListener,e,t,arguments)},rM=!0}}function r$(e,t,r,n,o){return"string"!=typeof r?e.apply(this,o):(r.split(/\s+/).forEach(e=>{rD.indexOf(e)>=0&&(t(e,n),r=r.replace(e,""))}),""===r.trim()?this:e.apply(this,o))}let rL={};function rF(e){return Promise.resolve().then(()=>{let t=rL[t5(e)];if(!t)return e;if(e.status===tz)return rB(e,t),e;if(e.status===t1)return t.promise.then(()=>e);if(e.status!==tZ&&e.status!==t2)return e;let r=e.status===t2?Promise.resolve():r_(e,"unload");return e.status=t1,r.then(()=>(rB(e,t),e)).catch(r=>(delete rL[t5(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,tV(r,e,t3),t.reject(r),e))})}function rB(e,t){delete rL[t5(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=tz,t.resolve()}function rV(e,t,r,n){rL[t5(e)]={app:e,resolve:r,reject:n},Object.defineProperty(rL[t5(e)],"promise",{get:t})}let rU=[];function rW(){return rU.filter(t4).map(t5)}function rH(){return rU.map(t5)}function rK(e){let t=re(rU,t=>t5(t)===e);return t?t.status:null}let rz=!1;function rG(e,t,r,n){var o,i;let a,s,u=(a={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(tH(39,!1));let t=["name","app","activeWhen","customProps"],r=Object.keys(e).reduce((e,r)=>t.indexOf(r)>=0?e:e.concat(r),[]);if(0!==r.length)throw Error(tH(38,!1,t.join(", "),r.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(tH(20,!1));let n=e=>"string"==typeof e||"function"==typeof e;if(!(n(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(n)))throw Error(tH(24,!1));if(!rX(e.customProps))throw Error(tH(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,r,n){if("string"!=typeof e||0===e.length)throw Error(tH(20,!1));if(!t)throw Error(tH(23,!1));if("function"!=typeof r)throw Error(tH(24,!1));if(!rX(n))throw Error(tH(22,!1))}(e,t,r,n),a.name=e,a.loadApp=t,a.activeWhen=r,a.customProps=n),a.loadApp="function"!=typeof(o=a.loadApp)?()=>Promise.resolve(o):o,a.customProps=a.customProps||{},s=(s=Array.isArray(i=a.activeWhen)?i:[i]).map(e=>"function"==typeof e?e:rQ(e)),a.activeWhen=e=>s.some(t=>t(e)),a);if(r5||rz||(rz=!0,setTimeout(()=>{r5||console.warn(tH(1,!1))},5e3)),-1!==rH().indexOf(u.name))throw Error(tH(21,!1,u.name));rU.push(t7({loadErrorTime:null,status:tz,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},u)),rS&&(rI(),r4())}function rq(e=window.location){return rU.filter(t=>t.activeWhen(e)).map(t5)}function rY(e){if(0===rU.filter(t=>t5(t)===e).length)throw Error(tH(25,!1,e));return(rS?rZ(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rU.map(t5).indexOf(e);rU.splice(t,1)})}function rZ(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(tH(26,!1));let r=re(rU,t=>t5(t)===e);if(!r)throw Error(tH(27,!1,e));let n=rL[t5(r)];if(t&&t.waitForUnmount){if(n)return n.promise;{let e=new Promise((t,n)=>{rV(r,()=>e,t,n)});return e}}{let e;return n?(e=n.promise,rJ(r,n.resolve,n.reject)):e=new Promise((t,n)=>{rV(r,()=>e,t,n),rJ(r,t,n)}),e}}function rJ(e,t,r){Promise.resolve().then(()=>{if(re(rq(),t=>t===t5(e)))return r3()}).then(()=>ra(e).then(rF).then(()=>{t(),setTimeout(()=>{r4()})})).catch(r)}function rX(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function rQ(e,t){let r=function(e,t){let r=0,n=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let r=e[t],o=n&&"/"===r;(!n&&":"===r||o)&&i(t)}return i(e.length),RegExp(o,"i");function i(i){let a=e.slice(r,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=n?"[^/]+/?":a,i===e.length)if(n)t&&(o+="$");else{let e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}n=!n,r=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let n=e.href.replace(t,"").replace(e.search,"").split("?")[0];return r.test(n)}}let r0=!1,r1=[],r2=rS&&window.location.href;function r3(){return r4()}function r4(e=[],t,r=!1){let n,o,i,a,s;if(r0)return new Promise((e,r)=>{r1.push({resolve:e,reject:r,eventArguments:t})});let{appsToUnload:u,appsToUnmount:l,appsToLoad:c,appsToMount:d}=(n=[],o=[],i=[],a=[],s=(new Date).getTime(),rU.forEach(e=>{let t=e.status!==t3&&t6(e);switch(e.status){case t2:t&&s-e.loadErrorTime>=200&&i.push(e);break;case tz:case tG:t&&i.push(e);break;case tq:case tZ:!t&&rL[t5(e)]?n.push(e):t&&a.push(e);break;case tX:t||o.push(e)}}),{appsToUnload:n,appsToUnmount:o,appsToLoad:i,appsToMount:a}),f,p=[],h=r2,m=r2=window.location.href;return r5?(r0=!0,f=u.concat(c,l,d),Promise.resolve().then(()=>(w(0===f.length?"before-no-app-change":"before-app-change",v(!0)),w("before-routing-event",v(!0,{cancelNavigation:y})),Promise.all(p).then(r=>{if(r.some(e=>e))return rj.call(window.history,history.state,"",h.substring(location.origin.length)),r2=location.href,r0=!1,r4(e,t,!0);let n=u.map(rF),o=Promise.all(l.map(ra).map(e=>e.then(rF)).concat(n));o.then(()=>{w("before-mount-routing-event",v(!0))},e=>{throw e});let i=c.map(e=>rE(e).then(e=>r6(e,o))),a=d.filter(e=>0>c.indexOf(e)).map(e=>r6(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(i.concat(a)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(f=c,Promise.resolve().then(()=>Promise.all(c.map(rE)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function y(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch(e=>(console.warn(Error(tH(42,!1))),console.warn(e),!1)))}function g(){let t=rW();e.forEach(e=>e.resolve(t));try{w(0===f.length?"no-app-change":"app-change",v()),w("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(r0=!1,r1.length>0){let e=r1;r1=[],r4(e)}return t}function b(){r||(e.forEach(e=>{rk(e.eventArguments)}),rk(t))}function v(e=!1,r){let n={},o={[tX]:[],[tZ]:[],[tz]:[],[t3]:[]};e?(c.concat(d).forEach((e,t)=>{a(e,tX)}),u.forEach(e=>{a(e,tz)}),l.forEach(e=>{a(e,tZ)})):f.forEach(e=>{a(e)});let i={detail:{newAppStatuses:n,appsByNewStatus:o,totalAppChanges:f.length,originalEvent:null==t?void 0:t[0],oldUrl:h,newUrl:m}};return r&&t7(i.detail,r),i;function a(e,t){let r=t5(e);t=t||rK(r),n[r]=t,(o[t]=o[t]||[]).push(r)}}function w(e,t){r||window.dispatchEvent(new tF(`single-spa:${e}`,t))}}function r6(e,t){return t6(e)?ri(e).then(e=>t.then(()=>t6(e)?rl(e):e)):t.then(()=>e)}let r5=!1;function r8(e){r5=!0,rS&&(rN(e),r4())}function r9(e,t){let r=window.getOpenmrsSpaBase().replace(/\/$/,"");return r7(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:r,...t}).replace(/^\/\//,"/")}function r7(e,t){return Object.keys(t).reduce((e,r)=>e.split("${"+r+"}").join(t[r]),e)}function ne({to:e,templateParams:t}){let r=window.getOpenmrsSpaBase().replace(/\/$/,""),n=r9(e,t).replace(window.location.origin,"");n.startsWith(r)?rP(n):window.location.assign(n)}rS&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rU]},reroute:r4,NOT_LOADED:tz,toLoadPromise:rE,toBootstrapPromise:ri,unregisterApplication:rY,getProfilerData:function(){return ro}});let nt="openmrs:history";function nr(e){let t=JSON.parse(sessionStorage.getItem(nt)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(nt,JSON.stringify(t))}function nn(){0===JSON.parse(sessionStorage.getItem(nt)??"[]").length&&document.referrer&&nr(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=no();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(nt,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?ni({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&nr(window.location.href)})}function no(){return JSON.parse(sessionStorage.getItem(nt)??"[]")}function ni({toUrl:e}){let t=no(),r=t.lastIndexOf(e);if(-1!=r){let e=t.slice(0,r+1);ne({to:t[r]}),sessionStorage.setItem(nt,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function na(){sessionStorage.removeItem(nt)}let ns="${openmrsSpaBase}/login",nu={redirectAuthFailure:{enabled:{_type:ex.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:ex.String,_default:ns,_validators:[tk.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:ex.Array,_default:[401],_elements:{_type:ex.Number,_validators:[tk.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:ex.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:ex.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function nl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let nc="/ws/rest/v1",nd="/ws/fhir2/R4",nf=`${nc}/session`;function np(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function nh(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let r=np(e);if(t.headers||(t.headers={}),(0,eo.isPlainObject)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(nc)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(nd)){let e=new URL(r,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),r=e.toString())}let n=Error();return window.fetch(r,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:o}=await tt("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(r===np(nf)||204===e.status)&&ne({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return r===np(nf)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(na(),ne({to:t.url||e.headers.get("location")||ns}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let o=t;try{o=JSON.parse(t)}catch(e){}throw new ny(r,e,o,n)},t=>{throw new ny(r,e,null,n)})})}function nm(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let r=new AbortController;return t.signal=r.signal,new ew(n=>{let o=!1;return nh(e,t).then(e=>{o=!0,n.next(e),n.complete()},e=>{o=!0,n.error(e)}),()=>{o||r.abort()}})}class ny extends Error{constructor(e,t,r,n){super(),nl(this,"response",void 0),nl(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,n.message=this.message,this.responseBody=r,this.response=t,this.stack=`Stacktrace for outgoing request:
13
13
  ${n.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let ng=q("session",{loaded:!1,session:null}),nb=0;function nv(e={includeAuthStatus:!0}){return(nb<Date.now()-6e4||!ng.getState().loaded)&&nx(),new ew(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(ng.getState()),ng.subscribe(r)})}function nw(){return(nb<Date.now()-6e4||!ng.getState().loaded)&&nx(),ng}function n_(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function nx(e,t){nb=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),nC(nh(nf,{headers:r}))}function nE(){ng.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function nS(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!(0,eo.isUndefined)(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!(0,eo.isUndefined)(n.privileges.find(t=>e===t.display))):((0,eo.isUndefined)(r)||console.error(`Could not understand privileges "${r}"`),!0))||!(0,eo.isUndefined)(t.roles.find(e=>"System Developer"===e.display))}function nO(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(ng.getState()),e||(t=ng.subscribe(n))})}function nD(){return new Promise((e,t)=>{nv().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function nP(e,t){return nC(nh(nf,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function nk(e,t,r){return r||(r=new AbortController),await nh(`${nc}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),nx()}function nC(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},ng.setState(n),t(n)):(n={loaded:!1,session:null},ng.setState(n),r(n))}).catch(e=>{M(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};ng.setState(t),r(t)})})}function nT(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}ng.subscribe(e=>{e.loaded&&e.session&&n_(e.session)});let nj={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function nR(){e4("@openmrs/esm-api",nu),nx()}let nN={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var nA=r(2284),nM=r(3029),nI=r(2901);function n$(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var nL=r(3662);function nF(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,nL.A)(e,t)}function nB(e,t){if(t&&("object"==(0,nA.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return n$(e)}function nV(e){return(nV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nU=r(4467),nW=r(6369),nH=r(3612),nK=r(6562);function nz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nz(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var nq={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},nY=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,nM.A)(this,e),this.init(t,r)}return(0,nI.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||nq,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,nG(nG({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),nZ=function(){function e(){(0,nM.A)(this,e),this.observers={}}return(0,nI.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function nJ(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function nX(e){return null==e?"":""+e}function nQ(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function n0(e,t,r){var n=nQ(e,t,Object);n.obj[n.k]=r}function n1(e,t){var r=nQ(e,t),n=r.obj,o=r.k;if(n)return n[o]}function n2(e,t,r){var n=n1(e,r);return void 0!==n?n:n1(t,r)}function n3(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var n4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function n6(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return n4[e]}):e}var n5="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,n8=[" ",",","?","!",";"];function n9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n9(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n9(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var oe=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,nM.A)(this,n),t=r.call(this),n5&&nZ.call(n$(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,nI.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=n1(this.data,a);return s||!i||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,u=o.slice(a,a+s).join(n),l=i[u];void 0===l&&o.length>a+s;)s++,l=i[u=o.slice(a,a+s).join(n)];if(void 0===l)return;if(null===l)return null;if(r.endsWith(u)){if("string"==typeof l)return l;if(u&&"string"==typeof l[u])return l[u]}var c=o.slice(a+s).join(n);if(c)return e(l,c,n);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),n0(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);var s=n1(this.data,a)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=n7(n7({},s),r),n0(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?n7(n7({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(nZ),ot={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?or(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var oo={},oi=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,nM.A)(this,n),i=r.call(this),n5&&nZ.call(n$(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=n$(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=nY.create("translator"),i}return(0,nI.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=n8.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,nA.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,c=l[l.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return i?(h.res="".concat(c).concat(p).concat(u),h):"".concat(c).concat(p).concat(u)}return i?(h.res=u,h):u}var h=this.resolve(e,t),m=h&&h.res,y=h&&h.usedKey||u,g=h&&h.exactUsedKey||u,b=Object.prototype.toString.apply(m),v=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(w&&m&&x&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof v||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,m,on(on({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=E,h):E}if(a){var S="[object Array]"===b,O=S?[]:{},D=S?g:y;for(var P in m)if(Object.prototype.hasOwnProperty.call(m,P)){var k="".concat(D).concat(a).concat(P);O[P]=this.translate(k,on(on({},t),{joinArrays:!1,ns:l})),O[P]===k&&(O[P]=m[P])}m=O}}else if(w&&"string"==typeof v&&"[object Array]"===b)(m=m.join(v))&&(m=this.extendTranslation(m,e,t,r));else{var C=!1,T=!1,j=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),N=j?this.pluralResolver.getSuffix(d,t.count,t):"",A=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(m)&&R&&(C=!0,m=A),this.isValidLookup(m)||(T=!0,m=u);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:m,I=R&&A!==m&&this.options.updateMissing;if(T||C||I){if(this.logger.log(I?"updateKey":"missingKey",d,c,u,I?A:m),a){var $=this.resolve(u,on(on({},t),{},{keySeparator:!1}));$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)L.push(F[B]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);var V=function(e,r,n){var i=R&&n!==m?n:M;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,i,I,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,i,I,t),o.emit("missingKey",e,c,r,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?L.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){V([e],u+r,t["defaultValue".concat(r)]||A)})}):V(L,u,A))}m=this.extendTranslation(m,e,t,h,r),T&&m===u&&this.options.appendNamespaceToMissingKey&&(m="".concat(c,":").concat(u)),(T||C)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(u):u,C?m:void 0):this.options.parseMissingKeyHandler(m))}return i?(h.res=m,h):m}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,on(on({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(on(on({},r),{interpolation:on(on({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=on(on({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=ot.handle(f,e,t,this.options&&this.options.postProcessPassResolved?on({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;r=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),p=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(i=e,!oo["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(oo["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(r){if(!a.isValidLookup(t)){o=r;var i,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,r,e,s);else{d&&(c=a.pluralResolver.getSuffix(r,s.count,s));var c,h="".concat(a.options.pluralSeparator,"zero");if(d&&(u.push(l+c),f&&u.push(l+h)),p){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(m),d&&(u.push(m+c),f&&u.push(m+h))}}for(;i=u.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(nZ);function oa(e){return e.charAt(0).toUpperCase()+e.slice(1)}var os=function(){function e(t){(0,nM.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nY.create("languageUtils")}return(0,nI.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=oa(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=oa(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=oa(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),ou=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ol={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},oc=["v1","v2","v3"],od={zero:0,one:1,two:2,few:3,many:4,other:5},of=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,nM.A)(this,e),this.languageUtils=t,this.options=n,this.logger=nY.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},ou.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:ol[e.fc]}})}),r)}return(0,nI.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return od[e]-od[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!oc.includes(this.options.compatibilityJSON)}}]),e}();function op(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?op(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var om=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,nM.A)(this,e),this.logger=nY.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,nI.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:n6,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?n3(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?n3(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?n3(t.nestingPrefix):t.nestingPrefixEscaped||n3("$t("),this.nestingSuffix=t.nestingSuffix?n3(t.nestingSuffix):t.nestingSuffixEscaped||n3(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=n2(t,u,e);return s.alwaysFormat?s.format(o,void 0,r,oh(oh(oh({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),l=i.join(s.formatSeparator).trim();return s.format(n2(t,u,a),l,r,oh(oh(oh({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach(function(t){for(a=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=c(r)))if("function"==typeof d){var u=d(e,o,n);i="string"==typeof u?u:""}else if(n&&n.hasOwnProperty(r))i="";else if(f){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=nX(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=oh({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=oh(oh({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),u=c,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=nX(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce(function(e,t){return o.format(e,t,i.lng,oh(oh({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ob(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var ov=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,nM.A)(this,e),this.logger=nY.create("formatter"),this.options=t,this.formats={number:ob(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:ob(function(e,t){var r=new Intl.NumberFormat(e,og(og({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:ob(function(e,t){var r=new Intl.DateTimeFormat(e,og({},t));return function(e){return r.format(e)}}),relativetime:ob(function(e,t){var r=new Intl.RelativeTimeFormat(e,og({},t));return function(e){return r.format(e,t.range||"day")}}),list:ob(function(e,t){var r=new Intl.ListFormat(e,og({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,nI.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ob(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,nW.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,nH.A)(t)||(0,nK.A)()),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=l.locale||l.lng||n.locale||n.lng||r;u=o.formats[a](e,c,og(og(og({},s),n),l))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ow(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ow(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ox=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,nM.A)(this,n),i=r.call(this),n5&&nZ.call(n$(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=nY.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return(0,nI.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},u={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(r){var n,s,u,l;n=r.loaded,(u=(s=nQ(n,[o],Object)).obj)[l=s.k]=u[l]||[],u[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[r](e,t,function(s,u){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&u&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,a)},i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,o_(o_({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(nZ);function oE(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function oS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oS(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function oD(){}var oP=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if((0,nM.A)(this,n),t=r.call(this),n5&&nZ.call(n$(t)),t.options=oE(o),t.services={},t.logger=nY,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=n$(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),nB(t,n$(t));setTimeout(function(){t.init(o,i)},0)}return t}return(0,nI.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,nA.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,nA.A)(e[2])||"object"===(0,nA.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=oO(oO(oO({},n),this.options),oE(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=oO(oO({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?nY.init(o(this.modules.logger),this.options):nY.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"u">typeof Intl&&(i=ov);var i,a=new os(this.options);this.store=new oe(this.options.resources,this.options);var s=this.services;s.logger=nY,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new of(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new om(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ox(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new oi(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=oD),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=nJ(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oD,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=nJ();return e||(e=this.languages),t||(t=this.options.ns),r||(r=oD),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ot.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=nJ();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,nA.A)(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=oO({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",c=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=nJ();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=nJ();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oD,o=oO(oO(oO({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=oO({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new oi(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(nZ);(0,nU.A)(oP,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new oP(e,t)});var ok=oP.createInstance();ok.createInstance=oP.createInstance,ok.createInstance,ok.init,ok.loadResources,ok.reloadResources,ok.use,ok.changeLanguage,ok.getFixedT,ok.t,ok.exists,ok.setDefaultNamespace,ok.hasLoadedNamespace,ok.loadNamespaces,ok.loadLanguages;let oC=ok.default||ok;function oT(e,t,r,n){return oC.t(t,{ns:e,defaultValue:r,...n})}function oj(e,t,r){return nN[e]?oT("core",e,t??nN[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}oC.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let oR="import-map-override:",oN="import-map-overrides-disabled",oA="import-map-overrides:change",oM=!1,oI=null,o$=null;async function oL(){return o$??(o$=oF().then(({map:e,complete:t})=>(t||(o$=null),e))),o$}async function oF(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:oB(t),complete:r}}function oB(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function oV(){let e={};try{let t=oz();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(oR)){let r=n.slice(oR.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function oU(){let e=await oL();return oM?oB([e,oI??oV()]):e}async function oW(){return oL()}async function oH(){return oM?oB([await oL(),oV()]):oL()}function oK(e){if(!oM)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(oR)){let t=localStorage.getItem(r);t&&(e[r.slice(oR.length)]=t)}}return{imports:e}}return oV()}function oz(){if(!oM)return[];try{let e=localStorage.getItem(oN);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function oG(e){return!!oM&&oz().includes(e)}function oq(e,t){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(oR+e,t),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function oY(e){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(oR+e);let t=oz().filter(t=>t!==e);t.length>0?localStorage.setItem(oN,JSON.stringify(t)):localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oZ(){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(oR)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function oJ(e){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oz().filter(t=>t!==e);t.length>0?localStorage.setItem(oN,JSON.stringify(t)):localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oX=!1;function oQ(){!oX&&(oX=!0,(oM="development"===window.spaEnv)&&(oI=oV()))}function o0(e){return e.replace(/[\/\-@]/g,"_")}async function o1(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([o2(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),i&&clearTimeout(i);let s=o0(e),u=window[s];if(!("object"==typeof(o=u)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}u.init(r.S.default);let l=(await u.get(t))();if("object"!=typeof l||null===l){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return l}async function o2(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=o0(e);if(!window[r]){let r=t??await o3();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in oK().imports;try{return await function(e){var t;let r=(t=window)[o4]??(t[o4]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let i=new Promise((t,n)=>{let i=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",u)}function s(){a(),t()}function u(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",u),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&T({kind:"error",title:oj("scriptLoadingFailed","Error: Script failed to load"),description:oj("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:oj("resetOverrides","Reset overrides"),onActionButtonClick(){oZ(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function o3(){return oU()}let o4=Symbol.for("__openmrs_script_loading");function o6(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function o5(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&o6(t))}let o8="openmrs-routes:",o9="openmrs-routes:change",o7=!1,ie=null,it=null;async function ir(){return it??(it=io().then(({map:e,complete:t})=>(t||(it=null),e))),it}async function io(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&o5(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:ii(t),complete:r}}function ii(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function ia(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(o8)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(o8.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(o6(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(o6(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function is(){let e=await ir();return o7?ii([e,ie??await ia()]):e}async function iu(){return ir()}async function il(){return o7?ii([await ir(),await ia()]):ir()}function ic(){if(!o7)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(o8)){let t=localStorage.getItem(r);t&&(e[r.slice(o8.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function id(e,t){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(o8+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!o6(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(o8+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(o8+e,JSON.stringify(t.toString()));else{if(!o6(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(o8+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function ip(e){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(o8+e),window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ih(){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(o8)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let im=null;function iy(){return im||(im=(o7="development"===window.spaEnv)?ia().then(e=>{ie=e}):Promise.resolve())}let ig=`${nc}/attachment`;function ib(e,t){return nh(`${ig}/${e}`,{signal:t.signal})}function iv(e,t,r){return nh(`${ig}?patient=${e}&includeEncounterless=${t}`,{signal:r.signal})}async function iw(e,t){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),nh(`${ig}`,{method:"POST",body:r})}function i_(e,t){return nh(`${ig}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function ix(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function iE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var iO=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function iD(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var iP=function(e,t){this.type=e,Object.assign(this,t)};function ik(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function iC(){}var iT={type:"SKIP_WAITING"};function ij(e,t){if(!t)return e&&e.then?e.then(iC):Promise.resolve()}var iR=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new iO,n.en=new iO,n.on=new iO,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!iD(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new iP(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new iP("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new iP("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return ik(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new iP("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return ij(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),ik(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&iD(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new iP("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?ij(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return ik(this.getSW(),function(t){return ix(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&ix(this.fn.waiting,iT)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&iD(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return ik(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],iE(t.prototype,r),n&&iE(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return iS(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?iS(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function iN(e,t){if(void 0!==d)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),d;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new iR(e,t);return d=r.register().then(()=>r.controlling.then(()=>r))}function iA(){return d??Promise.resolve(void 0)}let iM="x-omrs-offline-response-body",iI="x-omrs-offline-response-status",i$="x-omrs-offline-caching-strategy";async function iL(e){let t=await iA();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function iF(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function iB(){return!window.indexedDB}async function iV(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function iU(){return await iV()||await iB()||await iF()}let iW="openmrs3:offline-mode",iH="unavailable";function iK(){return{current:iH,notAvailable:"unavailable"===iH,active:"on"===iH}}function iz(e){"unavailable"!==iH&&"unavailable"!==e&&(localStorage.setItem(iW,"on"===e?"active":"disabled"),iH=e)}async function iG(){await iU()||(iH="active"===localStorage.getItem(iW)?"on":"off"),navigator.onLine}let iq="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iY=Object.keys,iZ=Array.isArray;function iJ(e,t){return"object"!=typeof t||iY(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||iq.Promise||(iq.Promise=Promise);let iX=Object.getPrototypeOf,iQ={}.hasOwnProperty;function i0(e,t){return iQ.call(e,t)}function i1(e,t){"function"==typeof t&&(t=t(iX(e))),("u"<typeof Reflect?iY:Reflect.ownKeys)(t).forEach(r=>{i3(e,r,t[r])})}let i2=Object.defineProperty;function i3(e,t,r,n){i2(e,t,iJ(r&&i0(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function i4(e){return{from:function(t){return e.prototype=Object.create(t.prototype),i3(e.prototype,"constructor",e),{extend:i1.bind(null,e.prototype)}}}}let i6=Object.getOwnPropertyDescriptor;function i5(e,t){let r;return i6(e,t)||(r=iX(e))&&i5(r,t)}let i8=[].slice;function i9(e,t,r){return i8.call(e,t,r)}function i7(e,t){return t(e)}function ae(e){if(!e)throw Error("Assertion Failed")}function at(e){iq.setImmediate?setImmediate(e):setTimeout(e,0)}function ar(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function an(e,t){if(i0(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=an(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:an(s,t.substr(a+1))}}function ao(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){ae("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)ao(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?iZ(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var u=e[a];u&&i0(e,a)||(u=e[a]={}),ao(u,s,r)}}else void 0===r?iZ(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function ai(e){var t={};for(var r in e)i0(e,r)&&(t[r]=e[r]);return t}let aa=[].concat;function as(e){return aa.apply([],e)}let au="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(as([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>iq[e]),al=au.map(e=>iq[e]);ar(au,e=>[e,!0]);let ac=null;function ad(e){ac="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=ac&&ac.get(t);if(r)return r;if(iZ(t)){r=[],ac&&ac.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(al.indexOf(t.constructor)>=0)r=t;else{let n=iX(t);for(var i in r=n===Object.prototype?{}:Object.create(n),ac&&ac.set(t,r),t)i0(t,i)&&(r[i]=e(t[i]))}return r}(e);return ac=null,t}let{toString:af}={};function ap(e){return af.call(e).slice(8,-1)}let ah="u">typeof Symbol?Symbol.iterator:"@@iterator",am="symbol"==typeof ah?function(e){var t;return null!=e&&(t=e[ah])&&t.apply(e)}:function(){return null},ay={};function ag(e){var t,r,n,o;if(1==arguments.length){if(iZ(e))return e.slice();if(this===ay&&"string"==typeof e)return[e];if(o=am(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let ab="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var av="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),aw=()=>!0;let a_=!Error("").stack;function ax(){if(a_)try{throw ax.arguments,Error()}catch(e){return e}return Error()}function aE(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(aw).map(e=>"\n"+e).join("")):""}var aS=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],aO=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(aS),aD={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function aP(e,t){this._e=ax(),this.name=e,this.message=t}function ak(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function aC(e,t,r,n){this._e=ax(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=ak(e,t)}function aT(e,t){this._e=ax(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=ak(e,t)}i4(aP).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+aE(this._e,2))}},toString:function(){return this.name+": "+this.message}}),i4(aC).from(aP),i4(aT).from(aP);var aj=aO.reduce((e,t)=>(e[t]=t+"Error",e),{}),aR=aO.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=ax(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=aD[t]||r,this.inner=null)}return i4(n).from(aP),e[t]=n,e},{});aR.Syntax=SyntaxError,aR.Type=TypeError,aR.Range=RangeError;var aN=aS.reduce((e,t)=>(e[t+"Error"]=aR[t],e),{}),aA=aO.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=aR[t]),e),{});function aM(){}function aI(e){return e}function a$(e,t){return null==e||e===aI?t:function(r){return t(e(r))}}function aL(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function aF(e,t){return e===aM?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?aL(n,this.onsuccess):n),o&&(this.onerror=this.onerror?aL(o,this.onerror):o),void 0!==i?i:r}}function aB(e,t){return e===aM?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?aL(r,this.onsuccess):r),n&&(this.onerror=this.onerror?aL(n,this.onerror):n)}}function aV(e,t){return e===aM?t:function(r){var n=e.apply(this,arguments);iJ(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?aL(o,this.onsuccess):o),i&&(this.onerror=this.onerror?aL(i,this.onerror):i),void 0===n?void 0===a?void 0:a:iJ(n,a)}}function aU(e,t){return e===aM?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function aW(e,t){return e===aM?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}aA.ModifyError=aC,aA.DexieError=aP,aA.BulkError=aT;var aH={};let[aK,az,aG]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iX(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,iX(t),e]})(),aq=az&&az.then,aY=aK&&aK.constructor,aZ=!!aG;var aJ=!1,aX=aG?()=>{aG.then(sl)}:iq.setImmediate?setImmediate.bind(null,sl):iq.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{sl(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(sl,0)},aQ=function(e,t){a9.push([e,t]),a1&&(aX(),a1=!1)},a0=!0,a1=!0,a2=[],a3=[],a4=null,a6=aI,a5={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:sR,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{sR(e[0],e[1])}catch(e){}})}},a8=a5,a9=[],a7=0,se=[];function st(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=aM,this._lib=!1;var t=this._PSD=a8;if(av&&(this._stackHolder=ax(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==aH)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&so(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&sc();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof st?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,si(t)),n&&sd()}},so.bind(null,t))}catch(e){so(t,e)}}(this,e)}let sr={get:function(){var e=a8,t=sv;function r(r,n){var o=!e.global&&(e!==a8||t!==sv);let i=o&&!sE();var a=new st((t,a)=>{sa(this,new sn(sT(r,e,o,i),sT(n,e,o,i),t,a,e))});return av&&su(a,this),a}return r.prototype=aH,r},set:function(e){i3(this,"then",e&&e.prototype===aH?sr:{get:function(){return e},set:sr.set})}};function sn(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function so(e,t){if(a3.push(t),null===e._state){var r=e._lib&&sc();t=a6(t),e._state=!1,e._value=t,av&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=i5(t,"stack");t._promise=e,i3(t,"stack",{get:()=>aJ?r&&(r.get?r.get.apply(t):r.value):e.stack})}),a2.some(t=>t._value===e._value)||a2.push(e),si(e),r&&sd()}}function si(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)sa(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===a7&&(++a7,aQ(()=>{0==--a7&&sf()},[]))}function sa(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++a7,aQ(ss,[r,e,t])}else e._listeners.push(t)}function ss(e,t,r){try{a4=t;var n,o=t._value;t._state?n=e(o):(a3.length&&(a3=[]),n=e(o),-1===a3.indexOf(o)&&function(e){for(var t=a2.length;t;)if(a2[--t]._value===e._value)return void a2.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{a4=null,0==--a7&&sf(),--r.psd.ref||r.psd.finalize()}}function su(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function sl(){sc()&&sd()}function sc(){var e=a0;return a0=!1,a1=!1,e}function sd(){var e,t,r;do for(;a9.length>0;)for(e=a9,a9=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(a9.length>0);a0=!0,a1=!0}function sf(){var e=a2;a2=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=se.slice(0),r=t.length;r;)t[--r]()}function sp(e){return new st(aH,!1,e)}function sh(e,t){var r=a8;return function(){var n=sc(),o=a8;try{return sP(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{sP(o,!1),n&&sd()}}}i1(st.prototype,{then:sr,_then:function(e,t){sa(this,new sn(null,null,e,t,a8))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):sp(e)):this.then(null,e=>e&&e.name===t?r(e):sp(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),sp(t)))},stack:{get:function(){if(this._stack)return this._stack;try{aJ=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=aE(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return av&&((o=aE(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{aJ=!1}}},timeout:function(e,t){return e<1/0?new st((r,n)=>{var o=setTimeout(()=>n(new aR.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&i3(st.prototype,Symbol.toStringTag,"Dexie.Promise"),a5.env=sk(),i1(st,{all:function(){var e=ag.apply(null,arguments).map(sS);return new st(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>st.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof st)return e;if(e&&"function"==typeof e.then)return new st((t,r)=>{e.then(t,r)});var t=new st(aH,!0,e);return su(t,a4),t},reject:sp,race:function(){var e=ag.apply(null,arguments).map(sS);return new st((t,r)=>{e.map(e=>st.resolve(e).then(t,r))})},PSD:{get:()=>a8,set:e=>a8=e},totalEchoes:{get:()=>sv},newPSD:s_,usePSD:sC,scheduler:{get:()=>aQ,set:e=>{aQ=e}},rejectionMapper:{get:()=>a6,set:e=>{a6=e}},follow:(e,t)=>new st((r,n)=>s_((t,r)=>{var n=a8;n.unhandleds=[],n.onunhandled=r,n.finalize=aL(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},se.push(function t(){e(),se.splice(se.indexOf(t),1)}),++a7,aQ(()=>{0==--a7&&sf()},[])},n.finalize),e()},t,r,n))}),aY&&(aY.allSettled&&i3(st,"allSettled",function(){let e=ag.apply(null,arguments).map(sS);return new st(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>st.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),aY.any&&"u">typeof AggregateError&&i3(st,"any",function(){let e=ag.apply(null,arguments).map(sS);return new st((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>st.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let sm={awaits:0,echoes:0,id:0};var sy=0,sg=[],sb=0,sv=0,sw=0;function s_(e,t,r,n){var o=a8,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++sw;var a=a5.env;i.env=aZ?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject,nthen:sj(a.nthen,i),gthen:sj(a.gthen,i)}:{},t&&iJ(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sC(i,e,r,n);return 0===i.ref&&i.finalize(),s}function sx(){return sm.id||(sm.id=++sy),++sm.awaits,sm.echoes+=100,sm.id}function sE(){return!!sm.awaits&&(0==--sm.awaits&&(sm.id=0),sm.echoes=100*sm.awaits,!0)}function sS(e){return sm.echoes&&e&&e.constructor===aY?(sx(),e.then(e=>(sE(),e),e=>(sE(),sN(e)))):e}function sO(e){++sv,sm.echoes&&0!=--sm.echoes||(sm.echoes=sm.id=0),sg.push(a8),sP(e,!0)}function sD(){var e=sg[sg.length-1];sg.pop(),sP(e,!1)}function sP(e,t){var r,n=a8;if((t?!sm.echoes||sb++&&e===a8:!sb||--sb&&e===a8)||(r=t?sO.bind(null,e):sD,aq.call(aK,r)),e!==a8&&(a8=e,n===a5&&(a5.env=sk()),aZ)){var o=a5.env.Promise,i=e.env;az.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(iq,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function sk(){var e=iq.Promise;return aZ?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(iq,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:az.then,gthen:e.prototype.then}:{}}function sC(e,t,r,n,o){var i=a8;try{return sP(e,!0),t(r,n,o)}finally{sP(i,!1)}}function sT(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=a8;r&&sx(),sP(t,!0);try{return e.apply(this,arguments)}finally{sP(i,!1),n&&(o=sE,aq.call(aK,o))}}}function sj(e,t){return function(r,n){return e.call(this,sT(r,t),sT(n,t))}}function sR(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(iq.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),iJ(n,o)):iq.CustomEvent&&iJ(n=new CustomEvent("unhandledrejection",{detail:o}),o),n&&iq.dispatchEvent&&(dispatchEvent(n),!iq.PromiseRejectionEvent&&iq.onunhandledrejection))try{iq.onunhandledrejection(n)}catch(e){}av&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+aq).indexOf("[native code]")&&(sx=sE=aM);var sN=st.reject;let sA=String.fromCharCode(65535),sM="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",sI=[],s$="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),sL=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function sF(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let sB={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function sV(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ad(t))[e],t)}class sU{_trans(e,t,r){let n=this._tx||a8.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new aR.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=sc();try{return n&&n.db===this.db?n===a8.trans?n._promise(e,i,r):s_(()=>n._promise(e,i,r),{trans:n,transless:a8.transless||a8}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||a8.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===aj.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):sN(i)}return i._promise(r,(e,t)=>s_(()=>(a8.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return sN(new aR.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return sN(new aR.DatabaseClosed);t.open().catch(aM)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&sd()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(iZ(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=iY(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==sA)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&av&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?sF(r,a&&a.multi?e=>{let t=an(e,o);return iZ(t)&&t.some(e=>i(s,e))}:e=>i(s,an(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,iZ(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(i0(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){iJ(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sV(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?st.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{ao(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||iZ(e))return this.where(":id").equals(e).modify(t);{let r=an(e,this.schema.primKey.keyPath);if(void 0===r)return sN(new aR.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?iY(t).forEach(r=>{ao(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sV(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?st.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{ao(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?st.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:sB})).then(e=>e.numFailures?st.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new aR.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new aR.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sV(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new aT(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new aR.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new aR.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sV(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new aT(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new aT(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function sW(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"==typeof e){var a;return void iY(a=e).forEach(function(e){var t=a[e];if(iZ(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new aR.InvalidArgument("Invalid event config");var r=i(e,aI,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){at(function(){e.apply(null,t)})})})}})}n||(n=aU),o||(o=aM);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(n,o)}};return t[e]=r[e]=s,s}}function sH(e,t){return i4(t).from({prototype:e}),t}function sK(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function sz(e,t){e.filter=sF(e.filter,t)}function sG(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>sF(n(),t()):t,e.justLimit=r&&!n}function sq(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new aR.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function sY(e,t,r){let n=sq(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function sZ(e,t,r,n){let o=e.replayFilter?sF(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),i0(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),sJ(sY(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return sJ(sY(e,n,r),sF(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function sJ(e,t,r,n){var o=sh(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=aM},t=>{e.fail(t),r=aM})||o(e.value,e,e=>r=e),r()})})}function sX(e,t){try{let r=sQ(e),n=sQ(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(s0(e),s0(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=sX(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function sQ(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=ap(e);return"ArrayBuffer"===r?"binary":r}function s0(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class s1{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,sN.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,sN.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=sF(t.algorithm,e)}_iterate(e,t){return sZ(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&iJ(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>sZ(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(sK(t,!0))return r.count({trans:e,query:{index:sq(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return sZ(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&sK(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=sq(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return sZ(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,sK(t)?sG(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):sG(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),sG(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return sz(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return sz(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=sF(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&sK(t,!0)&&t.limit>0)return this._read(e=>{var r=sq(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return sz(this._ctx,function(e){var t=e.primaryKey.toString(),n=i0(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=iY(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];an(t,a)!==s&&(ao(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,iY(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(l,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=f[e],r={value:ad(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===sX(u(t),u(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=sK(t)&&t.limit===1/0&&("function"!=typeof e||e===s2)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(g.length>0||b&&e===s2)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>p(g.length,e))).then(()=>o.length>c+d&&i(c+l))})};return i(0).then(()=>{if(c.length>0)throw new aC("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return sK(e)&&(e.isPrimKey&&!s$||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new aC("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(s2)}}let s2=(e,t)=>t.value=null;function s3(e,t){return e<t?-1:+(e!==t)}function s4(e,t){return e>t?-1:+(e!==t)}function s6(e,t,r){var n=e instanceof ue?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function s5(e){return new e.Collection(e,()=>s7("")).limit(0)}function s8(e,t,r,n){var o,i,a,s,u,l,c,d=r.length;if(!r.every(e=>"string"==typeof e))return s6(e,"String expected.");function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?s3:s4;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),u=t.map(function(e){return e.lower}),l=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>s9(s[0],u[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,u,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==n[u])return 0>o(e[u],r[u])?e.substr(0,u)+r[u]+r.substr(u+1):0>o(e[u],n[u])?e.substr(0,u)+n[u]+r.substr(u+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[u],l)&&(s=u)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],u[m],a,l);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function s9(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function s7(e){return{type:1,lower:e,upper:e}}class ue{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?s5(this):new this.Collection(this,()=>s9(e,t,!r,!n))}catch(e){return s6(this,sM)}}equals(e){return null==e?s6(this,sM):new this.Collection(this,()=>s7(e))}above(e){return null==e?s6(this,sM):new this.Collection(this,()=>s9(e,void 0,!0))}aboveOrEqual(e){return null==e?s6(this,sM):new this.Collection(this,()=>s9(e,void 0,!1))}below(e){return null==e?s6(this,sM):new this.Collection(this,()=>s9(void 0,e,!1,!0))}belowOrEqual(e){return null==e?s6(this,sM):new this.Collection(this,()=>s9(void 0,e))}startsWith(e){return"string"!=typeof e?s6(this,"String expected."):this.between(e,e+sA,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):s8(this,(e,t)=>0===e.indexOf(t[0]),[e],sA)}equalsIgnoreCase(e){return s8(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ag.apply(ay,arguments);return 0===e.length?s5(this):s8(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ag.apply(ay,arguments);return 0===e.length?s5(this):s8(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,sA)}anyOf(){let e=ag.apply(ay,arguments),t=this._cmp;try{e.sort(t)}catch(e){return s6(this,sM)}if(0===e.length)return s5(this);let r=new this.Collection(this,()=>s9(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ag.apply(ay,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return s6(this,sM)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return s5(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return s6(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",aR.InvalidArgument);let s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers,l,c=n;function d(e,t){return c(e[0],t[0])}try{(l=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return s6(this,sM)}let f=0,p=u?e=>n(e,l[f][1])>0:e=>n(e,l[f][1])>=0,h=s?e=>o(e,l[f][0])>0:e=>o(e,l[f][0])>=0,m=p,y=new this.Collection(this,()=>s9(l[0][0],l[l.length-1][1],!s,!u));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),l.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===l.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,l[f][1])||0===this._cmp(o,l[f][0])||t(()=>{c===n?e.continue(l[f][0]):e.continue(l[f][1])}),!1)}),y}startsWithAnyOf(){let e=ag.apply(ay,arguments);return e.every(e=>"string"==typeof e)?0===e.length?s5(this):this.inAnyRange(e.map(e=>[e,e+sA])):s6(this,"startsWithAnyOf() only works with strings")}}function ut(e){return sh(function(t){return ur(t),e(t.target.error),!1})}function ur(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let un=sW(null,"storagemutated");class uo{_lock(){return ae(!a8.global),++this._reculock,1!==this._reculock||a8.global||(a8.lockOwnerFor=this),this}_unlock(){if(ae(!a8.global),0==--this._reculock)for(a8.global||(a8.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sC(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&a8.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(ae(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new aR.DatabaseClosed(r);case"MissingAPIError":throw new aR.MissingAPI(r.message,r);default:throw new aR.OpenFailed(r)}if(!this.active)throw new aR.TransactionInactive;return ae(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sh(t=>{ur(t),this._reject(e.error)}),e.onabort=sh(t=>{ur(t),this.active&&this._reject(new aR.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=sh(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&un.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return sN(new aR.ReadOnly("Transaction is readonly"));if(!this.active)return sN(new aR.TransactionInactive);if(this._locked())return new st((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},a8])});if(r)return s_(()=>{var e=new st((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new st((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=st.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new st((e,n)=>{r.then(r=>t._waitingQueue.push(sh(e.bind(null,r))),e=>t._waitingQueue.push(sh(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new aR.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(i0(t,e))return t[e];let r=this.schema[e];if(!r)throw new aR.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function ui(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+ua(t)}}function ua(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function us(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:ar(r,e=>[e.name,e])}}let uu=e=>{try{return e.only([[]]),uu=()=>[[]],[[]]}catch(e){return uu=()=>sA,sA}};function ul(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>an(t,e):t=>an(t,e)}function uc(e){return[].slice.call(e)}let ud=0;function uf(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function up({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=uc(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=iZ(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:ul(t)},indexes:uc(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:iZ(o),keyPath:o,unique:r,multiEntry:n,extractKey:ul(o)};return i[uf(o)]=a,a}),getIndexByKeyPath:e=>i[uf(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[uf(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,u)=>{let l;s=sh(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,ur(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(l=c.clear()):h.push(l=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(l=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),l.onerror=g;else for(let t=0;t<p;++t)h.push(l=c[r](e[t])),l.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};l.onerror=e=>{g(e),b(e)},l.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=sh(n);let i=e.objectStore(t),a=r.length,s=Array(a),u,l=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===l&&n(s)},f=ut(o);for(let e=0;e<a;++e)null!=r[e]&&((u=i.get(r[e]))._pos=e,u.onsuccess=d,u.onerror=f,++l);0===l&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=sh(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=ut(o)}),query:e=>new Promise((r,n)=>{r=sh(r);let{trans:i,values:s,limit:u,query:l}=e,c=u===1/0?void 0:u,{index:d,range:f}=l,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===u)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=ut(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===u?r({result:o}):void i.continue()):r({result:o})},t.onerror=ut(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,u)=>{s=sh(s);let{index:l,range:c}=n,d=e.objectStore(t),f=l.isPrimaryKey?d:d.index(l.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=ut(u),h.onsuccess=sh(t=>{let r=h.result;if(!r)return void s(null);r.___id=++ud,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=sh(u),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=sh(e),h.onerror=ut(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=sh(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},u)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),u=n.isPrimaryKey?s:s.index(n.name),l=o(i),c=l?u.count(l):u.count();c.onsuccess=sh(t=>e(t.target.result)),c.onerror=ut(a)})}}}),u={};return s.forEach(e=>u[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:uu(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function uh({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=i5(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?i3(t,r,{get(){return this.table(r)},set(e){i2(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function um({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function uy(e,t){return e._cfg.version-t._cfg.version}function ug(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||s$)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function ub(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>uv(o,e)),o}function uv(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function uw(e,t,r){let n={};return i9(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=ui(ua(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=ui(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=us(e,i,a)}),n}function u_({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+i9(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&iq.WorkerGlobalScope&&iq instanceof iq.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ux{_parseStoresSpec(e,t){iY(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return ui(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),iZ(n),0===t)}),o=n.shift();if(o.multi)throw new aR.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new aR.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new aR.Schema("Index must have a name and cannot be an empty string")}),t[r]=us(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?iJ(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{iJ(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,um(t,[t._allTables,t,t.Transaction.prototype]),uh(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],iY(o),o),t._storeNames=iY(o),this}upgrade(e){return this._cfg.contentUpgrade=aW(this._cfg.contentUpgrade||aM,e),this}}function uE(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new uU("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function uS(e){return e&&"function"==typeof e.databases}function uO(e){return s_(function(){return a8.letThrough=!0,e()})}function uD(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):iZ(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function uP(e,t,r){var n=arguments.length;if(n<2)throw new aR.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,as(o),r]}function uk(e,t,r){let n=iZ(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let uC={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=uf(e),s=o[n]=o[n]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...r,isVirtual:l,keyTail:t,keyLength:u,extractKey:ul(e),unique:!l&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function u(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:uk(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:uk(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[uf(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(u(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(uk(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(uk(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function uT(e,t,r,n){return r=r||{},n=n||"",iY(e).forEach(o=>{if(i0(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=ap(i);e!==ap(a)?r[n+o]=t[o]:"Object"===e?uT(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),iY(t).forEach(o=>{i0(e,o)||(r[n+o]=t[o])}),r}let uj={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=a8.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===aM)break;return o._promise("readwrite",()=>u(e),!0);case"put":if(a.fire===aM&&s.fire===aM)break;return o._promise("readwrite",()=>u(e),!0);case"delete":if(i.fire===aM)break;return o._promise("readwrite",()=>u(e),!0);case"deleteRange":if(i.fire===aM)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>u({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function u(e){var t,o;let u=a8.trans,l=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!l)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:l}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:l,cache:"immutable"})).then(t=>{let o=l.map((r,o)=>{let l=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,l,u);else if("add"===e.type||void 0===l){let t=a.fire.call(c,r,e.values[o],u);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||ao(e.values[o],n.keyPath,r))}else{let t=uT(l,e.values[o]),n=s.fire.call(c,t,r,l,u);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{i0(t,e)?t[e]=n[e]:ao(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<l.length;++i){let a=n?n[i]:l[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function uR(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===sX(t.keys[o],e[i])&&(n.push(r?ad(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let uN={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=uR(e.keys,e.trans._cache,"clone"===e.cache);return t?st.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ad(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function uA(e){return!("from"in e)}let uM=function(e,t){if(!this){let t=new uM;return e&&"d"in e&&iJ(t,e),t}iJ(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function uI(e,t,r){let n=sX(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(uA(e))return iJ(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>sX(r,e.from))return o?uI(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},uF(e);if(sX(t,e.to)>0)return i?uI(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},uF(e);0>sX(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),sX(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&u$(e,o),i&&a&&u$(e,i)}function u$(e,t){uA(t)||function e(t,{from:r,to:n,l:o,r:i}){uI(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function uL(e){let t=uA(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>sX(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=sX(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function uF(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=uB(r)}e.d=uB(e)}function uB({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}i1(uM.prototype,{add(e){return u$(this,e),this},addKey(e){return uI(this,e,e),this},addKeys(e){return e.forEach(e=>uI(this,e,e)),this},[ah](){return uL(this)}});let uV={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new uM(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,l={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new uM)},l=u(""),c=u(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(iZ(f)){"delete"!==d&&(f=e.results),l.addKeys(f);let t=uR(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=u(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&iZ(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==sX(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),l.add(e)}else l.add(r),c.add(r),i.indexes.forEach(e=>u(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new uM(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new uM(e.key)],getMany:e=>[a,(new uM).addKeys(e.keys)],count:c,query:c,openCursor:c};return iY(d).forEach(e=>{l[e]=function(i){let{subscr:a}=a8;if(a){let l=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new uM)},c=l(""),f=l(":dels"),[p,h]=d[e](i);if(l(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(u&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),l}}}};class uU{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=uU.dependencies;this._options=t={addons:uU.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:aM,dbReadyPromise:null,cancelOpen:aM,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new st(e=>{i.dbReadyResolve=e}),i.openCanceller=new st((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=sW(this,"populate","blocked","versionchange","close",{ready:[aW,aM]}),this.on.ready.subscribe=i7(this.on.ready.subscribe,e=>(t,r)=>{uU.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||st.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,sH(s1.prototype,function(e,t){this.db=r;let n=sB,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==aI?s:null}})),this.Table=function(e){return sH(sU.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:sW(null,{creating:[aF,aM],reading:[a$,aI],updating:[aV,aM],deleting:[aB,aM]})})}(this),this.Transaction=function(e){return sH(uo.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=sW(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new st((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),sN(e)})})}(this),this.Version=function(e){return sH(ux.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return sH(ue.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new aR.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=uu(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),sI.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(uC),this.use(uj),this.use(uV),this.use(uN),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new aR.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new aR.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(uy),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||a8.letThrough||this._vip)?e():new st((e,t)=>{if(this._state.openComplete)return t(new aR.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new aR.DatabaseClosed);this.open().catch(aM)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?sN(r.dbOpenError):e);av&&(r.openCanceller._stackHolder=ax()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new aR.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,u=!1;return st.race([o,("u"<typeof navigator?st.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new st((t,o)=>{if(i(),!n)throw new aR.MissingAPI;let a=e.name,l=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!l)throw new aR.MissingAPI;l.onerror=ut(o),l.onblocked=sh(e._fireOnBlocked),l.onupgradeneeded=sh(t=>{if(s=l.transaction,r.autoSchema&&!e._options.allowEmptyDB){l.onerror=ur,s.abort(),l.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=sh(()=>{o(new aR.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=ut(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;u=d<1,e._novip.idbdb=l.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=a8.transless||a8,s_(()=>{a8.trans=n,a8.transless=f,0===i?(iY(r).forEach(e=>{ub(c,e,r[e].primKey,r[e].indexes)}),up(e,c),st.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=uw(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,u=i._cfg.dbschema;u_(e,o,n),u_(e,u,n),a=e._dbSchema=u;let l=ug(o,u);l.add.forEach(e=>{ub(n,e[0],e[1].primKey,e[1].indexes)}),l.change.forEach(e=>{if(e.recreate)throw new aR.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>uv(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),uv(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;up(e,n),r._memoizedTables={},s=!0;let i=ai(u);l.del.forEach(e=>{i[e]=o[e]}),um(e,[e.Transaction.prototype]),uh(e,[e.Transaction.prototype],iY(i),i),r.schema=i;let a=ab(c);a&&sx();let d=st.follow(()=>{if((t=c(r))&&a){var e=sE.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?st.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&s$||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),um(e,[e.Transaction.prototype]),uh(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?st.resolve(o.shift()(r.idbtrans)).then(e):st.resolve()})().then(()=>{var e;iY(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||ub(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),l.onsuccess=sh(()=>{s=null;let n=e._novip.idbdb=l.result,o=i9(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=uw(0,t,r);e._storeNames=i9(t.objectStoreNames,0),uh(e,[e._allTables],iY(n),n)}(e,n,i):(u_(e,e._dbSchema,i),((t=ug(uw(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),up(e,i)}catch(e){}sI.push(e),n.onversionchange=sh(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=sh(t=>{e.on("close").fire(t)}),u&&function({indexedDB:e,IDBKeyRange:t},r){uS(e)||"__dbnames"===r||uE(e,t).put({name:r}).catch(aM)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],st.resolve(uO(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(aW,aM);return r.onReadyBeingFired=[],st.resolve(uO(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),sN(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=sI.indexOf(this);if(t>=0&&sI.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new st(t=>{e.dbReadyResolve=t}),e.openCanceller=new st((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new aR.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new st((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=sh(()=>{!function({indexedDB:e,IDBKeyRange:t},r){uS(e)||"__dbnames"===r||uE(e,t).delete(r).catch(aM)}(this._deps,this.name),r()}),e.onerror=ut(n),e.onblocked=this._fireOnBlocked};if(e)throw new aR.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return iY(this._allTables).map(e=>this._allTables[e])}transaction(){let e=uP.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=a8.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)n="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new aR.InvalidArgument("Invalid transaction mode: "+e);n="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===n){if(!a)throw new aR.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new aR.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):sN(e)}let s=(function e(t,r,n,o,i){return st.resolve().then(()=>{let a,s=a8.transless||a8,u=t._createTransaction(r,n,t._dbSchema,o);if(o)u.idbtrans=o.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===aj.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):sN(o)}let l=ab(i);l&&sx();let c=st.follow(()=>{if(a=i.call(u,u))if(l){var e=sE.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=uD(a))},{trans:u,transless:s});return(a&&"function"==typeof a.then?st.resolve(a).then(e=>u.active?e:sN(new aR.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&u._resolve(),u._completion.then(()=>e))).catch(e=>(u._reject(e),sN(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):a8.trans?sC(a8.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!i0(this._allTables,e))throw new aR.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let uW="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class uH{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[uW](){return this}}function uK(e,t){return iY(t).forEach(r=>{u$(e[r]||(e[r]=new uM),t[r])}),e}try{i={indexedDB:iq.indexedDB||iq.mozIndexedDB||iq.webkitIndexedDB||iq.msIndexedDB,IDBKeyRange:iq.IDBKeyRange||iq.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function uz(e){let t=uG;try{uG=!0,un.storagemutated.fire(e)}finally{uG=t}}i1(uU,{...aA,delete:e=>new uU(e,{addons:[]}).delete(),exists:e=>new uU(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return uS(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):uE(e,t).toCollection().primaryKeys()})(uU.dependencies).then(e)}catch(e){return sN(new aR.MissingAPI)}},defineClass:()=>function(e){iJ(this,e)},ignoreTransaction:e=>a8.trans?sC(a8.transless,e):e(),vip:uO,async:function(e){return function(){try{var t=uD(e.apply(this,arguments));return t&&"function"==typeof t.then?t:st.resolve(t)}catch(e){return sN(e)}}},spawn:function(e,t,r){try{var n=uD(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:st.resolve(n)}catch(e){return sN(e)}},currentTransaction:{get:()=>a8.trans||null},waitFor:function(e,t){let r=st.resolve("function"==typeof e?uU.ignoreTransaction(e):e).timeout(t||6e4);return a8.trans?a8.trans.waitFor(r):r},Promise:st,debug:{get:()=>av,set:e=>{av=e,aw="dexie"===e?()=>!0:sL}},derive:i4,extend:iJ,props:i1,override:i7,Events:sW,on:un,liveQuery:function(e){return new uH(t=>{let r=ab(e),n=!1,o={},i={},a={get closed(){return n},unsubscribe:()=>{n=!0,un.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,u=!1;function l(){return iY(i).some(e=>o[e]&&function(e,t){let r=uL(t),n=r.next();if(n.done)return!1;let o=n.value,i=uL(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=sX(s.from,o.to)&&sX(s.to,o.from)>=0)return!0;0>sX(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{uK(o,e),l()&&d()},d=()=>{let f,p;if(s||n)return;o={};let h={},m=(r&&sx(),f=()=>s_(e,{subscr:h,trans:null}),p=a8.trans?sC(a8.transless,f):f(),r&&p.then(sE,sE),p);u||(un("storagemutated",c),u=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,n||(l()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:uK,getByKeyPath:an,setByKeyPath:ao,delByKeyPath:function(e,t){"string"==typeof t?ao(e,t,void 0):"length"in t&&[].map.call(t,function(t){ao(e,t,void 0)})},shallowClone:ai,deepClone:ad,getObjectDiff:uT,cmp:sX,asap:at,minKey:-1/0,addons:[],connections:sI,errnames:aj,dependencies:i,semVer:"3.2.2",version:"3.2.2".split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),uU.maxKey=uu(uU.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(un("storagemutated",e=>{if(!uG){let t;s$?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uG=!0,dispatchEvent(t),uG=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{uG||uz(e)}));let uG=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");un("storagemutated",t=>{uG||e.postMessage(t)}),e.onmessage=e=>{e.data&&uz(e.data)}}else if("u">typeof self&&"u">typeof navigator){un("storagemutated",e=>{try{uG||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&uz(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&uz(e.changedParts)})}function uq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}st.rejectionMapper=function(e,t){if(!e||e instanceof aP||e instanceof TypeError||e instanceof SyntaxError||!e.name||!aN[e.name])return e;var r=new aN[e.name](t||e.message,e);return"stack"in e&&i3(r,"stack",{get:function(){return this.inner.stack}}),r},aw=sL;class uY extends uU{constructor(){super("EsmOffline"),uq(this,"syncQueue",void 0),uq(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function uZ(){return new uY}let uJ=new uY,uX={},uQ=q("offline-synchronization",{});function u0(){return uQ}async function u1(){if(uQ.getState().synchronization)return;let e=await uJ.syncQueue.count(),t={},r=Object.entries(uX),n=r.length,o={},i=new AbortController,a=()=>{let e=uQ.getState().synchronization;uQ.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{uQ.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],u=s.dependsOn.map(e=>t[e]);u.every(Boolean)&&(o[n]={},await Promise.all(u),t[n]=u2(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{uQ.setState({synchronization:void 0})}}async function u2({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],u=await u3();await uJ.syncQueue.where({type:e,userId:u}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let l=0;l<a.length;l++){let[c,d,{id:f,dependencies:p=[]}]=a[l];try{let i=await r(d,{abort:o,index:l,items:s,userId:u,dependencies:p.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==f&&(n[e][f]=i),await uJ.syncQueue.delete(c)}catch(e){await uJ.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function u3(){let e=await nO();return e?.uuid||"*"}async function u4(e,t,r,n){let o=n&&n.id;return void 0!==o&&await uJ.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(uU.errnames.DatabaseClosed),await uJ.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(uU.errnames.DatabaseClosed,()=>-1)}async function u6(e,t,r){let n=await u3();return await u4(n,e,t,r)}async function u5(e,t){return(await u8(e,t)).map(e=>e.content)}async function u8(e,t){return await uJ.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(uU.errnames.DatabaseClosed,()=>[])}async function u9(e){let t=await u3();return await u5(t,e)}async function u7(e){let t=await u3();return await u8(t,e)}async function le(e){return await uJ.syncQueue.get(e).catch(uU.errnames.DatabaseClosed,()=>void 0)}function lt(e){return!!uX[e]?.options.onBeginEditSyncItem}async function lr(e){let t=await le(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=uX[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function ln(e){await uJ.syncQueue.delete(e).catch(uU.errnames.DatabaseClosed)}function lo(e,t,r,n={}){uX[e]={type:e,dependsOn:t,process:r,options:n}}var li=r(8414);let la="OFFLINE+";function ls(){return la+(0,li.A)()}function lu(e){return e.startsWith(la)}let ll={};function lc(){return Object.values(ll)}function ld(e){ll[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),ll[e.id]=e}async function lf(e){let t=await lw();return await lp(t,e)}async function lp(e,t){let r=new uY;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(uU.errnames.DatabaseClosed,()=>[])}async function lh(e,t){let r=await lw();return await lm(r,e,t)}async function lm(e,t,r){let n=new uY,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(uU.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(uU.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(uU.errnames.DatabaseClosed)}async function ly(e,t){let r=await lw();return await lg(r,e,t)}async function lg(e,t,r){let n=new uY,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(uU.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(uU.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(uU.errnames.DatabaseClosed))}async function lb(e,t){let r=await lf(e);await Promise.all(r.map(async e=>lv(e.type,e.identifier,t)))}async function lv(e,t,r){await lh(e,t);let n=new uY,o=await lw(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(uU.errnames.DatabaseClosed,()=>void 0),a=lc().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),u=s.filter(e=>!e.error).map(e=>e.id),l=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:u,erroredHandlers:l,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(uU.errnames.DatabaseClosed)}async function lw(){let e=(await nO()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let l_=q("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function lx(){return lO(),l_}function lE(e,t){lO(),ld({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function lS(e){lO(),await lv("patient",e)}function lO(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function lD(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([nh(`${nd}/Patient/${e}`,t).catch(e=>n=e),r?lP(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function lP(e){let t=(await u9("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function lk(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lC(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var lT=r(6170);function lj(e){return{uuid:e.uuid,display:e.display}}function lR(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return nm(`${nc}/location${n?"?"+n:""}`).pipe((0,lT.map)(e=>e.data.results.map(lj))).pipe((0,lT.take)(1))}function lN(e){return{uuid:e.uuid,display:e.display,name:e.name}}function lA(){return nm(`${nc}/visittype`).pipe((0,lT.map)(e=>e.data.results.map(lN))).pipe((0,lT.take)(1))}var lM=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),lI=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return ea(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(eh),l$=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return ea(t,e),t}(eg),lL=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ea(t,e),t.prototype[ey]=function(){return new l$(this)},t.prototype.lift=function(e){var t=new lF(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new lM;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new lM;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new lM;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new lM},t.prototype._subscribe=function(e){if(this.closed)throw new lM;return this.hasError?(e.error(this.thrownError),eh.EMPTY):this.isStopped?(e.complete(),eh.EMPTY):(this.observers.push(e),new lI(this,e))},t.prototype.asObservable=function(){var e=new ew;return e.source=this,e},t.create=function(e,t){return new lF(e,t)},t}(ew),lF=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return ea(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):eh.EMPTY},t}(lL),lB=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return ea(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new lM},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(lL),lV=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),lU=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let lW="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",lH=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lK(){return Z("visit",lH)}function lz(e,t){lK().setState({patientUuid:e,manuallySetVisitUuid:t})}function lG(e,t){return nh(`${nc}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lq(e,t,r){return nh(`${nc}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lY(e,t,r){return nh(`${nc}/visit?patient=${e}&v=${r??lW}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lK().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let lZ=new lB(null);class lJ{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lJ.version}static addUnaryOp(e){return lJ.max_unop_len=Math.max(e.length,lJ.max_unop_len),lJ.unary_ops[e]=1,lJ}static addBinaryOp(e,t,r){return lJ.max_binop_len=Math.max(e.length,lJ.max_binop_len),lJ.binary_ops[e]=t,r?lJ.right_associative.add(e):lJ.right_associative.delete(e),lJ}static addIdentifierChar(e){return lJ.additional_identifier_chars.add(e),lJ}static addLiteral(e,t){return lJ.literals[e]=t,lJ}static removeUnaryOp(e){return delete lJ.unary_ops[e],e.length===lJ.max_unop_len&&(lJ.max_unop_len=lJ.getMaxKeyLen(lJ.unary_ops)),lJ}static removeAllUnaryOps(){return lJ.unary_ops={},lJ.max_unop_len=0,lJ}static removeIdentifierChar(e){return lJ.additional_identifier_chars.delete(e),lJ}static removeBinaryOp(e){return delete lJ.binary_ops[e],e.length===lJ.max_binop_len&&(lJ.max_binop_len=lJ.getMaxKeyLen(lJ.binary_ops)),lJ.right_associative.delete(e),lJ}static removeAllBinaryOps(){return lJ.binary_ops={},lJ.max_binop_len=0,lJ}static removeLiteral(e){return delete lJ.literals[e],lJ}static removeAllLiterals(){return lJ.literals={},lJ}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new lJ(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return lJ.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lJ.binary_ops[String.fromCharCode(e)]||lJ.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lJ.isIdentifierStart(e)||lJ.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(lJ.hooks[e]){let r={context:this,node:t};return lJ.hooks.run(e,r),r.node}return t}searchHook(e){if(lJ.hooks[e]){let t={context:this};return lJ.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lJ.SPACE_CODE||e===lJ.TAB_CODE||e===lJ.LF_CODE||e===lJ.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:lJ.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lJ.SEMCOL_CODE||r===lJ.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,lJ.max_binop_len),t=e.length;for(;t>0;){if(lJ.binary_ops.hasOwnProperty(e)&&(!lJ.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lJ.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,i,a,s,u;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:lJ.binaryPrecedence(t),right_a:lJ.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=lJ.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lJ.right_associative.has(t)},u=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:lJ.BINARY_EXP,operator:t,left:i,right:a},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+u),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lJ.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lJ.isDecimalDigit(e)||e===lJ.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lJ.SQUOTE_CODE||e===lJ.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lJ.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lJ.max_unop_len)).length;r>0;){if(lJ.unary_ops.hasOwnProperty(t)&&(!lJ.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lJ.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lJ.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lJ.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lJ.literals.hasOwnProperty(n.name)?n={type:lJ.LITERAL,value:lJ.literals[n.name],raw:n.name}:n.name===lJ.this_str&&(n={type:lJ.THIS_EXP})):e===lJ.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lJ.PERIOD_CODE||t===lJ.OBRACK_CODE||t===lJ.OPAREN_CODE||t===lJ.QUMARK_CODE;){let r;if(t===lJ.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lJ.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lJ.OBRACK_CODE?((e={type:lJ.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lJ.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lJ.OPAREN_CODE?e={type:lJ.CALL_EXP,arguments:this.gobbleArguments(lJ.CPAREN_CODE),callee:e}:(t===lJ.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lJ.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lJ.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lJ.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lJ.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));lJ.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lJ.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lJ.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lJ.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lJ.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lJ.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:lJ.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lJ.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lJ.isIdentifierPart(e))this.index++;else break;return{type:lJ.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lJ.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lJ.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lJ.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lJ.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lJ.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lJ.CPAREN_CODE);if(this.code===lJ.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lJ.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lJ.ARRAY_EXP,elements:this.gobbleArguments(lJ.CBRACK_CODE)}}}Object.assign(lJ,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(lJ),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),lJ.max_unop_len=lJ.getMaxKeyLen(lJ.unary_ops),lJ.max_binop_len=lJ.getMaxKeyLen(lJ.binary_ops);let lX=e=>new lJ(e).parse(),lQ=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lJ).filter(e=>!lQ.includes(e)&&void 0===lX[e]).forEach(e=>{lX[e]=lJ[e]}),lX.Jsep=lJ,lX.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let l0="ArrowFunctionExpression",l1={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},l2={...l1,Promise};function l3(e,t={}){return l7(e,t,cr)}async function l4(e,t={}){return ce(e,t,cr)}function l6(e,t={}){return l7(e,t,cn)}function l5(e,t={}){return ce(e,t,cn)}function l8(e,t={}){return l7(e,t,co)}function l9(e,t={}){return ce(e,t,co)}function l7(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=cl(t,l1),o=ci("string"==typeof e?lX(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function ce(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=cl(t,l2);return Promise.resolve(ci("string"==typeof e?lX(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function ct(e){return lX(e)}function cr(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function cn(e){return"boolean"==typeof e}function co(e){return"number"==typeof e}function ci(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,u,l,c,d,f,p,h,m=e,y=t;let g=ci(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return ci(b.left,v)&&ci(b.right,v);case"||":return ci(b.left,v)||ci(b.right,v);case"??":return ci(b.left,v)??ci(b.right,v)}let w=ci(b.left,v),x=ci(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,ci(r.test,n)?ci(r.consequent,n):ci(r.alternate,n);case"CallExpression":return cf(cs(e,t));case"ArrowFunctionExpression":let E;return o=e,i=t,E=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<E.length)throw`Required argument(s) ${E.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(E.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return ci(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return cf(cu(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(cp(s));case"SequenceExpression":let S;return u=e,l=t,(S=u.expressions.map(cp(l)))[S.length-1];case"NewExpression":var O=e,D=t;if(O.callee&&"Identifier"===O.callee.type){let e=O.arguments?.map(cp(D));switch(O.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${O.callee.name}`}}if(O.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(ch(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let P,k;return f=e,p=t,P=f.expressions?.map(cp(p))??[],(k=f.quasis?.map(cp(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ca(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ca(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function cs(e,t){let r=cd(e.callee,t);if(r===cc||e.optional&&null==r)return cc;let n=e.arguments?.map(cp(t));if(r){if("function"!=typeof r)throw`${cg(e.callee)} is not a function`}else throw`No function named ${cg(e.callee)} is defined in this context`;return r(...n)}function cu(e,t){let r=cd(e.object,t);if(r===cc||e.optional&&null==r)return cc;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${cy(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=ca(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${cy(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(ci(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);ch(n),function(e,t){if(cm.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function cl(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lX.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:l0,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=l0,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lX.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lX.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,i,a;let s=this.index,u=this.expr.charAt(this.index+1),l=t.call(this,u);if(!l)return;let c="";for(;o=this.code,i=l,95===o||i.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=u)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),lX.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lX.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lX.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lX.addBinaryOp("in",7),lX.addBinaryOp("??",1);let cc=Symbol("optional chain short-circuited");function cd(e,t){switch(e.type){case"MemberExpression":return cu(e,t);case"CallExpression":return cs(e,t);default:return ci(e,t)}}function cf(e){return e===cc?void 0:e}function cp(e){return function(t){return null===t?null:ci(t,e)}}function ch(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let cm=new Set(["toString","valueOf","hasOwnProperty"]);function cy(e,t){try{return ca(e,t)}catch{return"<computed>"}}function cg(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function cb(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...l2},isLocalExpression:!1,variables:new Set};return cv("string"==typeof e?lX(e):e,t),[...t.variables]}function cv(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,cv(n.argument,o);case"BinaryExpression":return i=e,a=t,[cv(i.left,a),cv(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,u=t,[cv(s.consequent,u),cv(s.test,u),cv(s.alternate,u)].filter(Boolean);case"CallExpression":let r;return l=e,c=t,r=cv(l.callee,c),l.arguments?.map(cw(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,u,l,c,d,f,p,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let E=v.params?.map(cw(x))??[],S=cv(v.body,x)??[];if(S&&Array.isArray(S))for(let e of S)E.includes(e)||w.variables.add(e);return;case"MemberExpression":var O=e,D=t;if(cv(O.object,D),O.computed)return void cv(O.property,D);let P={...D};P.isLocalExpression=!0,cv(O.property,P);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(cw(f));case"SequenceExpression":return p=e,h=t,void p.expressions?.map(cw(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(cw(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(cw(b)),g.quasis?.map(cw(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function cw(e){return function(t){return null===t?null:cv(t,e)}}let c_=Z("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function cx(e,t,r){c_.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function cE(){let e=c_.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function cS(e){return c_.getState().flags[e].enabled}function cO(e,t){c_.subscribe(r=>{t(r.flags[e].enabled)})}function cD(e,t){c_.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}function cP(e){return!window.offlineEnabled||(e??navigator.onLine)}function ck(e=!0,t=!1){return cC(cP(),e,t)}function cC(e,t=!0,r=!1){return!!(e?t:r)}c_.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});let cT=q("extensionsInternal",{slots:{},extensions:{}}),cj=q("extensionRenderings",{renderings:new Map}),cR=()=>Z("extensionsInternal",{slots:{},extensions:{}}),cN=()=>Z("extensionRenderings",{renderings:new Map});function cA(e){let t=cT.getState(),r=e(t);r!==t&&cT.setState(r)}let cM=null,cI=null;function c$(){let e=cj.getState();return cM&&e===cI||(cM=new Map(e.renderings),cI=e,function(e){for(let t of(cG.clear(),e.values()))cY(t,1);cq=!0}(cM)),cM}function cL(e){cI={renderings:e},cj.setState(cI,!0)}function cF(e){let t=c$();t.has(e.renderingId)||(t.set(e.renderingId,e),cY(e,1),cL(t))}function cB(e){let t=c$(),r=t.get(e);r&&(t.delete(e),cY(r,-1),cL(t))}let cV=()=>Z("extensions",{slots:{}}),cU=0,cW=new Set;function cH(e){cU++;try{return e()}finally{if(0==--cU&&cW.size>0){let e=Array.from(cW);for(let t of(cW.clear(),e))cK(t)}}}function cK(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function cz(e){cU>0?cW.add(e):cK(e)}let cG=new Map,cq=!1;function cY(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=cG.get(r);if(!n){if(t<0)return;cG.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),cq=!0;return}n.count+=t,n.count<1&&(cG.delete(r),cq=!0)}function cZ(){var e,t;if(c$(),!cq)return;cq=!1;let r=Array.from(cG.values(),({record:e})=>e);r.sort(cJ),e=eR.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===cJ(e,t[r]))||eR.setState({mountedExtensions:r})}function cJ(e,t){return cX(e.slotName,t.slotName)||cX(e.extensionId,t.extensionId)||cX(e.slotModuleName,t.slotModuleName)||cX(e.extensionModuleName,t.extensionModuleName)}function cX(e,t){return e===t?0:e<t?-1:1}cZ(),cj.subscribe(()=>cz(cZ));let cQ=cR(),c0=cV(),c1=eA(),c2=e$(),c3=new Set,c4=!1;function c6(e){if(null===e)c3=null;else if(null!==c3)for(let t of e)c3.add(t);cz(c5)}function c5(){if(!c4){c4=!0;try{for(let e=1;;e++){let t=c3;if(null!==t&&0===t.size)return;c3=new Set;try{!function(e,t,r,n,o,i=null){let a=c0.getState().slots,s={},u=!1,l=cP(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,d]of Object.entries(e.slots)){let f=a[n];if(f&&i&&!i.has(n)){s[n]=f;continue}let{config:p}=eI(t,d.name),h=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=cQ.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>du(e,o,i[de(e)]?.order,t)-du(r,o,i[de(r)]?.order,t))}(r,t.slots[e].attachedIds),u=[];for(let l of s){let{config:s}=eF(n,e,l),c=eB(r,e,l),d=c?(0,eo.merge)({},s,c):s,f=de(l),p=t.extensions[f];if(p){let e=d?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!nS(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag)||window.offlineEnabled&&!cC(i,p.online,p.offline))continue;u.push({id:l,name:f,moduleName:p.moduleName,config:d,featureFlag:p.featureFlag,meta:p.meta,online:d?.["Display conditions"]?.online??p.online??!0,offline:d?.["Display conditions"]?.offline??p.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||p.displayExpression})}}return u}(n,e,p,r,c,l,o.session);f&&f.moduleName===d.moduleName&&(0,eo.isEqual)(f.candidateExtensions,h)?s[n]=f:(s[n]={moduleName:d.moduleName,candidateExtensions:h},u=!0)}(u||Object.keys(a).length!==Object.keys(s).length)&&c0.setState({slots:s})}(cQ.getState(),c1.getState(),c2.getState(),c_.getState(),ng.getState(),t)}catch(e){throw c3=null===t||null===c3?null:new Set([...t,...c3]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{c4=!1}}}function c8(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function c9(){c6(null)}function c7(e,t){return{moduleName:t,name:e,attachedIds:[]}}function de(e){let[t]=e.split("#");return t}function dt(e,t){let r=de(t);return e.extensions[r]}function dr(e){return dt(cQ.getState(),e)}cQ.subscribe((e,t)=>{c6(e.extensions!==t.extensions?null:c8(e.slots,t.slots))}),c1.subscribe((e,t)=>{c6(c8(e.slots,t.slots))}),c2.subscribe((e,t)=>{c6(c8(e.configs,t.configs))}),c_.subscribe(()=>c6(null)),ng.subscribe(()=>c6(null)),c9(),g(c9);let dn=e=>cA(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function di(e,t){cA(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...c7(e),attachedIds:[t]}}}})}function da(e,t){cA(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function ds(e){cA(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function du(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function dl(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!l6(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(dc(e),t,ng.getState().session,e)}function dc(e){return c0.getState().slots[e]?.candidateExtensions??[]}let dd=(e,t)=>cQ.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=c7(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),df=()=>{c3=null,cA(()=>({slots:{},extensions:{}})),cN().setState({renderings:new Map}),c0.setState({slots:{}})},dp=q("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function dh({name:e,basePath:t,mode:r,componentContext:n,state:o}){dp.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function dm(e){dp.getState().slotName===e&&dp.setState(dp.getInitialState(),!0)}let dy=q("modalRegistry",{modals:{}});function dg(e){dy.setState(t=>(t.modals[e.name]=e,t))}function db(e){let t=dy.getState().modals[e];if(!t){let r=dr(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),dg(t))}return t}let dv=q("workspaceRegistrations",{workspaces:{}}),dw=q("workspaceGroups",{workspaceGroups:{}});function d_(e){dv.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function dx(e){dw.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let dE=new Set;function dS(e){let t=dv.getState().workspaces;if(t[e])return t[e];{let t=dr(e);if(t){var r;let n;return dE.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),dE.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?oT(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function dO(e){let t=dw.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let dD=q("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function dP(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=dD.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function dk(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=dD.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function dC(e){let{openedWindows:t}=dD.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function dT(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=dD.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}dD.setState({registeredGroupsByName:n})}function dj(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=dD.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}dD.setState({registeredWindowsByName:n})}function dR(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=dD.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}dD.setState({registeredWorkspacesByName:n})}let dN=0,dA=null,dM={bootstrap:15e3,mount:15e3,unmount:15e3};function dI(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(dM).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=dM[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function d$(e,t){var r,n;let o,i,a,s,u,l=await (dA??(dA=new Promise((e,t)=>{rf({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),rf))),dA),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=l((r=d.onSettled,"function"==typeof e?()=>e().then(e=>dI(e,r)):dI(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),u=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>u,set:e=>{u=e&&s(e)}})}function dL(){return dF}function dF(e,t){let r,n=d$(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function dB(e,t,r,n,o=e=>e,i={}){let a=de(n),s=dr(n),u=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:l,moduleName:c,online:d,offline:f,load:p}=s;if(ck(d,f)){let s,d=dN++,f=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=f;let h=e=>{try{cB(f)}catch(t){console.error(e,t)}};try{cF({renderingId:f,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await p()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{u=await d$(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:l,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}u.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),u.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return u}var dV=r(7979),dU=r.n(dV);let dW=(0,dV.createContext)({moduleName:"",featureName:""});function dH({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,dV.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),dU().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),ne({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:r9(e,t),...o},n)}let dK=({state:e,children:t,...r})=>{let{extension:n}=(0,dV.useContext)(dW),o=(0,dV.useRef)(null),i=(0,dV.useRef)(Promise.resolve()),a=(0,dV.useRef)(!1),s=(0,dV.useRef)(!1),u=(0,dV.useRef)(e),l=(0,dV.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,dV.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,dV.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,dB(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?l(t):t&&u.current!==e&&c(t,u.current)},()=>{s.current=!1}))},[]);return(0,dV.useEffect)(()=>(a.current=!1,()=>{a.current=!0,l(o.current)}),[]),(0,dV.useEffect)(()=>{u.current=e,o.current&&c(o.current,e)},[e]),n?dU().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function dz(e){let t=(0,dV.useRef)(e);return L(t.current,e)||(t.current=e),t.current}function dG(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let dq=e=>e;function dY(e,t=dq,r){let n=(0,dV.useCallback)(t=>e.subscribe(t),[e]),o=(0,dV.useCallback)(()=>t(e.getState()),[e,t]),i=(0,dV.useSyncExternalStore)(n,o,o),a=(0,dV.useMemo)(()=>r?dG(e,r):null,[e,r]);return(0,dV.useMemo)(()=>a?{...i,...a}:i,[i,a])}function dZ(e,t){return dY(e,dq,t)}function dJ(e){return function(t){let r=(0,dV.useCallback)(t=>e.subscribe(t),[]),n=(0,dV.useCallback)(()=>e.getState(),[]),o=(0,dV.useSyncExternalStore)(r,n,n),i=(0,dV.useMemo)(()=>t?dG(e,t):null,[t]);return(0,dV.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let dX=[];Object.freeze(dX);let dQ={candidateExtensions:dX};Object.freeze(dQ);let d0=e=>{let t=(0,dV.useCallback)(t=>t.slots?.[e]??dQ,[e]);return dY(cV(),t)},d1=e=>e.session;function d2(e,t){let{candidateExtensions:r}=d0(e),n=dY(ng,d1),o=dz(t);return(0,dV.useMemo)(()=>dl(e,o),[e,o,n,r])}function d3(e,t){let{moduleName:r}=(0,dV.useContext)(dW);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,dV.useEffect)(()=>{dd(r,e)},[r,e]),{extensions:d2(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function d4(e){return e}function d6({name:e,extensionSlotName:t,select:r=d4,children:n,state:o,style:i,...a}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,u=(0,dV.useRef)(null),{extensions:l,extensionSlotModuleName:c}=d3(s,o),d=(0,dV.useMemo)(()=>r(l),[r,l]),f=(0,dV.useMemo)(()=>{if("function"==typeof n&&!dU().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return dU().createElement("div",{ref:u,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>dU().createElement(dW.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c}}},f?.[t]??("function"!=typeof n?n:null)??dU().createElement(dK,{state:o}))))}var d5=r(5338);function d8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d8(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d8(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d7(e){return(d7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(fe(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(fe(e)));return e}}var fr=null;try{fr=require("react").createContext()}catch(e){}var fn={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function fo(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function fi(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,i=fl(e,t,function(){r(this)}),a=ft(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:fu(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function fa(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():fu(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function fs(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=fl(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=ft(e,t)();fu(e).render(n,i)}})}function fu(e){return e.ReactDOMClient||e.ReactDOM}function fl(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=fr?e.React.createElement(fr.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,d9(d9({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var fc=r(3826),fd=r(9338),ff=r.n(fd),fp=r(7956);let fh={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},fm=new Map;(0,fp.initCache)(fm);let fy={errorRetryCount:3,fetcher:nh,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof ny){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>fm};function fg(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},fh,e),r={...fy,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=dU().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return dU().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=dU().createElement(dV.Suspense,{fallback:null},dU().createElement(fd.SWRConfig,{value:r},dU().createElement(dW.Provider,{value:this.state.config},t.disableTranslations?dU().createElement(e,this.props):dU().createElement(fc.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},dU().createElement(e,this.props)))));return t.strictMode&&dU().StrictMode?dU().createElement(dU().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function fb(e,t){return function(e){if("object"!==d7(e))throw Error("single-spa-react requires a configuration object");var t,r=d9(d9({},fn),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!fr&&r.React.createContext&&(fr=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:fo.bind(null,r),mount:fi.bind(null,r),unmount:fa.bind(null,r)};return r.parcelCanUpdate&&(n.update=fs.bind(null,r)),n}({React:dU(),ReactDOMClient:d5,rootComponent:fg(t)(e)})}function fv(e,t){return()=>e().then(({default:e})=>fb(e,t))}function fw(e,t){return()=>Promise.resolve(fb(e,t))}let f_=fv,fx=U()(()=>({}));Y("openmrs-app-context",fx);let fE={};function fS(e,t=e=>e){let r=fx.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function fO(e,t){fx.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function fD(e){return null===e?null:Object.freeze(Object.assign({},e))}let fP=new Map;function fk(e,t){let r=(0,dV.useRef)(t??{}),n=(0,dV.useRef)(t=>fO(e,t)),o=(0,dV.useRef)(Symbol());return(0,dV.useEffect)(()=>{let r=t??{},n=o.current;return null===fS(e)?!function(e,t=fE){fx.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===fE?{}:t})})}(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),fO(e,()=>r)),fP.set(e,n),()=>{fP.get(e)===n&&(fx.setState(t=>(e in t&&delete t[e],t)),fP.delete(e))}},[e]),(0,dV.useEffect)(()=>{let n=t??{};L(r.current,n)||(fO(e,()=>n),r.current=n)},[t]),n.current}function fC({namespace:e,value:t}){return fk(e,t),null}let fT=({children:e,value:t,fallback:r})=>t?dU().createElement(dU().Fragment,null,e):r?dU().createElement(dU().Fragment,null,r):null;function fj(){let e=(0,dV.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,dV.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function fR(e,t=e=>e??{}){let[r,n]=(0,dV.useState)(()=>{if(fN(e))return;let r=fS(e);if(null!==r)return t?t(r):r});return(0,dV.useEffect)(()=>{if(fN(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,dV.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>L(e,r)?e:r)})(fD(o=fS(e))),fx.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(fD(n)))})},[e,t]),r}function fN(e){return"string"!=typeof e||0===e.trim().length}function fA(e){let t=d2(e);return(0,dV.useMemo)(()=>t.map(e=>e.id),[t])}function fM(e){return d0(e).candidateExtensions}function fI(e,t){let{data:r,error:n,mutate:o,isLoading:i,isValidating:a}=ff()(`${ig}?patient=${e}&includeEncounterless=${t}`,nh);return(0,dV.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:n,mutate:o,isValidating:a}),[r,n,i,a,o])}function f$(e){(0,dV.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let fL={},fF=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
- Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function fB(e){let{moduleName:t,extension:r}=(0,dV.useContext)(dW),n=e?.externalModuleName??t;if(!n&&!r)throw Error(fF);let o=function(e){let t=(0,dV.useMemo)(()=>eN(e),[e]),r=function(e){let[t,r]=(0,dV.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,dV.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw fL[e]||(fL[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),fL[e];return r}(n),i=function(e){let t=(0,dV.useMemo)(e$,[]),r=function(e,t){let[r,n]=(0,dV.useState)(t?()=>{let r=eF(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,dV.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=eF(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,eo.isEqual)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!fL[r]&&t&&(fL[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=eF(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),fL[r]}return r||{}}(r);return(0,dV.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let fV=d2;function fU(){let[e,t]=(0,dV.useState)(cP());return(0,dV.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function fW(e,t=300){let[r,n]=(0,dV.useState)(e);return(0,dV.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var fH=r(6088),fK=r.n(fH);let fz=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function fG(){let e=`${nc}/emrapi/configuration?v=${fz}`,t=fK()(e,nh);return(0,dV.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let fq=dJ(cR());function fY(e){let t=d2(e);return(0,dV.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let fZ=dJ(cV());function fJ(e){let{flags:t}=dY(c_);return t[e]?.enabled??!1}function fX(){let[,e]=(0,dV.useState)(0);return(0,dV.useCallback)(()=>{e(e=>e+1)},[])}function fQ(e,t,r={}){return f1(e,t,f0,r)}let f0={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(np(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function f1(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:u,swrConfig:l}=n,c=n.fetcher??nh,[d,f]=(0,dV.useState)(1),p=(0,dV.useRef)(NaN),h=(0,dV.useRef)(NaN),m=(0,dV.useRef)(d),y=(0,dV.useRef)(!1),g=(0,dV.useRef)(!1),b=e?.toString()??"",[v,w]=(0,dV.useState)(b);b!==v&&(w(b),f(1),m.current=1,p.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,E=(0,dV.useMemo)(()=>o(e,t,x),[e,t,x]),{data:S,...O}=(u?fK():ff())(E,c,l);S?.data&&(p.current=i(S?.data),h.current=a(S?.data),y.current=!0);let D=Math.ceil(p.current/t),P=(0,dV.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,dV.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(p.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,f(e))},[d,t,b,S]);let k=(0,dV.useCallback)(()=>{P(m.current+1)},[P]),C=(0,dV.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(S?.data),totalPages:D,totalCount:p.current,currentPage:d,currentPageSize:h.current,paginated:D>1,showNextButton:d<D,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...O}}function f2(e,t,r={}){return f1(e,t,f3(),r)}function f3(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(np(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var f4=r(2398),f6=r.n(f4);function f5(e,t={}){return f8(e,f0,t)}function f8(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,u=r.fetcher??nh,l=(0,dV.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=f6()(l,u,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{f((c?.length??0)+1)},nextUri:h,...p}}function f9(e,t={}){return f7(e,f0,t)}function f7(e,t,r={}){let n=f8(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:u,nextUri:l}=n;return((0,dV.useEffect)(()=>{o&&!i&&s()},[o,l]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:u||o}}function pe(e,t={}){return f7(e,f3(),t)}function pt(e,t={}){return f8(e,f3(),t)}function pr(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function pn(){let[e,t]=(0,dV.useState)(pr);return(0,dV.useEffect)(()=>{let e=()=>{t(pr())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let po=e=>"small-desktop"===e||"large-desktop"===e;function pi(e){let t=(0,dV.useContext)(dW);(0,dV.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),dh(e),()=>{dm(e.name)}),[t,e])}function pa(){return dY(dp)}function ps(e=null,t=null){let[r,n]=(0,dV.useState)([]);return(0,dV.useEffect)(()=>{let r=lR(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function pu(e,t=!0){let r=(0,dV.useRef)(null);return(0,dV.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function pl(e){let t=(0,dV.useRef)();return(0,dV.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function pc(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=fj(),s=(0,dV.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),u=(0,dV.useCallback)(e=>nh(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return ff()(e,u,i)}function pd(e=[],t=10){let[r,n]=(0,dV.useState)(1),o=(0,dV.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,dV.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,dV.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),u=(0,dV.useCallback)(()=>{n(e=>e+1)},[]),l=(0,dV.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,dV.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:u,goToPrevious:l}),[a,o,e.length,t,i,s,u,l])}function pf(e,t,r,n){return{pageSizes:(0,dV.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,dV.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function pp(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function ph(e){let[t,r]=(0,dV.useState)(e??pp()),{data:n,error:o,isValidating:i}=ff()(t?["patient",t]:null,()=>lD(t,{}));return(0,dV.useEffect)(()=>{let e=()=>{let e=pp();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,dV.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function pm(){let e=`${nc}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=ff()(e,nh);return(0,dV.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function py(e){let{extensions:t,extensionSlotModuleName:r}=d3(e);return e?t.map(t=>({state:n})=>dU().createElement(dW.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},dU().createElement(dK,{state:n}))):[]}function pg(){let e=(0,dV.useRef)(),[t,r]=(0,dV.useState)(null),n=null;if(!t){if(a){let e=nw().getState();e.loaded&&(n=e.session)}else a=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(nw().getState()),n||(e.current=nw().subscribe(r))});if(n)r(n);else throw a}(0,dV.useEffect)(()=>(e.current||(e.current=nw().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(a)throw console.warn("useSession is in an unexpected state. Attempting to recover."),a;else throw Error("useSession is in an invalid state.");return o}let pb=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,dV.useState)(null);return((0,dV.useEffect)(()=>{let e=nv({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&nS(e,n))?dU().createElement(dU().Fragment,null,r):t?dU().createElement(dU().Fragment,null,t):null};var pv=r(6734),pw=r.n(pv),p_=r(7581);let px=new Map;function pE(){for(let e of Array.from(px.values()))e()}let pS={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function pO(e){let t=(0,dV.useId)();return(0,dV.useEffect)(()=>{if(e)return px.set(t,e),()=>{px.delete(t)}},[t,e]),{...dZ(lK(),pS),mutateVisit:pE}}function pD(e,t=lW){let r=(0,dV.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=pO((0,dV.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,u=`/${a}?v=${t}`,{data:l,error:c,mutate:d,isValidating:f}=ff()(e?`${nc}/visit${s}`:null,nh),{data:p,error:h,mutate:m,isValidating:y}=ff()(e&&a?`${nc}/visit${u}`:null,nh),g=(0,dV.useMemo)(()=>l?.data.results.find(e=>null===e.stopDatetime)??null,[l]),b=(0,dV.useMemo)(()=>a&&p?p.data:null,[p,a]),v=(0,dV.useRef)(null);(0,dV.useEffect)(()=>{!f&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,f,y,n]);let w=(0,dV.useCallback)(()=>{d(),m()},[d,m]);(0,dV.useEffect)(()=>{r.current=w},[w]);let x=!!(!l||a&&!p),E=!!(a?h:c);return{error:c||h,mutate:w,isValidating:f||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!E}}function pP(){let[e,t]=(0,dV.useState)([]);return(0,dV.useEffect)(()=>{let e=lA().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}pv.extend(p_);let pk=new Map;async function pC(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,i=n?t.substring(r+1):t,a=await o1(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?pj(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),pT)}let pT={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function pj(e,t){if(e in pk)await pk[e];else{let r=t??await o1(e);await (pk[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{e5(e),t(null)}).catch(n)}e5(e),t(null)}))}}function pR(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
15
+ ${this.stack}`}}let ng=q("session",{loaded:!1,session:null}),nb=0;function nv(e={includeAuthStatus:!0}){return(nb<Date.now()-6e4||!ng.getState().loaded)&&nx(),new ew(t=>{let r=r=>{r.loaded&&(e.includeAuthStatus?t.next(r.session):t.next(r.session?.user))};return r(ng.getState()),ng.subscribe(r)})}function nw(){return(nb<Date.now()-6e4||!ng.getState().loaded)&&nx(),ng}function n_(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function nx(e,t){nb=Date.now();let r={};return e&&t&&(r.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),nC(nh(nf,{headers:r}))}function nE(){ng.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function nS(e,t){var r,n;if(void 0===t)return!e;if(!e)return!0;return r=e,n=t,("string"==typeof r?!(0,eo.isUndefined)(n.privileges.find(e=>r===e.display)):Array.isArray(r)?r.every(e=>!(0,eo.isUndefined)(n.privileges.find(t=>e===t.display))):((0,eo.isUndefined)(r)||console.error(`Could not understand privileges "${r}"`),!0))||!(0,eo.isUndefined)(t.roles.find(e=>"System Developer"===e.display))}function nO(){let e,t;return new Promise(r=>{let n=n=>{n.loaded&&n.session.user&&(e=n.session.user,r(n.session.user),t&&t())};n(ng.getState()),e||(t=ng.subscribe(n))})}function nD(){return new Promise((e,t)=>{nv().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function nP(e,t){return nC(nh(nf,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function nk(e,t,r){return r||(r=new AbortController),await nh(`${nc}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:r.signal}),nx()}function nC(e){return new Promise((t,r)=>{e.then(e=>{let n;"object"==typeof e?.data?(n={loaded:!0,session:e.data},ng.setState(n),t(n)):(n={loaded:!1,session:null},ng.setState(n),r(n))}).catch(e=>{M(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};ng.setState(t),r(t)})})}function nT(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}ng.subscribe(e=>{e.loaded&&e.session&&n_(e.session)});let nj={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function nR(){e4("@openmrs/esm-api",nu),nx()}let nN={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var nA=r(2284),nM=r(3029),nI=r(2901);function n$(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var nL=r(3662);function nF(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,nL.A)(e,t)}function nB(e,t){if(t&&("object"==(0,nA.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return n$(e)}function nV(e){return(nV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nU=r(4467),nW=r(6369),nH=r(3612),nK=r(6562);function nz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nz(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var nq={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},nY=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,nM.A)(this,e),this.init(t,r)}return(0,nI.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||nq,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,nG(nG({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),nZ=function(){function e(){(0,nM.A)(this,e),this.observers={}}return(0,nI.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function nJ(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function nX(e){return null==e?"":""+e}function nQ(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function n0(e,t,r){var n=nQ(e,t,Object);n.obj[n.k]=r}function n1(e,t){var r=nQ(e,t),n=r.obj,o=r.k;if(n)return n[o]}function n2(e,t,r){var n=n1(e,r);return void 0!==n?n:n1(t,r)}function n3(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var n4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function n6(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return n4[e]}):e}var n5="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,n8=[" ",",","?","!",";"];function n9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n9(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n9(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var oe=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,nM.A)(this,n),t=r.call(this),n5&&nZ.call(n$(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,nI.A)(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=n1(this.data,a);return s||!i||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,u=o.slice(a,a+s).join(n),l=i[u];void 0===l&&o.length>a+s;)s++,l=i[u=o.slice(a,a+s).join(n)];if(void 0===l)return;if(null===l)return null;if(r.endsWith(u)){if("string"==typeof l)return l;if(u&&"string"==typeof l[u])return l[u]}var c=o.slice(a+s).join(n);if(c)return e(l,c,n);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),n0(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);var s=n1(this.data,a)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=n7(n7({},s),r),n0(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?n7(n7({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(nZ),ot={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?or(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var oo={},oi=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,nM.A)(this,n),i=r.call(this),n5&&nZ.call(n$(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=n$(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=nY.create("translator"),i}return(0,nI.A)(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=n8.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==(0,nA.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,c=l[l.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return i?(h.res="".concat(c).concat(p).concat(u),h):"".concat(c).concat(p).concat(u)}return i?(h.res=u,h):u}var h=this.resolve(e,t),m=h&&h.res,y=h&&h.usedKey||u,g=h&&h.exactUsedKey||u,b=Object.prototype.toString.apply(m),v=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(w&&m&&x&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof v||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,m,on(on({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(h.res=E,h):E}if(a){var S="[object Array]"===b,O=S?[]:{},D=S?g:y;for(var P in m)if(Object.prototype.hasOwnProperty.call(m,P)){var k="".concat(D).concat(a).concat(P);O[P]=this.translate(k,on(on({},t),{joinArrays:!1,ns:l})),O[P]===k&&(O[P]=m[P])}m=O}}else if(w&&"string"==typeof v&&"[object Array]"===b)(m=m.join(v))&&(m=this.extendTranslation(m,e,t,r));else{var C=!1,T=!1,j=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),N=j?this.pluralResolver.getSuffix(d,t.count,t):"",A=t["defaultValue".concat(N)]||t.defaultValue;!this.isValidLookup(m)&&R&&(C=!0,m=A),this.isValidLookup(m)||(T=!0,m=u);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:m,I=R&&A!==m&&this.options.updateMissing;if(T||C||I){if(this.logger.log(I?"updateKey":"missingKey",d,c,u,I?A:m),a){var $=this.resolve(u,on(on({},t),{},{keySeparator:!1}));$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)L.push(F[B]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(t.lng||this.language):L.push(t.lng||this.language);var V=function(e,r,n){var i=R&&n!==m?n:M;o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,r,i,I,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,r,i,I,t),o.emit("missingKey",e,c,r,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?L.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){V([e],u+r,t["defaultValue".concat(r)]||A)})}):V(L,u,A))}m=this.extendTranslation(m,e,t,h,r),T&&m===u&&this.options.appendNamespaceToMissingKey&&(m="".concat(c,":").concat(u)),(T||C)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(c,":").concat(u):u,C?m:void 0):this.options.parseMissingKeyHandler(m))}return i?(h.res=m,h):m}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,on(on({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(on(on({},r),{interpolation:on(on({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=on(on({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=ot.handle(f,e,t,this.options&&this.options.postProcessPassResolved?on({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;r=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),p=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(i=e,!oo["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(oo["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(r){if(!a.isValidLookup(t)){o=r;var i,u=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,l,r,e,s);else{d&&(c=a.pluralResolver.getSuffix(r,s.count,s));var c,h="".concat(a.options.pluralSeparator,"zero");if(d&&(u.push(l+c),f&&u.push(l+h)),p){var m="".concat(l).concat(a.options.contextSeparator).concat(s.context);u.push(m),d&&(u.push(m+c),f&&u.push(m+h))}}for(;i=u.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(nZ);function oa(e){return e.charAt(0).toUpperCase()+e.slice(1)}var os=function(){function e(t){(0,nM.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nY.create("languageUtils")}return(0,nI.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=oa(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=oa(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=oa(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),ou=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ol={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},oc=["v1","v2","v3"],od={zero:0,one:1,two:2,few:3,many:4,other:5},of=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,nM.A)(this,e),this.languageUtils=t,this.options=n,this.logger=nY.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},ou.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:ol[e.fc]}})}),r)}return(0,nI.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return od[e]-od[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!oc.includes(this.options.compatibilityJSON)}}]),e}();function op(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?op(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var om=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,nM.A)(this,e),this.logger=nY.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,nI.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:n6,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?n3(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?n3(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?n3(t.nestingPrefix):t.nestingPrefixEscaped||n3("$t("),this.nestingSuffix=t.nestingSuffix?n3(t.nestingSuffix):t.nestingSuffixEscaped||n3(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(0>e.indexOf(s.formatSeparator)){var o=n2(t,u,e);return s.alwaysFormat?s.format(o,void 0,r,oh(oh(oh({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),l=i.join(s.formatSeparator).trim();return s.format(n2(t,u,a),l,r,oh(oh(oh({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach(function(t){for(a=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=c(r)))if("function"==typeof d){var u=d(e,o,n);i="string"==typeof u?u:""}else if(n&&n.hasOwnProperty(r))i="";else if(f){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=nX(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=oh({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=oh(oh({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var c=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=c.shift(),u=c,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=nX(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce(function(e,t){return o.format(e,t,i.lng,oh(oh({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ob(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var ov=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,nM.A)(this,e),this.logger=nY.create("formatter"),this.options=t,this.formats={number:ob(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:ob(function(e,t){var r=new Intl.NumberFormat(e,og(og({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:ob(function(e,t){var r=new Intl.DateTimeFormat(e,og({},t));return function(e){return r.format(e)}}),relativetime:ob(function(e,t){var r=new Intl.RelativeTimeFormat(e,og({},t));return function(e){return r.format(e,t.range||"day")}}),list:ob(function(e,t){var r=new Intl.ListFormat(e,og({},t));return function(e){return r.format(e)}})},this.init(t)}return(0,nI.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ob(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=(t=e.split(":"),(0,nW.A)(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||(0,nH.A)(t)||(0,nK.A)()),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var l=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},c=l.locale||l.lng||n.locale||n.lng||r;u=o.formats[a](e,c,og(og(og({},s),n),l))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ow(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ow(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ox=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,nM.A)(this,n),i=r.call(this),n5&&nZ.call(n$(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=nY.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return(0,nI.A)(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},u={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(r){var n,s,u,l;n=r.loaded,(u=(s=nQ(n,[o],Object)).obj)[l=s.k]=u[l]||[],u[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[r](e,t,function(s,u){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}s&&u&&o<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,a)},i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null==r||""===r||(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,o_(o_({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(nZ);function oE(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function oS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oS(Object(r),!0).forEach(function(t){(0,nU.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function oD(){}var oP=function(e){nF(n,e);var t,r=(t=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,r=nV(n);return e=t?Reflect.construct(r,arguments,nV(this).constructor):r.apply(this,arguments),nB(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if((0,nM.A)(this,n),t=r.call(this),n5&&nZ.call(n$(t)),t.options=oE(o),t.services={},t.logger=nY,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=n$(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),nB(t,n$(t));setTimeout(function(){t.init(o,i)},0)}return t}return(0,nI.A)(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,nA.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,nA.A)(e[2])||"object"===(0,nA.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=oO(oO(oO({},n),this.options),oE(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=oO(oO({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?nY.init(o(this.modules.logger),this.options):nY.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"u">typeof Intl&&(i=ov);var i,a=new os(this.options);this.store=new oe(this.options.resources,this.options);var s=this.services;s.logger=nY,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new of(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new om(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ox(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new oi(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=oD),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=nJ(),c=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oD,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=nJ();return e||(e=this.languages),t||(t=this.options.ns),r||(r=oD),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ot.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=nJ();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==(0,nA.A)(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=oO({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",c=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=nJ();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=nJ();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oD,o=oO(oO(oO({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=oO({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new oi(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(nZ);(0,nU.A)(oP,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new oP(e,t)});var ok=oP.createInstance();ok.createInstance=oP.createInstance,ok.createInstance,ok.init,ok.loadResources,ok.reloadResources,ok.use,ok.changeLanguage,ok.getFixedT,ok.t,ok.exists,ok.setDefaultNamespace,ok.hasLoadedNamespace,ok.loadNamespaces,ok.loadLanguages;let oC=ok.default||ok;function oT(e,t,r,n){return oC.t(t,{ns:e,defaultValue:r,...n})}function oj(e,t,r){return nN[e]?oT("core",e,t??nN[e],r):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}oC.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let oR="import-map-override:",oN="import-map-overrides-disabled",oA="import-map-overrides:change",oM=!1,oI=null,o$=null;async function oL(){return o$??(o$=oF().then(({map:e,complete:t})=>(t||(o$=null),e))),o$}async function oF(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{if(o.src){let e=await fetch(o.src);if(!e.ok)throw Error(`Request for ${o.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else o.textContent&&t.push(JSON.parse(o.textContent))}catch(e){r=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${n}`,e)}}return{map:oB(t),complete:r}}function oB(e){let t={imports:{}};for(let r of e)r?.imports&&Object.assign(t.imports,r.imports);return t}function oV(){let e={};try{let t=oz();for(let r=0;r<localStorage.length;r++){let n=localStorage.key(r);if(n?.startsWith(oR)){let r=n.slice(oR.length);if(!t.includes(r)){let t=localStorage.getItem(n);t&&(e[r]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function oU(){let e=await oL();return oM?oB([e,oI??oV()]):e}async function oW(){return oL()}async function oH(){return oM?oB([await oL(),oV()]):oL()}function oK(e){if(!oM)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(oR)){let t=localStorage.getItem(r);t&&(e[r.slice(oR.length)]=t)}}return{imports:e}}return oV()}function oz(){if(!oM)return[];try{let e=localStorage.getItem(oN);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function oG(e){return!!oM&&oz().includes(e)}function oq(e,t){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(oR+e,t),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function oY(e){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(oR+e);let t=oz().filter(t=>t!==e);t.length>0?localStorage.setItem(oN,JSON.stringify(t)):localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oZ(){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(oR)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function oJ(e){if(!oM)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oz().filter(t=>t!==e);t.length>0?localStorage.setItem(oN,JSON.stringify(t)):localStorage.removeItem(oN),window.dispatchEvent(new CustomEvent(oA))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oX=!1;function oQ(){!oX&&(oX=!0,(oM="development"===window.spaEnv)&&(oI=oV()))}function o0(e){return e.replace(/[\/\-@]/g,"_")}async function o1(e,t="./start",n){var o;let i,a=!n?.maxLoadingTime||n.maxLoadingTime<=0?6e5:n.maxLoadingTime;await Promise.race([o2(e,n?.importMap),new Promise((t,r)=>{i=setTimeout(()=>{var t;r(Error(`Could not resolve requested script, ${e}, within ${(t=a)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},a)})]),i&&clearTimeout(i);let s=o0(e),u=window[s];if(!("object"==typeof(o=u)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}u.init(r.S.default);let l=(await u.get(t))();if("object"!=typeof l||null===l){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return l}async function o2(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let r=o0(e);if(!window[r]){let r=t??await o3();if(!r.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let n=r.imports[e];n.startsWith("./")&&(n=window.spaBase+n.substring(1));let o=e in oK().imports;try{return await function(e){var t;let r=(t=window)[o4]??(t[o4]=new Map),n=r.get(e);if(n)return n;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let o=document.createElement("script");o.src=e,o.type="text/javascript",o.async=!0;let i=new Promise((t,n)=>{let i=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function a(){clearTimeout(i),o.removeEventListener("load",s),o.removeEventListener("error",u)}function s(){a(),t()}function u(t){a(),r.delete(e),o.remove();let i=`Failed to load script from ${e}`;console.error(i,t),n(t.message??i)}o.addEventListener("load",s),o.addEventListener("error",u),document.head.appendChild(o)});return r.set(e,i),i}(n)}catch(e){return o&&T({kind:"error",title:oj("scriptLoadingFailed","Error: Script failed to load"),description:oj("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:n}),actionButtonLabel:oj("resetOverrides","Reset overrides"),onActionButtonClick(){oZ(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function o3(){return oU()}let o4=Symbol.for("__openmrs_script_loading");function o6(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function o5(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&o6(t))}let o8="openmrs-routes:",o9="openmrs-routes:change",o7=!1,ie=null,it=null;async function ir(){return it??(it=io().then(({map:e,complete:t})=>(t||(it=null),e))),it}async function io(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],r=!0;for(let n=0;n<e.length;n++){let o=e[n];try{let e;if(o.src){let t=await fetch(o.src);if(!t.ok)throw Error(`Request for ${o.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else o.textContent&&(e=JSON.parse(o.textContent));e&&o5(e)&&t.push(e)}catch(e){r=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${n}`,e)}}return{map:ii(t),complete:r}}function ii(e){let t={routes:{}};for(let r of e)r&&"object"==typeof r&&!Array.isArray(r)&&(Object.assign(t.routes,r.routes),void 0===t.version&&void 0!==r.version&&(t.version=r.version));return t}async function ia(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let r=localStorage.key(e);if(r?.startsWith(o8)){let e=localStorage.getItem(r);e&&t.push({moduleName:r.slice(o8.length),raw:e})}}for(let r of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let r=JSON.parse(t);if(o6(r))return{moduleName:e,routes:r};if("string"==typeof r&&r.startsWith("http")){let t=await fetch(r),n=await t.json();if(o6(n))return{moduleName:e,routes:n};throw Error(`${r} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===r.status?e.routes[r.value.moduleName]=r.value.routes:console.warn("[route-maps] Failed to load route override",r.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function is(){let e=await ir();return o7?ii([e,ie??await ia()]):e}async function iu(){return ir()}async function il(){return o7?ii([await ir(),await ia()]):ir()}function ic(){if(!o7)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(o8)){let t=localStorage.getItem(r);t&&(e[r.slice(o8.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function id(e,t){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(o8+e,JSON.stringify(t));else{let r=JSON.parse(t);if(!o6(r))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(o8+e,JSON.stringify(r))}else if(t instanceof URL)localStorage.setItem(o8+e,JSON.stringify(t.toString()));else{if(!o6(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(o8+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function ip(e){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(o8+e),window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function ih(){if(!o7)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);r?.startsWith(o8)&&e.push(r)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(o9))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let im=null;function iy(){return im||(im=(o7="development"===window.spaEnv)?ia().then(e=>{ie=e}):Promise.resolve())}let ig=`${nc}/attachment`;function ib(e,t){return nh(`${ig}/${e}`,{signal:t.signal})}function iv(e,t,r,n){return nh(iw(e,t,n),{signal:r.signal})}function iw(e,t,r){return r?`${ig}?patient=${e}&encounter=${r}`:`${ig}?patient=${e}&includeEncounterless=${t}`}async function i_(e,t,r){let n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),r&&n.append("encounter",r),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),nh(`${ig}`,{method:"POST",body:n})}function ix(e,t){return nh(`${ig}/${e}`,{method:"DELETE",signal:t.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function iE(e,t){return new Promise(function(r){var n=new MessageChannel;n.port1.onmessage=function(e){r(e.data)},e.postMessage(t,[n.port2])})}function iS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var iD=function(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r})};function iP(e,t){var r=location.href;return new URL(e,r).href===new URL(t,r).href}var ik=function(e,t){this.type=e,Object.assign(this,t)};function iC(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function iT(){}var ij={type:"SKIP_WAITING"};function iR(e,t){if(!t)return e&&e.then?e.then(iT):Promise.resolve()}var iN=function(e){function t(t,r){var n,o;return void 0===r&&(r={}),(n=e.call(this)||this).nn={},n.tn=0,n.rn=new iD,n.en=new iD,n.on=new iD,n.un=0,n.an=new Set,n.cn=function(){var e=n.fn,t=e.installing;n.tn>0||!iP(t.scriptURL,n.sn.toString())||performance.now()>n.un+6e4?(n.vn=t,e.removeEventListener("updatefound",n.cn)):(n.hn=t,n.an.add(t),n.rn.resolve(t)),++n.tn,t.addEventListener("statechange",n.ln)},n.ln=function(e){var t=n.fn,r=e.target,o=r.state,i=r===n.vn,a={sw:r,isExternal:i,originalEvent:e};!i&&n.mn&&(a.isUpdate=!0),n.dispatchEvent(new ik(o,a)),"installed"===o?n.wn=self.setTimeout(function(){"installed"===o&&t.waiting===r&&n.dispatchEvent(new ik("waiting",a))},200):"activating"===o&&(clearTimeout(n.wn),i||n.en.resolve(r))},n.dn=function(e){var t=n.hn,r=t!==navigator.serviceWorker.controller;n.dispatchEvent(new ik("controlling",{isExternal:r,originalEvent:e,sw:t,isUpdate:n.mn})),r||n.on.resolve(t)},o=function(e){var t=e.data,r=e.ports,o=e.source;return iC(n.getSW(),function(){n.an.has(o)&&n.dispatchEvent(new ik("message",{data:t,originalEvent:e,ports:r,sw:o}))})},n.gn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},n.sn=t,n.nn=r,navigator.serviceWorker.addEventListener("message",n.gn),n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var r,n,o=t.prototype;return o.register=function(e){var t=(void 0===e?{}:e).immediate,r=void 0!==t&&t;try{var n,o,i,a=this;return n=function(){if(!r&&"complete"!==document.readyState)return iR(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return a.mn=!!navigator.serviceWorker.controller,a.yn=a.pn(),iC(a.bn(),function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&iP(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then(function(){a.dispatchEvent(new ik("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn})},(i=n())&&i.then?i.then(o):o(i)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?iR(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return iC(this.getSW(),function(t){return iE(t,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&iE(this.fn.waiting,ij)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&iP(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(function(){return iC(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},r=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],iS(t.prototype,r),n&&iS(t,n),t}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,r=function(e){var t;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return iO(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?iO(e,void 0):void 0}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}(this.Sn(e.type));!(t=r()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function iA(e,t){if(void 0!==d)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),d;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let r=new iN(e,t);return d=r.register().then(()=>r.controlling.then(()=>r))}function iM(){return d??Promise.resolve(void 0)}let iI="x-omrs-offline-response-body",i$="x-omrs-offline-response-status",iL="x-omrs-offline-caching-strategy";async function iF(e){let t=await iM();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function iB(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function iV(){return!window.indexedDB}async function iU(){return new Promise(e=>{let t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}async function iW(){return await iU()||await iV()||await iB()}let iH="openmrs3:offline-mode",iK="unavailable";function iz(){return{current:iK,notAvailable:"unavailable"===iK,active:"on"===iK}}function iG(e){"unavailable"!==iK&&"unavailable"!==e&&(localStorage.setItem(iH,"on"===e?"active":"disabled"),iK=e)}async function iq(){await iW()||(iK="active"===localStorage.getItem(iH)?"on":"off"),navigator.onLine}let iY="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,iZ=Object.keys,iJ=Array.isArray;function iX(e,t){return"object"!=typeof t||iZ(t).forEach(function(r){e[r]=t[r]}),e}"u"<typeof Promise||iY.Promise||(iY.Promise=Promise);let iQ=Object.getPrototypeOf,i0={}.hasOwnProperty;function i1(e,t){return i0.call(e,t)}function i2(e,t){"function"==typeof t&&(t=t(iQ(e))),("u"<typeof Reflect?iZ:Reflect.ownKeys)(t).forEach(r=>{i4(e,r,t[r])})}let i3=Object.defineProperty;function i4(e,t,r,n){i3(e,t,iX(r&&i1(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function i6(e){return{from:function(t){return e.prototype=Object.create(t.prototype),i4(e.prototype,"constructor",e),{extend:i2.bind(null,e.prototype)}}}}let i5=Object.getOwnPropertyDescriptor;function i8(e,t){let r;return i5(e,t)||(r=iQ(e))&&i8(r,t)}let i9=[].slice;function i7(e,t,r){return i9.call(e,t,r)}function ae(e,t){return t(e)}function at(e){if(!e)throw Error("Assertion Failed")}function ar(e){iY.setImmediate?setImmediate(e):setTimeout(e,0)}function an(e,t){return e.reduce((e,r,n)=>{var o=t(r,n);return o&&(e[o[0]]=o[1]),e},{})}function ao(e,t){if(i1(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,o=t.length;n<o;++n){var i=ao(e,t[n]);r.push(i)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:ao(s,t.substr(a+1))}}function ai(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){at("string"!=typeof r&&"length"in r);for(var n=0,o=t.length;n<o;++n)ai(e,t[n],r[n])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===r?iJ(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var u=e[a];u&&i1(e,a)||(u=e[a]={}),ai(u,s,r)}}else void 0===r?iJ(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function aa(e){var t={};for(var r in e)i1(e,r)&&(t[r]=e[r]);return t}let as=[].concat;function au(e){return as.apply([],e)}let al="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(au([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>iY[e]),ac=al.map(e=>iY[e]);an(al,e=>[e,!0]);let ad=null;function af(e){ad="u">typeof WeakMap&&new WeakMap;let t=function e(t){if(!t||"object"!=typeof t)return t;let r=ad&&ad.get(t);if(r)return r;if(iJ(t)){r=[],ad&&ad.set(t,r);for(var n=0,o=t.length;n<o;++n)r.push(e(t[n]))}else if(ac.indexOf(t.constructor)>=0)r=t;else{let n=iQ(t);for(var i in r=n===Object.prototype?{}:Object.create(n),ad&&ad.set(t,r),t)i1(t,i)&&(r[i]=e(t[i]))}return r}(e);return ad=null,t}let{toString:ap}={};function ah(e){return ap.call(e).slice(8,-1)}let am="u">typeof Symbol?Symbol.iterator:"@@iterator",ay="symbol"==typeof am?function(e){var t;return null!=e&&(t=e[am])&&t.apply(e)}:function(){return null},ag={};function ab(e){var t,r,n,o;if(1==arguments.length){if(iJ(e))return e.slice();if(this===ag&&"string"==typeof e)return[e];if(o=ay(e)){for(r=[];!(n=o.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=Array(t);t--;)r[t]=arguments[t];return r}let av="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var aw="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),a_=()=>!0;let ax=!Error("").stack;function aE(){if(ax)try{throw aE.arguments,Error()}catch(e){return e}return Error()}function aS(e,t){var r=e.stack;return r?(t=t||0,0===r.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),r.split("\n").slice(t).filter(a_).map(e=>"\n"+e).join("")):""}var aO=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],aD=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(aO),aP={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ak(e,t){this._e=aE(),this.name=e,this.message=t}function aC(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,r)=>r.indexOf(e)===t).join("\n")}function aT(e,t,r,n){this._e=aE(),this.failures=t,this.failedKeys=n,this.successCount=r,this.message=aC(e,t)}function aj(e,t){this._e=aE(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=aC(e,t)}i6(ak).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+aS(this._e,2))}},toString:function(){return this.name+": "+this.message}}),i6(aT).from(ak),i6(aj).from(ak);var aR=aD.reduce((e,t)=>(e[t]=t+"Error",e),{}),aN=aD.reduce((e,t)=>{var r=t+"Error";function n(e,n){this._e=aE(),this.name=r,e?"string"==typeof e?(this.message=`${e}${n?"\n "+n:""}`,this.inner=n||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=aP[t]||r,this.inner=null)}return i6(n).from(ak),e[t]=n,e},{});aN.Syntax=SyntaxError,aN.Type=TypeError,aN.Range=RangeError;var aA=aO.reduce((e,t)=>(e[t+"Error"]=aN[t],e),{}),aM=aD.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=aN[t]),e),{});function aI(){}function a$(e){return e}function aL(e,t){return null==e||e===a$?t:function(r){return t(e(r))}}function aF(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function aB(e,t){return e===aI?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?aF(n,this.onsuccess):n),o&&(this.onerror=this.onerror?aF(o,this.onerror):o),void 0!==i?i:r}}function aV(e,t){return e===aI?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?aF(r,this.onsuccess):r),n&&(this.onerror=this.onerror?aF(n,this.onerror):n)}}function aU(e,t){return e===aI?t:function(r){var n=e.apply(this,arguments);iX(r,n);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?aF(o,this.onsuccess):o),i&&(this.onerror=this.onerror?aF(i,this.onerror):i),void 0===n?void 0===a?void 0:a:iX(n,a)}}function aW(e,t){return e===aI?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function aH(e,t){return e===aI?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,o=arguments.length,i=Array(o);o--;)i[o]=arguments[o];return r.then(function(){return t.apply(n,i)})}return t.apply(this,arguments)}}aM.ModifyError=aT,aM.DexieError=ak,aM.BulkError=aj;var aK={};let[az,aG,aq]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iQ(e),e];let t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,iQ(t),e]})(),aY=aG&&aG.then,aZ=az&&az.constructor,aJ=!!aq;var aX=!1,aQ=aq?()=>{aq.then(sc)}:iY.setImmediate?setImmediate.bind(null,sc):iY.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{sc(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(sc,0)},a0=function(e,t){a7.push([e,t]),a2&&(aQ(),a2=!1)},a1=!0,a2=!0,a3=[],a4=[],a6=null,a5=a$,a8={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:sN,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{sN(e[0],e[1])}catch(e){}})}},a9=a8,a7=[],se=0,st=[];function sr(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=aI,this._lib=!1;var t=this._PSD=a9;if(aw&&(this._stackHolder=aE(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==aK)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&si(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,r){try{r(r=>{if(null===t._state){if(r===t)throw TypeError("A promise cannot be resolved with itself.");var n=t._lib&&sd();r&&"function"==typeof r.then?e(t,(e,t)=>{r instanceof sr?r._then(e,t):r.then(e,t)}):(t._state=!0,t._value=r,sa(t)),n&&sf()}},si.bind(null,t))}catch(e){si(t,e)}}(this,e)}let sn={get:function(){var e=a9,t=sw;function r(r,n){var o=!e.global&&(e!==a9||t!==sw);let i=o&&!sS();var a=new sr((t,a)=>{ss(this,new so(sj(r,e,o,i),sj(n,e,o,i),t,a,e))});return aw&&sl(a,this),a}return r.prototype=aK,r},set:function(e){i4(this,"then",e&&e.prototype===aK?sn:{get:function(){return e},set:sn.set})}};function so(e,t,r,n,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=o}function si(e,t){if(a4.push(t),null===e._state){var r=e._lib&&sd();t=a5(t),e._state=!1,e._value=t,aw&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var r=i8(t,"stack");t._promise=e,i4(t,"stack",{get:()=>aX?r&&(r.get?r.get.apply(t):r.value):e.stack})}),a3.some(t=>t._value===e._value)||a3.push(e),sa(e),r&&sf()}}function sa(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)ss(e,t[r]);var o=e._PSD;--o.ref||o.finalize(),0===se&&(++se,a0(()=>{0==--se&&sp()},[]))}function ss(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++se,a0(su,[r,e,t])}else e._listeners.push(t)}function su(e,t,r){try{a6=t;var n,o=t._value;t._state?n=e(o):(a4.length&&(a4=[]),n=e(o),-1===a4.indexOf(o)&&function(e){for(var t=a3.length;t;)if(a3[--t]._value===e._value)return void a3.splice(t,1)}(t)),r.resolve(n)}catch(e){r.reject(e)}finally{a6=null,0==--se&&sp(),--r.psd.ref||r.psd.finalize()}}function sl(e,t){var r=t?t._numPrev+1:0;r<100&&(e._prev=t,e._numPrev=r)}function sc(){sd()&&sf()}function sd(){var e=a1;return a1=!1,a2=!1,e}function sf(){var e,t,r;do for(;a7.length>0;)for(e=a7,a7=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}while(a7.length>0);a1=!0,a2=!0}function sp(){var e=a3;a3=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=st.slice(0),r=t.length;r;)t[--r]()}function sh(e){return new sr(aK,!1,e)}function sm(e,t){var r=a9;return function(){var n=sd(),o=a9;try{return sk(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{sk(o,!1),n&&sf()}}}i2(sr.prototype,{then:sn,_then:function(e,t){ss(this,new so(null,null,e,t,a9))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?r(e):sh(e)):this.then(null,e=>e&&e.name===t?r(e):sh(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),sh(t)))},stack:{get:function(){if(this._stack)return this._stack;try{aX=!0;var e=(function e(t,r,n){if(r.length===n)return r;var o="";if(!1===t._state){var i,a,s=t._value;null!=s?(i=s.name||"Error",a=s.message||s,o=aS(s,0)):(i=s,a=""),r.push(i+(a?": "+a:"")+o)}return aw&&((o=aS(t._stackHolder,2))&&-1===r.indexOf(o)&&r.push(o),t._prev&&e(t._prev,r,n)),r})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{aX=!1}}},timeout:function(e,t){return e<1/0?new sr((r,n)=>{var o=setTimeout(()=>n(new aN.Timeout(t)),e);this.then(r,n).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&i4(sr.prototype,Symbol.toStringTag,"Dexie.Promise"),a8.env=sC(),i2(sr,{all:function(){var e=ab.apply(null,arguments).map(sO);return new sr(function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((o,i)=>sr.resolve(o).then(r=>{e[i]=r,--n||t(e)},r))})},resolve:e=>{if(e instanceof sr)return e;if(e&&"function"==typeof e.then)return new sr((t,r)=>{e.then(t,r)});var t=new sr(aK,!0,e);return sl(t,a6),t},reject:sh,race:function(){var e=ab.apply(null,arguments).map(sO);return new sr((t,r)=>{e.map(e=>sr.resolve(e).then(t,r))})},PSD:{get:()=>a9,set:e=>a9=e},totalEchoes:{get:()=>sw},newPSD:sx,usePSD:sT,scheduler:{get:()=>a0,set:e=>{a0=e}},rejectionMapper:{get:()=>a5,set:e=>{a5=e}},follow:(e,t)=>new sr((r,n)=>sx((t,r)=>{var n=a9;n.unhandleds=[],n.onunhandled=r,n.finalize=aF(function(){var e;e=()=>{0===this.unhandleds.length?t():r(this.unhandleds[0])},st.push(function t(){e(),st.splice(st.indexOf(t),1)}),++se,a0(()=>{0==--se&&sp()},[])},n.finalize),e()},t,r,n))}),aZ&&(aZ.allSettled&&i4(sr,"allSettled",function(){let e=ab.apply(null,arguments).map(sO);return new sr(t=>{0===e.length&&t([]);let r=e.length,n=Array(r);e.forEach((e,o)=>sr.resolve(e).then(e=>n[o]={status:"fulfilled",value:e},e=>n[o]={status:"rejected",reason:e}).then(()=>--r||t(n)))})}),aZ.any&&"u">typeof AggregateError&&i4(sr,"any",function(){let e=ab.apply(null,arguments).map(sO);return new sr((t,r)=>{0===e.length&&r(AggregateError([]));let n=e.length,o=Array(n);e.forEach((e,i)=>sr.resolve(e).then(e=>t(e),e=>{o[i]=e,--n||r(AggregateError(o))}))})}));let sy={awaits:0,echoes:0,id:0};var sg=0,sb=[],sv=0,sw=0,s_=0;function sx(e,t,r,n){var o=a9,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++s_;var a=a8.env;i.env=aJ?{Promise:sr,PromiseProp:{value:sr,configurable:!0,writable:!0},all:sr.all,race:sr.race,allSettled:sr.allSettled,any:sr.any,resolve:sr.resolve,reject:sr.reject,nthen:sR(a.nthen,i),gthen:sR(a.gthen,i)}:{},t&&iX(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sT(i,e,r,n);return 0===i.ref&&i.finalize(),s}function sE(){return sy.id||(sy.id=++sg),++sy.awaits,sy.echoes+=100,sy.id}function sS(){return!!sy.awaits&&(0==--sy.awaits&&(sy.id=0),sy.echoes=100*sy.awaits,!0)}function sO(e){return sy.echoes&&e&&e.constructor===aZ?(sE(),e.then(e=>(sS(),e),e=>(sS(),sA(e)))):e}function sD(e){++sw,sy.echoes&&0!=--sy.echoes||(sy.echoes=sy.id=0),sb.push(a9),sk(e,!0)}function sP(){var e=sb[sb.length-1];sb.pop(),sk(e,!1)}function sk(e,t){var r,n=a9;if((t?!sy.echoes||sv++&&e===a9:!sv||--sv&&e===a9)||(r=t?sD.bind(null,e):sP,aY.call(az,r)),e!==a9&&(a9=e,n===a8&&(a8.env=sC()),aJ)){var o=a8.env.Promise,i=e.env;aG.then=i.nthen,o.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(iY,"Promise",i.PromiseProp),o.all=i.all,o.race=i.race,o.resolve=i.resolve,o.reject=i.reject,i.allSettled&&(o.allSettled=i.allSettled),i.any&&(o.any=i.any))}}function sC(){var e=iY.Promise;return aJ?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(iY,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:aG.then,gthen:e.prototype.then}:{}}function sT(e,t,r,n,o){var i=a9;try{return sk(e,!0),t(r,n,o)}finally{sk(i,!1)}}function sj(e,t,r,n){return"function"!=typeof e?e:function(){var o,i=a9;r&&sE(),sk(t,!0);try{return e.apply(this,arguments)}finally{sk(i,!1),n&&(o=sS,aY.call(az,o))}}}function sR(e,t){return function(r,n){return e.call(this,sj(r,t),sj(n,t))}}function sN(e,t){var r;try{r=t.onuncatched(e)}catch(e){}if(!1!==r)try{var n,o={promise:t,reason:e};if(iY.document&&document.createEvent?((n=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),iX(n,o)):iY.CustomEvent&&iX(n=new CustomEvent("unhandledrejection",{detail:o}),o),n&&iY.dispatchEvent&&(dispatchEvent(n),!iY.PromiseRejectionEvent&&iY.onunhandledrejection))try{iY.onunhandledrejection(n)}catch(e){}aw&&n&&!n.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+aY).indexOf("[native code]")&&(sE=sS=aI);var sA=sr.reject;let sM=String.fromCharCode(65535),sI="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",s$=[],sL="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),sF=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function sB(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}let sV={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function sU(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=af(t))[e],t)}class sW{_trans(e,t,r){let n=this._tx||a9.trans,o=this.name;function i(e,r,n){if(!n.schema[o])throw new aN.NotFound("Table "+o+" not part of transaction");return t(n.idbtrans,n)}let a=sd();try{return n&&n.db===this.db?n===a9.trans?n._promise(e,i,r):sx(()=>n._promise(e,i,r),{trans:n,transless:a9.transless||a9}):function e(t,r,n,o){if(t.idbdb&&(t._state.openComplete||a9.letThrough||t._vip)){var i=t._createTransaction(r,n,t._dbSchema);try{i.create(),t._state.PR1398_maxLoop=3}catch(i){return i.name===aR.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,o))):sA(i)}return i._promise(r,(e,t)=>sx(()=>(a9.trans=i,o(e,t,i)))).then(e=>i._completion.then(()=>e))}if(t._state.openComplete)return sA(new aN.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return sA(new aN.DatabaseClosed);t.open().catch(aI)}return t._state.dbReadyPromise.then(()=>e(t,r,n,o))}(this.db,e,[this.name],i)}finally{a&&sf()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(iJ(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let t=iZ(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);let r=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)&&e.keyPath.every(e=>t.indexOf(e)>=0))[0];if(r&&this.db._maxKey!==sM)return this.where(r.name).equals(r.keyPath.map(t=>e[t]));!r&&aw&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);let{idxByName:n}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}let[a,s]=t.reduce(([t,r],o)=>{let a=n[o],s=e[o];return[t||a,t||!a?sB(r,a&&a.multi?e=>{let t=ao(e,o);return iJ(t)&&t.some(e=>i(s,e))}:e=>i(s,ao(e,o))):r]},[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):r?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,iJ(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let t=t=>{if(!t)return t;let r=Object.create(e.prototype);for(var n in t)if(i1(t,n))try{r[n]=t[n]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){iX(this,e)})}add(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sU(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?sr.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{ai(e,n,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||iJ(e))return this.where(":id").equals(e).modify(t);{let r=ao(e,this.schema.primKey.keyPath);if(void 0===r)return sA(new aN.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?iZ(t).forEach(r=>{ai(e,r,t[r])}):t(e,{value:e,primKey:r})}catch(e){}return this.where(":id").equals(r).modify(t)}}put(e,t){let{auto:r,keyPath:n}=this.schema.primKey,o=e;return n&&r&&(o=sU(n)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?sr.reject(e.failures[0]):e.lastResult).then(t=>{if(n)try{ai(e,n,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?sr.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:sV})).then(e=>e.numFailures?sr.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new aN.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new aN.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sU(i)):e;return this.core.mutate({trans:t,type:"add",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new aj(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,n)})})}bulkPut(e,t,r){let n=Array.isArray(t)?t:void 0,o=(r=r||(n?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",t=>{let{auto:r,keyPath:i}=this.schema.primKey;if(i&&n)throw new aN.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(n&&n.length!==e.length)throw new aN.InvalidArgument("Arguments objects and keys must have the same length");let a=e.length,s=i&&r?e.map(sU(i)):e;return this.core.mutate({trans:t,type:"put",keys:n,values:s,wantResults:o}).then(({numFailures:e,results:t,lastResult:r,failures:n})=>{if(0===e)return o?t:r;throw new aj(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,n)})})}bulkDelete(e){let t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:r,failures:n})=>{if(0===e)return r;throw new aj(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,n)})}}function sH(e){var t={},r=function(r,n){if(n){for(var o=arguments.length,i=Array(o-1);--o;)i[o-1]=arguments[o];return t[r].subscribe.apply(null,i),e}if("string"==typeof r)return t[r]};r.addEventType=i;for(var n=1,o=arguments.length;n<o;++n)i(arguments[n]);return r;function i(e,n,o){if("object"==typeof e){var a;return void iZ(a=e).forEach(function(e){var t=a[e];if(iJ(t))i(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new aN.InvalidArgument("Invalid event config");var r=i(e,a$,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){ar(function(){e.apply(null,t)})})})}})}n||(n=aW),o||(o=aI);var s={subscribers:[],fire:o,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(n,o)}};return t[e]=r[e]=s,s}}function sK(e,t){return i6(t).from({prototype:e}),t}function sz(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function sG(e,t){e.filter=sB(e.filter,t)}function sq(e,t,r){var n=e.replayFilter;e.replayFilter=n?()=>sB(n(),t()):t,e.justLimit=r&&!n}function sY(e,t){if(e.isPrimKey)return t.primaryKey;let r=t.getIndexByKeyPath(e.index);if(!r)throw new aN.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function sZ(e,t,r){let n=sY(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function sJ(e,t,r,n){let o=e.replayFilter?sB(e.filter,e.replayFilter()):e.filter;if(e.or){let i={},a=(e,r,n)=>{if(!o||o(r,n,e=>r.stop(e),e=>r.fail(e))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),i1(i,s)||(i[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),sX(sZ(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return sX(sZ(e,n,r),sB(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function sX(e,t,r,n){var o=sm(n?(e,t,o)=>r(n(e),t,o):r);return e.then(e=>{if(e)return e.start(()=>{var r=()=>e.continue();t&&!t(e,e=>r=e,t=>{e.stop(t),r=aI},t=>{e.fail(t),r=aI})||o(e.value,e,e=>r=e),r()})})}function sQ(e,t){try{let r=s0(e),n=s0(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return r===n?0:r<n?-1:1}(s1(e),s1(t));case"Array":return function(e,t){let r=e.length,n=t.length,o=r<n?r:n;for(let r=0;r<o;++r){let n=sQ(e[r],t[r]);if(0!==n)return n}return r===n?0:r<n?-1:1}(e,t)}}catch(e){}return NaN}function s0(e){let t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";let r=ah(e);return"ArrayBuffer"===r?"binary":r}function s1(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class s2{_read(e,t){var r=this._ctx;return r.error?r.table._trans(null,sA.bind(null,r.error)):r.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,sA.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=sB(t.algorithm,e)}_iterate(e,t){return sJ(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&iX(r,e),t._ctx=r,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(r=>sJ(t,e,r,t.table.core))}count(e){return this._read(e=>{let t=this._ctx,r=t.table.core;if(sz(t,!0))return r.count({trans:e,query:{index:sY(t,r.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var n=0;return sJ(t,()=>(++n,!1),e,r).then(()=>n)}).then(e)}sortBy(e,t){let r=e.split(".").reverse(),n=r[0],o=r.length-1;function i(e,t){return t?i(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=i(e,o),n=i(t,o);return r<n?-a:r>n?a:0}return this.toArray(function(e){return e.sort(s)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&sz(t,!0)&&t.limit>0){let{valueMapper:r}=t,n=sY(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:n,range:t.range}}).then(({result:e})=>r?e.map(r):e)}{let r=[];return sJ(t,e=>r.push(e),e,t.table.core).then(()=>r)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,sz(t)?sq(t,()=>{var t=e;return(e,r)=>0===t||(1===t?--t:r(()=>{e.advance(t),t=0}),!1)}):sq(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),sq(this._ctx,()=>{var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}},!0),this}until(e,t){return sG(this._ctx,function(r,n,o){return!e(r.value)||(n(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t;return sG(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=sB(t.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.key,r)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,r){e(r.primaryKey,r)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.key)}).then(function(){return r}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&sz(t,!0)&&t.limit>0)return this._read(e=>{var r=sY(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(e,t){r.push(t.primaryKey)}).then(function(){return r}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return sG(this._ctx,function(e){var t=e.primaryKey.toString(),n=i1(r,t);return r[t]=!0,!n}),this}modify(e){var t=this._ctx;return this._write(r=>{var n;if("function"==typeof e)n=e;else{var o=iZ(e),i=o.length;n=function(t){for(var r=!1,n=0;n<i;++n){var a=o[n],s=e[a];ao(t,a)!==s&&(ai(t,a,s),r=!0)}return r}}let a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[],d=0,f=[],p=(e,t)=>{let{failures:r,numFailures:n}=t;for(let t of(d+=e-n,iZ(r)))c.push(r[t])};return this.clone().primaryKeys().then(o=>{let i=c=>{let d=Math.min(l,o.length-c);return a.getMany({trans:r,keys:o.slice(c,c+d),cache:"immutable"}).then(f=>{let h=[],m=[],y=s?[]:null,g=[];for(let e=0;e<d;++e){let t=f[e],r={value:af(t),primKey:o[c+e]};!1!==n.call(r,r.value,r)&&(null==r.value?g.push(o[c+e]):s||0===sQ(u(t),u(r.value))?(m.push(r.value),s&&y.push(o[c+e])):(g.push(o[c+e]),h.push(r.value)))}let b=sz(t)&&t.limit===1/0&&("function"!=typeof e||e===s3)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&a.mutate({trans:r,type:"add",values:h}).then(e=>{for(let t in e.failures)g.splice(parseInt(t),1);p(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&a.mutate({trans:r,type:"put",keys:y,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>p(m.length,e))).then(()=>(g.length>0||b&&e===s3)&&a.mutate({trans:r,type:"delete",keys:g,criteria:b}).then(e=>p(g.length,e))).then(()=>o.length>c+d&&i(c+l))})};return i(0).then(()=>{if(c.length>0)throw new aT("Error modifying one or more objects",c,d,f);return o.length})})})}delete(){var e=this._ctx,t=e.range;return sz(e)&&(e.isPrimKey&&!sL||3===t.type)?this._write(r=>{let{primaryKey:n}=e.table.core.schema;return e.table.core.count({trans:r,query:{index:n,range:t}}).then(n=>e.table.core.mutate({trans:r,type:"deleteRange",range:t}).then(({failures:e,lastResult:t,results:r,numFailures:o})=>{if(o)throw new aT("Could not delete some values",Object.keys(e).map(t=>e[t]),n-o);return n-o}))}):this.modify(s3)}}let s3=(e,t)=>t.value=null;function s4(e,t){return e<t?-1:+(e!==t)}function s6(e,t){return e>t?-1:+(e!==t)}function s5(e,t,r){var n=e instanceof ut?new e.Collection(e):e;return n._ctx.error=r?new r(t):TypeError(t),n}function s8(e){return new e.Collection(e,()=>ue("")).limit(0)}function s9(e,t,r,n){var o,i,a,s,u,l,c,d=r.length;if(!r.every(e=>"string"==typeof e))return s5(e,"String expected.");function f(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),i="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),a="next"===e?s4:s6;var t=r.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return a(e.lower,t.lower)});s=t.map(function(e){return e.upper}),u=t.map(function(e){return e.lower}),l=e,c="next"===e?"":n}f("next");var p=new e.Collection(e,()=>s7(s[0],u[d-1]+n));p._ondirectionchange=function(e){f(e)};var h=0;return p._addAlgorithm(function(e,r,n){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,u,h))return!0;for(var p=null,m=h;m<d;++m){var y=function(e,t,r,n,o,i){for(var a=Math.min(e.length,n.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==n[u])return 0>o(e[u],r[u])?e.substr(0,u)+r[u]+r.substr(u+1):0>o(e[u],n[u])?e.substr(0,u)+n[u]+r.substr(u+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;0>o(e[u],l)&&(s=u)}return a<n.length&&"next"===i?e+r.substr(e.length):a<e.length&&"prev"===i?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}(o,f,s[m],u[m],a,l);null===y&&null===p?h=m+1:(null===p||a(p,y)>0)&&(p=y)}return r(null!==p?function(){e.continue(p+c)}:n),!1}),p}function s7(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function ue(e){return{type:1,lower:e,upper:e}}class ut{get Collection(){return this._ctx.table.db.Collection}between(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?s8(this):new this.Collection(this,()=>s7(e,t,!r,!n))}catch(e){return s5(this,sI)}}equals(e){return null==e?s5(this,sI):new this.Collection(this,()=>ue(e))}above(e){return null==e?s5(this,sI):new this.Collection(this,()=>s7(e,void 0,!0))}aboveOrEqual(e){return null==e?s5(this,sI):new this.Collection(this,()=>s7(e,void 0,!1))}below(e){return null==e?s5(this,sI):new this.Collection(this,()=>s7(void 0,e,!1,!0))}belowOrEqual(e){return null==e?s5(this,sI):new this.Collection(this,()=>s7(void 0,e))}startsWith(e){return"string"!=typeof e?s5(this,"String expected."):this.between(e,e+sM,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):s9(this,(e,t)=>0===e.indexOf(t[0]),[e],sM)}equalsIgnoreCase(e){return s9(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ab.apply(ag,arguments);return 0===e.length?s8(this):s9(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ab.apply(ag,arguments);return 0===e.length?s8(this):s9(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,sM)}anyOf(){let e=ab.apply(ag,arguments),t=this._cmp;try{e.sort(t)}catch(e){return s5(this,sI)}if(0===e.length)return s8(this);let r=new this.Collection(this,()=>s7(e[0],e[e.length-1]));r._ondirectionchange=r=>{t="next"===r?this._ascending:this._descending,e.sort(t)};let n=0;return r._addAlgorithm((r,o,i)=>{let a=r.key;for(;t(a,e[n])>0;)if(++n===e.length)return o(i),!1;return 0===t(a,e[n])||(o(()=>{r.continue(e[n])}),!1)}),r}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=ab.apply(ag,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return s5(this,sI)}let t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){let r=this._cmp,n=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return s8(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=n(e[0],e[1])))return s5(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",aN.InvalidArgument);let s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers,l,c=n;function d(e,t){return c(e[0],t[0])}try{(l=e.reduce(function(e,t){let n=0,o=e.length;for(;n<o;++n){let o=e[n];if(0>r(t[0],o[1])&&r(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return n===o&&e.push(t),e},[])).sort(d)}catch(e){return s5(this,sI)}let f=0,p=u?e=>n(e,l[f][1])>0:e=>n(e,l[f][1])>=0,h=s?e=>o(e,l[f][0])>0:e=>o(e,l[f][0])>=0,m=p,y=new this.Collection(this,()=>s7(l[0][0],l[l.length-1][1],!s,!u));return y._ondirectionchange=e=>{"next"===e?(m=p,c=n):(m=h,c=o),l.sort(d)},y._addAlgorithm((e,t,r)=>{for(var o=e.key;m(o);)if(++f===l.length)return t(r),!1;return!!(!p(o)&&!h(o))||(0===this._cmp(o,l[f][1])||0===this._cmp(o,l[f][0])||t(()=>{c===n?e.continue(l[f][0]):e.continue(l[f][1])}),!1)}),y}startsWithAnyOf(){let e=ab.apply(ag,arguments);return e.every(e=>"string"==typeof e)?0===e.length?s8(this):this.inAnyRange(e.map(e=>[e,e+sM])):s5(this,"startsWithAnyOf() only works with strings")}}function ur(e){return sm(function(t){return un(t),e(t.target.error),!1})}function un(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let uo=sH(null,"storagemutated");class ui{_lock(){return at(!a9.global),++this._reculock,1!==this._reculock||a9.global||(a9.lockOwnerFor=this),this}_unlock(){if(at(!a9.global),0==--this._reculock)for(a9.global||(a9.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sT(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&a9.lockOwnerFor!==this}create(e){if(!this.mode)return this;let t=this.db.idbdb,r=this.db._state.dbOpenError;if(at(!this.idbtrans),!e&&!t)switch(r&&r.name){case"DatabaseClosedError":throw new aN.DatabaseClosed(r);case"MissingAPIError":throw new aN.MissingAPI(r.message,r);default:throw new aN.OpenFailed(r)}if(!this.active)throw new aN.TransactionInactive;return at(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sm(t=>{un(t),this._reject(e.error)}),e.onabort=sm(t=>{un(t),this.active&&this._reject(new aN.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=sm(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&uo.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,r){if("readwrite"===e&&"readwrite"!==this.mode)return sA(new aN.ReadOnly("Transaction is readonly"));if(!this.active)return sA(new aN.TransactionInactive);if(this._locked())return new sr((n,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,r).then(n,o)},a9])});if(r)return sx(()=>{var e=new sr((e,r)=>{this._lock();let n=t(e,r,this);n&&n.then&&n.then(e,r)});return e.finally(()=>this._unlock()),e._lib=!0,e});var n=new sr((e,r)=>{var n=t(e,r,this);n&&n.then&&n.then(e,r)});return n._lib=!0,n}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();let r=sr.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>r);else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new sr((e,n)=>{r.then(r=>t._waitingQueue.push(sm(e.bind(null,r))),e=>t._waitingQueue.push(sm(n.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new aN.Abort))}table(e){let t=this._memoizedTables||(this._memoizedTables={});if(i1(t,e))return t[e];let r=this.schema[e];if(!r)throw new aN.NotFound("Table "+e+" not part of transaction");let n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n}}function ua(e,t,r,n,o,i,a){return{name:e,keyPath:t,unique:r,multi:n,auto:o,compound:i,src:(r&&!a?"&":"")+(n?"*":"")+(o?"++":"")+us(t)}}function us(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function uu(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:an(r,e=>[e.name,e])}}let ul=e=>{try{return e.only([[]]),ul=()=>[[]],[[]]}catch(e){return ul=()=>sM,sM}};function uc(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?t=>t[e]:t=>ao(t,e):t=>ao(t,e)}function ud(e){return[].slice.call(e)}let uf=0;function up(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function uh({_novip:e},t){let r=t.db,n=function(e,t,{IDBKeyRange:r,indexedDB:n},o){var i;return{dbcore:(i=function(e,t,r){let n;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:r,upper:n,lowerOpen:o,upperOpen:i}=e;return void 0===r?void 0===n?null:t.upperBound(n,!!i):void 0===n?t.lowerBound(r,!!o):t.bound(r,n,!!o,!!i)}let{schema:i,hasGetAll:a}=(n=ud(e.objectStoreNames),{schema:{name:e.name,tables:n.map(e=>r.objectStore(e)).map(e=>{let{keyPath:t,autoIncrement:r}=e,n=iJ(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:uc(t)},indexes:ud(e.indexNames).map(t=>e.index(t)).map(e=>{let{name:t,unique:r,multiEntry:n,keyPath:o}=e,a={name:t,compound:iJ(o),keyPath:o,unique:r,multiEntry:n,extractKey:uc(o)};return i[up(o)]=a,a}),getIndexByKeyPath:e=>i[up(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[up(t)]=a.primaryKey),a})},hasGetAll:n.length>0&&"getAll"in r.objectStore(n[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=i.tables.map(e=>{let t;return{name:t=e.name,schema:e,mutate:function({trans:e,type:r,keys:n,values:i,range:a}){return new Promise((s,u)=>{let l;s=sm(s);let c=e.objectStore(t),d=null==c.keyPath,f="put"===r||"add"===r;if(!f&&"delete"!==r&&"deleteRange"!==r)throw Error("Invalid operation type: "+r);let{length:p}=n||i||{length:1};if(n&&i&&n.length!==i.length)throw Error("Given keys array must have same length as given values array.");if(0===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],y=0,g=e=>{++y,un(e)};if("deleteRange"===r){if(4===a.type)return s({numFailures:y,failures:m,results:[],lastResult:void 0});3===a.type?h.push(l=c.clear()):h.push(l=c.delete(o(a)))}else{let[e,t]=f?d?[i,n]:[i,null]:[n,null];if(f)for(let n=0;n<p;++n)h.push(l=t&&void 0!==t[n]?c[r](e[n],t[n]):c[r](e[n])),l.onerror=g;else for(let t=0;t<p;++t)h.push(l=c[r](e[t])),l.onerror=g}let b=e=>{let t=e.target.result;h.forEach((e,t)=>null!=e.error&&(m[t]=e.error)),s({numFailures:y,failures:m,results:"delete"===r?n:h.map(e=>e.result),lastResult:t})};l.onerror=e=>{g(e),b(e)},l.onsuccess=b})},getMany:({trans:e,keys:r})=>new Promise((n,o)=>{n=sm(n);let i=e.objectStore(t),a=r.length,s=Array(a),u,l=0,c=0,d=e=>{let t=e.target;s[t._pos]=t.result,++c===l&&n(s)},f=ur(o);for(let e=0;e<a;++e)null!=r[e]&&((u=i.get(r[e]))._pos=e,u.onsuccess=d,u.onerror=f,++l);0===l&&n(s)}),get:({trans:e,key:r})=>new Promise((n,o)=>{n=sm(n);let i=e.objectStore(t).get(r);i.onsuccess=e=>n(e.target.result),i.onerror=ur(o)}),query:e=>new Promise((r,n)=>{r=sm(r);let{trans:i,values:s,limit:u,query:l}=e,c=u===1/0?void 0:u,{index:d,range:f}=l,p=i.objectStore(t),h=d.isPrimaryKey?p:p.index(d.name),m=o(f);if(0===u)return r({result:[]});if(a){let e=s?h.getAll(m,c):h.getAllKeys(m,c);e.onsuccess=e=>r({result:e.target.result}),e.onerror=ur(n)}else{let e=0,t=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];t.onsuccess=n=>{let i=t.result;return i?(o.push(s?i.value:i.primaryKey),++e===u?r({result:o}):void i.continue()):r({result:o})},t.onerror=ur(n)}}),openCursor:function({trans:e,values:r,query:n,reverse:i,unique:a}){return new Promise((s,u)=>{s=sm(s);let{index:l,range:c}=n,d=e.objectStore(t),f=l.isPrimaryKey?d:d.index(l.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",h=!r&&"openKeyCursor"in f?f.openKeyCursor(o(c),p):f.openCursor(o(c),p);h.onerror=ur(u),h.onsuccess=sm(t=>{let r=h.result;if(!r)return void s(null);r.___id=++uf,r.done=!1;let n=r.continue.bind(r),o=r.continuePrimaryKey;o&&(o=o.bind(r));let i=r.advance.bind(r),a=()=>{throw Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=()=>{throw Error("Cursor not started")},r.fail=sm(u),r.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},r.start=e=>{let t=new Promise((e,t)=>{e=sm(e),h.onerror=ur(t),r.fail=t,r.stop=t=>{r.stop=r.continue=r.continuePrimaryKey=r.advance=a,e(t)}}),s=()=>{if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=()=>{throw Error("Cursor behind last entry")},r.stop()};return h.onsuccess=sm(e=>{h.onsuccess=s,s()}),r.continue=n,r.continuePrimaryKey=o,r.advance=i,s(),t},s(r)},u)})},count({query:e,trans:r}){let{index:n,range:i}=e;return new Promise((e,a)=>{let s=r.objectStore(t),u=n.isPrimaryKey?s:s.index(n.name),l=o(i),c=l?u.count(l):u.count();c.onsuccess=sm(t=>e(t.target.result)),c.onerror=ur(a)})}}}),u={};return s.forEach(e=>u[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:ul(t),schema:i}}(t,r,o),e.dbcore.reduce((e,{create:t})=>({...e,...t(e)}),i))}}(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach(t=>{let r=t.name;e.core.schema.tables.some(e=>e.name===r)&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))})}function um({_novip:e},t,r,n){r.forEach(r=>{let o=n[r];t.forEach(t=>{let n=i8(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?i4(t,r,{get(){return this.table(r)},set(e){i3(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,o))})})}function uy({_novip:e},t){t.forEach(t=>{for(let r in t)t[r]instanceof e.Table&&delete t[r]})}function ug(e,t){return e._cfg.version-t._cfg.version}function ub(e,t){let r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){let o=e[r],i=t[r];if(o){let e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(i.primKey.keyPath||"")&&(o.primKey.auto===i.primKey.auto||sL)){let t,r=o.idxByName,a=i.idxByName;for(t in r)a[t]||e.del.push(t);for(t in a){let n=r[t],o=a[t];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}else e.recreate=!0,n.change.push(e)}else n.add.push([r,i])}return n}function uv(e,t,r,n){let o=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(e=>uw(o,e)),o}function uw(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function u_(e,t,r){let n={};return i7(t.objectStoreNames,0).forEach(e=>{let t=r.objectStore(e),o=t.keyPath,i=ua(us(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){let r=t.index(t.indexNames[e]);o=r.keyPath;var s=ua(r.name,o,!!r.unique,!!r.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}n[e]=uu(e,i,a)}),n}function ux({_novip:e},t,r){let n=r.db.objectStoreNames;for(let o=0;o<n.length;++o){let i=n[o],a=r.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){let r=a.indexNames[e],n=a.index(r).keyPath,o="string"==typeof n?n:"["+i7(n).join("+")+"]";if(t[i]){let e=t[i].idxByName[o];e&&(e.name=r,delete t[i].idxByName[o],t[i].idxByName[r]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&iY.WorkerGlobalScope&&iY instanceof iY.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class uE{_parseStoresSpec(e,t){iZ(e).forEach(r=>{if(null!==e[r]){var n=e[r].split(",").map((e,t)=>{let r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return ua(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),iJ(n),0===t)}),o=n.shift();if(o.multi)throw new aN.Schema("Primary key cannot be multi-valued");n.forEach(e=>{if(e.auto)throw new aN.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new aN.Schema("Index must have a name and cannot be an empty string")}),t[r]=uu(r,o,n)}})}stores(e){let t=this.db;this._cfg.storesSource=this._cfg.storesSource?iX(this._cfg.storesSource,e):e;let r=t._versions,n={},o={};return r.forEach(e=>{iX(n,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(n,o)}),t._dbSchema=o,uy(t,[t._allTables,t,t.Transaction.prototype]),um(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],iZ(o),o),t._storeNames=iZ(o),this}upgrade(e){return this._cfg.contentUpgrade=aH(this._cfg.contentUpgrade||aI,e),this}}function uS(e,t){let r=e._dbNamesDB;return r||(r=e._dbNamesDB=new uW("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function uO(e){return e&&"function"==typeof e.databases}function uD(e){return sx(function(){return a9.letThrough=!0,e()})}function uP(e){var t=t=>e.next(t),r=o(t),n=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(r,n):iJ(i)?Promise.all(i).then(r,n):r(i)}}return o(t)()}function uk(e,t,r){var n=arguments.length;if(n<2)throw new aN.InvalidArgument("Too few arguments");for(var o=Array(n-1);--n;)o[n-1]=arguments[n];return r=o.pop(),[e,au(o),r]}function uC(e,t,r){let n=iJ(e)?e.slice():[e];for(let e=0;e<r;++e)n.push(t);return n}let uT={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){let r=e.table(t),{schema:n}=r,o={},i=[];function a(e,t,r){let n=up(e),s=o[n]=o[n]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...r,isVirtual:l,keyTail:t,keyLength:u,extractKey:uc(e),unique:!l&&r.unique};return s.push(c),c.isPrimaryKey||i.push(c),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,r),s.sort((e,t)=>e.keyTail-t.keyTail),c}let s=a(n.primaryKey.keyPath,0,n.primaryKey);for(let e of(o[":id"]=[s],n.indexes))a(e.keyPath,0,e);function u(t){var r,n;let o=t.query.index;return o.isVirtual?{...t,query:{index:o,range:(r=t.query.range,n=o.keyTail,{type:1===r.type?2:r.type,lower:uC(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:uC(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}:t}return{...r,schema:{...n,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){let t=o[up(e)];return t&&t[0]}},count:e=>r.count(u(e)),query:e=>r.query(u(e)),openCursor(t){let{keyTail:n,isVirtual:o,keyLength:i}=t.query.index;return o?r.openCursor(u(t)).then(r=>r&&Object.create(r,{continue:{value:function(o){null!=o?r.continue(uC(o,t.reverse?e.MAX_KEY:e.MIN_KEY,n)):t.unique?r.continue(r.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,n)):r.continue()}},continuePrimaryKey:{value(t,o){r.continuePrimaryKey(uC(t,e.MAX_KEY,n),o)}},primaryKey:{get:()=>r.primaryKey},key:{get(){let e=r.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>r.value}})):r.openCursor(t)}}}}}};function uj(e,t,r,n){return r=r||{},n=n||"",iZ(e).forEach(o=>{if(i1(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){let e=ah(i);e!==ah(a)?r[n+o]=t[o]:"Object"===e?uj(i,a,r,n+o+"."):i!==a&&(r[n+o]=t[o])}else i!==a&&(r[n+o]=t[o])}else r[n+o]=void 0}),iZ(t).forEach(o=>{i1(e,o)||(r[n+o]=t[o])}),r}let uR={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){let r=e.table(t),{primaryKey:n}=r.schema;return{...r,mutate(e){let o=a9.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===aI)break;return o._promise("readwrite",()=>u(e),!0);case"put":if(a.fire===aI&&s.fire===aI)break;return o._promise("readwrite",()=>u(e),!0);case"delete":if(i.fire===aI)break;return o._promise("readwrite",()=>u(e),!0);case"deleteRange":if(i.fire===aI)break;return o._promise("readwrite",()=>(function e(t,o,i){return r.query({trans:t,values:!1,query:{index:n,range:o},limit:i}).then(({result:r})=>u({type:"delete",keys:r,trans:t}).then(n=>n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:e(t,{...o,lower:r[r.length-1],lowerOpen:!0},i)))})(e.trans,e.range,1e4),!0)}return r.mutate(e);function u(e){var t,o;let u=a9.trans,l=e.keys||("delete"===(t=e).type?t.keys:t.keys||t.values.map(n.extractKey));if(!l)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:l}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):r.getMany({trans:o.trans,keys:l,cache:"immutable"})).then(t=>{let o=l.map((r,o)=>{let l=t[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,r,l,u);else if("add"===e.type||void 0===l){let t=a.fire.call(c,r,e.values[o],u);null==r&&null!=t&&(r=t,e.keys[o]=r,n.outbound||ai(e.values[o],n.keyPath,r))}else{let t=uj(l,e.values[o]),n=s.fire.call(c,t,r,l,u);if(n){let t=e.values[o];Object.keys(n).forEach(e=>{i1(t,e)?t[e]=n[e]:ai(t,e,n[e])})}}return c});return r.mutate(e).then(({failures:r,results:n,numFailures:i,lastResult:a})=>{for(let i=0;i<l.length;++i){let a=n?n[i]:l[i],s=o[i];null==a?s.onerror&&s.onerror(r[i]):s.onsuccess&&s.onsuccess("put"===e.type&&t[i]?e.values[i]:a)}return{failures:r,results:n,numFailures:i,lastResult:a}}).catch(e=>(o.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}}}}})};function uN(e,t,r){try{if(!t||t.keys.length<e.length)return null;let n=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===sQ(t.keys[o],e[i])&&(n.push(r?af(t.values[o]):t.values[o]),++i);return n.length===e.length?n:null}catch(e){return null}}let uA={stack:"dbcore",level:-1,create:e=>({table:t=>{let r=e.table(t);return{...r,getMany:e=>{if(!e.cache)return r.getMany(e);let t=uN(e.keys,e.trans._cache,"clone"===e.cache);return t?sr.resolve(t):r.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?af(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),r.mutate(e))}}})};function uM(e){return!("from"in e)}let uI=function(e,t){if(!this){let t=new uI;return e&&"d"in e&&iX(t,e),t}iX(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function u$(e,t,r){let n=sQ(t,r);if(isNaN(n))return;if(n>0)throw RangeError();if(uM(e))return iX(e,{from:t,to:r,d:1});let o=e.l,i=e.r;if(0>sQ(r,e.from))return o?u$(o,t,r):e.l={from:t,to:r,d:1,l:null,r:null},uB(e);if(sQ(t,e.to)>0)return i?u$(i,t,r):e.r={from:t,to:r,d:1,l:null,r:null},uB(e);0>sQ(t,e.from)&&(e.from=t,e.l=null,e.d=i?i.d+1:1),sQ(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);let a=!e.r;o&&!e.l&&uL(e,o),i&&a&&uL(e,i)}function uL(e,t){uM(t)||function e(t,{from:r,to:n,l:o,r:i}){u$(t,r,n),o&&e(t,o),i&&e(t,i)}(e,t)}function uF(e){let t=uM(e)?null:{s:0,n:e};return{next(e){let r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&0>sQ(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||0>=sQ(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function uB(e){var t,r;let n=((null==(t=e.r)?void 0:t.d)||0)-((null==(r=e.l)?void 0:r.d)||0),o=n>1?"r":n<-1?"l":"";if(o){let t="r"===o?"l":"r",r={...e},n=e[o];e.from=n.from,e.to=n.to,e[o]=n[o],r[o]=n[t],e[t]=r,r.d=uV(r)}e.d=uV(e)}function uV({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}i2(uI.prototype,{add(e){return uL(this,e),this},addKey(e){return u$(this,e,e),this},addKeys(e){return e.forEach(e=>u$(this,e,e)),this},[am](){return uF(this)}});let uU={stack:"dbcore",level:0,create:e=>{let t=e.schema.name,r=new uI(e.MIN_KEY,e.MAX_KEY);return{...e,table:n=>{let o=e.table(n),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,l={...o,mutate:e=>{let a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{let r=`idb://${t}/${n}/${e}`;return s[r]||(s[r]=new uI)},l=u(""),c=u(":dels"),{type:d}=e,[f,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(iJ(f)){"delete"!==d&&(f=e.results),l.addKeys(f);let t=uN(f,h);t||"add"===d||c.addKeys(f),(t||p)&&i.indexes.forEach(function(e){let r=u(e.name||"");function n(t){return null!=t?e.extractKey(t):null}let o=t=>e.multiEntry&&iJ(t)?t.forEach(e=>r.addKey(e)):r.addKey(t);(t||p).forEach((e,r)=>{let i=t&&n(t[r]),a=p&&n(p[r]);0!==sQ(i,a)&&(null!=i&&o(i),null!=a&&o(a))})})}else if(f){let e={from:f.lower,to:f.upper};c.add(e),l.add(e)}else l.add(r),c.add(r),i.indexes.forEach(e=>u(e.name).add(r));return e})}},c=({query:{index:t,range:r}})=>{var n,o;return[t,new uI(null!=(n=r.lower)?n:e.MIN_KEY,null!=(o=r.upper)?o:e.MAX_KEY)]},d={get:e=>[a,new uI(e.key)],getMany:e=>[a,(new uI).addKeys(e.keys)],count:c,query:c,openCursor:c};return iZ(d).forEach(e=>{l[e]=function(i){let{subscr:a}=a9;if(a){let l=e=>{let r=`idb://${t}/${n}/${e}`;return a[r]||(a[r]=new uI)},c=l(""),f=l(":dels"),[p,h]=d[e](i);if(l(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){let t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(r=>{if("query"===e){if(u&&i.values)return t.then(({result:e})=>(c.addKeys(e),r));let e=i.values?r.result.map(s):r.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){let e=i.values;return r&&Object.create(r,{key:{get:()=>(f.addKey(r.primaryKey),r.key)},primaryKey:{get(){let e=r.primaryKey;return f.addKey(e),e}},value:{get:()=>(e&&c.addKey(r.primaryKey),r.value)}})}return r})}f.add(r)}}return o[e].apply(this,arguments)}}),l}}}};class uW{constructor(e,t){var r;this._middlewares={},this.verno=0;const n=uW.dependencies;this._options=t={addons:uW.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:o}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:aI,dbReadyPromise:null,cancelOpen:aI,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};i.dbReadyPromise=new sr(e=>{i.dbReadyResolve=e}),i.openCanceller=new sr((e,t)=>{i.cancelOpen=t}),this._state=i,this.name=e,this.on=sH(this,"populate","blocked","versionchange","close",{ready:[aH,aI]}),this.on.ready.subscribe=ae(this.on.ready.subscribe,e=>(t,r)=>{uW.vip(()=>{let n=this._state;if(n.openComplete)n.dbOpenError||sr.resolve().then(t),r&&e(t);else if(n.onReadyBeingFired)n.onReadyBeingFired.push(t),r&&e(t);else{e(t);let n=this;r||e(function e(){n.on.ready.unsubscribe(t),n.on.ready.unsubscribe(e)})}})}),this.Collection=(r=this,sK(s2.prototype,function(e,t){this.db=r;let n=sV,o=null;if(t)try{n=t()}catch(e){o=e}let i=e._ctx,a=i.table,s=a.hook.reading.fire;this._ctx={table:a,index:i.index,isPrimKey:!i.index||a.schema.primKey.keyPath&&i.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:i.or,valueMapper:s!==a$?s:null}})),this.Table=function(e){return sK(sW.prototype,function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:sH(null,{creating:[aB,aI],reading:[aL,a$],updating:[aU,aI],deleting:[aV,aI]})})}(this),this.Transaction=function(e){return sK(ui.prototype,function(t,r,n,o,i){this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=sH(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new sr((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),sA(e)})})}(this),this.Version=function(e){return sK(uE.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return sK(ut.prototype,function(t,r,n){this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n};let o=e._deps.indexedDB;if(!o)throw new aN.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>0>o.cmp(e,t)?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=ul(t.IDBKeyRange),this._createTransaction=(e,t,r,n)=>new this.Transaction(e,t,r,this._options.chromeTransactionDurability,n),this._fireOnBlocked=e=>{this.on("blocked").fire(e),s$.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(uT),this.use(uR),this.use(uU),this.use(uA),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new aN.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new aN.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let t=this._versions;var r=t.filter(t=>t._cfg.version===e)[0];return r||(r=new this.Version(e),t.push(r),t.sort(ug),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(e){return this.idbdb&&(this._state.openComplete||a9.letThrough||this._vip)?e():new sr((e,t)=>{if(this._state.openComplete)return t(new aN.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new aN.DatabaseClosed);this.open().catch(aI)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:r,name:n}){n&&this.unuse({stack:e,name:n});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==r?10:r,name:n}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:r}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>r?e.create!==r:!!t&&e.name!==t)),this}open(){return function(e){var t;let r=e._state,{indexedDB:n}=e._deps;if(r.isBeingOpened||e.idbdb)return r.dbReadyPromise.then(()=>r.dbOpenError?sA(r.dbOpenError):e);aw&&(r.openCanceller._stackHolder=aE()),r.isBeingOpened=!0,r.dbOpenError=null,r.openComplete=!1;let o=r.openCanceller;function i(){if(r.openCanceller!==o)throw new aN.DatabaseClosed("db.open() was cancelled")}let a=r.dbReadyResolve,s=null,u=!1;return sr.race([o,("u"<typeof navigator?sr.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var r=function(){return indexedDB.databases().finally(e)};t=setInterval(r,100),r()}).finally(function(){return clearInterval(t)}):Promise.resolve()).then(()=>new sr((t,o)=>{if(i(),!n)throw new aN.MissingAPI;let a=e.name,l=r.autoSchema?n.open(a):n.open(a,Math.round(10*e.verno));if(!l)throw new aN.MissingAPI;l.onerror=ur(o),l.onblocked=sm(e._fireOnBlocked),l.onupgradeneeded=sm(t=>{if(s=l.transaction,r.autoSchema&&!e._options.allowEmptyDB){l.onerror=un,s.abort(),l.result.close();let e=n.deleteDatabase(a);e.onsuccess=e.onerror=sm(()=>{o(new aN.NoSuchDatabase(`Database ${a} doesnt exist`))})}else{let r,n,a,f;s.onerror=ur(o);var i,c,d=t.oldVersion>0x4000000000000000?0:t.oldVersion;u=d<1,e._novip.idbdb=l.result,i=d/10,c=s,r=e._dbSchema,(n=e._createTransaction("readwrite",e._storeNames,r)).create(c),n._completion.catch(o),a=n._reject.bind(n),f=a9.transless||a9,sx(()=>{a9.trans=n,a9.transless=f,0===i?(iZ(r).forEach(e=>{uv(c,e,r[e].primKey,r[e].indexes)}),uh(e,c),sr.follow(()=>e.on.populate.fire(n)).catch(a)):(function({_novip:e},t,r,n){let o=[],i=e._versions,a=e._dbSchema=u_(e,e.idbdb,n),s=!1;return i.filter(e=>e._cfg.version>=t).forEach(i=>{o.push(()=>{let o=a,u=i._cfg.dbschema;ux(e,o,n),ux(e,u,n),a=e._dbSchema=u;let l=ub(o,u);l.add.forEach(e=>{uv(n,e[0],e[1].primKey,e[1].indexes)}),l.change.forEach(e=>{if(e.recreate)throw new aN.Upgrade("Not yet support for changing primary key");{let t=n.objectStore(e.name);e.add.forEach(e=>uw(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),uw(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});let c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){let t;uh(e,n),r._memoizedTables={},s=!0;let i=aa(u);l.del.forEach(e=>{i[e]=o[e]}),uy(e,[e.Transaction.prototype]),um(e,[e.Transaction.prototype],iZ(i),i),r.schema=i;let a=av(c);a&&sE();let d=sr.follow(()=>{if((t=c(r))&&a){var e=sS.bind(null,null);t.then(e,e)}});return t&&"function"==typeof t.then?sr.resolve(t):d.then(()=>t)}}),o.push(t=>{var n;s&&sL||(n=i._cfg.dbschema,[].slice.call(t.db.objectStoreNames).forEach(e=>null==n[e]&&t.db.deleteObjectStore(e))),uy(e,[e.Transaction.prototype]),um(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})}),(function e(){return o.length?sr.resolve(o.shift()(r.idbtrans)).then(e):sr.resolve()})().then(()=>{var e;iZ(e=a).forEach(t=>{n.db.objectStoreNames.contains(t)||uv(n,t,e[t].primKey,e[t].indexes)})})})(e,i,n,c).catch(a)})}},o),l.onsuccess=sm(()=>{s=null;let n=e._novip.idbdb=l.result,o=i7(n.objectStoreNames);if(o.length>0)try{let t,i=n.transaction(1===o.length?o[0]:o,"readonly");r.autoSchema?function({_novip:e},t,r){e.verno=t.version/10;let n=e._dbSchema=u_(0,t,r);e._storeNames=i7(t.objectStoreNames,0),um(e,[e._allTables],iZ(n),n)}(e,n,i):(ux(e,e._dbSchema,i),((t=ub(u_(0,e.idbdb,i),e._dbSchema)).add.length||t.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),uh(e,i)}catch(e){}s$.push(e),n.onversionchange=sm(t=>{r.vcFired=!0,e.on("versionchange").fire(t)}),n.onclose=sm(t=>{e.on("close").fire(t)}),u&&function({indexedDB:e,IDBKeyRange:t},r){uO(e)||"__dbnames"===r||uS(e,t).put({name:r}).catch(aI)}(e._deps,a),t()},o)}))]).then(()=>(i(),r.onReadyBeingFired=[],sr.resolve(uD(()=>e.on.ready.fire(e.vip))).then(function t(){if(r.onReadyBeingFired.length>0){let n=r.onReadyBeingFired.reduce(aH,aI);return r.onReadyBeingFired=[],sr.resolve(uD(()=>n(e.vip))).then(t)}}))).finally(()=>{r.onReadyBeingFired=null,r.isBeingOpened=!1}).then(()=>e).catch(t=>{r.dbOpenError=t;try{s&&s.abort()}catch(e){}return o===r.openCanceller&&e._close(),sA(t)}).finally(()=>{r.openComplete=!0,a()})}(this)}_close(){let e=this._state,t=s$.indexOf(this);if(t>=0&&s$.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sr(t=>{e.dbReadyResolve=t}),e.openCanceller=new sr((t,r)=>{e.cancelOpen=r})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new aN.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,t=this._state;return new sr((r,n)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=sm(()=>{!function({indexedDB:e,IDBKeyRange:t},r){uO(e)||"__dbnames"===r||uS(e,t).delete(r).catch(aI)}(this._deps,this.name),r()}),e.onerror=ur(n),e.onblocked=this._fireOnBlocked};if(e)throw new aN.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return iZ(this._allTables).map(e=>this._allTables[e])}transaction(){let e=uk.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,r){let n,o,i=a9.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);let a=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||"readonly"===e)n="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new aN.InvalidArgument("Invalid transaction mode: "+e);n="readwrite"}if(i){if("readonly"===i.mode&&"readwrite"===n){if(!a)throw new aN.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&o.forEach(e=>{if(i&&-1===i.storeNames.indexOf(e)){if(!a)throw new aN.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),a&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(t,r)=>{r(e)}):sA(e)}let s=(function e(t,r,n,o,i){return sr.resolve().then(()=>{let a,s=a9.transless||a9,u=t._createTransaction(r,n,t._dbSchema,o);if(o)u.idbtrans=o.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===aR.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then(()=>e(t,r,n,null,i))):sA(o)}let l=av(i);l&&sE();let c=sr.follow(()=>{if(a=i.call(u,u))if(l){var e=sS.bind(null,null);a.then(e,e)}else"function"==typeof a.next&&"function"==typeof a.throw&&(a=uP(a))},{trans:u,transless:s});return(a&&"function"==typeof a.then?sr.resolve(a).then(e=>u.active?e:sA(new aN.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>a)).then(e=>(o&&u._resolve(),u._completion.then(()=>e))).catch(e=>(u._reject(e),sA(e)))})}).bind(null,this,n,o,i,r);return i?i._promise(n,s,"lock"):a9.trans?sT(a9.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!i1(this._allTables,e))throw new aN.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let uH="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class uK{constructor(e){this._subscribe=e}subscribe(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})}[uH](){return this}}function uz(e,t){return iZ(t).forEach(r=>{uL(e[r]||(e[r]=new uI),t[r])}),e}try{i={indexedDB:iY.indexedDB||iY.mozIndexedDB||iY.webkitIndexedDB||iY.msIndexedDB,IDBKeyRange:iY.IDBKeyRange||iY.webkitIDBKeyRange}}catch(e){i={indexedDB:null,IDBKeyRange:null}}function uG(e){let t=uq;try{uq=!0,uo.storagemutated.fire(e)}finally{uq=t}}i2(uW,{...aM,delete:e=>new uW(e,{addons:[]}).delete(),exists:e=>new uW(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:t}){return uO(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>"__dbnames"!==e)):uS(e,t).toCollection().primaryKeys()})(uW.dependencies).then(e)}catch(e){return sA(new aN.MissingAPI)}},defineClass:()=>function(e){iX(this,e)},ignoreTransaction:e=>a9.trans?sT(a9.transless,e):e(),vip:uD,async:function(e){return function(){try{var t=uP(e.apply(this,arguments));return t&&"function"==typeof t.then?t:sr.resolve(t)}catch(e){return sA(e)}}},spawn:function(e,t,r){try{var n=uP(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:sr.resolve(n)}catch(e){return sA(e)}},currentTransaction:{get:()=>a9.trans||null},waitFor:function(e,t){let r=sr.resolve("function"==typeof e?uW.ignoreTransaction(e):e).timeout(t||6e4);return a9.trans?a9.trans.waitFor(r):r},Promise:sr,debug:{get:()=>aw,set:e=>{aw=e,a_="dexie"===e?()=>!0:sF}},derive:i6,extend:iX,props:i2,override:ae,Events:sH,on:uo,liveQuery:function(e){return new uK(t=>{let r=av(e),n=!1,o={},i={},a={get closed(){return n},unsubscribe:()=>{n=!0,uo.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,u=!1;function l(){return iZ(i).some(e=>o[e]&&function(e,t){let r=uF(t),n=r.next();if(n.done)return!1;let o=n.value,i=uF(e),a=i.next(o.from),s=a.value;for(;!n.done&&!a.done;){if(0>=sQ(s.from,o.to)&&sQ(s.to,o.from)>=0)return!0;0>sQ(o.from,s.from)?o=(n=r.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e]))}let c=e=>{uz(o,e),l()&&d()},d=()=>{let f,p;if(s||n)return;o={};let h={},m=(r&&sE(),f=()=>sx(e,{subscr:h,trans:null}),p=a9.trans?sT(a9.transless,f):f(),r&&p.then(sS,sS),p);u||(uo("storagemutated",c),u=!0),s=!0,Promise.resolve(m).then(e=>{s=!1,n||(l()?d():(o={},i=h,t.next&&t.next(e)))},e=>{s=!1,t.error&&t.error(e),a.unsubscribe()})};return d(),a})},extendObservabilitySet:uz,getByKeyPath:ao,setByKeyPath:ai,delByKeyPath:function(e,t){"string"==typeof t?ai(e,t,void 0):"length"in t&&[].map.call(t,function(t){ai(e,t,void 0)})},shallowClone:aa,deepClone:af,getObjectDiff:uj,cmp:sQ,asap:ar,minKey:-1/0,addons:[],connections:s$,errnames:aR,dependencies:i,semVer:"3.2.2",version:"3.2.2".split(".").map(e=>parseInt(e)).reduce((e,t,r)=>e+t/Math.pow(10,2*r))}),uW.maxKey=ul(uW.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(uo("storagemutated",e=>{if(!uq){let t;sL?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uq=!0,dispatchEvent(t),uq=!1}}),addEventListener("x-storagemutated-1",({detail:e})=>{uq||uG(e)}));let uq=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel("x-storagemutated-1");uo("storagemutated",t=>{uq||e.postMessage(t)}),e.onmessage=e=>{e.data&&uG(e.data)}}else if("u">typeof self&&"u">typeof navigator){uo("storagemutated",e=>{try{uq||("u">typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:"x-storagemutated-1",changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if("x-storagemutated-1"===e.key){let t=JSON.parse(e.newValue);t&&uG(t.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&"x-storagemutated-1"===e.type&&uG(e.changedParts)})}function uY(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}sr.rejectionMapper=function(e,t){if(!e||e instanceof ak||e instanceof TypeError||e instanceof SyntaxError||!e.name||!aA[e.name])return e;var r=new aA[e.name](t||e.message,e);return"stack"in e&&i4(r,"stack",{get:function(){return this.inner.stack}}),r},a_=sF;class uZ extends uW{constructor(){super("EsmOffline"),uY(this,"syncQueue",void 0),uY(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function uJ(){return new uZ}let uX=new uZ,uQ={},u0=q("offline-synchronization",{});function u1(){return u0}async function u2(){if(u0.getState().synchronization)return;let e=await uX.syncQueue.count(),t={},r=Object.entries(uQ),n=r.length,o={},i=new AbortController,a=()=>{let e=u0.getState().synchronization;u0.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{u0.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<n&&r.length>0;e++)for(let e=r.length;e--;){let[n,s]=r[e],u=s.dependsOn.map(e=>t[e]);u.every(Boolean)&&(o[n]={},await Promise.all(u),t[n]=u3(s,o,i,a),r.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{u0.setState({synchronization:void 0})}}async function u3({type:e,dependsOn:t,process:r},n,o,i){let a=[],s=[],u=await u4();await uX.syncQueue.where({type:e,userId:u}).each((e,t)=>{a.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let l=0;l<a.length;l++){let[c,d,{id:f,dependencies:p=[]}]=a[l];try{let i=await r(d,{abort:o,index:l,items:s,userId:u,dependencies:p.map(({id:e,type:r})=>t.includes(r)?n[r][e]:void 0)});void 0!==f&&(n[e][f]=i),await uX.syncQueue.delete(c)}catch(e){await uX.syncQueue.update(c,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function u4(){let e=await nO();return e?.uuid||"*"}async function u6(e,t,r,n){let o=n&&n.id;return void 0!==o&&await uX.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(uW.errnames.DatabaseClosed),await uX.syncQueue.add({type:t,content:r,userId:e,descriptor:n||{},createdOn:new Date}).catch(uW.errnames.DatabaseClosed,()=>-1)}async function u5(e,t,r){let n=await u4();return await u6(n,e,t,r)}async function u8(e,t){return(await u9(e,t)).map(e=>e.content)}async function u9(e,t){return await uX.syncQueue.where(t?{type:t,userId:e}:{userId:e}).toArray().catch(uW.errnames.DatabaseClosed,()=>[])}async function u7(e){let t=await u4();return await u8(t,e)}async function le(e){let t=await u4();return await u9(t,e)}async function lt(e){return await uX.syncQueue.get(e).catch(uW.errnames.DatabaseClosed,()=>void 0)}function lr(e){return!!uQ[e]?.options.onBeginEditSyncItem}async function ln(e){let t=await lt(e);if(!t)throw Error(`No sync item with the ID ${e} exists.`);let r=uQ[t.type]?.options.onBeginEditSyncItem;if(!r)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);r(t)}async function lo(e){await uX.syncQueue.delete(e).catch(uW.errnames.DatabaseClosed)}function li(e,t,r,n={}){uQ[e]={type:e,dependsOn:t,process:r,options:n}}var la=r(8414);let ls="OFFLINE+";function lu(){return ls+(0,la.A)()}function ll(e){return e.startsWith(ls)}let lc={};function ld(){return Object.values(lc)}function lf(e){lc[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),lc[e.id]=e}async function lp(e){let t=await l_();return await lh(t,e)}async function lh(e,t){let r=new uZ;return await r.dynamicOfflineData.where(t?{type:t,users:e}:{users:e}).toArray().catch(uW.errnames.DatabaseClosed,()=>[])}async function lm(e,t){let r=await l_();return await ly(r,e,t)}async function ly(e,t,r){let n=new uZ,o=await n.dynamicOfflineData.get({type:t,identifier:r}).catch(uW.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await n.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(uW.errnames.DatabaseClosed):await n.dynamicOfflineData.add({users:[e],type:t,identifier:r}).catch(uW.errnames.DatabaseClosed)}async function lg(e,t){let r=await l_();return await lb(r,e,t)}async function lb(e,t,r){let n=new uZ,o=await n.dynamicOfflineData.get({type:t,identifier:r,users:e}).catch(uW.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await n.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(uW.errnames.DatabaseClosed):await n.dynamicOfflineData.delete(o.id).catch(uW.errnames.DatabaseClosed))}async function lv(e,t){let r=await lp(e);await Promise.all(r.map(async e=>lw(e.type,e.identifier,t)))}async function lw(e,t,r){await lm(e,t);let n=new uZ,o=await l_(),i=await n.dynamicOfflineData.get({type:e,identifier:t}).catch(uW.errnames.DatabaseClosed,()=>void 0),a=ld().filter(t=>t.type===e);if(!i)return;let s=await Promise.all(a.map(async e=>{try{return e.sync(t,r),{id:e.id,error:void 0}}catch(r){let t=r.message?.toString()??r.toString();return{id:e.id,error:t}}})),u=s.filter(e=>!e.error).map(e=>e.id),l=s.filter(e=>e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),d={syncedOn:new Date,syncedBy:o,succeededHandlers:u,erroredHandlers:l,errors:c};i.id&&await n.dynamicOfflineData.update(i.id,{syncState:d}).catch(uW.errnames.DatabaseClosed)}async function l_(){let e=(await nO()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let lx=q("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function lE(){return lD(),lx}function lS(e,t){lD(),lf({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,r)=>t.onOfflinePatientAdded({patientUuid:e,signal:r??new AbortController().signal})})}async function lO(e){lD(),await lw("patient",e)}function lD(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function lP(e,t,r=!0){if(e){let n=null,[o,i]=await Promise.all([nh(`${nd}/Patient/${e}`,t).catch(e=>n=e),r?lk(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(n)throw n}return null}async function lk(e){let t=(await u7("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}function lC(e,t){let r=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(r)}function lT(e,t){let r=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,r),()=>{window.removeEventListener(`openmrs:${e}`,r)}}var lj=r(6170);function lR(e){return{uuid:e.uuid,display:e.display}}function lN(e=null,t=null){let r=new URLSearchParams;e&&r.set("tag",e),t&&r.set("q",t);let n=r.toString();return nm(`${nc}/location${n?"?"+n:""}`).pipe((0,lj.map)(e=>e.data.results.map(lR))).pipe((0,lj.take)(1))}function lA(e){return{uuid:e.uuid,display:e.display,name:e.name}}function lM(){return nm(`${nc}/visittype`).pipe((0,lj.map)(e=>e.data.results.map(lA))).pipe((0,lj.take)(1))}var lI=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),l$=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return ea(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(eh),lL=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return ea(t,e),t}(eg),lF=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return ea(t,e),t.prototype[ey]=function(){return new lL(this)},t.prototype.lift=function(e){var t=new lB(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new lI;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new lI;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new lI;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new lI},t.prototype._subscribe=function(e){if(this.closed)throw new lI;return this.hasError?(e.error(this.thrownError),eh.EMPTY):this.isStopped?(e.complete(),eh.EMPTY):(this.observers.push(e),new l$(this,e))},t.prototype.asObservable=function(){var e=new ew;return e.source=this,e},t.create=function(e,t){return new lB(e,t)},t}(ew),lB=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return ea(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):eh.EMPTY},t}(lF),lV=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return ea(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(!this.closed)return this._value;throw new lI},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(lF),lU=((ee={}).NEWVISIT="startVisit",ee.EDITVISIT="editVisit",ee.LOADING="loadingVisit",ee),lW=((et={}).NOTSTARTED="notStarted",et.ONGOING="ongoing",et);let lH="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",lK=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function lz(){return Z("visit",lK)}function lG(e,t){lz().setState({patientUuid:e,manuallySetVisitUuid:t})}function lq(e,t){return nh(`${nc}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function lY(e,t,r){return nh(`${nc}/visit/${e}`,{signal:r.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function lZ(e,t,r){return nh(`${nc}/visit?patient=${e}&v=${r??lH}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}lz().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});let lJ=new lV(null);class lX{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+lX.version}static addUnaryOp(e){return lX.max_unop_len=Math.max(e.length,lX.max_unop_len),lX.unary_ops[e]=1,lX}static addBinaryOp(e,t,r){return lX.max_binop_len=Math.max(e.length,lX.max_binop_len),lX.binary_ops[e]=t,r?lX.right_associative.add(e):lX.right_associative.delete(e),lX}static addIdentifierChar(e){return lX.additional_identifier_chars.add(e),lX}static addLiteral(e,t){return lX.literals[e]=t,lX}static removeUnaryOp(e){return delete lX.unary_ops[e],e.length===lX.max_unop_len&&(lX.max_unop_len=lX.getMaxKeyLen(lX.unary_ops)),lX}static removeAllUnaryOps(){return lX.unary_ops={},lX.max_unop_len=0,lX}static removeIdentifierChar(e){return lX.additional_identifier_chars.delete(e),lX}static removeBinaryOp(e){return delete lX.binary_ops[e],e.length===lX.max_binop_len&&(lX.max_binop_len=lX.getMaxKeyLen(lX.binary_ops)),lX.right_associative.delete(e),lX}static removeAllBinaryOps(){return lX.binary_ops={},lX.max_binop_len=0,lX}static removeLiteral(e){return delete lX.literals[e],lX}static removeAllLiterals(){return lX.literals={},lX}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new lX(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return lX.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!lX.binary_ops[String.fromCharCode(e)]||lX.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return lX.isIdentifierStart(e)||lX.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(lX.hooks[e]){let r={context:this,node:t};return lX.hooks.run(e,r),r.node}return t}searchHook(e){if(lX.hooks[e]){let t={context:this};return lX.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===lX.SPACE_CODE||e===lX.TAB_CODE||e===lX.LF_CODE||e===lX.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:lX.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],r,n;for(;this.index<this.expr.length;)if((r=this.code)===lX.SEMCOL_CODE||r===lX.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(r===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,lX.max_binop_len),t=e.length;for(;t>0;){if(lX.binary_ops.hasOwnProperty(e)&&(!lX.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!lX.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,n,o,i,a,s,u;if(!(i=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return i;for(o={value:t,prec:lX.binaryPrecedence(t),right_a:lX.right_associative.has(t)},(a=this.gobbleToken())||this.throwError("Expected expression after "+t),n=[i,o,a];t=this.gobbleBinaryOp();){if(0===(r=lX.binaryPrecedence(t))){this.index-=t.length;break}o={value:t,prec:r,right_a:lX.right_associative.has(t)},u=t;let s=e=>o.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;n.length>2&&s(n[n.length-2]);)a=n.pop(),t=n.pop().value,i=n.pop(),e={type:lX.BINARY_EXP,operator:t,left:i,right:a},n.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+u),n.push(o,e)}for(s=n.length-1,e=n[s];s>1;)e={type:lX.BINARY_EXP,operator:n[s-1].value,left:n[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,r,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"))return this.runHook("after-token",n);if(e=this.code,lX.isDecimalDigit(e)||e===lX.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===lX.SQUOTE_CODE||e===lX.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===lX.OBRACK_CODE)n=this.gobbleArray();else{for(r=(t=this.expr.substr(this.index,lX.max_unop_len)).length;r>0;){if(lX.unary_ops.hasOwnProperty(t)&&(!lX.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!lX.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:lX.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}lX.isIdentifierStart(e)?(n=this.gobbleIdentifier(),lX.literals.hasOwnProperty(n.name)?n={type:lX.LITERAL,value:lX.literals[n.name],raw:n.name}:n.name===lX.this_str&&(n={type:lX.THIS_EXP})):e===lX.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===lX.PERIOD_CODE||t===lX.OBRACK_CODE||t===lX.OPAREN_CODE||t===lX.QUMARK_CODE;){let r;if(t===lX.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==lX.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===lX.OBRACK_CODE?((e={type:lX.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==lX.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===lX.OPAREN_CODE?e={type:lX.CALL_EXP,arguments:this.gobbleArguments(lX.CPAREN_CODE),callee:e}:(t===lX.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:lX.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,r;for(;lX.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===lX.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);lX.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));lX.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);lX.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return r=this.code,lX.isIdentifierStart(r)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(r===lX.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===lX.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:lX.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),n=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){n=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:lX.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(lX.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,lX.isIdentifierPart(e))this.index++;else break;return{type:lX.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){r=!0,this.index++,e===lX.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===lX.COMMA_CODE){if(this.index++,++n!==t.length){if(e===lX.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===lX.CBRACK_CODE)for(let e=t.length;e<n;e++)t.push(null)}}else if(t.length!==n&&0!==n)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==lX.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(lX.CPAREN_CODE);if(this.code===lX.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:lX.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:lX.ARRAY_EXP,elements:this.gobbleArguments(lX.CBRACK_CODE)}}}Object.assign(lX,{hooks:new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(lX),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),lX.max_unop_len=lX.getMaxKeyLen(lX.unary_ops),lX.max_binop_len=lX.getMaxKeyLen(lX.binary_ops);let lQ=e=>new lX(e).parse(),l0=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(lX).filter(e=>!l0.includes(e)&&void 0===lQ[e]).forEach(e=>{lQ[e]=lX[e]}),lQ.Jsep=lX,lQ.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}});let l1="ArrowFunctionExpression",l2={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},l3={...l2,Promise};function l4(e,t={}){return ce(e,t,cn)}async function l6(e,t={}){return ct(e,t,cn)}function l5(e,t={}){return ce(e,t,co)}function l8(e,t={}){return ct(e,t,co)}function l9(e,t={}){return ce(e,t,ci)}function l7(e,t={}){return ct(e,t,ci)}function ce(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=cc(t,l2),o=ca("string"==typeof e?lQ(e):e,n);if(r(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function ct(e,t={},r){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let n=cc(t,l3);return Promise.resolve(ca("string"==typeof e?lQ(e):e,n)).then(t=>{if(r(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function cr(e){return lQ(e)}function cn(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function co(e){return"boolean"==typeof e}function ci(e){return"number"==typeof e}function ca(e,t){switch(e.type){case"UnaryExpression":var r,n,o,i,a,s,u,l,c,d,f,p,h,m=e,y=t;let g=ca(m.argument,y);switch(m.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${m.operator}''`}case"BinaryExpression":var b=e,v=t;switch(b.operator){case"&&":return ca(b.left,v)&&ca(b.right,v);case"||":return ca(b.left,v)||ca(b.right,v);case"??":return ca(b.left,v)??ca(b.right,v)}let w=ca(b.left,v),x=ca(b.right,v);switch(b.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${b.operator}' operator`}case"ConditionalExpression":return r=e,n=t,ca(r.test,n)?ca(r.consequent,n):ca(r.alternate,n);case"CallExpression":return cp(cu(e,t));case"ArrowFunctionExpression":let E;return o=e,i=t,E=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<E.length)throw`Required argument(s) ${E.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(E.reduce((t,r,n)=>{let o=e[n];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let r of Object.keys(t))if(!e(t[r]))return!1;return!0}if(Array.isArray(t)){for(let r of t)if(!e(r))break}return!1}(o)&&t.push([r,o]),t},[]));return ca(o.body,i.addVariables(t))}).bind(null);case"MemberExpression":return cp(cl(e,t));case"ArrayExpression":return a=e,s=t,a.elements?.map(ch(s));case"SequenceExpression":let S;return u=e,l=t,(S=u.expressions.map(ch(l)))[S.length-1];case"NewExpression":var O=e,D=t;if(O.callee&&"Identifier"===O.callee.type){let e=O.arguments?.map(ch(D));switch(O.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${O.callee.name}`}}if(O.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(cm(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let P,k;return f=e,p=t,P=f.expressions?.map(ch(p))??[],(k=f.quasis?.map(ch(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+P.join("")+k.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(h=e).cooked,tail:h.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function cs(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return cs(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function cu(e,t){let r=cf(e.callee,t);if(r===cd||e.optional&&null==r)return cd;let n=e.arguments?.map(ch(t));if(r){if("function"!=typeof r)throw`${cb(e.callee)} is not a function`}else throw`No function named ${cb(e.callee)} is defined in this context`;return r(...n)}function cl(e,t){let r=cf(e.object,t);if(r===cd||e.optional&&null==r)return cd;if(null===r)throw TypeError(`TypeError: cannot read properties of null (reading '${cg(e.property,t)}')`);if(void 0===r)switch(e.object.type){case"Identifier":{let r=cs(e.object,t);throw ReferenceError(`ReferenceError: ${r} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${cg(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof r&&"function"!=typeof r&&"string"!=typeof r&&"number"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;let n=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(ca(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);cm(n),function(e,t){if(cy.has(String(t)))return;let r=Object(e);for(;null!==r;){if(Object.hasOwn(r,t)){if(r===Object.prototype||r===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}r=Object.getPrototypeOf(r)}}(r,n);let o=r[n];return"function"==typeof o?o.bind(r):o}function cc(e,t){let r={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return r.addVariables.bind(r),r}lQ.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let r=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let r=this.gobbleBinaryExpression();r||this.throwError("Expected expression after "+e),t.node={type:l1,params:null,body:r};return}}this.index=r}}),e.hooks.add("after-expression",function(t){!function t(r){r&&(Object.values(r).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===r.operator&&(r.type=l1,r.params=r.left?[r.left]:null,r.body=r.right,r.params&&r.params[0].type===e.SEQUENCE_EXP&&(r.params=r.params[0].expressions),delete r.left,delete r.right,delete r.operator))}(t.node)})}}),lQ.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let r=t.node;if(r&&"new"===r.operator){r.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(r.argument.type)||this.throwError("Expected new function()"),t.node=r.argument;let n=t.node;for(;n.type===e.MEMBER_EXP||n.type===e.CALL_EXP&&n.callee.type===e.MEMBER_EXP;)n=n.type===e.MEMBER_EXP?n.object:n.callee.object;n.type="NewExpression"}})}}),lQ.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function r(t){let r=this.index,n="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:n+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(n+=this.expr.charAt(this.index++),o());let i=this.char;("e"===i||"E"===i)&&(n+=this.expr.charAt(this.index++),("+"===(i=this.char)||"-"===i)&&(n+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")"));let a=this.code;if(e.isIdentifierStart(a))this.throwError("Variable names cannot start with a number ("+n+this.char+")");else if(a===e.PERIOD_CODE){n.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:a,number:n},null,2)}`),this.index=r;return}t.node={type:e.LITERAL,value:parseFloat(n),raw:this.expr.substring(r,this.index)}}e.hooks.add("gobble-token",function(n){if(48===this.code){var o,i,a;let s=this.index,u=this.expr.charAt(this.index+1),l=t.call(this,u);if(!l)return;let c="";for(;o=this.code,i=l,95===o||i.some(([e,t])=>o>=e&&o<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(u.charCodeAt(0))){this.index=s+1,r.call(this,n);return}this.throwError("unexpected char within number")}n.node={type:e.LITERAL,value:parseInt(c,"x"===(a=u)||"X"===a?16:"b"===a||"B"===a?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&r.call(this,n)})}}),lQ.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let r=++this.index,n=!1;for(;this.index<this.expr.length;){if(47===this.code&&!n){let n,o=this.expr.slice(r,this.index),i="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)i+=this.char;else break}try{n=new RegExp(o,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:n,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),lQ.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:o},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}})}}),lQ.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,r=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},n="",o="",i=!1,a=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:o,cooked:n},tail:i});for(;this.index<a;){let a=this.expr.charAt(++this.index);if("`"===a)return this.index+=1,i=!0,s(),e.node=t,r&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===a&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",n="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===a)switch(o+=a,a=this.expr.charAt(++this.index),o+=a,a){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+=a}else n+=a,o+=a}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(r){if((r.node.type===e.IDENTIFIER||r.node.type===e.MEMBER_EXP)&&96===this.code)return r.node={type:"TaggedTemplateExpression",tag:r.node,quasi:t.bind(this)(r,!1)},r.node=this.gobbleTokenProperty(r.node),r.node})}}),lQ.addBinaryOp("in",7),lQ.addBinaryOp("??",1);let cd=Symbol("optional chain short-circuited");function cf(e,t){switch(e.type){case"MemberExpression":return cl(e,t);case"CallExpression":return cu(e,t);default:return ca(e,t)}}function cp(e){return e===cd?void 0:e}function ch(e){return function(t){return null===t?null:ca(t,e)}}function cm(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let cy=new Set(["toString","valueOf","hasOwnProperty"]);function cg(e,t){try{return cs(e,t)}catch{return"<computed>"}}function cb(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function cv(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...l3},isLocalExpression:!1,variables:new Set};return cw("string"==typeof e?lQ(e):e,t),[...t.variables]}function cw(e,t){switch(e.type){case"UnaryExpression":return n=e,o=t,cw(n.argument,o);case"BinaryExpression":return i=e,a=t,[cw(i.left,a),cw(i.right,a)].filter(Boolean);case"ConditionalExpression":return s=e,u=t,[cw(s.consequent,u),cw(s.test,u),cw(s.alternate,u)].filter(Boolean);case"CallExpression":let r;return l=e,c=t,r=cw(l.callee,c),l.arguments?.map(c_(c)),r;case"ArrowFunctionExpression":var n,o,i,a,s,u,l,c,d,f,p,h,m,y,g,b,v=e,w=t;let x={...w};x.isLocalExpression=!0;let E=v.params?.map(c_(x))??[],S=cw(v.body,x)??[];if(S&&Array.isArray(S))for(let e of S)E.includes(e)||w.variables.add(e);return;case"MemberExpression":var O=e,D=t;if(cw(O.object,D),O.computed)return void cw(O.property,D);let P={...D};P.isLocalExpression=!0,cw(O.property,P);return;case"ArrayExpression":return d=e,f=t,void d.elements?.map(c_(f));case"SequenceExpression":return p=e,h=t,void p.expressions?.map(c_(h));case"NewExpression":return m=e,y=t,void m.arguments?.map(c_(y));case"Literal":case"TemplateElement":return;case"Identifier":var k=e,C=t;if(!(k.name in C.globals))if(C.isLocalExpression)return k.name;else C.variables.add(k.name);return;case"TemplateLiteral":return g=e,b=t,void(g.expressions?.map(c_(b)),g.quasis?.map(c_(b)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function c_(e){return function(t){return null===t?null:cw(t,e)}}let cx=Z("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let r=t.replace("openmrs:feature-flag:",""),n=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${r}`)||"{}");e[r]={enabled:"true"===localStorage.getItem(t),...n}}return e}()});function cE(e,t,r){cx.setState(n=>({flags:{...n.flags,[e]:{enabled:n.flags[e]?.enabled??!1,label:t,description:r}}}))}function cS(){let e=cx.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let r=t.replace("openmrs:feature-flag:","");e[r]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${r}`))})}function cO(e){return cx.getState().flags[e].enabled}function cD(e,t){cx.subscribe(r=>{t(r.flags[e].enabled)})}function cP(e,t){cx.setState(r=>({flags:{...r.flags,[e]:{...r.flags[e],enabled:t}}}))}function ck(e){return!window.offlineEnabled||(e??navigator.onLine)}function cC(e=!0,t=!1){return cT(ck(),e,t)}function cT(e,t=!0,r=!1){return!!(e?t:r)}cx.subscribe(e=>{for(let[t,r]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,r.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:r.label,description:r.description}))});let cj=q("extensionsInternal",{slots:{},extensions:{}}),cR=q("extensionRenderings",{renderings:new Map}),cN=()=>Z("extensionsInternal",{slots:{},extensions:{}}),cA=()=>Z("extensionRenderings",{renderings:new Map});function cM(e){let t=cj.getState(),r=e(t);r!==t&&cj.setState(r)}let cI=null,c$=null;function cL(){let e=cR.getState();return cI&&e===c$||(cI=new Map(e.renderings),c$=e,function(e){for(let t of(cq.clear(),e.values()))cZ(t,1);cY=!0}(cI)),cI}function cF(e){c$={renderings:e},cR.setState(c$,!0)}function cB(e){let t=cL();t.has(e.renderingId)||(t.set(e.renderingId,e),cZ(e,1),cF(t))}function cV(e){let t=cL(),r=t.get(e);r&&(t.delete(e),cZ(r,-1),cF(t))}let cU=()=>Z("extensions",{slots:{}}),cW=0,cH=new Set;function cK(e){cW++;try{return e()}finally{if(0==--cW&&cH.size>0){let e=Array.from(cH);for(let t of(cH.clear(),e))cz(t)}}}function cz(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function cG(e){cW>0?cH.add(e):cz(e)}let cq=new Map,cY=!1;function cZ(e,t){let r=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),n=cq.get(r);if(!n){if(t<0)return;cq.set(r,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),cY=!0;return}n.count+=t,n.count<1&&(cq.delete(r),cY=!0)}function cJ(){var e,t;if(cL(),!cY)return;cY=!1;let r=Array.from(cq.values(),({record:e})=>e);r.sort(cX),e=eR.getState().mountedExtensions,t=r,e.length===t.length&&e.every((e,r)=>0===cX(e,t[r]))||eR.setState({mountedExtensions:r})}function cX(e,t){return cQ(e.slotName,t.slotName)||cQ(e.extensionId,t.extensionId)||cQ(e.slotModuleName,t.slotModuleName)||cQ(e.extensionModuleName,t.extensionModuleName)}function cQ(e,t){return e===t?0:e<t?-1:1}cJ(),cR.subscribe(()=>cG(cJ));let c0=cN(),c1=cU(),c2=eA(),c3=e$(),c4=new Set,c6=!1;function c5(e){if(null===e)c4=null;else if(null!==c4)for(let t of e)c4.add(t);cG(c8)}function c8(){if(!c6){c6=!0;try{for(let e=1;;e++){let t=c4;if(null!==t&&0===t.size)return;c4=new Set;try{!function(e,t,r,n,o,i=null){let a=c1.getState().slots,s={},u=!1,l=ck(),c=Object.entries(n.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[n,d]of Object.entries(e.slots)){let f=a[n];if(f&&i&&!i.has(n)){s[n]=f;continue}let{config:p}=eI(t,d.name),h=function(e,t,r,n,o,i,a){let s=function(e,t){let r=e.add||[],n=e.remove||[],o=e.order||[],{extensions:i}=c0.getState();return[...t,...r].filter(e=>!n.includes(e)).sort((e,r)=>dl(e,o,i[dt(e)]?.order,t)-dl(r,o,i[dt(r)]?.order,t))}(r,t.slots[e].attachedIds),u=[];for(let l of s){let{config:s}=eF(n,e,l),c=eB(r,e,l),d=c?(0,eo.merge)({},s,c):s,f=dt(l),p=t.extensions[f];if(p){let e=d?.["Display conditions"]?.privileges??p.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!a?.user||!nS(e,a.user))||p.featureFlag&&!o.includes(p.featureFlag)||window.offlineEnabled&&!cT(i,p.online,p.offline))continue;u.push({id:l,name:f,moduleName:p.moduleName,config:d,featureFlag:p.featureFlag,meta:p.meta,online:d?.["Display conditions"]?.online??p.online??!0,offline:d?.["Display conditions"]?.offline??p.offline??!1,displayConditionExpression:d?.["Display conditions"]?.expression||p.displayExpression})}}return u}(n,e,p,r,c,l,o.session);f&&f.moduleName===d.moduleName&&(0,eo.isEqual)(f.candidateExtensions,h)?s[n]=f:(s[n]={moduleName:d.moduleName,candidateExtensions:h},u=!0)}(u||Object.keys(a).length!==Object.keys(s).length)&&c1.setState({slots:s})}(c0.getState(),c2.getState(),c3.getState(),cx.getState(),ng.getState(),t)}catch(e){throw c4=null===t||null===c4?null:new Set([...t,...c4]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{c6=!1}}}function c9(e,t){let r=new Set;for(let n of Object.keys(e))e[n]!==t[n]&&r.add(n);for(let n of Object.keys(t))n in e||r.add(n);return r}function c7(){c5(null)}function de(e,t){return{moduleName:t,name:e,attachedIds:[]}}function dt(e){let[t]=e.split("#");return t}function dr(e,t){let r=dt(t);return e.extensions[r]}function dn(e){return dr(c0.getState(),e)}c0.subscribe((e,t)=>{c5(e.extensions!==t.extensions?null:c9(e.slots,t.slots))}),c2.subscribe((e,t)=>{c5(c9(e.slots,t.slots))}),c3.subscribe((e,t)=>{c5(c9(e.configs,t.configs))}),cx.subscribe(()=>c5(null)),ng.subscribe(()=>c5(null)),c7(),g(c7);let di=e=>cM(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function da(e,t){cM(r=>{let n=r.slots[e];return n?{...r,slots:{...r.slots,[e]:{...n,attachedIds:[...n.attachedIds,t]}}}:{...r,slots:{...r.slots,[e]:{...de(e),attachedIds:[t]}}}})}function ds(e,t){cM(r=>{let n=r.slots[e];return n&&n.attachedIds.includes(t)?{...r,slots:{...r.slots,[e]:{...n,attachedIds:n.attachedIds.filter(e=>e!==t)}}}:r})}function du(e){cM(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[]}}}:t})}function dl(e,t,r,n){let o=t.indexOf(e);if(-1!==o)return o;{if(void 0!==r)return 1e3+r;let t=n.indexOf(e);return -1!==t?2e3+t:3e3}}function dc(e,t){return function(e,t,r=null,n){let o;return e.filter(e=>{let i=e.displayConditionExpression;if("string"!=typeof i||0===i.trim().length)return!0;o??(o=t&&"object"==typeof t?{session:r,...t}:{session:r});try{return!!l5(i,o)}catch(t){return console.error(`Error while evaluating expression '${i}' for ${e.id}`+(n?` in ${n}`:""),t),!1}})}(dd(e),t,ng.getState().session,e)}function dd(e){return c1.getState().slots[e]?.candidateExtensions??[]}let df=(e,t)=>c0.setState(r=>{let n=r.slots[t]?.moduleName;if(n&&n!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${n}.`),r;if(n&&n==e)return r;if(r.slots[t])return{...r,slots:{...r.slots,[t]:{...r.slots[t],moduleName:e}}};let o=de(t,e);return{...r,slots:{...r.slots,[t]:{...o}}}}),dp=()=>{c4=null,cM(()=>({slots:{},extensions:{}})),cA().setState({renderings:new Map}),c1.setState({slots:{}})},dh=q("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function dm({name:e,basePath:t,mode:r,componentContext:n,state:o}){dh.setState({slotName:e,basePath:t,mode:r??"normal",componentContext:n,state:o})}function dy(e){dh.getState().slotName===e&&dh.setState(dh.getInitialState(),!0)}let dg=q("modalRegistry",{modals:{}});function db(e){dg.setState(t=>(t.modals[e.name]=e,t))}function dv(e){let t=dg.getState().modals[e];if(!t){let r=dn(e);r&&(t={name:e,load:r.load,moduleName:r.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),db(t))}return t}let dw=q("workspaceRegistrations",{workspaces:{}}),d_=q("workspaceGroups",{workspaceGroups:{}});function dx(e){dw.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function dE(e){d_.setState(t=>{let r=t.workspaceGroups[e.name];return r?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...r,members:Array.from(new Set([...r.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let dS=new Set;function dO(e){let t=dw.getState().workspaces;if(t[e])return t[e];{let t=dn(e);if(t){var r;let n;return dS.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),dS.add(e)),{name:t.name,title:(r=t,"string"==typeof(n=r?.meta?.title)?n:n&&"object"==typeof n?oT(r.moduleName,n.key,n.default):r.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function dD(e){let t=d_.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let dP=q("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function dk(e){let{registeredWorkspacesByName:t,registeredWindowsByName:r}=dP.getState(),n=t[e];if(n){let t=r[n.window];if(t)return t;throw Error(`No workspace window found with name: ${n.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function dC(e){let{registeredGroupsByName:t,registeredWindowsByName:r}=dP.getState(),n=r[e];if(n){let r=t[n.group];if(r)return r;throw Error(`No workspace group found with name: ${n.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function dT(e){let{openedWindows:t}=dP.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function dj(e,t){if(0==t.length)return;let{registeredGroupsByName:r}=dP.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace group ${r.name} more than once`);n[r.name]={...r,moduleName:e}}dP.setState({registeredGroupsByName:n})}function dR(e,t){if(0==t.length)return;let{registeredWindowsByName:r}=dP.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace window ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}dP.setState({registeredWindowsByName:n})}function dN(e,t){if(0==t.length)return;let{registeredWorkspacesByName:r}=dP.getState(),n={...r};for(let r of t){if(n[r.name])throw Error(`Cannot register workspace ${r.name} more than once`);let t={...r,moduleName:e};n[r.name]=t}dP.setState({registeredWorkspacesByName:n})}let dA=0,dM=null,dI={bootstrap:15e3,mount:15e3,unmount:15e3};function d$(e,t){if(e.timeouts)return e;let r=e.name??"parcel",n=Object.fromEntries(Object.keys(dI).filter(t=>e[t]).map(n=>{var o,i;let a,s;return[n,(o=e[n],i=dI[n],a=Array.isArray(o)?o:[o],s=e=>a.reduce((t,o,i)=>t.then(()=>{let t=o(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${n} at array index ${i} for parcel ${r} did not return a promise`))}),Promise.resolve(void 0)),e=>{let o,a=new Promise((e,t)=>{o=setTimeout(()=>t(Error(`Lifecycle function ${n} for parcel ${r} did not settle within ${i}ms`)),i)});return Promise.race([s(e),a]).finally(()=>clearTimeout(o)).then(e=>(t(n,!1),e),e=>{throw t(n,!0),e})})]}));return{...e,...n}}async function dL(e,t){var r,n;let o,i,a,s,u,l=await (dM??(dM=new Promise((e,t)=>{rf({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),rf))),dM),c={...t},d=(o=c,i=!1,{retarget:e=>o={...e},release:a=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(o),onSettled(e,t){switch(e){case"bootstrap":t&&a();return;case"mount":i||(i=t);return;case"unmount":(t||i)&&a();return}}});return n=l((r=d.onSettled,"function"==typeof e?()=>e().then(e=>d$(e,r)):d$(e,r)),c),s=e=>t=>e.call(n,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===n.getStatus()&&d.release(),e}),u=n.update&&s(n.update),Object.defineProperty(n,"update",{configurable:!0,enumerable:!0,get:()=>u,set:e=>{u=e&&s(e)}})}function dF(){return dB}function dB(e,t){let r,n=dL(e,t).then(e=>r=e);return{mount:()=>n.then(e=>e.mount()),unmount:()=>n.then(e=>e.unmount()),update:e=>n.then(t=>t.update?.(e)),getStatus:()=>r?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return n.then(e=>e.loadPromise)},get bootstrapPromise(){return n.then(e=>e.bootstrapPromise)},get mountPromise(){return n.then(e=>e.mountPromise)},get unmountPromise(){return n.then(e=>e.unmountPromise)}}}async function dV(e,t,r,n,o=e=>e,i={}){let a=dt(n),s=dn(n),u=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);let{meta:l,moduleName:c,online:d,offline:f,load:p}=s;if(cC(d,f)){let s,d=dA++,f=`${t}/${n}-${d}`;e.dataset.extensionRenderingId=f;let h=e=>{try{cV(f)}catch(t){console.error(e,t)}};try{cB({renderingId:f,extensionName:a,extensionModuleName:c,extensionId:n,slotName:t,slotModuleName:r})}catch(e){throw h(`Recomputing configuration after registering '${n}' failed also failed`),e}try{s=await p()}catch(e){throw h(`Recomputing configuration after '${n}' failed to load also failed`),e}try{u=await dL(o({...s,name:`${t}/${a}-${d}`}),{...i,_meta:l,_extensionContext:{extensionId:n,extensionSlotName:t,extensionSlotModuleName:r,extensionModuleName:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${n}' failed to mount also failed`),e}u.mountPromise.then(void 0,e=>{console.error(`Extension '${n}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${n}' failed to mount also failed`)}),u.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${n}' failed`),e=>{console.error(`Extension '${n}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${n}' failed to unmount also failed`)})}}else console.warn(`Tried to render ${n} into ${t} but no DOM element was available.`);return u}var dU=r(7979),dW=r.n(dU);let dH=(0,dU.createContext)({moduleName:"",featureName:""});function dK({to:e,templateParams:t,onBeforeNavigate:r,children:n,...o}){return(0,dU.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),dW().createElement("a",{onClick:n=>{0===n.button&&!n.ctrlKey&&!n.shiftKey&&!n.altKey&&!n.metaKey&&(n.preventDefault(),r?.(n),ne({to:e,templateParams:t})),0===n.button&&(n.ctrlKey||n.metaKey)&&r?.(n),0===n.button&&n.shiftKey&&r?.(n),1===n.button&&r?.(n)},href:r9(e,t),...o},n)}let dz=({state:e,children:t,...r})=>{let{extension:n}=(0,dU.useContext)(dH),o=(0,dU.useRef)(null),i=(0,dU.useRef)(Promise.resolve()),a=(0,dU.useRef)(!1),s=(0,dU.useRef)(!1),u=(0,dU.useRef)(e),l=(0,dU.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":i.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,dU.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(i.current=Promise.all([e.mountPromise,i.current]).then(()=>{if(o.current?.getStatus()==="MOUNTED"&&o.current.update)return o.current.update({...t})}).catch(e=>{let t=o.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${n?.extensionId}' failed to update`,e)}))},[]),d=(0,dU.useCallback)(t=>{t&&!o.current&&!s.current&&n?.extensionSlotName&&n.extensionSlotModuleName&&(s.current=!0,dV(t,n.extensionSlotName,n.extensionSlotModuleName,n.extensionId,void 0,e).then(t=>{(s.current=!1,o.current=t,a.current)?l(t):t&&u.current!==e&&c(t,u.current)},()=>{s.current=!1}))},[]);return(0,dU.useEffect)(()=>(a.current=!1,()=>{a.current=!0,l(o.current)}),[]),(0,dU.useEffect)(()=>{u.current=e,o.current&&c(o.current,e)},[e]),n?dW().createElement("div",{ref:d,"data-extension-id":n?.extensionId,style:{position:"relative"},...r}):null};function dG(e){let t=(0,dU.useRef)(e);return L(t.current,e)||(t.current=e),t.current}function dq(e,t){"function"==typeof t&&(t=t(e));let r={};for(let[n,o]of Object.entries(t)){let t=function(...t){e.setState(e=>o(e,...t))};r[n]=t}return r}let dY=e=>e;function dZ(e,t=dY,r){let n=(0,dU.useCallback)(t=>e.subscribe(t),[e]),o=(0,dU.useCallback)(()=>t(e.getState()),[e,t]),i=(0,dU.useSyncExternalStore)(n,o,o),a=(0,dU.useMemo)(()=>r?dq(e,r):null,[e,r]);return(0,dU.useMemo)(()=>a?{...i,...a}:i,[i,a])}function dJ(e,t){return dZ(e,dY,t)}function dX(e){return function(t){let r=(0,dU.useCallback)(t=>e.subscribe(t),[]),n=(0,dU.useCallback)(()=>e.getState(),[]),o=(0,dU.useSyncExternalStore)(r,n,n),i=(0,dU.useMemo)(()=>t?dq(e,t):null,[t]);return(0,dU.useMemo)(()=>i?{...o,...i}:o,[o,i])}}let dQ=[];Object.freeze(dQ);let d0={candidateExtensions:dQ};Object.freeze(d0);let d1=e=>{let t=(0,dU.useCallback)(t=>t.slots?.[e]??d0,[e]);return dZ(cU(),t)},d2=e=>e.session;function d3(e,t){let{candidateExtensions:r}=d1(e),n=dZ(ng,d2),o=dG(t);return(0,dU.useMemo)(()=>dc(e,o),[e,o,n,r])}function d4(e,t){let{moduleName:r}=(0,dU.useContext)(dH);if(!r)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,dU.useEffect)(()=>{df(r,e)},[r,e]),{extensions:d3(e,t),extensionSlotName:e,extensionSlotModuleName:r}}function d6(e){return e}function d5({name:e,extensionSlotName:t,select:r=d6,children:n,state:o,style:i,...a}){if(n&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,u=(0,dU.useRef)(null),{extensions:l,extensionSlotModuleName:c}=d4(s,o),d=(0,dU.useMemo)(()=>r(l),[r,l]),f=(0,dU.useMemo)(()=>{if("function"==typeof n&&!dW().isValidElement(n))return d.map(e=>n(e,o))},[n,d]);return dW().createElement("div",{ref:u,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...i,position:"relative"},...a},s&&d?.map((e,t)=>dW().createElement(dH.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c}}},f?.[t]??("function"!=typeof n?n:null)??dW().createElement(dz,{state:o}))))}var d8=r(5338);function d9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d9(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d9(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){var r;if("function"!=typeof(r=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var r="single-spa-application:".concat(t);return function(){var e=document.getElementById(r);return e||((e=document.createElement("div")).id=r,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(ft(r)));return function(){var e=r(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(ft(e)));return e}}var fn=null;try{fn=require("react").createContext()}catch(e){}var fo={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function fi(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function fa(e,t){return new Promise(function(r,n){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,i=fc(e,t,function(){r(this)}),a=fr(e,t)(),s=function(e){var t=e.reactDom,r=e.renderType,n=e.elementToRender,o=e.domElement,i=t[r];if("function"!=typeof i)throw Error('renderType "'.concat(r,'" did not return a function.'));switch(r){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var a=i(o);return a.render(n),a;case"hydrateRoot":return i(o,n);default:return i(n,o),null}}({elementToRender:i,domElement:a,reactDom:fl(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[t.name]=a,e.renderResults[t.name]=s})}function fs(e,t){return new Promise(function(r){e.unmountResolves[t.name]=r;var n=e.renderResults[t.name];n&&n.unmount?n.unmount():fl(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function fu(e,t){return new Promise(function(r){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(r);var n=fc(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(n);else{var i=fr(e,t)();fl(e).render(n,i)}})}function fl(e){return e.ReactDOMClient||e.ReactDOM}function fc(e,t,r){var n=e.React.createElement(e.rootComponent,t),o=fn?e.React.createElement(fn.Provider,{value:t},n):n;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function r(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},r.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return r.prototype=Object.create(e.React.Component.prototype),r.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},r.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},r}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),o=e.React.createElement(e.SingleSpaRoot,d7(d7({},t),{},{mountFinished:r,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),o)}var fd=r(3826),ff=r(9338),fp=r.n(ff),fh=r(7956);let fm={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},fy=new Map;(0,fh.initCache)(fy);let fg={errorRetryCount:3,fetcher:nh,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof ny){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>fy};function fb(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},fm,e),r={...fg,...t.swrConfig};return function(e){var n,o,i,a,s;return i=o=class extends(n=dW().Component){componentDidCatch(e,r){r&&r.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:r.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:r})}render(){if(this.state.caughtError)return dW().createElement("div",null,"An error has occurred. Please try reloading the page.");{let n=dW().createElement(dU.Suspense,{fallback:null},dW().createElement(ff.SWRConfig,{value:r},dW().createElement(dH.Provider,{value:this.state.config},t.disableTranslations?dW().createElement(e,this.props):dW().createElement(fd.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},dW().createElement(e,this.props)))));return t.strictMode&&dW().StrictMode?dW().createElement(dW().StrictMode,null,n):n}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in i?Object.defineProperty(i,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[a]=s,o}}function fv(e,t){return function(e){if("object"!==fe(e))throw Error("single-spa-react requires a configuration object");var t,r=d7(d7({},fo),e);if(!r.React)throw Error("single-spa-react must be passed opts.React");if(!r.ReactDOM&&!r.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(r.renderType||(null!=(t=r.ReactDOMClient)&&t.createRoot?r.renderType="createRoot":r.renderType="render"),!r.rootComponent&&!r.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(r.errorBoundary&&"function"!=typeof r.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!fn&&r.React.createContext&&(fn=r.React.createContext()),r.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(r);var n={bootstrap:fi.bind(null,r),mount:fa.bind(null,r),unmount:fs.bind(null,r)};return r.parcelCanUpdate&&(n.update=fu.bind(null,r)),n}({React:dW(),ReactDOMClient:d8,rootComponent:fb(t)(e)})}function fw(e,t){return()=>e().then(({default:e})=>fv(e,t))}function f_(e,t){return()=>Promise.resolve(fv(e,t))}let fx=fw,fE=U()(()=>({}));Y("openmrs-app-context",fE);let fS={};function fO(e,t=e=>e){let r=fE.getState();return e in r?Object.freeze(Object.assign({},t?t(r[e]):r[e])):null}function fD(e,t){fE.setState(r=>(e in r||(r[e]={}),r[e]=t(r[e]),Object.assign({},r)))}function fP(e){return null===e?null:Object.freeze(Object.assign({},e))}let fk=new Map;function fC(e,t){let r=(0,dU.useRef)(t??{}),n=(0,dU.useRef)(t=>fD(e,t)),o=(0,dU.useRef)(Symbol());return(0,dU.useEffect)(()=>{let r=t??{},n=o.current;return null===fO(e)?!function(e,t=fS){fE.setState(r=>{if(e in r)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},r,{[e]:t===fS?{}:t})})}(e,r):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),fD(e,()=>r)),fk.set(e,n),()=>{fk.get(e)===n&&(fE.setState(t=>(e in t&&delete t[e],t)),fk.delete(e))}},[e]),(0,dU.useEffect)(()=>{let n=t??{};L(r.current,n)||(fD(e,()=>n),r.current=n)},[t]),n.current}function fT({namespace:e,value:t}){return fC(e,t),null}let fj=({children:e,value:t,fallback:r})=>t?dW().createElement(dW().Fragment,null,e):r?dW().createElement(dW().Fragment,null,r):null;function fR(){let e=(0,dU.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,dU.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function fN(e,t=e=>e??{}){let[r,n]=(0,dU.useState)(()=>{if(fA(e))return;let r=fO(e);if(null!==r)return t?t(r):r});return(0,dU.useEffect)(()=>{if(fA(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,dU.useEffect)(()=>{var r;let o;return(r=e=>{if(null==e)return void n(void 0);let r=t?t(e):e;n(e=>L(e,r)?e:r)})(fP(o=fO(e))),fE.subscribe(t=>{let n=e in t?t[e]:null;n!==o&&(o=n,r(fP(n)))})},[e,t]),r}function fA(e){return"string"!=typeof e||0===e.trim().length}function fM(e){let t=d3(e);return(0,dU.useMemo)(()=>t.map(e=>e.id),[t])}function fI(e){return d1(e).candidateExtensions}function f$(e,t,r){let{data:n,error:o,mutate:i,isLoading:a,isValidating:s}=fp()(e?iw(e,t,r):null,nh);return(0,dU.useMemo)(()=>({isLoading:a,data:n?.data.results??[],error:o,mutate:i,isValidating:s}),[n,o,a,s,i])}function fL(e){(0,dU.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let fF={},fB=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function fV(e){let{moduleName:t,extension:r}=(0,dU.useContext)(dH),n=e?.externalModuleName??t;if(!n&&!r)throw Error(fB);let o=function(e){let t=(0,dU.useMemo)(()=>eN(e),[e]),r=function(e){let[t,r]=(0,dU.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,dU.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&r(e.config)}),[e]),t}(t);if(!r)throw fF[e]||(fF[e]=new Promise(e=>{let r=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),r())})})),fF[e];return r}(n),i=function(e){let t=(0,dU.useMemo)(e$,[]),r=function(e,t){let[r,n]=(0,dU.useState)(t?()=>{let r=eF(e.getState(),t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null);return(0,dU.useEffect)(()=>{if(t)return e.subscribe(e=>{let o=eF(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,eo.isEqual)(o.config,r)&&n(o.config)})},[e,t,r]),r}(t,e);if(!r&&e){let r=`${e.extensionSlotName}-${e.extensionId}`;throw!fF[r]&&t&&(fF[r]=new Promise(r=>{let n=t.subscribe(t=>{let o=eF(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(r(o.config),n())})})),fF[r]}return r||{}}(r);return(0,dU.useMemo)(()=>e?.externalModuleName&&n===e.externalModuleName?{...o}:{...o,...i},[n,e?.externalModuleName,o,i])}let fU=d3;function fW(){let[e,t]=(0,dU.useState)(ck());return(0,dU.useEffect)(()=>g(({online:e})=>t(e)),[]),e}function fH(e,t=300){let[r,n]=(0,dU.useState)(e);return(0,dU.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}var fK=r(6088),fz=r.n(fK);let fG=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function fq(){let e=`${nc}/emrapi/configuration?v=${fG}`,t=fz()(e,nh);return(0,dU.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}let fY=dX(cN());function fZ(e){let t=d3(e);return(0,dU.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let fJ=dX(cU());function fX(e){let{flags:t}=dZ(cx);return t[e]?.enabled??!1}function fQ(){let[,e]=(0,dU.useState)(0);return(0,dU.useCallback)(()=>{e(e=>e+1)},[])}function f0(e,t,r={}){return f2(e,t,f1,r)}let f1={getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(np(e.toString()),window.location.toString());return n.searchParams.set("limit",""+t),n.searchParams.set("startIndex",""+r),n.searchParams.set("totalCount","true"),n.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function f2(e,t,r,n={}){let{getPaginatedUrl:o,getTotalCount:i,getCurrentPageSize:a,getData:s}=r,{immutable:u,swrConfig:l}=n,c=n.fetcher??nh,[d,f]=(0,dU.useState)(1),p=(0,dU.useRef)(NaN),h=(0,dU.useRef)(NaN),m=(0,dU.useRef)(d),y=(0,dU.useRef)(!1),g=(0,dU.useRef)(!1),b=e?.toString()??"",[v,w]=(0,dU.useState)(b);b!==v&&(w(b),f(1),m.current=1,p.current=NaN,h.current=NaN,y.current=!1,g.current=!1);let x=(d-1)*t,E=(0,dU.useMemo)(()=>o(e,t,x),[e,t,x]),{data:S,...O}=(u?fz():fp())(E,c,l);S?.data&&(p.current=i(S?.data),h.current=a(S?.data),y.current=!0);let D=Math.ceil(p.current/t),P=(0,dU.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let r=Math.ceil(p.current/t);!y.current||Number.isNaN(r)||e<=r?(m.current=e,f(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,dU.useEffect)(()=>{if(!y.current)return;if(Number.isNaN(p.current)){g.current||(g.current=!0,console.warn(`useServerPagination: ${b} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),m.current=e,f(e))},[d,t,b,S]);let k=(0,dU.useCallback)(()=>{P(m.current+1)},[P]),C=(0,dU.useCallback)(()=>{P(m.current-1)},[P]);return{data:s(S?.data),totalPages:D,totalCount:p.current,currentPage:d,currentPageSize:h.current,paginated:D>1,showNextButton:d<D,showPreviousButton:d>1,goTo:P,goToNext:k,goToPrevious:C,...O}}function f3(e,t,r={}){return f2(e,t,f4(),r)}function f4(){return{getPaginatedUrl:(e,t,r)=>{if(!e)return null;{let n=new URL(np(e.toString()),window.location.toString());return n.searchParams.set("_count",""+t),n.searchParams.set("_getpagesoffset",""+r),n.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var f6=r(2398),f5=r.n(f6);function f8(e,t={}){return f9(e,f1,t)}function f9(e,t,r={}){let{swrInfiniteConfig:n,immutable:o}=r,{getNextUrl:i,getTotalCount:a,getData:s}=t,u=r.fetcher??nh,l=(0,dU.useCallback)((r,n)=>0==r?e?.toString()??null:t.getNextUrl(n.data),[e]),{data:c,size:d,setSize:f,...p}=f5()(l,u,{...n,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),h=i(c?.[c.length-1].data),m=a(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:m,hasMore:null!=h,loadMore:()=>{f((c?.length??0)+1)},nextUri:h,...p}}function f7(e,t={}){return pe(e,f1,t)}function pe(e,t,r={}){let n=f9(e,t,r),{hasMore:o,error:i,data:a,loadMore:s,isLoading:u,nextUri:l}=n;return((0,dU.useEffect)(()=>{o&&!i&&s()},[o,l]),r.partialData)?n:{...n,data:o||i?void 0:a,isLoading:u||o}}function pt(e,t={}){return pe(e,f4(),t)}function pr(e,t={}){return f9(e,f4(),t)}function pn(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function po(){let[e,t]=(0,dU.useState)(pn);return(0,dU.useEffect)(()=>{let e=()=>{t(pn())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let pi=e=>"small-desktop"===e||"large-desktop"===e;function pa(e){let t=(0,dU.useContext)(dH);(0,dU.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),dm(e),()=>{dy(e.name)}),[t,e])}function ps(){return dZ(dh)}function pu(e=null,t=null){let[r,n]=(0,dU.useState)([]);return(0,dU.useEffect)(()=>{let r=lN(e,t).subscribe(e=>{n(e)},e=>{console.error(e)});return()=>r.unsubscribe()},[e,t]),r}function pl(e,t=!0){let r=(0,dU.useRef)(null);return(0,dU.useEffect)(()=>{let n=n=>{t&&r.current&&n.target&&n.target instanceof Node&&(r.current.contains(n.target)||e(n))};return window.addEventListener("mousedown",n),window.addEventListener("touchstart",n),()=>{window.removeEventListener("mousedown",n),window.removeEventListener("touchstart",n)}},[e,t]),r}function pc(e){let t=(0,dU.useRef)();return(0,dU.useEffect)(()=>{let r=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting)return void e()},{threshold:1});return t.current&&r.observe(t.current),()=>{t.current&&r.unobserve(t.current)}},[t.current,e]),t}function pd(e,t={}){let{abortController:r,fetchInit:n,url:o,swrConfig:i}=t,a=fR(),s=(0,dU.useMemo)(()=>n?.signal??r?.signal??a.signal,[r?.signal,n?.signal,a.signal]),u=(0,dU.useCallback)(e=>nh(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...n,signal:s}),[s,n,o]);return fp()(e,u,i)}function pf(e=[],t=10){let[r,n]=(0,dU.useState)(1),o=(0,dU.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);r>o&&n(o);let i=Math.min(Math.max(1,r),o),a=(0,dU.useMemo)(()=>{let r=(i-1)*t,n=(i+0)*t;return e.slice(r,n)},[e,i,t]),s=(0,dU.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):n(e)},[]),u=(0,dU.useCallback)(()=>{n(e=>e+1)},[]),l=(0,dU.useCallback)(()=>{n(e=>Math.max(1,e-1))},[]);return(0,dU.useMemo)(()=>({results:a,totalPages:o,currentPage:i,paginated:e.length>t,showNextButton:i<o,showPreviousButton:i>1,goTo:s,goToNext:u,goToPrevious:l}),[a,o,e.length,t,i,s,u,l])}function pp(e,t,r,n){return{pageSizes:(0,dU.useMemo)(()=>{let r=Math.ceil(t/e);return isNaN(r)&&(r=0),[...Array(r).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,dU.useMemo)(()=>e>t?t:e*r>t?e*(r-1)+n:e*r,[e,t,r,n])}}function ph(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function pm(e){let[t,r]=(0,dU.useState)(e??ph()),{data:n,error:o,isValidating:i}=fp()(t?["patient",t]:null,()=>lP(t,{}));return(0,dU.useEffect)(()=>{let e=()=>{let e=ph();e!==t&&r(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,dU.useMemo)(()=>({isLoading:i&&!o&&!n,patient:n,patientUuid:t,error:o}),[i,o,n,t])}function py(){let e=`${nc}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:r,isLoading:n}=fp()(e,nh);return(0,dU.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:n,error:r}),[t,r,n])}function pg(e){let{extensions:t,extensionSlotModuleName:r}=d4(e);return e?t.map(t=>({state:n})=>dW().createElement(dH.Provider,{value:{moduleName:r,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:r}}},dW().createElement(dz,{state:n}))):[]}function pb(){let e=(0,dU.useRef)(),[t,r]=(0,dU.useState)(null),n=null;if(!t){if(a){let e=nw().getState();e.loaded&&(n=e.session)}else a=new Promise(t=>{let r=({loaded:r,session:o})=>{r&&(t(o),n=o,e.current&&(e.current(),e.current=void 0))};r(nw().getState()),n||(e.current=nw().subscribe(r))});if(n)r(n);else throw a}(0,dU.useEffect)(()=>(e.current||(e.current=nw().subscribe(({loaded:e,session:t})=>{e&&(n=t,r(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=t||n;if(!o)if(a)throw console.warn("useSession is in an unexpected state. Attempting to recover."),a;else throw Error("useSession is in an invalid state.");return o}let pv=({privilege:e,fallback:t,children:r})=>{let[n,o]=(0,dU.useState)(null);return((0,dU.useEffect)(()=>{let e=nv({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),n&&nS(e,n))?dW().createElement(dW().Fragment,null,r):t?dW().createElement(dW().Fragment,null,t):null};var pw=r(6734),p_=r.n(pw),px=r(7581);let pE=new Map;function pS(){for(let e of Array.from(pE.values()))e()}let pO={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function pD(e){let t=(0,dU.useId)();return(0,dU.useEffect)(()=>{if(e)return pE.set(t,e),()=>{pE.delete(t)}},[t,e]),{...dJ(lz(),pO),mutateVisit:pS}}function pP(e,t=lH){let r=(0,dU.useRef)(void 0),{patientUuid:n,manuallySetVisitUuid:o,setVisitContext:i}=pD((0,dU.useCallback)(()=>r.current?.(),[])),a=e&&n==e?o:null,s=`?patient=${e}&v=${t}&includeInactive=false`,u=`/${a}?v=${t}`,{data:l,error:c,mutate:d,isValidating:f}=fp()(e?`${nc}/visit${s}`:null,nh),{data:p,error:h,mutate:m,isValidating:y}=fp()(e&&a?`${nc}/visit${u}`:null,nh),g=(0,dU.useMemo)(()=>l?.data.results.find(e=>null===e.stopDatetime)??null,[l]),b=(0,dU.useMemo)(()=>a&&p?p.data:null,[p,a]),v=(0,dU.useRef)(null);(0,dU.useEffect)(()=>{!f&&g&&n===e&&null===o&&i(g),y||(v.current&&b&&v.current.uuid===b.uuid&&!v.current.stopDatetime&&b.stopDatetime&&i(null),v.current=b)},[b,o,g,f,y,n]);let w=(0,dU.useCallback)(()=>{d(),m()},[d,m]);(0,dU.useEffect)(()=>{r.current=w},[w]);let x=!!(!l||a&&!p),E=!!(a?h:c);return{error:c||h,mutate:w,isValidating:f||y,activeVisit:g,currentVisit:b,currentVisitIsRetrospective:!!a,isLoading:x&&!E}}function pk(){let[e,t]=(0,dU.useState)([]);return(0,dU.useEffect)(()=>{let e=lM().subscribe(e=>{t(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}pw.extend(px);let pC=new Map;async function pT(e,t){let r=t.indexOf("#"),n=r>=0,o=n?t.substring(0,r):e,i=n?t.substring(r+1):t,a=await o1(o);return a&&Object.hasOwn(a,i)&&"function"==typeof a[i]?pR(o,a).then(()=>a[i]()):(a?a&&Object.hasOwn(a,i)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${i}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${t} defined in ${e}'s routes.json`),pj)}let pj={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function pR(e,t){if(e in pC)await pC[e];else{let r=t??await o1(e);await (pC[e]=new Promise((t,n)=>{if(Object.hasOwn(r,"startupApp")){let o=r.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{e5(e),t(null)}).catch(n)}e5(e),t(null)}))}}function pN(e,t){let r=t.name;if(!r)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
17
17
  registered. To fix this, ensure that you define the "name" field inside the
18
18
  extension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${r} from ${e} declares both a 'slots' property and
19
19
  a 'slot' property. Only the 'slots' property will be honored.`);let n=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
20
- To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(dn({name:r,load:()=>pC(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))di(o,r)}let pN=[];function pA(e,t){cH(()=>(function(e,t){if(e&&t&&"object"==typeof t){e6(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=t.featureFlags??[],s=t.workspaceGroups2??[],u=t.workspaceWindows2??[],l=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?pN.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?pR(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?dg({name:r,moduleName:e,load:()=>pC(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
20
+ To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let o of(di({name:r,load:()=>pT(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:t.online??!0,offline:t.offline??!1,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),n))da(o,r)}let pA=[];function pM(e,t){cK(()=>(function(e,t){if(e&&t&&"object"==typeof t){e6(e);let r=t.extensions??[],n=t.modals??[],o=t.workspaces??[],i=t.workspaceGroups??[],a=t.featureFlags??[],s=t.workspaceGroups2??[],u=t.workspaceWindows2??[],l=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?pA.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?pN(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let r;(r=t.name)?t.component?db({name:r,moduleName:e,load:()=>pT(e,t.component)}):console.error(`The modal ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
21
21
  To fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be
22
22
  registered. To fix this, ensure that you define the "name" field inside the
23
23
  modal definition.`,t)}else console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let r=t.name;if(!r)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
24
24
  To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let n=t.title;if(!n)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
25
25
  To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${r} from ${e} is missing a 'component' entry and thus cannot be registered.
26
- To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(d_({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>pC(e,t.component)}),t.groups||[]))dx({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?dx({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
- To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),dT(e,s);for(let t of(dj(e,u),u))t.icon&&pR(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});dR(e,l),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?cx(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
26
+ To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let o of(dx({name:r,title:n,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>pT(e,t.component)}),t.groups||[]))dE({name:o,members:[r]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let r;(r=t.name)?dE({name:r,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
+ To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),dj(e,s);for(let t of(dR(e,u),u))t.icon&&pN(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});dN(e,l),a.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?cE(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
28
28
  To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
29
29
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
- To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function pM(){pN.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pN){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${n}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
- To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rG(e,()=>pC(t.appName,t.component),function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!cS(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?rQ(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let pI={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function p$(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<pI.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>pI.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>pI.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<pI.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<pI.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<pI.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>pI.SMALL_DESKTOP_MAX)}let pL=!1;function pF(){pL||(window.addEventListener("resize",p$),p$(),pL=!0)}var pB=r(4848),pV=r(6942),pU=r.n(pV);function pW({title:e,children:t}){let r="tablet"===pn();return(0,pB.jsxs)("div",{className:pU()({"-esm-fast-data-entry__card-header-module__tabletHeader___rUYi0":r,"-esm-fast-data-entry__card-header-module__desktopHeader___CDa37":!r}),children:[(0,pB.jsx)("h4",{children:e}),t]})}let pH=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],pK={primaryColor:{_type:ex.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tk.oneOf(pH)]},secondaryColor:{_type:ex.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tk.oneOf(pH)]}},pz={"Brand color #1":{_default:"#005d5d",_type:ex.String},"Brand color #2":{_default:"#004144",_type:ex.String},"Brand color #3":{_default:"#007d79",_type:ex.String},excludePatientIdentifierCodeTypes:{uuids:{_type:ex.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:ex.UUID}}},implementationName:{_type:ex.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:ex.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:ex.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[tk.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:ex.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:ex.String}},diagnosisTags:pK};var pG=r(3392);let pq={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},pY=e=>(0,pB.jsx)(pG.TableBatchActions,{translateWithId:(e,t)=>{let r=pq[e];return r?oj(r,e,t):e},...e}),pZ="-esm-fast-data-entry__custom-overflow-menu-module__container___lY3iq",pJ="-esm-fast-data-entry__custom-overflow-menu-module__menu___dReHr",pX="-esm-fast-data-entry__custom-overflow-menu-module__show___48R0e",pQ="-esm-fast-data-entry__custom-overflow-menu-module__overflowMenuButton___tsY8r",p0=(0,dV.createContext)(null);function p1(){let e=(0,dV.useContext)(p0);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function p2({menuTitle:e,children:t}){let[r,n]=dU().useState(!1),o=pu(()=>n(!1),r),i="tablet"===pn(),a=(0,dV.useCallback)(()=>n(e=>!e),[]),s=(0,dV.useRef)(null),u=(0,dV.useRef)(null),l=(0,dV.useId)(),c=`custom-overflow-menu-trigger-${l}`,d=`custom-overflow-menu-${l}`,f=(0,dV.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,dV.useMemo)(()=>({closeMenu:f}),[f]),h=(0,dV.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=dV.Children.toArray(t);(0,dV.useEffect)(()=>{if(r&&u.current){let e=u.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,dV.useCallback)(({currentIndex:e,direction:t})=>{let r=u.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,dV.isValidElement)(e)?(0,dV.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,pB.jsxs)("div",{"data-overflow-menu":!0,className:pU()("cds--overflow-menu",pZ),ref:o,children:[(0,pB.jsx)("button",{className:pU()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},pQ),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,pB.jsxs)("div",{className:pU()("cds--overflow-menu-options","cds--overflow-menu--flip",pJ,{[pX]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:u,role:"menu",tabIndex:-1,children:[(0,pB.jsx)("ul",{className:pU()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,pB.jsx)(p0.Provider,{value:p,children:g})}),(0,pB.jsx)("span",{})]})]})}function p3(e){let t=(0,dV.useContext)(p0);return(0,pB.jsx)(pG.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var p4=r(9943);let p6=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],p5=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),p8=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-add",iconProps:e})})),p9=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),p7=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),he=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),ht=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),hr=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),hn=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),ho=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),hi=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),ha=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),hs=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),hu=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),hl=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),hc=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),hd=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),hf=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),hp=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),hh=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),hm=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),hy=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),hg=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),hb=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-close",iconProps:e})})),hv=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),hw=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),h_=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-document",iconProps:e})})),hx=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),hE=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-download",iconProps:e})})),hS=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),hO=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),hD=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),hP=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-events",iconProps:e})})),hk=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),hC=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),hT=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),hj=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),hR=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),hN=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-group",iconProps:e})})),hA=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),hM=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),hI=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),h$=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-information",iconProps:e})})),hL=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),hF=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),hB=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),hV=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),hU=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),hW=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-location",iconProps:e})})),hH=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),hK=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),hz=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),hG=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),hq=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),hY=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),hZ=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-money",iconProps:e})})),hJ=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),hX=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),hQ=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h0=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h1=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-password",iconProps:e})})),h2=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),h3=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),h4=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),h6=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),h5=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),h8=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),h9=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),h7=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-report",iconProps:e})})),me=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),mt=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-save",iconProps:e})})),mr=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-search",iconProps:e})})),mn=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),mo=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),mi=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),ma=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),ms=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),mu=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),ml=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),mc=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-table",iconProps:e})})),md=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-time",iconProps:e})})),mf=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),mp=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),mh=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),mm=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),my=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),mg=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),mb=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mv=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),mw=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-user",iconProps:e})})),m_=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mx=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mE=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(mT,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mS=mE,mO=hx,mD=hU,mP=hI,mk=ma,mC=(0,dV.memo)((0,dV.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,dV.useRef)(e?document.getElementById(e):void 0);return(0,dV.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pB.jsx)(fT,{value:o.current,fallback:t,children:(0,pB.jsx)(mT,{ref:n,icon:e,iconProps:r})})})),mT=(0,dV.memo)((0,dV.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,dV.useRef)(null);return(0,dV.useImperativeHandle)(r,()=>a.current),(0,dV.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,pB.jsx)("svg",{ref:a,className:pU()("omrs-icon","-esm-fast-data-entry__icons-module__icon___sq7Qp",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,pB.jsx)("use",{href:`#${e}`})})})),mj=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,fc.useTranslation)(),i=(0,p4.useLocation)(),a=(0,dV.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,pB.jsx)("div",{children:(0,pB.jsx)(dH,{className:pU()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,pB.jsxs)("span",{className:"-esm-fast-data-entry__dashboard-module__menu___Lg1M+",children:[(0,pB.jsx)(mC,{icon:n,className:"-esm-fast-data-entry__dashboard-module__icon___Y2DxK",size:16}),(0,pB.jsx)("span",{children:o(t)})]})})},e)};function mR(e){return function({basePath:t}){return(0,pB.jsx)(p4.BrowserRouter,{children:(0,pB.jsx)(mj,{basePath:t,...e})})}}function mN(e){let t=(0,dV.useRef)(null),r=(0,dV.useRef)(void 0),n=(0,dV.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,dV.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function mA(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=mM(e,t);return r||="function"==typeof n,n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():mM(e[r],null)})}}}function mM(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mI(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let m$="u">typeof document?dU().useLayoutEffect:()=>{},mL={prefix:String(Math.round(1e10*Math.random())),current:0},mF=dU().createContext(mL),mB=dU().createContext(!1),mV=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mU="function"==typeof dU().useId?function(e){let t=dU().useId(),[r]=(0,dV.useState)(mz()),n=r?"react-aria":`react-aria${mL.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,dV.useContext)(mF),r=function(e=!1){let t=(0,dV.useContext)(mF),r=(0,dV.useRef)(null);if(null===r.current&&!e){let e=dU().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let r=mV.get(e);null==r?mV.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mV.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mW(){return!1}function mH(){return!0}function mK(e){return()=>{}}function mz(){return"function"==typeof dU().useSyncExternalStore?dU().useSyncExternalStore(mK,mW,mH):(0,dV.useContext)(mB)}let mG=!!("u">typeof window&&window.document&&window.document.createElement),mq=new Map;function mY(e){let[t,r]=(0,dV.useState)(e),n=(0,dV.useRef)(null),o=mU(t),i=(0,dV.useRef)(null);if(s&&s.register(i,o),mG){let e=mq.get(o);e&&!e.includes(n)?e.push(n):mq.set(o,[n])}return m$(()=>()=>{s&&s.unregister(i),mq.delete(o)},[o]),(0,dV.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mZ(e=[]){let t=mY(),[r,n]=function(e){let[t,r]=(0,dV.useState)(e),n=(0,dV.useRef)(t),o=(0,dV.useRef)(null),i=(0,dV.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}n.current===e.value?i.current():r(e.value)});return m$(()=>{n.current=t,o.current&&i.current()}),[t,(0,dV.useCallback)(e=>{o.current=e(n.current),i.current()},[i])]}(t),o=(0,dV.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return m$(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mq.delete(e)}));let mJ=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mX(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mI(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mJ(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mq.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mq.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):"ref"===e&&r&&o?t.ref=mA(r,o):t[e]=void 0!==o?o:r}}return t}let mQ=Symbol("default");function m0({values:e,children:t}){for(let[r,n]of e)t=dU().createElement(r.Provider,{value:n},t);return t}function m1(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,dV.useMemo)(()=>{let e,u,l;return e="function"==typeof t?t({...s,defaultClassName:o}):t,u="function"==typeof r?r({...s,defaultStyle:a||{}}):r,l="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:u||a?{...a,...u}:void 0,children:null!=l?l:i,"data-rac":""}},[t,r,n,o,i,a,s])}function m2(e,t){let r=(0,dV.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||mQ;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function m3(e,t,r){let{ref:n,...o}=m2(r,e.slot)||{},i=mN((0,dV.useMemo)(()=>mA(t,n),[t,n])),a=mX(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function m4(e=!0){let[t,r]=(0,dV.useState)(e),n=(0,dV.useRef)(!1),o=(0,dV.useCallback)(e=>{n.current=!0,r(!!e)},[]);return m$(()=>{n.current||r(!1)},[]),[o,t]}function m6(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let m5=(0,dV.createContext)(null),m8=null;function m9(e,t="assertive",r=7e3){m8?m8.announce(e,t,r):(m8=new m7,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?m8.announce(e,t,r):setTimeout(()=>{(null==m8?void 0:m8.isAttached())&&(null==m8||m8.announce(e,t,r))},100))}class m7{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let ye=new Set(["id"]),yt=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yr=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yn=new Set(["dir","lang","hidden","inert","translate"]),yo=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),yi=/^(data-.*)$/;function ya(e,t={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(ye.has(t)||r&&yt.has(t)||n&&yr.has(t)||o&&yn.has(t)||i&&(yo.has(t)||t.endsWith("Capture")&&yo.has(t.slice(0,-7)))||a?.has(t)||yi.test(t))&&(s[t]=e[t]);return s}function ys(e){if(function(){if(null==yu){yu=!1;try{document.createElement("div").focus({get preventScroll(){return yu=!0,!0}})}catch{}}return yu}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let yu=null,yl=e=>e?.ownerDocument??document,yc=e=>e&&"window"in e&&e.window===e?e:yl(e).defaultView||window;function yd(e,t){return!!t&&!!e&&e.contains(t)}function yf(e){return e.target}function yp(e){if(!e)return!1;let t=e.getRootNode(),r=yc(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return null!=n&&e.contains(n)}let yh="u">typeof Element&&"checkVisibility"in Element.prototype;function ym(e,t){return yh?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=yc(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||ym(e.parentElement,e))}let yy=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],yg=yy.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yy.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yb=yy.join(':not([hidden]):not([tabindex="-1"]),');function yv(e,t){return e.matches(yg)&&!y_(e)&&(t?.skipVisibilityCheck||ym(e))}function yw(e){return e.matches(yb)&&ym(e)&&!y_(e)}function y_(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function yx(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function yE(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function yS(e){let t=(0,dV.useRef)({isFocused:!1,observer:null});return m$(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,dV.useCallback)(r=>{let n=yf(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=yx(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let yO=!1;function yD(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function yP(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function yk(e){let t=null;return()=>(null==t&&(t=e()),t)}let yC=yk(function(){return yP(/^Mac/i)}),yT=yk(function(){return yP(/^iPhone/i)}),yj=yk(function(){return yP(/^iPad/i)||yC()&&navigator.maxTouchPoints>1}),yR=yk(function(){return yT()||yj()});yk(function(){return yC()||yR()});let yN=yk(function(){return yD(/AppleWebKit/i)&&!yA()}),yA=yk(function(){return yD(/Chrome/i)}),yM=yk(function(){return yD(/Android/i)}),yI=yk(function(){return yD(/Firefox/i)});function y$(e){return""===e.pointerType&&!!e.isTrusted||(yM()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function yL(e,t,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}=t;yI()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(yC()?n=!0:o=!0);let s=yN()&&yC()&&!yj()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});yL.isOpening=r,ys(e),e.dispatchEvent(s),yL.isOpening=!1}yL.isOpening=!1;let yF=null,yB=new Set,yV=new Map,yU=!1,yW=!1,yH={Tab:!0,Escape:!0};function yK(e,t){for(let r of yB)r(e,t)}function yz(e){yU=!0,yL.isOpening||e.metaKey||!yC()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yF="keyboard",yK("keyboard",e))}function yG(e){yF="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(yU=!0,yK("pointer",e))}function yq(e){!yL.isOpening&&y$(e)&&(yU=!0,yF="virtual")}function yY(e){let t=yc(yf(e)),r=yl(yf(e));yf(e)!==t&&yf(e)!==r&&!yO&&e.isTrusted&&(yU||yW||(yF="virtual",yK("virtual",e)),yU=!1,yW=!1)}function yZ(){yO||(yU=!1,yW=!0)}function yJ(e){if("u"<typeof window||"u"<typeof document)return;let t=yc(e),r=yl(e);if(yV.get(t))return;let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){yU=!0,n.apply(this,arguments)},r.addEventListener("keydown",yz,!0),r.addEventListener("keyup",yz,!0),r.addEventListener("click",yq,!0),t.addEventListener("focus",yY,!0),t.addEventListener("blur",yZ,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",yG,!0),r.addEventListener("pointermove",yG,!0),r.addEventListener("pointerup",yG,!0)),t.addEventListener("beforeunload",()=>{yX(e)},{once:!0}),yV.set(t,{focus:n})}let yX=(e,t)=>{let r=yc(e),n=yl(e);t&&n.removeEventListener("DOMContentLoaded",t),yV.has(r)&&(r.HTMLElement.prototype.focus=yV.get(r).focus,n.removeEventListener("keydown",yz,!0),n.removeEventListener("keyup",yz,!0),n.removeEventListener("click",yq,!0),r.removeEventListener("focus",yY,!0),r.removeEventListener("blur",yZ,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",yG,!0),n.removeEventListener("pointermove",yG,!0),n.removeEventListener("pointerup",yG,!0)),yV.delete(r))};function yQ(){return"pointer"!==yF}"u">typeof document&&("loading"!==(f=yl(void 0)).readyState?yJ(void 0):f.addEventListener("DOMContentLoaded",()=>{yJ(void 0)}));let y0=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),y1=new Map,y2=new Set;function y3(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=yf(r);if(!e(r)||!n)return;let o=y1.get(n);if(o&&(o.delete(r.propertyName),0===o.size&&(n.removeEventListener("transitioncancel",t),y1.delete(n)),0===y1.size)){for(let e of y2)e();y2.clear()}};document.body.addEventListener("transitionrun",r=>{let n=yf(r);if(!e(r)||!n)return;let o=y1.get(n);o||(o=new Set,y1.set(n,o),n.addEventListener("transitioncancel",t,{once:!0})),o.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function y4(e){requestAnimationFrame(()=>{for(let[e]of y1)"isConnected"in e&&!e.isConnected&&y1.delete(e);0===y1.size?e():y2.add(e)})}function y6(e){if(!e.isConnected)return;let t=yl(e);if("virtual"===yF){let r=((e=document)=>e.activeElement)(t);y4(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&ys(e)})}else ys(e)}function y5(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,dV.useCallback)(e=>{if(yf(e)===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=yS(i),s=(0,dV.useCallback)(e=>{let t=yf(e),n=yl(t),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function y8(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}function y9(e,t){m$(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?y3():document.addEventListener("DOMContentLoaded",y3));let y7=dU().createContext(null);function ge(e,t){let{focusProps:r}=y5(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:y8(e.onKeyDown),onKeyUp:y8(e.onKeyUp)}},o=mX(r,n),i=function(e){let t=(0,dV.useContext)(y7)||{};y9(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,dV.useRef)(e.autoFocus);(0,dV.useEffect)(()=>{s.current&&t.current&&y6(t.current),s.current=!1},[t]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:mX({...o,tabIndex:u},a)}}dU().forwardRef(function(e,t){let{children:r,...n}=e,o=mN(t),i={...n,ref:o};return dU().createElement(y7.Provider,{value:i},r)});let gt="default",gr="",gn=new WeakMap;function go(e){if(yR())"disabled"===gt&&(gt="restoring",setTimeout(()=>{y4(()=>{if("restoring"===gt){let t=yl(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=gr||""),gr="",gt="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&gn.has(e)){let t=gn.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),gn.delete(e)}}function gi(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let ga=new WeakMap;function gs(e){let t=e??("u">typeof document?document:void 0);if(!t)return gi(t);if(ga.has(t))return ga.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof yc(r).HTMLMetaElement&&(r.nonce||r.content)||gi(t)||void 0;return void 0!==n&&ga.set(t,n),n}let gu=dU().createContext({register:()=>{}});gu.displayName="PressResponderContext";let gl=dU().useInsertionEffect??m$;function gc(e){let t=(0,dV.useRef)(null);return gl(()=>{t.current=e},[e]),(0,dV.useCallback)((...e)=>{let r=t.current;return r?.(...e)},[])}function gd(){let e=(0,dV.useRef)(new Map),t=(0,dV.useCallback)((t,r,n,o)=>{let i=o?.once?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,dV.useCallback)((t,r,n,o)=>{let i=e.current.get(n)?.fn||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,dV.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,dV.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var gf=r(539),gp=r.n(gf);class gh{#e;constructor(e,t,r,n){this.#e=!0;let o=n?.target??r.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,u,l=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,l=r.clientY),i&&(null!=u&&null!=l?(a=u-i.left,s=l-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=s,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let gm=Symbol("linkClicked"),gy="react-aria-pressable-style",gg="data-react-aria-pressable";function gb(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:u,preventFocusOnPress:l,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,dV.useContext)(gu);if(t){let{register:r,ref:n,...o}=t;e=mX(o,e),r()}return y9(t,e.ref),e}(e),[h,m]=(0,dV.useState)(!1),y=(0,dV.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=gd(),v=(0,dV.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new gh("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,n,r]),w=(0,dV.useCallback)((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let u=!0;if(o){let t=new gh("pressend",n,e);o(t),u=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new gh("press",n,e);t(r),u&&=r.shouldStopPropagation}return a.isTriggeringEvent=!1,u},[s,o,r,t]),x=gc(w),E=gc((0,dV.useCallback)((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new gh("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[s,i])),S=(0,dV.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(g_(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||go(t.target),t.disposables))r();t.disposables=[]}},[d,b,w]),O=gc(S),D=(0,dV.useCallback)(e=>{c&&S(e)},[c,S]),P=(0,dV.useCallback)(e=>{s||a?.(e)},[s,a]),k=(0,dV.useCallback)((e,t)=>{if(!s&&a){let r=new MouseEvent("click",e);yE(r,t),a(yx(r))}},[s,a]),C=(0,dV.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(gw(t.nativeEvent,t.currentTarget)&&yd(t.currentTarget,yf(t))){gx(yf(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",n=v(t,"keyboard"));let o=t.currentTarget;g(yl(t.currentTarget),"keyup",mI(t=>{gw(t,o)&&!t.repeat&&yd(o,yf(t))&&e.target&&E(g_(e.target,t),"keyboard")},r),!0),n&&t.stopPropagation(),t.metaKey&&yC()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||yd(t.currentTarget,yf(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!yL.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||y$(t.nativeEvent))){let e=v(t,"virtual"),n=E(t,"virtual"),o=x(t,"virtual");P(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",o=E(g_(t.currentTarget,t),n),i=x(g_(t.currentTarget,t),n,!0);r=o&&i,e.isOverTarget=!1,P(t),O(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{if(e.isPressed&&e.target&&gw(t,e.target)){gx(yf(t),t.key)&&t.preventDefault();let r=yf(t),n=yd(e.target,r);x(g_(e.target,t),"keyboard",n),n&&k(t,e.target),b(),"Enter"!==t.key&&gv(e.target)&&yd(e.target,r)&&!t[gm]&&(t[gm]=!0,yL(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!yd(t.currentTarget,yf(t)))return;if(o=t.nativeEvent,!yM()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(yR()){if("default"===gt){let t=yl(e);gr=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}gt="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";gn.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=yf(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(yl(t.currentTarget),"pointerup",r,!1),g(yl(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(yd(t.currentTarget,yf(t))&&0===t.button){if(l){let r=function(e){for(;e&&!yv(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=yc(e),r=t.document.activeElement;if(!r||r===e)return;yO=!0;let n=!1,o=e=>{(yf(e)===r||n)&&e.stopImmediatePropagation()},i=t=>{(yf(t)===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,ys(r),u()))},a=t=>{(yf(t)===e||n)&&t.stopImmediatePropagation()},s=t=>{(yf(t)===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,ys(r),u()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let u=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),yO=!1,n=!1},l=requestAnimationFrame(u);return u}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{yd(t.currentTarget,yf(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||E(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(g_(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(g_(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(yd(e.target,yf(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?O(t):(ys(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else O(t);e.isOverTarget=!1}},n=e=>{O(e)};t.onDragStart=e=>{yd(e.currentTarget,yf(e))&&O(e)}}return t},[g,s,l,b,d,D,v,P,k]);return(0,dV.useEffect)(()=>{if(!f)return;let e=yl(f.current);if(!e||!e.head||e.getElementById(gy))return;let t=e.createElement("style");t.id=gy;let r=gs(e);r&&(t.nonce=r),t.textContent=`
30
+ To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function pI(){pA.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of pA){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let r=e.get(t.appName),n=`${t.appName}-page-${r}`,o=t.containerDomId??"omrs-apps-container",i=document.getElementById(o),a=`single-spa-application:${n}`;if(i){let e=document.createElement("div");e.id=a,i?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,t){let r=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===r?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
+ To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rG(e,()=>pT(t.appName,t.component),function(e,{online:t,offline:r,featureFlag:n}){return window.offlineEnabled?o=>!!(navigator.onLine&&(t??!0)||!navigator.onLine&&r)&&(!n||!!cO(n))&&e(o):e}(function e(t){if(Array.isArray(t)){let r=t.map(e);return e=>r.some(t=>t(e))}return"string"==typeof t?rQ(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(r),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(n,t)}}let p$={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function pL(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<p$.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>p$.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>p$.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<p$.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<p$.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<p$.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>p$.SMALL_DESKTOP_MAX)}let pF=!1;function pB(){pF||(window.addEventListener("resize",pL),pL(),pF=!0)}var pV=r(4848),pU=r(6942),pW=r.n(pU);function pH({title:e,children:t}){let r="tablet"===po();return(0,pV.jsxs)("div",{className:pW()({"-esm-fast-data-entry__card-header-module__tabletHeader___rUYi0":r,"-esm-fast-data-entry__card-header-module__desktopHeader___CDa37":!r}),children:[(0,pV.jsx)("h4",{children:e}),t]})}let pK=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],pz={primaryColor:{_type:ex.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tk.oneOf(pK)]},secondaryColor:{_type:ex.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tk.oneOf(pK)]}},pG={"Brand color #1":{_default:"#005d5d",_type:ex.String},"Brand color #2":{_default:"#004144",_type:ex.String},"Brand color #3":{_default:"#007d79",_type:ex.String},excludePatientIdentifierCodeTypes:{uuids:{_type:ex.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:ex.UUID}}},implementationName:{_type:ex.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:ex.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:ex.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[tk.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:ex.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:ex.String}},diagnosisTags:pz};var pq=r(3392);let pY={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},pZ=e=>(0,pV.jsx)(pq.TableBatchActions,{translateWithId:(e,t)=>{let r=pY[e];return r?oj(r,e,t):e},...e}),pJ="-esm-fast-data-entry__custom-overflow-menu-module__container___lY3iq",pX="-esm-fast-data-entry__custom-overflow-menu-module__menu___dReHr",pQ="-esm-fast-data-entry__custom-overflow-menu-module__show___48R0e",p0="-esm-fast-data-entry__custom-overflow-menu-module__overflowMenuButton___tsY8r",p1=(0,dU.createContext)(null);function p2(){let e=(0,dU.useContext)(p1);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function p3({menuTitle:e,children:t}){let[r,n]=dW().useState(!1),o=pl(()=>n(!1),r),i="tablet"===po(),a=(0,dU.useCallback)(()=>n(e=>!e),[]),s=(0,dU.useRef)(null),u=(0,dU.useRef)(null),l=(0,dU.useId)(),c=`custom-overflow-menu-trigger-${l}`,d=`custom-overflow-menu-${l}`,f=(0,dU.useCallback)(()=>{n(!1),s.current?.focus()},[]),p=(0,dU.useMemo)(()=>({closeMenu:f}),[f]),h=(0,dU.useCallback)(e=>{"Escape"===e.key&&r&&(e.stopPropagation(),f())},[f,r]),m=dU.Children.toArray(t);(0,dU.useEffect)(()=>{if(r&&u.current){let e=u.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[r]);let y=(0,dU.useCallback)(({currentIndex:e,direction:t})=>{let r=u.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!r?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(r).indexOf(n);if(-1===o)return void r[t>0?0:r.length-1]?.focus();let i=o+t,a=i<0?r.length-1:i>=r.length?0:i;r[a]?.focus()},[]),g=m.map((e,t)=>(0,dU.isValidElement)(e)?(0,dU.cloneElement)(e,{closeMenu:f,handleOverflowMenuItemFocus:y,index:t}):e);return(0,pV.jsxs)("div",{"data-overflow-menu":!0,className:pW()("cds--overflow-menu",pJ),ref:o,children:[(0,pV.jsx)("button",{className:pW()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":r},p0),"aria-controls":d,"aria-expanded":r,"aria-haspopup":"true",id:c,onClick:a,onKeyDown:h,ref:s,children:e}),(0,pV.jsxs)("div",{className:pW()("cds--overflow-menu-options","cds--overflow-menu--flip",pX,{[pQ]:r}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:h,ref:u,role:"menu",tabIndex:-1,children:[(0,pV.jsx)("ul",{className:pW()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":i}),children:(0,pV.jsx)(p1.Provider,{value:p,children:g})}),(0,pV.jsx)("span",{})]})]})}function p4(e){let t=(0,dU.useContext)(p1);return(0,pV.jsx)(pq.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var p6=r(9943);let p5=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],p8=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),p9=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-add",iconProps:e})})),p7=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),he=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),ht=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),hr=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),hn=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),ho=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),hi=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),ha=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),hs=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),hu=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),hl=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),hc=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),hd=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),hf=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),hp=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),hh=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),hm=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),hy=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),hg=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),hb=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),hv=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-close",iconProps:e})})),hw=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),h_=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),hx=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-document",iconProps:e})})),hE=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),hS=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-download",iconProps:e})})),hO=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),hD=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),hP=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),hk=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-events",iconProps:e})})),hC=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),hT=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),hj=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),hR=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),hN=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),hA=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-group",iconProps:e})})),hM=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),hI=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),h$=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),hL=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-information",iconProps:e})})),hF=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),hB=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),hV=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),hU=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),hW=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),hH=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-location",iconProps:e})})),hK=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),hz=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),hG=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),hq=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),hY=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),hZ=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),hJ=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-money",iconProps:e})})),hX=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),hQ=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),h0=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h1=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h2=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-password",iconProps:e})})),h3=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),h4=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),h6=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),h5=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),h8=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),h9=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),h7=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),me=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-report",iconProps:e})})),mt=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),mr=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-save",iconProps:e})})),mn=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-search",iconProps:e})})),mo=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),mi=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),ma=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),ms=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),mu=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),ml=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),mc=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),md=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-table",iconProps:e})})),mf=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-time",iconProps:e})})),mp=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),mh=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),mm=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),my=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mg=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),mb=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),mv=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),mw=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),m_=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-user",iconProps:e})})),mx=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),mE=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-view",iconProps:e})})),mS=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(mj,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),mO=mS,mD=hE,mP=hW,mk=h$,mC=ms,mT=(0,dU.memo)((0,dU.forwardRef)(function({icon:e,fallback:t,...r},n){let o=(0,dU.useRef)(e?document.getElementById(e):void 0);return(0,dU.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=e?document.getElementById(e):void 0)});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pV.jsx)(fj,{value:o.current,fallback:t,children:(0,pV.jsx)(mj,{ref:n,icon:e,iconProps:r})})})),mj=(0,dU.memo)((0,dU.forwardRef)(function({icon:e,iconProps:t},r){let{className:n,fill:o,size:i}=Object.assign({},{fill:"currentColor",size:20},t);(i<=0||i>72)&&(console.error(`Invalid size '${i}' specified for ${e}. Defaulting to 20.`),i=20);let a=(0,dU.useRef)(null);return(0,dU.useImperativeHandle)(r,()=>a.current),(0,dU.useEffect)(()=>{a.current&&"currentColor"!==o&&a.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,pV.jsx)("svg",{ref:a,className:pW()("omrs-icon","-esm-fast-data-entry__icons-module__icon___sq7Qp",n),height:i,width:i,viewBox:"0 0 16 16",children:(0,pV.jsx)("use",{href:`#${e}`})})})),mR=({path:e,title:t,basePath:r,icon:n})=>{let{t:o}=(0,fd.useTranslation)(),i=(0,p6.useLocation)(),a=(0,dU.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let r=t.split("/").map(e=>decodeURIComponent(e)),n=(i.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return n.some((e,t)=>r.every((e,r)=>n[t+r]===e))},[i.pathname,e]);return(0,pV.jsx)("div",{children:(0,pV.jsx)(dK,{className:pW()("cds--side-nav__link",{"active-left-nav-link":a}),to:`${r}/${encodeURIComponent(e)}`,children:(0,pV.jsxs)("span",{className:"-esm-fast-data-entry__dashboard-module__menu___Lg1M+",children:[(0,pV.jsx)(mT,{icon:n,className:"-esm-fast-data-entry__dashboard-module__icon___Y2DxK",size:16}),(0,pV.jsx)("span",{children:o(t)})]})})},e)};function mN(e){return function({basePath:t}){return(0,pV.jsx)(p6.BrowserRouter,{children:(0,pV.jsx)(mR,{basePath:t,...e})})}}function mA(e){let t=(0,dU.useRef)(null),r=(0,dU.useRef)(void 0),n=(0,dU.useCallback)(t=>{if("function"==typeof e){let r=e(t);return()=>{"function"==typeof r?r():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,dU.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,r.current&&(r.current(),r.current=void 0),null!=value&&(r.current=n(value))}}),[n])}function mM(...e){return 1===e.length&&e[0]?e[0]:t=>{let r=!1,n=e.map(e=>{let n=mI(e,t);return r||="function"==typeof n,n});if(r)return()=>{n.forEach((t,r)=>{"function"==typeof t?t():mI(e[r],null)})}}}function mI(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function m$(...e){return(...t)=>{for(let r of e)"function"==typeof r&&r(...t)}}let mL="u">typeof document?dW().useLayoutEffect:()=>{},mF={prefix:String(Math.round(1e10*Math.random())),current:0},mB=dW().createContext(mF),mV=dW().createContext(!1),mU=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mW="function"==typeof dW().useId?function(e){let t=dW().useId(),[r]=(0,dU.useState)(mG()),n=r?"react-aria":`react-aria${mF.prefix}`;return e||`${n}-${t}`}:function(e){let t=(0,dU.useContext)(mB),r=function(e=!1){let t=(0,dU.useContext)(mB),r=(0,dU.useRef)(null);if(null===r.current&&!e){let e=dW().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let r=mU.get(e);null==r?mU.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==r.state&&(t.current=r.id,mU.delete(e))}r.current=++t.current}return r.current}(!!e),n=`react-aria${t.prefix}`;return e||`${n}-${r}`};function mH(){return!1}function mK(){return!0}function mz(e){return()=>{}}function mG(){return"function"==typeof dW().useSyncExternalStore?dW().useSyncExternalStore(mz,mH,mK):(0,dU.useContext)(mV)}let mq=!!("u">typeof window&&window.document&&window.document.createElement),mY=new Map;function mZ(e){let[t,r]=(0,dU.useState)(e),n=(0,dU.useRef)(null),o=mW(t),i=(0,dU.useRef)(null);if(s&&s.register(i,o),mq){let e=mY.get(o);e&&!e.includes(n)?e.push(n):mY.set(o,[n])}return mL(()=>()=>{s&&s.unregister(i),mY.delete(o)},[o]),(0,dU.useEffect)(()=>{let e=n.current;return e&&r(e),()=>{e&&(n.current=null)}}),o}function mJ(e=[]){let t=mZ(),[r,n]=function(e){let[t,r]=(0,dU.useState)(e),n=(0,dU.useRef)(t),o=(0,dU.useRef)(null),i=(0,dU.useRef)(()=>{if(!o.current)return;let e=o.current.next();if(e.done){o.current=null;return}n.current===e.value?i.current():r(e.value)});return mL(()=>{n.current=t,o.current&&i.current()}),[t,(0,dU.useCallback)(e=>{o.current=e(n.current),i.current()},[i])]}(t),o=(0,dU.useCallback)(()=>{n(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,n]);return mL(o,[t,o,...e]),r}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{mY.delete(e)}));let mX=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n};function mQ(...e){let t={...e[0]};for(let r=1;r<e.length;r++){let n=e[r];for(let e in n){let r=t[e],o=n[e];"function"==typeof r&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=m$(r,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof r&&"string"==typeof o?t[e]=mX(r,o):"id"===e&&r&&o?t.id=function(e,t){if(e===t)return e;let r=mY.get(e);if(r)return r.forEach(e=>e.current=t),t;let n=mY.get(t);return n?(n.forEach(t=>t.current=e),e):t}(r,o):"ref"===e&&r&&o?t.ref=mM(r,o):t[e]=void 0!==o?o:r}}return t}let m0=Symbol("default");function m1({values:e,children:t}){for(let[r,n]of e)t=dW().createElement(r.Provider,{value:n},t);return t}function m2(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,dU.useMemo)(()=>{let e,u,l;return e="function"==typeof t?t({...s,defaultClassName:o}):t,u="function"==typeof r?r({...s,defaultStyle:a||{}}):r,l="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:null!=e?e:o,style:u||a?{...a,...u}:void 0,children:null!=l?l:i,"data-rac":""}},[t,r,n,o,i,a,s])}function m3(e,t){let r=(0,dU.useContext)(e);if(null===t)return null;if(r&&"object"==typeof r&&"slots"in r&&r.slots){let e=t||m0;if(!r.slots[e]){let e=new Intl.ListFormat().format(Object.keys(r.slots).map(e=>`"${e}"`)),n=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${n} Valid slot names are ${e}.`)}return r.slots[e]}return r}function m4(e,t,r){let{ref:n,...o}=m3(r,e.slot)||{},i=mA((0,dU.useMemo)(()=>mM(t,n),[t,n])),a=mQ(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?a.style=t=>{let r="function"==typeof o.style?o.style(t):o.style,n={...t.defaultStyle,...r},i="function"==typeof e.style?e.style({...t,defaultStyle:n}):e.style;return{...n,...i}}:a.style={...o.style,...e.style}),[a,i]}function m6(e=!0){let[t,r]=(0,dU.useState)(e),n=(0,dU.useRef)(!1),o=(0,dU.useCallback)(e=>{n.current=!0,r(!!e)},[]);return mL(()=>{n.current||r(!1)},[]),[o,t]}function m5(e){let t=/^(data-.*)$/,r={};for(let n in e)t.test(n)||(r[n]=e[n]);return r}let m8=(0,dU.createContext)(null),m9=null;function m7(e,t="assertive",r=7e3){m9?m9.announce(e,t,r):(m9=new ye,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?m9.announce(e,t,r):setTimeout(()=>{(null==m9?void 0:m9.isAttached())&&(null==m9||m9.announce(e,t,r))},100))}class ye{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){var n,o;if(!this.node)return;let i=document.createElement("div");"object"==typeof e?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,"assertive"===t?null==(n=this.assertiveLog)||n.appendChild(i):null==(o=this.politeLog)||o.appendChild(i),""!==e&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let yt=new Set(["id"]),yr=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yn=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yo=new Set(["dir","lang","hidden","inert","translate"]),yi=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),ya=/^(data-.*)$/;function ys(e,t={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:a}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(yt.has(t)||r&&yr.has(t)||n&&yn.has(t)||o&&yo.has(t)||i&&(yi.has(t)||t.endsWith("Capture")&&yi.has(t.slice(0,-7)))||a?.has(t)||ya.test(t))&&(s[t]=e[t]);return s}function yu(e){if(function(){if(null==yl){yl=!1;try{document.createElement("div").focus({get preventScroll(){return yl=!0,!0}})}catch{}}return yl}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}(e);e.focus(),function(e){for(let{element:t,scrollTop:r,scrollLeft:n}of e)t.scrollTop=r,t.scrollLeft=n}(t)}}let yl=null,yc=e=>e?.ownerDocument??document,yd=e=>e&&"window"in e&&e.window===e?e:yc(e).defaultView||window;function yf(e,t){return!!t&&!!e&&e.contains(t)}function yp(e){return e.target}function yh(e){if(!e)return!1;let t=e.getRootNode(),r=yd(e);if(!(t instanceof r.Document||t instanceof r.ShadowRoot))return!1;let n=t.activeElement;return null!=n&&e.contains(n)}let ym="u">typeof Element&&"checkVisibility"in Element.prototype;function yy(e,t){return ym?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=yd(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:r,visibility:n}=e.style,o="none"!==r&&"hidden"!==n&&"collapse"!==n;if(o){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:r,visibility:n}=t(e);o="none"!==r&&"hidden"!==n&&"collapse"!==n}return o}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||yy(e.parentElement,e))}let yg=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],yb=yg.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";yg.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let yv=yg.join(':not([hidden]):not([tabindex="-1"]),');function yw(e,t){return e.matches(yb)&&!yx(e)&&(t?.skipVisibilityCheck||yy(e))}function y_(e){return e.matches(yv)&&yy(e)&&!yx(e)}function yx(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function yE(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function yS(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function yO(e){let t=(0,dU.useRef)({isFocused:!1,observer:null});return mL(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,dU.useCallback)(r=>{let n=yp(r);(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&(t.current.isFocused=!0,n.addEventListener("focusout",r=>{if(t.current.isFocused=!1,n.disabled){let t=yE(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();n.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let yD=!1;function yP(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function yk(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function yC(e){let t=null;return()=>(null==t&&(t=e()),t)}let yT=yC(function(){return yk(/^Mac/i)}),yj=yC(function(){return yk(/^iPhone/i)}),yR=yC(function(){return yk(/^iPad/i)||yT()&&navigator.maxTouchPoints>1}),yN=yC(function(){return yj()||yR()});yC(function(){return yT()||yN()});let yA=yC(function(){return yP(/AppleWebKit/i)&&!yM()}),yM=yC(function(){return yP(/Chrome/i)}),yI=yC(function(){return yP(/Android/i)}),y$=yC(function(){return yP(/Firefox/i)});function yL(e){return""===e.pointerType&&!!e.isTrusted||(yI()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function yF(e,t,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}=t;y$()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(yT()?n=!0:o=!0);let s=yA()&&yT()&&!yR()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});yF.isOpening=r,yu(e),e.dispatchEvent(s),yF.isOpening=!1}yF.isOpening=!1;let yB=null,yV=new Set,yU=new Map,yW=!1,yH=!1,yK={Tab:!0,Escape:!0};function yz(e,t){for(let r of yV)r(e,t)}function yG(e){yW=!0,yF.isOpening||e.metaKey||!yT()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yB="keyboard",yz("keyboard",e))}function yq(e){yB="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(yW=!0,yz("pointer",e))}function yY(e){!yF.isOpening&&yL(e)&&(yW=!0,yB="virtual")}function yZ(e){let t=yd(yp(e)),r=yc(yp(e));yp(e)!==t&&yp(e)!==r&&!yD&&e.isTrusted&&(yW||yH||(yB="virtual",yz("virtual",e)),yW=!1,yH=!1)}function yJ(){yD||(yW=!1,yH=!0)}function yX(e){if("u"<typeof window||"u"<typeof document)return;let t=yd(e),r=yc(e);if(yU.get(t))return;let n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){yW=!0,n.apply(this,arguments)},r.addEventListener("keydown",yG,!0),r.addEventListener("keyup",yG,!0),r.addEventListener("click",yY,!0),t.addEventListener("focus",yZ,!0),t.addEventListener("blur",yJ,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",yq,!0),r.addEventListener("pointermove",yq,!0),r.addEventListener("pointerup",yq,!0)),t.addEventListener("beforeunload",()=>{yQ(e)},{once:!0}),yU.set(t,{focus:n})}let yQ=(e,t)=>{let r=yd(e),n=yc(e);t&&n.removeEventListener("DOMContentLoaded",t),yU.has(r)&&(r.HTMLElement.prototype.focus=yU.get(r).focus,n.removeEventListener("keydown",yG,!0),n.removeEventListener("keyup",yG,!0),n.removeEventListener("click",yY,!0),r.removeEventListener("focus",yZ,!0),r.removeEventListener("blur",yJ,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",yq,!0),n.removeEventListener("pointermove",yq,!0),n.removeEventListener("pointerup",yq,!0)),yU.delete(r))};function y0(){return"pointer"!==yB}"u">typeof document&&("loading"!==(f=yc(void 0)).readyState?yX(void 0):f.addEventListener("DOMContentLoaded",()=>{yX(void 0)}));let y1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),y2=new Map,y3=new Set;function y4(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=r=>{let n=yp(r);if(!e(r)||!n)return;let o=y2.get(n);if(o&&(o.delete(r.propertyName),0===o.size&&(n.removeEventListener("transitioncancel",t),y2.delete(n)),0===y2.size)){for(let e of y3)e();y3.clear()}};document.body.addEventListener("transitionrun",r=>{let n=yp(r);if(!e(r)||!n)return;let o=y2.get(n);o||(o=new Set,y2.set(n,o),n.addEventListener("transitioncancel",t,{once:!0})),o.add(r.propertyName)}),document.body.addEventListener("transitionend",t)}function y6(e){requestAnimationFrame(()=>{for(let[e]of y2)"isConnected"in e&&!e.isConnected&&y2.delete(e);0===y2.size?e():y3.add(e)})}function y5(e){if(!e.isConnected)return;let t=yc(e);if("virtual"===yB){let r=((e=document)=>e.activeElement)(t);y6(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&yu(e)})}else yu(e)}function y8(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=(0,dU.useCallback)(e=>{if(yp(e)===e.currentTarget)return n&&n(e),o&&o(!1),!0},[n,o]),a=yO(i),s=(0,dU.useCallback)(e=>{let t=yp(e),n=yc(t),i=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();t===e.currentTarget&&t===i&&(r&&r(e),o&&o(!0),a(e))},[o,r,a]);return{focusProps:{onFocus:!t&&(r||o||n)?s:void 0,onBlur:!t&&(n||o)?i:void 0}}}function y9(e){if(!e)return;let t=!0;return r=>{e({...r,preventDefault(){r.preventDefault()},isDefaultPrevented:()=>r.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&r.stopPropagation()}}function y7(e,t){mL(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?y4():document.addEventListener("DOMContentLoaded",y4));let ge=dW().createContext(null);function gt(e,t){let{focusProps:r}=y8(e),{keyboardProps:n}={keyboardProps:e.isDisabled?{}:{onKeyDown:y9(e.onKeyDown),onKeyUp:y9(e.onKeyUp)}},o=mQ(r,n),i=function(e){let t=(0,dU.useContext)(ge)||{};y7(t,e);let{ref:r,...n}=t;return n}(t),a=e.isDisabled?{}:i,s=(0,dU.useRef)(e.autoFocus);(0,dU.useEffect)(()=>{s.current&&t.current&&y5(t.current),s.current=!1},[t]);let u=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(u=void 0),{focusableProps:mQ({...o,tabIndex:u},a)}}dW().forwardRef(function(e,t){let{children:r,...n}=e,o=mA(t),i={...n,ref:o};return dW().createElement(ge.Provider,{value:i},r)});let gr="default",gn="",go=new WeakMap;function gi(e){if(yN())"disabled"===gr&&(gr="restoring",setTimeout(()=>{y6(()=>{if("restoring"===gr){let t=yc(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=gn||""),gn="",gr="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&go.has(e)){let t=go.get(e),r="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[r]&&(e.style[r]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),go.delete(e)}}function ga(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let gs=new WeakMap;function gu(e){let t=e??("u">typeof document?document:void 0);if(!t)return ga(t);if(gs.has(t))return gs.get(t);let r=t.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof yd(r).HTMLMetaElement&&(r.nonce||r.content)||ga(t)||void 0;return void 0!==n&&gs.set(t,n),n}let gl=dW().createContext({register:()=>{}});gl.displayName="PressResponderContext";let gc=dW().useInsertionEffect??mL;function gd(e){let t=(0,dU.useRef)(null);return gc(()=>{t.current=e},[e]),(0,dU.useCallback)((...e)=>{let r=t.current;return r?.(...e)},[])}function gf(){let e=(0,dU.useRef)(new Map),t=(0,dU.useCallback)((t,r,n,o)=>{let i=o?.once?(...t)=>{e.current.delete(n),n(...t)}:n;e.current.set(n,{type:r,eventTarget:t,fn:i,options:o}),t.addEventListener(r,i,o)},[]),r=(0,dU.useCallback)((t,r,n,o)=>{let i=e.current.get(n)?.fn||n;t.removeEventListener(r,i,o),e.current.delete(n)},[]),n=(0,dU.useCallback)(()=>{e.current.forEach((e,t)=>{r(e.eventTarget,e.type,t,e.options)})},[r]);return(0,dU.useEffect)(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}var gp=r(539),gh=r.n(gp);class gm{#e;constructor(e,t,r,n){this.#e=!0;let o=n?.target??r.currentTarget;const i=o?.getBoundingClientRect();let a,s=0,u,l=null;null!=r.clientX&&null!=r.clientY&&(u=r.clientX,l=r.clientY),i&&(null!=u&&null!=l?(a=u-i.left,s=l-i.top):(a=i.width/2,s=i.height/2)),this.type=e,this.pointerType=t,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=a,this.y=s,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let gy=Symbol("linkClicked"),gg="react-aria-pressable-style",gb="data-react-aria-pressable";function gv(e){let{onPress:t,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:a,isDisabled:s,isPressed:u,preventFocusOnPress:l,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...p}=function(e){let t=(0,dU.useContext)(gl);if(t){let{register:r,ref:n,...o}=t;e=mQ(o,e),r()}return y7(t,e.ref),e}(e),[h,m]=(0,dU.useState)(!1),y=(0,dU.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:g,removeAllGlobalListeners:b}=gf(),v=(0,dU.useCallback)((e,t)=>{let o=y.current;if(s||o.didFirePressStart)return!1;let i=!0;if(o.isTriggeringEvent=!0,n){let r=new gm("pressstart",t,e);n(r),i=r.shouldStopPropagation}return r&&r(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),i},[s,n,r]),w=(0,dU.useCallback)((e,n,i=!0)=>{let a=y.current;if(!a.didFirePressStart)return!1;a.didFirePressStart=!1,a.isTriggeringEvent=!0;let u=!0;if(o){let t=new gm("pressend",n,e);o(t),u=t.shouldStopPropagation}if(r&&r(!1),m(!1),t&&i&&!s){let r=new gm("press",n,e);t(r),u&&=r.shouldStopPropagation}return a.isTriggeringEvent=!1,u},[s,o,r,t]),x=gd(w),E=gd((0,dU.useCallback)((e,t)=>{let r=y.current;if(s)return!1;if(i){r.isTriggeringEvent=!0;let n=new gm("pressup",t,e);return i(n),r.isTriggeringEvent=!1,n.shouldStopPropagation}return!0},[s,i])),S=(0,dU.useCallback)(e=>{let t=y.current;if(t.isPressed&&t.target){for(let r of(t.didFirePressStart&&null!=t.pointerType&&w(gx(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,b(),d||gi(t.target),t.disposables))r();t.disposables=[]}},[d,b,w]),O=gd(S),D=(0,dU.useCallback)(e=>{c&&S(e)},[c,S]),P=(0,dU.useCallback)(e=>{s||a?.(e)},[s,a]),k=(0,dU.useCallback)((e,t)=>{if(!s&&a){let r=new MouseEvent("click",e);yS(r,t),a(yE(r))}},[s,a]),C=(0,dU.useMemo)(()=>{let e=y.current,t={onKeyDown(t){if(g_(t.nativeEvent,t.currentTarget)&&yf(t.currentTarget,yp(t))){gE(yp(t),t.key)&&t.preventDefault();let n=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",n=v(t,"keyboard"));let o=t.currentTarget;g(yc(t.currentTarget),"keyup",m$(t=>{g_(t,o)&&!t.repeat&&yf(o,yp(t))&&e.target&&E(gx(e.target,t),"keyboard")},r),!0),n&&t.stopPropagation(),t.metaKey&&yT()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||yf(t.currentTarget,yp(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!yF.isOpening){let r=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||yL(t.nativeEvent))){let e=v(t,"virtual"),n=E(t,"virtual"),o=x(t,"virtual");P(t),r=e&&n&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let n=e.pointerType||t.nativeEvent.pointerType||"virtual",o=E(gx(t.currentTarget,t),n),i=x(gx(t.currentTarget,t),n,!0);r=o&&i,e.isOverTarget=!1,P(t),O(t)}e.ignoreEmulatedMouseEvents=!1,r&&t.stopPropagation()}}},r=t=>{if(e.isPressed&&e.target&&g_(t,e.target)){gE(yp(t),t.key)&&t.preventDefault();let r=yp(t),n=yf(e.target,r);x(gx(e.target,t),"keyboard",n),n&&k(t,e.target),b(),"Enter"!==t.key&&gw(e.target)&&yf(e.target,r)&&!t[gy]&&(t[gy]=!0,yF(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let r of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",r))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var o;if(0!==t.button||!yf(t.currentTarget,yp(t)))return;if(o=t.nativeEvent,!yI()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(yN()){if("default"===gr){let t=yc(e);gn=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}gr="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";go.set(e,e.style[t]),e.style[t]="none"}}(e.target),i=v(t,e.pointerType);let o=yp(t);"releasePointerCapture"in o&&("hasPointerCapture"in o?o.hasPointerCapture(t.pointerId)&&o.releasePointerCapture(t.pointerId):o.releasePointerCapture(t.pointerId)),g(yc(t.currentTarget),"pointerup",r,!1),g(yc(t.currentTarget),"pointercancel",n,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(yf(t.currentTarget,yp(t))&&0===t.button){if(l){let r=function(e){for(;e&&!yw(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=yd(e),r=t.document.activeElement;if(!r||r===e)return;yD=!0;let n=!1,o=e=>{(yp(e)===r||n)&&e.stopImmediatePropagation()},i=t=>{(yp(t)===r||n)&&(t.stopImmediatePropagation(),e||n||(n=!0,yu(r),u()))},a=t=>{(yp(t)===e||n)&&t.stopImmediatePropagation()},s=t=>{(yp(t)===e||n)&&(t.stopImmediatePropagation(),n||(n=!0,yu(r),u()))};t.addEventListener("blur",o,!0),t.addEventListener("focusout",i,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let u=()=>{cancelAnimationFrame(l),t.removeEventListener("blur",o,!0),t.removeEventListener("focusout",i,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),yD=!1,n=!1},l=requestAnimationFrame(u);return u}(t.target);r&&e.disposables.push(r)}t.stopPropagation()}},t.onPointerUp=t=>{yf(t.currentTarget,yp(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||E(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(gx(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(gx(e.target,t),e.pointerType,!1),D(t))};let r=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(yf(e.target,yp(t))&&null!=e.pointerType){let r=!1,n=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(r?O(t):(yu(e.target),e.target.click()))},80);g(t.currentTarget,"click",()=>r=!0,!0),e.disposables.push(()=>clearTimeout(n))}else O(t);e.isOverTarget=!1}},n=e=>{O(e)};t.onDragStart=e=>{yf(e.currentTarget,yp(e))&&O(e)}}return t},[g,s,l,b,d,D,v,P,k]);return(0,dU.useEffect)(()=>{if(!f)return;let e=yc(f.current);if(!e||!e.head||e.getElementById(gg))return;let t=e.createElement("style");t.id=gg;let r=gu(e);r&&(t.nonce=r),t.textContent=`
33
33
  @layer {
34
- [${gg}] {
34
+ [${gb}] {
35
35
  touch-action: pan-x pan-y pinch-zoom;
36
36
  }
37
37
  }
38
- `.trim(),e.head.prepend(t)},[f]),(0,dV.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||go(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:u||h,pressProps:mX(p,C,{[gg]:!0})}}function gv(e){return"A"===e.tagName&&e.hasAttribute("href")}function gw(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof yc(t).HTMLInputElement&&!gS(t,r)||t instanceof yc(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&gv(t))&&"Enter"!==r)}function g_(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function gx(e,t){return e instanceof HTMLInputElement?!gS(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!gv(e))}let gE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gS(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:gE.has(e.type)}function gO(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,dV.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=gd(),u=(0,dV.useCallback)(e=>{yd(e.currentTarget,yf(e))&&i.current.isFocusWithin&&!yd(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),l=yS(u),c=(0,dV.useCallback)(e=>{if(!yd(e.currentTarget,yf(e)))return;let t=yf(e),r=yl(t),s=((e=document)=>e.activeElement)(r);if(!i.current.isFocusWithin&&s===t){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,l(e);let t=e.currentTarget;a(r,"focus",e=>{let n=yf(e);if(i.current.isFocusWithin&&!yd(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});yE(e,t),u(yx(e))}},{capture:!0})}},[n,o,l,a,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:u}}}function gD(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,dV.useRef)({isFocused:!1,isFocusVisible:r||yQ()}),[a,s]=(0,dV.useState)(!1),[u,l]=(0,dV.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,dV.useCallback)(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,dV.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=yQ(),s(e),c()},[c]);t={enabled:a,isTextInput:n},yJ(),(0,dV.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,r)=>{var n;let o,a,s,u,l,d,f,p;n=!!t?.isTextInput,a=yl(o=r?yf(r):void 0),u=void 0!==(s=yc(o))?s.HTMLInputElement:HTMLInputElement,l=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,f=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(a),(n=n||p instanceof u&&!y0.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&r instanceof f&&!yH[r.key]||(e=>{i.current.isFocusVisible=e,c()})(yQ())};return yB.add(e),()=>{yB.delete(e)}},[n,a]);let{focusProps:f}=y5({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=gO({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:u,focusProps:o?p:f}}let gP=!1,gk=0;function gC(e){"touch"===e.pointerType&&(gP=!0,setTimeout(()=>{gP=!1},500))}function gT(){let e=yl(null);if(void 0!==e)return 0===gk&&"u">typeof PointerEvent&&e.addEventListener("pointerup",gC),gk++,()=>{!(--gk>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",gC)}}function gj(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,dV.useState)(!1),s=(0,dV.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,dV.useEffect)(gT,[]);let{addGlobalListener:u,removeAllGlobalListeners:l}=gd(),{hoverProps:c,triggerHoverEnd:d}=(0,dV.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,l(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{gP&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!yd(n.currentTarget,yf(n)))return;s.isHovered=!0;let l=n.currentTarget;s.target=l,u(yl(yf(n)),"pointerover",t=>{s.isHovered&&s.target&&!yd(s.target,yf(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:l,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&yd(t.currentTarget,yf(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,u,l]);return(0,dV.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let gR=(0,dV.createContext)(!1);function gN(e){let t=(t,r)=>(0,dV.useContext)(gR)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,dV.forwardRef)(t)}let gA=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gM=(0,dV.createContext)({}),gI=gN(function(e,t){var r;[e,t]=m3(e,t,gM);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:u,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=gb({onPressStart:a,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:u,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=ge(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=mX(v,g,ya(e,{labelable:!0}));return{isPressed:b,buttonProps:mX(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:u,isFocusVisible:l}=gD(e),{hoverProps:c,isHovered:d}=gj({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:u,isFocusVisible:l,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=m1({...e,values:f,defaultClassName:"react-aria-Button"}),h=mY(i.id),m=mY(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,dV.useRef)(o);return(0,dV.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&u&&o?m9(e,"assertive"):g.current&&u&&!o&&m9(e,"assertive"),g.current=o},[o,u,y,h]),dU().createElement("button",{...ya(e,{propNames:gA}),...mX(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":u||void 0,"data-pending":o||void 0,"data-focus-visible":l||void 0},dU().createElement(m5.Provider,{value:{id:m}},p.children))});(0,dV.createContext)(null),(0,dV.createContext)(null),(0,dV.createContext)(null),(0,dV.createContext)(null),(0,dV.createContext)(null);let g$=(0,dV.createContext)({}),gL=(0,dV.createContext)({}),gF=(0,dV.forwardRef)(function(e,t){[e,t]=m3(e,t,gL);let{elementType:r="span",...n}=e;return dU().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gB=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gV=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gU(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gB.has(t.script)}let t=e.split("-")[0];return gV.has(t)}let gW=Symbol.for("react-aria.i18n.locale");function gH(){let e="u">typeof window&&window[gW]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gU(e)?"rtl":"ltr"}}let gK=gH(),gz=new Set;function gG(){for(let e of(gK=gH(),gz))e(gK)}function gq(){let e=mz(),[t,r]=(0,dV.useState)(gK);return((0,dV.useEffect)(()=>(0===gz.size&&window.addEventListener("languagechange",gG),gz.add(r),()=>{gz.delete(r),0===gz.size&&window.removeEventListener("languagechange",gG)}),[]),e)?{locale:"u">typeof window&&window[gW]||"en-US",direction:"ltr"}:t}let gY=dU().createContext(null);function gZ(e){let{locale:t,children:r}=e,n=dU().useMemo(()=>({locale:t,direction:gU(t)?"rtl":"ltr"}),[t]);return dU().createElement(gY.Provider,{value:n},r)}function gJ(e){let{children:t}=e,r=gq();return dU().createElement(gY.Provider,{value:r},t)}function gX(e){let{locale:t,children:r}=e;return t?dU().createElement(gZ,{locale:t,children:r}):dU().createElement(gJ,{children:r})}function gQ(){let e=gq();return(0,dV.useContext)(gY)||e}let g0=null;function g1(e,t="assertive",r=7e3){g0?g0.announce(e,t,r):(g0=new g2,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?g0.announce(e,t,r):setTimeout(()=>{g0?.isAttached()&&g0?.announce(e,t,r)},100))}class g2{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){if(!this.node)return;let n=document.createElement("div");"object"==typeof e?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(n):this.politeLog?.appendChild(n),""!==e&&setTimeout(()=>{n.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var g3={};function g4(e,t){let r=(0,dV.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}g3={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let g6=new Map;class g5{constructor(e,t={}){this.formatter=g9(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==be&&(be="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),be&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=g9(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let g8={true:{ja:"h11"},false:{}};function g9(e,t={}){if("boolean"==typeof t.hour12&&(null==g7&&(g7="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),g7)){let r=g8[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=r??n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(g6.has(r))return g6.get(r);let n=new Intl.DateTimeFormat(e,t);return g6.set(r,n),n}let g7=null,be=null;function bt(e){e=g4(e??{},br);let{locale:t}=gQ();return(0,dV.useMemo)(()=>new g5(t,e),[t,e])}function br(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}let bn=Symbol.for("react-aria.i18n.locale"),bo=Symbol.for("react-aria.i18n.strings");class bi{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[bn];if(void 0===p){let e=window[bo];if(!e)return null;for(let r in p={},e)p[r]=new bi({[t]:e[r]},t)}let r=p?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}let ba=new Map,bs=new Map;class bu{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=ba.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),ba.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=bs.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),bs.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}}let bl=new WeakMap;function bc(e,t){let r;return t&&bi.getGlobalDictionaryForPackage(t)||((r=bl.get(e))||(r=new bi(e),bl.set(e,r)),r)}function bd(e,t){let{locale:r}=gQ(),n=bc(e,t);return(0,dV.useMemo)(()=>new bu(r,n),[r,n])}function bf(e,t){return e-t*Math.floor(e/t)}function bp(e,t,r,n){let o=(t=bm(e,t))-1,i=-2;return r<=2?i=0:bh(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function bh(e){return e%4==0&&(e%100!=0||e%400==0)}function bm(e,t){return"BC"===e?1-t:t}function by(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let bg={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class bb{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=bf(t,146097),o=Math.floor(n/36524),i=bf(n,36524),a=Math.floor(i/1461),s=Math.floor(bf(i,1461)/365),[u,l]=by(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-bp(u,l,1,1),d=2;e<bp(u,l,3,1)?d=0:bh(l)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-bp(u,l,f,1)+1;return new bF(u,l,f,p)}toJulianDay(e){return bp(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return bg[bh(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return bh(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function bv(e,t){let r=e.copy(),n="hour"in r?bC(r,t):0;bw(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,b_(r),bx(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,b_(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,b_(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){let e=r.calendar.isInverseEra?.(r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function bw(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function b_(e){for(;e.month<1;)bw(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,bw(e,1)}function bx(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function bE(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),bx(e)}function bS(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function bO(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),bE(r),r}function bD(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),bP(r),r}function bP(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bk(e,t){let r=e%t;return r<0&&(r+=t),r}function bC(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bk(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bk(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bk(e.minute,60),r=Math.floor(e.hour/24),e.hour=bk(e.hour,24),r}function bT(e,t){let r=e.copy();return bC(r,t),r}function bj(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=bN(i,r,0,t.length-1,n?.round),o.era=t[i],bE(o);break}case"year":o.calendar.isInverseEra?.(o)&&(r=-r),o.year=bN(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bN(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=bN(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),bE(o),o}function bR(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=bN(t,r,i,a,n?.round);break}case"minute":o.minute=bN(e.minute,r,0,59,n?.round);break;case"second":o.second=bN(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=bN(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return o}function bN(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function bA(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?bq(bv(bX(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):bW(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),bQ(bZ(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function bM(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bI(e){let t,r=bQ(e,new bb);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function b$(e){return`${bI(e)}T${bM(e)}`}function bL(e){let t,r="object"==typeof e[0]?e.shift():new bb;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class bF{#t;constructor(...e){let[t,r,n,o,i]=bL(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,bE(this)}copy(){return this.era?new bF(this.calendar,this.era,this.year,this.month,this.day):new bF(this.calendar,this.year,this.month,this.day)}add(e){return bv(this,e)}subtract(e){return bv(this,bS(e))}set(e){return bO(this,e)}cycle(e,t,r){return bj(this,e,t,r)}toDate(e){return bY(this,e)}toString(){return bI(this)}compare(e){return b9(this,e)}}class bB{#t;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,bP(this)}copy(){return new bB(this.hour,this.minute,this.second,this.millisecond)}add(e){return bT(this,e)}subtract(e){return bT(this,bS(e))}set(e){return bD(this,e)}cycle(e,t,r){return bR(this,e,t,r)}toString(){return bM(this)}compare(e){var t,r;return t=this,r=e,b7(t)-b7(r)}}class bV{#t;constructor(...e){let[t,r,n,o,i]=bL(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bE(this)}copy(){return this.era?new bV(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bV(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return bv(this,e)}subtract(e){return bv(this,bS(e))}set(e){return bO(bD(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return bj(this,e,t,r);default:return bR(this,e,t,r)}}toDate(e,t){return bY(this,e,t)}toString(){return b$(this)}compare(e){var t,r;let n=b9(this,e);return 0===n?(t=this,r=bX(e),b7(t)-b7(r)):n}}class bU{#t;constructor(...e){let[t,r,n,o,i]=bL(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bE(this)}copy(){return this.era?new bU(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bU(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bA(this,e)}subtract(e){return bA(this,bS(e))}set(e,t){let r,n;return 0===(n=bD(bO(r=bX(this),e),e)).compare(r)?this:bQ(bZ(bq(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=bX(e),a=bQ(bD(i,{hour:t}),new bb),s=[bq(a,e.timeZone,"earlier"),bq(a,e.timeZone,"later")].filter(t=>bZ(t,e.timeZone).day===a.day)[0],u=bQ(bD(i,{hour:o}),new bb),l=[bq(u,e.timeZone,"earlier"),bq(u,e.timeZone,"later")].filter(t=>bZ(t,e.timeZone).day===u.day).pop(),c=bW(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return bQ(bZ(c=36e5*bN(d,r,Math.floor(s/36e5),Math.floor(l/36e5),n?.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bR(e,t,r,n);case"era":case"year":case"month":case"day":return bQ(bZ(bq(bj(bX(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(bW(e)-e.offset)}toString(){var e;let t,r,n,o,i;return`${b$(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof bU){var r,n;return e.timeZone===t?e:(r=e,n=t,bQ(bZ(bW(r)-r.offset,n),r.calendar))}return bZ(bq(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function bW(e){return bH(bm((e=bQ(e,new bb)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bH(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function bK(e,t){if("UTC"===t)return 0;if(e>0&&t===vt())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=bG(e,t);return bH(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let bz=new Map;function bG(e,t){let r=bz.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),bz.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function bq(e,t,r="compatible"){var n,o,i;let a=bX(e);if("UTC"===t)return bW(a);if(t===vt()&&"compatible"===r){a=bQ(a,new bb);let e=new Date,t=bm(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=bW(a),u=bK(s-864e5,t),l=bK(s+864e5,t),c=(n=a,((o=s-u)==(i=s-l)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=bG(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-u,s-l);case"compatible":case"later":return Math.max(s-u,s-l);case"reject":throw RangeError("No such absolute time found")}}function bY(e,t,r="compatible"){return new Date(bq(e,t,r))}function bZ(e,t){let r=bK(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new bU(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function bJ(e){return new bF(e.calendar,e.era,e.year,e.month,e.day)}function bX(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new bV(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function bQ(e,t){if(b3(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,bE(n),n}let b0={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function b1(e,t){return t=bQ(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function b2(e,t){return b3(e.calendar,t.calendar)&&b1(e,t)}function b3(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let b4={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function b6(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?b4[r]:function(e){let t=va.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return va.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=vi.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&vi.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&b0[r]||0};va.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function b5(e){return bZ(Date.now(),e)}function b8(e){return bJ(b5(e))}function b9(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function b7(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let ve=null;function vt(){return null==ve&&(ve=new Intl.DateTimeFormat().resolvedOptions().timeZone),ve}function vr(e){return e.subtract({days:e.day-1})}function vn(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function vo(e,t,r){let n=b6(e,t,r);return e.subtract({days:n})}let vi=new Map,va=new Map;function vs(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function vu(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function vl(e){return e&&e.__esModule?e.default:e}let vc=new WeakMap;function vd(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function vf(e,t,r,n){let o=bd(vl(g3),"@react-aria/calendar"),i=vd(e)||vd(t),a=bt({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=bt({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,dV.useMemo)(()=>{if(b1(e,vr(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),b1(t,vn(e)))return a.format(i.toDate(r));if(b1(t,vn(t)))return n?vp(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?vp(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function vp(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",u="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(u+=i[e].value);return t.format("dateRange",{startDate:s,endDate:u})}function vh(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mY(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function vm(e,t){let r=(0,dV.useRef)(!0),n=(0,dV.useRef)(null),o=gc(e);(0,dV.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,dV.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||t.some((t,r)=>!Object.is(t,e[r])))&&o(),n.current=t},t)}function vy(e,t){var r;let n,o,i,a,s,u=bd((r=g3)&&r.__esModule?r.default:r,"@react-aria/calendar"),l=ya(e),c=vf(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=vf(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);vm(()=>{t.isFocused||g1(d)},[d]);let f=(i=bd(vl(g3),"@react-aria/calendar"),"highlightedRange"in t?{start:n,end:o}=t.highlightedRange||{}:n=o=t.value??void 0,a=bt({weekday:"long",month:"long",year:"numeric",day:"numeric",era:vd(n)||vd(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,dV.useMemo)(()=>{if(!s&&n&&o)if(b1(n,o)){let e=a.format(n.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=vp(a,i,n,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[n,o,s,t.timeZone,i,a]));vm(()=>{f&&g1(f,"polite",4e3)},[f]);let p=mZ([!!e.errorMessage,e.isInvalid,e.validationState]);vc.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:f});let[h,m]=(0,dV.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,dV.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:mX(l,vh({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:p},title:c}}let vg={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function vb(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,dV.useState)(!1),{focusWithinProps:i}=gO({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,dV.useMemo)(()=>n?t:t?{...vg,...t}:vg,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return dU().createElement(r,mX(i,a),t)}function vv(e,t,r,n){let o=gc(r),i=null==r;(0,dV.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i])}function vw(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&"hidden"!==r.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function v_(e,t){let r=e;for(vw(r,t)&&(r=r.parentElement);r&&!vw(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function vx(e,t){let r=[],n=document.scrollingElement||document.documentElement;do vw(e,t)&&r.push(e),e=e.parentElement;while(e&&e!==n);return r}function vE(e,t,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),u=e.getBoundingClientRect(),l=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d?0:u.top,p=e===d?e.clientHeight:u.bottom,h=e===d?0:u.left,m=e===d?e.clientWidth:u.right,y=parseInt(l.scrollMarginTop,10)||0,g=parseInt(l.scrollMarginBottom,10)||0,b=parseInt(l.scrollMarginLeft,10)||0,v=parseInt(l.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,E=parseInt(c.scrollPaddingLeft,10)||0,S=parseInt(c.scrollPaddingRight,10)||0,O=parseInt(c.borderTopWidth,10)||0,D=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,C=s.top-y,T=s.bottom+g,j=s.left-b,R=s.right+v,N=e===d?0:P+k,A=e===d?0:O+D,M=e.offsetWidth-e.clientWidth-N,I=e.offsetHeight-e.clientHeight-A,$=f+O+w,L=p-D-x-I,F=h+P+E,B=m-k-S;"rtl"!==c.direction||yR()?B-=M:F+=M;let V=C<$||T>L,U=j<F||R>B;if(V&&"start"===n)i+=C-$;else if(V&&"center"===n)i+=(C+T)/2-($+L)/2;else if(V&&"end"===n)i+=T-L;else if(V&&"nearest"===n){let e=C-$,t=T-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=j-F;else if(U&&"center"===o)a+=(j+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=j-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function vS(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:n}=e.getBoundingClientRect(),o=vx(e,!0);for(let t of o)vE(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(n-a)>1)for(let e of o=r?vx(r,!0):[])vE(e,r,{block:"center",inline:"center"})}else{let{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(n-i)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let vO=0,vD=new Map;function vP(e){let[t,r]=(0,dV.useState)();return m$(()=>{if(!e)return;let t=vD.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${vO++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},vD.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),vD.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class vk extends bb{fromJulianDay(e){let t=super.fromJulianDay(e);return new bF(this,bm(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vC(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(vC(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function vC(e){let[t,r]=by(e.year+-543);return new bF(t,r,e.month,e.day)}function vT(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vj(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-vT(e,r,1,1))/30),o=t+1-vT(e,r,n,1);return[r,n,o]}function vR(e){return Math.floor(e%4/3)}function vN(e,t){return t%13!=0?30:vR(e)+5}class vA{fromJulianDay(e){let[t,r,n]=vj(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new bF(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),vT(1723856,t,e.month,e.day)}getDaysInMonth(e){return vN(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vR(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vM extends vA{fromJulianDay(e){let[t,r,n]=vj(1723856,e);return new bF(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class vI extends vA{fromJulianDay(e){let[t,r,n]=vj(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new bF(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vT(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vN(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let v$=765433;function vL(e){return 7>bf(7*e+1,19)}function vF(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>bf(3*(r+1),7)&&(r+=1),r}function vB(e){let t,r;return vF(e)+(t=vF(e-1),r=vF(e),vF(e+1)-r==356?2:+(r-t==382))}function vV(e){return vB(e+1)-vB(e)}function vU(e,t){if(t>=6&&!vL(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vV(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vL(e):30}class vW{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/v$*19+234)/235)+1,n=vB(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vB(--r)));let i=1,a=0;for(;a<o;)a+=vU(r,i),i++;let s=o-(a-=vU(r,--i));return new bF(this,r,i,s)}toJulianDay(e){let t=vB(e.year);for(let r=1;r<e.month;r++)t+=vU(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vU(e.year,e.month)}getMonthsInYear(e){return vL(e.year)?13:12}getDaysInYear(e){return vV(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vL(t.year)&&!vL(e.year)&&t.month>6?e.month--:!vL(t.year)&&vL(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vH extends bb{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-bp(o.era,o.year,1,1);if(a<80?(i--,a+=(t=bh(o.year-1)?31:30)+155+90+10):(t=bh(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new bF(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=by(e.year+78);return(bh(o)?(t=31,r=bp(n,o,3,21)):(t=30,r=bp(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&bh(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function vK(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vz(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vK(t,n,1,1)))/29.5)+1),i=r-vK(t,n,o,1)+1;return new bF(e,n,o,i)}function vG(e){return(14+11*e)%30<11}class vq{fromJulianDay(e){return vz(this,1948440,e)}toJulianDay(e){return vK(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vG(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vG(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vY extends vq{fromJulianDay(e){return vz(this,1948439,e)}toJulianDay(e){return vK(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vZ(e){return 460322+l[e-1300]}function vJ(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function vX(e,t){let r=vZ(e);for(let n=1;n<t;n++)r+=vJ(e,n);return r}function vQ(e){return l[e+1-1300]-l[e-1300]}class v0 extends vq{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let r=1;r<=12;r++)e+=vJ(t,r)}}}fromJulianDay(e){let t=e-1948440,r=vZ(1300),n=vZ(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vZ(++e)+1;let o=vQ(e);if(n===o){r=12;break}if(n<o){let t=vJ(e,r);for(r=1;n>t;)n-=t,t=vJ(e,++r);break}}return new bF(this,e,r,t-vX(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vX(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vJ(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):vQ(e.year)}}let v1=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],v2=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],v3=[1867,1911,1925,1988,2018],v4=["meiji","taisho","showa","heisei","reiwa"];function v6(e){let t=v1.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?v1.length-1:0===t?0:t-1}function v5(e){let t=v3[v4.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new bF(e.year+t,e.month,e.day)}class v8 extends bb{fromJulianDay(e){let t=super.fromJulianDay(e),r=v6(t);return new bF(this,v4[r],t.year-v3[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(v5(e))}balanceDate(e){let t=v5(e),r=v6(t);v4[r]!==e.era&&(e.era=v4[r],e.year=t.year-v3[r]),this.constrainDate(e)}constrainDate(e){let t=v4.indexOf(e.era),r=v2[t];if(null!=r){let[n,o,i]=r,a=n-v3[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=v1[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return v4}getYearsInEra(e){let t=v4.indexOf(e.era),r=v1[t],n=v1[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(v5(e))}getMinimumMonthInYear(e){let t=v9(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=v9(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function v9(e){if(1===e.year)return v1[v4.indexOf(e.era)]}let v7=[0,31,62,93,124,155,186,216,246,276,306,336];class we{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-v7[o]+1;return new bF(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=v7[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>bf(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function wt(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function wr(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class wn extends bb{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=wr(bm(t.era,t.year));return new bF(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(wo(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=wr(wt(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(wo(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function wo(e){let[t,r]=by(wt(e));return new bF(t,r,e.month,e.day)}function wi(e){switch(e){case"buddhist":return new vk;case"ethiopic":return new vA;case"ethioaa":return new vM;case"coptic":return new vI;case"hebrew":return new vW;case"indian":return new vH;case"islamic-civil":return new vq;case"islamic-tbla":return new vY;case"islamic-umalqura":return new v0;case"japanese":return new v8;case"persian":return new we;case"roc":return new wn;default:return new bb}}function wa(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function ws(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=wu(e,t,r).subtract(i);return wc(e,a,t,r,n,o)}function wu(e,t,r,n,o){let i=e;if(t.years)i=vr(e.subtract({months:e.month-1}));else t.months?i=vr(e):t.weeks&&(i=vo(e,r));return wc(e,i,t,r,n,o)}function wl(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=wu(e,t,r).subtract(i);return wc(e,a,t,r,n,o)}function wc(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=vu(t,wu(bJ(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=vs(t,wl(bJ(i),r,n));e&&(t=e)}return t}function wd(e,t,r){if(t){let r=vu(e,bJ(t));r&&(e=r)}if(r){let t=vs(e,bJ(r));t&&(e=t)}return e}function wf(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let wp="u">typeof document?dU().useInsertionEffect??dU().useLayoutEffect:()=>{};function wh(e,t,r){let[n,o]=(0,dV.useState)(e||t),i=(0,dV.useRef)(n),a=(0,dV.useRef)(void 0!==e),s=void 0!==e;(0,dV.useEffect)(()=>{a.current,a.current=s},[s]);let u=s?e:n;wp(()=>{i.current=u});let[,l]=(0,dV.useReducer)(()=>({}),{});return[u,(0,dV.useCallback)((e,...t)=>{let n="function"==typeof e?e(i.current):e;Object.is(i.current,n)||(i.current=n,o(n),l(),r?.(n,...t))},[r])]}function wm(e){let t=(0,dV.useMemo)(()=>new g5(e.locale),[e.locale]),r=(0,dV.useMemo)(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:u,isDateUnavailable:l,pageBehavior:c="visible",firstDayOfWeek:d}=e,f=(0,dV.useMemo)(()=>o(r.calendar),[o,r.calendar]),[p,h]=wh(e.value,e.defaultValue??null,e.onChange),m=(0,dV.useMemo)(()=>p?bQ(bJ(p),f):null,[p,f]),y=(0,dV.useMemo)(()=>p&&"timeZone"in p?p.timeZone:r.timeZone,[p,r.timeZone]),[g,b]=wh((0,dV.useMemo)(()=>e.focusedValue?wd(bQ(bJ(e.focusedValue),f),a,s):void 0,[e.focusedValue,f,a,s]),(0,dV.useMemo)(()=>wd(e.defaultFocusedValue?bQ(bJ(e.defaultFocusedValue),f):m||bQ(b8(y),f),a,s),[e.defaultFocusedValue,m,y,f,a,s]),e.onFocusChange),[v,w]=(0,dV.useState)(()=>{switch(u){case"start":return wu(g,i,n,a,s);case"end":return wl(g,i,n,a,s);default:return ws(g,i,n,a,s)}}),[x,E]=(0,dV.useState)(e.autoFocus||!1),S=(0,dV.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[O,D]=(0,dV.useState)(f);if(!b3(f,O)){let e=bQ(g,f);w(ws(e,i,n,a,s)),b(e),D(f)}function P(e){b(e=wd(e,a,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=wf(e=wd(e,a,s),v,l))&&(e=bQ(e,p?.calendar||new bb),p&&"hour"in p?h(p.set(e)):h(e))}}wa(g,a,s)?b(wd(g,a,s)):0>g.compare(v)?w(wl(g,i,n,a,s)):g.compare(S)>0&&w(wu(g,i,n,a,s));let C=(0,dV.useMemo)(()=>!!m&&(!!(l&&l(m))||wa(m,a,s)),[m,l,a,s]),T=e.isInvalid||"invalid"===e.validationState||C,j=(0,dV.useMemo)(()=>"visible"===c?i:wy(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:k,visibleRange:{start:v,end:S},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(j);b(wd(g.add(j),a,s)),w(wu(wc(g,e,j,n,a,s),j,n))},focusPreviousPage(){let e=v.subtract(j);b(wd(g.subtract(j),a,s)),w(wu(wc(g,e,j,n,a,s),j,n))},focusSectionStart(){i.days?P(v):i.weeks?P(vo(g,n)):(i.months||i.years)&&P(vr(g))},focusSectionEnd(){i.days?P(S):i.weeks?P(vo(g,n,void 0).add({days:6})):(i.months||i.years)&&P(vn(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(wy(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(wy(i)))},selectFocusedDate(){l&&l(g)||k(g)},selectDate(e){k(e)},isFocused:x,setFocused:E,isInvalid:e=>wa(e,a,s),isSelected(e){return null!=m&&b1(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&b1(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(S)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return b1(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=S.add({days:1});return b1(e,S)||this.isInvalid(e)},getDatesInWeek(e,t=v){let r=t.add({weeks:e}),o=[],i=b6(r=vo(r,n,d),n,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(r);let e=r.add({days:1});if(b1(r,e))break;r=e}for(;o.length<7;)o.push(null);return o}}}function wy(e){let t={...e};for(let r in e)t[r]=1;return t}function wg(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:bJ(e),end:bJ(t)}):null}function wb(e,t){return(e=bQ(e,t?.calendar||new bb),t&&"hour"in t)?t.set(e):e}function wv(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let ww=(0,dV.createContext)(null),w_=(0,dV.createContext)(null),wx=(0,dV.createContext)(null),wE=(0,dV.createContext)(null),wS=(0,dV.forwardRef)(function(e,t){[e,t]=m3(e,t,ww);let{locale:r}=gQ(),n=wm({...e,locale:r,createCalendar:e.createCalendar||wi}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:u}=vy(e,n),l=m1({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return dU().createElement("div",{...l,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},dU().createElement(m0,{values:[[gM,{slots:{previous:i,next:a}}],[g$,{"aria-hidden":!0,level:2,children:u}],[wx,n],[ww,e],[gL,{slots:{errorMessage:s}}]]},dU().createElement(vb,null,dU().createElement("h2",null,o["aria-label"])),l.children,dU().createElement(vb,null,dU().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),wO=(0,dV.forwardRef)(function(e,t){[e,t]=m3(e,t,w_);let{locale:r}=gQ(),n=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:u,...l}=e,[c,d]=wh(t,r||null,n),[f,p]=(0,dV.useState)(null),h="center";if(c&&c.start&&c.end){let e=ws(bJ(c.start),a,i,s,u).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,dV.useRef)(null),[y,g]=(0,dV.useState)(null),b=(0,dV.useMemo)(()=>vu(s,y?.start),[s,y]),v=(0,dV.useMemo)(()=>vs(u,y?.end),[u,y]),w=wm({...l,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:wv(t,w,-1),end:wv(t,w,1)},g(m.current)):(m.current=null,g(null))},[E,S]=(0,dV.useState)(w.visibleRange);b2(w.visibleRange.start,E.start)&&b2(w.visibleRange.end,E.end)||(x(f),S(w.visibleRange));let O=e=>{e?(p(e),x(e)):(p(null),x(null))},D=f?wg(f,w.focusedDate):c&&wg(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=wf(wd(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=wg(f,r);e&&d({start:wb(e.start,c?.start),end:wb(e.end,c?.end)}),O(null)}else O(r)},[k,C]=(0,dV.useState)(!1),{isDateUnavailable:T}=e,j=(0,dV.useMemo)(()=>!!c&&!f&&(!!(T&&(T(c.start)||T(c.end)))||wa(c.start,s,u)||wa(c.end,s,u)),[T,c,f,s,u]),R=e.isInvalid||"invalid"===e.validationState||j;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:O,highlightedRange:D,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(D&&e.compare(D.start)>=0&&0>=e.compare(D.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||wa(e,m.current?.start,m.current?.end),isDragging:k,setDragging:C,clearSelection(){O(null),d(null)}}}({...e,locale:r,createCalendar:e.createCalendar||wi}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:u}=function(e,t,r){let{commitBehavior:n="select",...o}=e,i=vy(o,t),a=(0,dV.useRef)(!1),s=(0,dV.useRef)("u">typeof window?window:null);vv(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let u={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return vv(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;r.current&&yp(r.current)&&(!yd(r.current,o)||!o.closest('button, [role="button"]'))&&u[n]()}),i.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&yd(r.current,e.relatedTarget)||!t.anchorDate||u[n]())},vv(r,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,n,t),l=m1({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return dU().createElement("div",{...l,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},dU().createElement(m0,{values:[[gM,{slots:{previous:i,next:a}}],[g$,{"aria-hidden":!0,level:2,children:u}],[wE,n],[w_,e],[gL,{slots:{errorMessage:s}}]]},dU().createElement(vb,null,dU().createElement("h2",null,o["aria-label"])),l.children,dU().createElement(vb,null,dU().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),wD=(0,dV.createContext)(null),wP=(0,dV.forwardRef)(function(e,t){var r,n;let o=(0,dV.useContext)(wx),i=(0,dV.useContext)(wE),a=m2(ww),s=m2(w_),u=null!=o?o:i,l=u.visibleRange.start;e.offset&&(l=l.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=gQ(),s=vf(n,o,t.timeZone,!0),{ariaLabel:u,ariaLabelledBy:l}=vc.get(t),c=vh({"aria-label":[u,s].filter(Boolean).join(", "),"aria-labelledby":l}),d=bt({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=gQ(),p=(0,dV.useMemo)(()=>{let e=vo(b8(t.timeZone),f,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((b6(vr(n),f,i)+r)/7));return{gridProps:mX(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:p,weeksInMonth:h}}({startDate:l,endDate:vn(l),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},u);return dU().createElement(wD.Provider,{value:{headerProps:f,weekDays:p,startDate:l,weeksInMonth:h}},dU().createElement("table",{...ya(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:dU().createElement(dU().Fragment,null,dU().createElement(wk,null,e=>dU().createElement(wC,null,e)),dU().createElement(wT,null,e.children))))}),wk=(0,dV.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,dV.useContext)(wD);return dU().createElement("thead",{...ya(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},dU().createElement("tr",null,a.map((e,t)=>dU().cloneElement(r(e),{key:t}))))}),wC=(0,dV.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return dU().createElement("th",{...ya(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),wT=(0,dV.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,dV.useContext)(wx),a=(0,dV.useContext)(wE),s=null!=i?i:a,{startDate:u,weeksInMonth:l}=(0,dV.useContext)(wD);return dU().createElement("tbody",{...ya(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(l).keys()].map(e=>dU().createElement("tr",{key:e},s.getDatesInWeek(e,u).map((e,t)=>e?dU().cloneElement(r(e),{key:t}):dU().createElement("td",{key:t})))))}),wj=(0,dV.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,dV.useContext)(wx),s=(0,dV.useContext)(wE),u=null!=a?a:s,{startDate:l}=null!=(n=(0,dV.useContext)(wD))?n:{startDate:u.visibleRange.start},c=(0,dV.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:u}=vc.get(t),l=bd((n=g3)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=bt({weekday:"long",day:"numeric",month:"long",year:"numeric",era:vd(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&b1(t.value,i));m&&(d=!0),i=g4(i,b2);let y=(0,dV.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=b1(i,b8(t.timeZone)),b=(0,dV.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(b1(i,t.value.start)||b1(i,t.value.end))&&(e=u+", "),e+=c.format(y),g?e=l.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=l.format("dateSelected",{date:e})),t.minValue&&b1(i,t.minValue)?e+=", "+l.format("minimumDate"):t.maxValue&&b1(i,t.maxValue)&&(e+=", "+l.format("maximumDate")),e},[c,y,l,d,g,i,t,u]),v="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(v=t.anchorDate?l.format("finishRangeSelectionPrompt"):l.format("startRangeSelectionPrompt"));let w=vP(v),x=(0,dV.useRef)(!1),E=(0,dV.useRef)(!1),S=(0,dV.useRef)(void 0),{pressProps:O,isPressed:D}=gb({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(b1(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}else if(b1(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=b1(i,t.focusedDate)?0:-1),(0,dV.useEffect)(()=>{f&&r.current&&(ys(r.current),"pointer"!==yF&&((e=document)=>e.activeElement)()===r.current&&vS(r.current,{containingElement:v_(r.current)}))},[f,r]);let P=bt({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,dV.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:mX(O,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=yf(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:D,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},u,c),{hoverProps:h,isHovered:m}=gj({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:g}=gD();g&&(g=p.isFocused);let b=(o=l,i=bQ(i=e,o.calendar),o=vr(o),i=vr(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in u&&u.highlightedRange&&(v=b1(e,u.highlightedRange.start),w=b1(e,u.highlightedRange.end));let x=m1({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...p}}),E={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return dU().createElement("td",{...d,ref:r},dU().createElement("div",{...mX(ya(t),f,y,h,E,x),ref:c}))}),wR=(0,dV.createContext)({}),wN=(0,dV.forwardRef)(function(e,t){var r,n;[e,t]=m3(e,t,wR);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:u,...l}=e,{hoverProps:c,isHovered:d}=gj({onHoverStart:a,onHoverChange:s,onHoverEnd:u,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=gD({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=m1({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return dU().createElement("div",{...mX(l,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),wA=(0,dV.createContext)({}),wM=gN(function(e,t){[e,t]=m3(e,t,wA);let{hoverProps:r,isHovered:n}=gj(e),{isFocused:o,isFocusVisible:i,focusProps:a}=gD({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],u=m1({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return dU().createElement("input",{...mX((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...u,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function wI(e,t,r,n){return e.createTreeWalker(t,r,n)}let w$=dU().createContext(null),wL="react-aria-focus-scope-restore",wF=null;function wB(e){var t,r,n,o,i,a,s,u,l,c;let d,f,p,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,dV.useRef)(null),w=(0,dV.useRef)(null),x=(0,dV.useRef)([]),{parentNode:E}=(0,dV.useContext)(w$)||{},S=(0,dV.useMemo)(()=>new w1({scopeRef:x}),[x]);m$(()=>{let e=E||w2.root;if(w2.getTreeNode(e.scopeRef)&&wF&&!wK(wF,e.scopeRef)){let t=w2.getTreeNode(wF);t&&(e=t)}e.addChild(S),w2.addNode(S)},[S,E]),m$(()=>{let e=w2.getTreeNode(x);e&&(e.contain=!!y)},[y]),m$(()=>{let e=v.current?.nextSibling,t=[],r=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(wL,r),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(wL,r)}},[m]),m$(()=>{if(r||n)return;let e=t.current,o=yl(e?e[0]:void 0),i=e=>{let r=yf(e);wW(r,t.current)?wF=t:wH(r)||(wF=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,dV.useRef)(void 0),f=(0,dV.useRef)(void 0),m$(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=yl(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!wU(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!wW(r,n))return;let i=wJ(wV(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(wz(a,!0),a instanceof yc(a).HTMLInputElement&&a.select())},n=e=>{(!wF||wK(wF,o))&&wW(yf(e),o.current)?(wF=o,d.current=yf(e)):wU(o)&&!wH(yf(e),o)?d.current?d.current.focus():wF&&wF.current&&wq(wF.current):wU(o)&&(d.current=yf(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=yF,n=("virtual"===r||null===r)&&yM()&&yA(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&wU(o)&&!wH(i,o)){wF=o;let t=yf(e);t&&t.isConnected?(d.current=t,d.current?.focus()):wF.current&&wq(wF.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),m$(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=g,u=y,p=(0,dV.useRef)("u">typeof document?((e=document)=>e.activeElement)(yl(a.current?a.current[0]:void 0)):null),m$(()=>{let e=a.current,t=yl(e?e[0]:void 0);if(!s||u)return;let r=()=>{(!wF||wK(wF,a))&&wW(((e=document)=>e.activeElement)(t),a.current)&&(wF=a)};return t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,u]),m$(()=>{let e=yl(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!wU(a)||t.isComposing)return;let r=e.activeElement;if(!wH(r,a)||!wY(a))return;let n=w2.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=wJ(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!wH(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(wH(s,a));(t.preventDefault(),t.stopPropagation(),s)?wz(s,!0):wH(o)?wz(o,!0):r.blur()}};return u||e.addEventListener("keydown",t,!0),()=>{u||e.removeEventListener("keydown",t,!0)}},[a,s,u]),m$(()=>{let e=yl(a.current?a.current[0]:void 0);if(!s)return;let t=w2.getTreeNode(a);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=w2.getTreeNode(a);if(!t)return;let r=t.nodeToRestore,n=((e=document)=>e.activeElement)(e);if(s&&r&&(n&&wH(n,a)||n===e.body&&wY(a))){let t=w2.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void wZ(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&w2.getTreeNode(e.scopeRef))return void wZ(wG(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),l=x,c=b,h=dU().useRef(c),(0,dV.useEffect)(()=>{h.current&&(wF=l,!wW(((e=document)=>e.activeElement)(yl(l.current?l.current[0]:void 0)),wF.current)&&l.current&&wq(l.current)),h.current=!1},[l]),(0,dV.useEffect)(()=>{let e=((e=document)=>e.activeElement)(yl(x.current?x.current[0]:void 0)),t=null;if(wW(e,x.current)){for(let r of w2.traverse())r.scopeRef&&wW(e,r.scopeRef.current)&&(t=r);t===w2.getTreeNode(x)&&(wF=t.scopeRef)}},[x]),m$(()=>()=>{let e=w2.getTreeNode(x)?.parent?.scopeRef??null;(x===wF||wK(x,wF))&&(!e||w2.getTreeNode(e))&&(wF=e),w2.removeTreeNode(x)},[x]);let O=(0,dV.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(yl(r[0]??void 0)),u=r[0].previousElementSibling,l=wJ(wV(r),{tabbable:o,accept:a},r);l.currentNode=wW(s,r)?s:u;let c=l.nextNode();return!c&&i&&(l.currentNode=u,c=l.nextNode()),c&&wz(c,!0),c},focusPrevious(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(yl(r[0]??void 0)),u=r[r.length-1].nextElementSibling,l=wJ(wV(r),{tabbable:o,accept:a},r);l.currentNode=wW(s,r)?s:u;let c=l.previousNode();return!c&&i&&(l.currentNode=u,c=l.previousNode()),c&&wz(c,!0),c},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=wJ(wV(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&wz(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=wJ(wV(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&wz(a,!0),a}}},[]),D=(0,dV.useMemo)(()=>({focusManager:O,parentNode:S}),[S,O]);return dU().createElement(w$.Provider,{value:D},dU().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,dU().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function wV(e){return e[0].parentElement}function wU(e){let t=w2.getTreeNode(wF);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wW(e,t){return!!e&&!!t&&t.some(t=>yd(t,e))}function wH(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of w2.traverse(w2.getTreeNode(t)))if(r&&wW(e,r.current))return!0;return!1}function wK(e,t){let r=w2.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function wz(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{y6(e)}catch{}}function wG(e,t=!0){let r=e[0].previousElementSibling,n=wV(e),o=wJ(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=wJ(n=wV(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function wq(e,t=!0){wz(wG(e,t))}function wY(e){let t=w2.getTreeNode(wF);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function wZ(e){e.dispatchEvent(new CustomEvent(wL,{bubbles:!0,cancelable:!0}))&&wz(e)}function wJ(e,t,r){let n=t?.tabbable?yw:yv,o=yl(e?.nodeType===Node.ELEMENT_NODE?e:null),i=wI(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>yd(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(yl(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),r=yc(e);return t instanceof r.RadioNodeList?Array.from(t).filter(e=>e instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:n(e)&&(!r||wW(e,r))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function wX(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,u=o||((e=document)=>e.activeElement)(yl(n)),l=wJ(n,{tabbable:i,accept:s});yd(n,u)&&(l.currentNode=u);let c=l.nextNode();return!c&&a&&(l.currentNode=n,c=l.nextNode()),c&&wz(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,u=o||((e=document)=>e.activeElement)(yl(n)),l=wJ(n,{tabbable:i,accept:s});if(yd(n,u))l.currentNode=u;else{let e=wQ(l);return e&&wz(e,!0),e??null}let c=l.previousNode();if(!c&&a){l.currentNode=n;let e=wQ(l);if(!e)return null;c=e}return c&&wz(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=wJ(n,{tabbable:o,accept:i}).nextNode();return a&&wz(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=wQ(wJ(n,{tabbable:o,accept:i}));return a&&wz(a,!0),a??null}}}function wQ(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class w0{constructor(){this.fastMap=new Map,this.root=new w1({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(t??null);if(!n)return;let o=new w1({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&wW(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new w0;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class w1{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let w2=new w0;var w3={};function w4(e,t,r){let{direction:n}=gQ(),o=(0,dV.useMemo)(()=>wX(t),[t]),i=()=>{if(!t.current)return;let e=window.event?yf(window.event):null,r=wJ(t.current,{tabbable:!0});if(e&&(r.currentNode=e,e=r.previousNode()),!e){let t;do(t=r.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=r.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=gb({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return mX(a,{onKeyDown:i=>{if(yd(i.currentTarget,yf(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=yf(i),r=w6(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=yf(i),r=w6(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function w6(e,t,r){let n=wJ(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function w5(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=mY(t);let a=mY(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:vh({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mZ([!!t,!!r,n,o]),u=mZ([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=mX(a,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:u}}}function w8(e,t,r){let n=gc(e=>{r&&!e.defaultPrevented&&r(t)});(0,dV.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",n),()=>{t?.removeEventListener("reset",n)}},[e])}function w9(e,t,r){let{validationBehavior:n,focus:o}=e;m$(()=>{if("native"===n&&r?.current&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,dV.useRef)(!1),a=gc(()=>{i.current||t.resetValidation()}),s=gc(e=>{t.displayValidation.isInvalid||t.commitValidation();let n=r?.current?.form;!e.defaultPrevented&&r&&n&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}(n)===r.current&&(o?o():r.current?.focus(),yF="keyboard",yK("keyboard",null));e.preventDefault()}),u=gc(()=>{t.commitValidation()});(0,dV.useEffect)(()=>{let e=r?.current;if(!e)return;let t=e.form,n=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&yf(window.event)instanceof MessagePort,n?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",u),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",u),t?.removeEventListener("reset",a),t&&(t.reset=n)}},[r,n])}w3={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let w7=new WeakMap,_e="__reactAriaDateFieldRole",_t="__reactAriaDateFieldFocusManager";function _r(e,t,r){var n;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:u,fieldProps:l,descriptionProps:c,errorMessageProps:d}=w5({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=(0,dV.useRef)(null),{focusWithinProps:p}=gO({...e,onFocusWithin(r){f.current=t.value,e.onFocus?.(r)},onBlurWithin:r=>{t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),e.onBlur?.(r)},onFocusWithinChange:e.onFocusChange}),h=bd((n=w3)&&n.__esModule?n.default:n,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=vP(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[_e]?l["aria-describedby"]:[g["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[_t],w=(0,dV.useMemo)(()=>v||wX(r),[v,r]),x=w4(t,r,"presentation"===e[_e]);w7.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let E=(0,dV.useRef)(e.autoFocus);o="presentation"===e[_e]?{role:"presentation"}:mX(l,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,dV.useEffect)(()=>{E.current&&w.focusFirst(),E.current=!1},[w]),w8(e.inputRef,t.defaultValue,t.setValue),w9({...e,focus(){w.focusFirst()}},t,e.inputRef);let S={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(S.type="text",S.hidden=!0,S.required=e.isRequired,S.onChange=()=>{});let O=ya(e);return{labelProps:{...u,onClick:()=>{w.focusFirst()}},fieldProps:mX(O,o,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:S,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var _n={};_n={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let _o={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},_i={..._o,customError:!0,valid:!1},_a={isInvalid:!1,validationDetails:_o,validationErrors:[]},_s=(0,dV.createContext)({}),_u="__reactAriaFormValidationState";function _l(e){if(e[_u]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[_u];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||="invalid"===r);let u=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:_i}:null,l=(0,dV.useMemo)(()=>a&&null!=o?_d(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return _c(r)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,dV.useContext)(_s),d=(0,dV.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>_c(c[e])):_c(c[n]):[],[c,n]),[f,p]=(0,dV.useState)(c),[h,m]=(0,dV.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,dV.useMemo)(()=>_d(h?[]:d),[h,d]),g=(0,dV.useRef)(_a),[b,v]=(0,dV.useState)(_a),w=(0,dV.useRef)(_a),[x,E]=(0,dV.useState)(!1);return(0,dV.useEffect)(()=>{if(!x)return;E(!1);let e=l||i||g.current;_f(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:u||y||l||i||_a,displayValidation:"native"===s?u||y||b:u||y||l||i||b,updateValidation(e){"aria"!==s||_f(b,e)?g.current=e:v(e)},resetValidation(){_f(_a,w.current)||(w.current=_a,v(_a)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function _c(e){return e?Array.isArray(e)?e:[e]:[]}function _d(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:_i}:null}function _f(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function _p(...e){let t=new Set,r=!1,n={..._o};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||=o.isInvalid,n)n[e]||=o.validationDetails[e]}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let _h=new bi((er=_n)&&er.__esModule?er.default:er);function _m(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function _y(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&n?.(e)||!1,u=i||a||s,l=[];if(u){let e=_m(),n=new bu(e,bi.getGlobalDictionaryForPackage("@react-stately/datepicker")||_h),u=new g5(e,_v({},o)),c=u.resolvedOptions().timeZone;a&&null!=t&&l.push(n.format("rangeUnderflow",{minValue:u.format(t.toDate(c))})),i&&null!=r&&l.push(n.format("rangeOverflow",{maxValue:u.format(r.toDate(c))})),s&&l.push(n.format("unavailableDate"))}return{isInvalid:u,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}let _g={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},_b={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function _v(e,t){e={...t.shouldForceLeadingZeros?_b:_g,...e};let r=t.granularity||"minute",n=Object.keys(e),o=n.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=n.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=n.slice(o,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function _w(e){return e&&"hour"in e?e:new bB}function __(e,t){return null===e?null:e?bQ(e,t):void 0}function _x(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,dV.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let _E=new bi({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class _S{constructor(e,t,r){if(this.era=r?.era??null,this.calendar=e,this.year=r?.year??null,this.month=r?.month??null,this.day=r?.day??null,this.hour=r?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=r?.minute??null,this.second=r?.second??null,this.millisecond=r?.millisecond??null,this.offset="offset"in(r??{})?r.offset:null,null!=this.hour){let[e,r]=_D(this.hour,t);this.dayPeriod=e,this.hour=r}}copy(){let e=new _S(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,r]=_D(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===r}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,r){let n=this.copy();return n[e]=t,"hour"===e&&null==n.dayPeriod&&"hour"in r&&(n.dayPeriod=_D(r.hour,this.hourCycle)[0]),"year"===e&&null==n.era&&(n.era=r.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(n.offset=null),n}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,r,n){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in r){let[e,t]=_D(r.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=r[e];return"year"===e&&null==o.era&&(o.era=r.era),o}switch(e){case"era":{let e=this.calendar.getEras(),r=e.indexOf(o.era);r=_O(r,t,0,e.length-1),o.era=e[r];break}case"year":{let n=new bF(this.calendar,this.era??r.era,this.year??r.year,this.month??1,this.day??1);o.era=(n=n.cycle(e,t,{round:"year"===e})).era,o.year=n.year;break}case"month":o.month=_O(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=_O(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=n.some(e=>["year","month","day"].includes(e));if("timeZone"in r&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(r),[n,i]=_D((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=n,o.offset=e.offset}else{let e=o.hour??0,n=this.getSegmentLimits("hour");o.hour=_O(e,t,n.minValue,n.maxValue),null==o.dayPeriod&&"hour"in r&&(o.dayPeriod=_D(r.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=_O(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=_O(o.minute??0,t,0,59,!0);break;case"second":o.second=_O(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,r){switch(r){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let r=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in r&&null!=this.offset&&r.offset!==this.offset&&(r=r.add({milliseconds:r.offset-this.offset})),r}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function _O(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function _D(e,t){let r=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}var _P=r(9381);let _k={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},_C={year:5,month:2,day:7,hour:2,minute:15,second:15},_T={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function _j(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:u,isDateUnavailable:l}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=_x(c,e.granularity),p=f||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,dV.useMemo)(()=>{let n=new g5(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[r(n.calendar),n.hourCycle]},[t,e.hourCycle,r]),[y,g]=wh(e.value,e.defaultValue??null,e.onChange),[b]=(0,dV.useState)(y),v=(0,dV.useMemo)(()=>__(y,h)??null,[y,h]),[w,x]=(0,dV.useState)(()=>new _S(h,m,v)),E="gregory"===h.identifier&&"BC"===w.era,S=(0,dV.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:f,hideTimeZone:n,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,n,E]),O=(0,dV.useMemo)(()=>_v({},S),[S]),D=(0,dV.useMemo)(()=>new g5(t,O),[t,O]),P=(0,dV.useMemo)(()=>D.resolvedOptions(),[D]),k=(0,dV.useMemo)(()=>(function(e,t,r,n){if(e)return __(e,r);let o=bQ(b5(n??vt()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?bJ(o):n?o:bX(o)})(e.placeholderValue,d,h,f),[e.placeholderValue,d,h,f]),C=(0,dV.useMemo)(()=>{let t="h11"===m||"h12"===m,r=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],n=r.indexOf(e.maxGranularity||"era"),o=r.indexOf("hour"===d&&t?"dayPeriod":d);return r.slice(n,o+1)},[e.maxGranularity,d,m]),[T,j]=(0,dV.useState)(v),[R,N]=(0,dV.useState)(h),[A,M]=(0,dV.useState)(m);v===T&&m===A&&b3(h,R)||(w=new _S(h,m,v),j(v),N(h),M(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof _S&&t.isCleared(C))x(new _S(h,m,v)),g(null);else if(t instanceof _S){if(t.isComplete(C)){let e=t.toValue(v??k);if(t.validate(e,C)){let t=bQ(e,c?.calendar||new bb);if(!y||0!==t.compare(y)){x(new _S(h,m,v)),g(t);return}}}x(t)}else t=bQ(t,c?.calendar||new bb),x(new _S(h,m,v)),g(t)},$=(0,dV.useMemo)(()=>w.toValue(v??k).toDate(p),[w,p,v,k]),L=(0,dV.useMemo)(()=>(function(e,t,r,n,o,i,a){let s=["hour","minute","second"],u=r.formatToParts(e),l=new(0,_P.K)(i,{useGrouping:!1}),c=new(0,_P.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of u)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let r=t[e.type]??0;"2-digit"===n[e.type]?e.value=c.format(r):e.value=l.format(r)}let d=[];for(let e of u){var f;let r=_T[e.type]||e.type,n=_k[r];"era"===r&&1===o.getEras().length&&(n=!1);let u=_k[r]&&null==t[e.type],l=_k[r]?(f=e.value,"era"===r||"dayPeriod"===r?f:"year"===r||"month"===r||"day"===r?_E.getStringForLocale(r,i):"––"):null,c={type:r,text:u?l:e.value,...t.getSegmentLimits(r),isPlaceholder:u,placeholder:l,isEditable:n};"hour"===r?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),r===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(r)&&r===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,D,P,h,t,d),[$,D,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,k,C))},B=(0,dV.useMemo)(()=>_y(y,s,u,l,S),[y,s,u,l,S]),V=_l({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:D,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,_C[e]||1)},decrementPage(e){F(e,-(_C[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,k))},setSegment(e,t){I(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(C)){let e=bQ(w.toValue(v??k),c?.calendar||new bb);y&&0===e.compare(y)||g(e),x(new _S(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new g5(t,_v(e,S)).format($):"",getDateFormatter:(e,t)=>new g5(e,_v({},{...S,...t}))}}let _R=(0,dV.createContext)(null),_N=(0,dV.createContext)(null),_A=(0,dV.createContext)(null),_M=(0,dV.forwardRef)(function(e,t){let r=(0,dV.useContext)(_N),n=(0,dV.useContext)(_A);return r||n?dU().createElement(_$,{...e,ref:t}):dU().createElement(_I,{...e,ref:t})}),_I=(0,dV.forwardRef)((e,t)=>{let[r,n]=m3({slot:e.slot},t,_R),{locale:o}=gQ(),i=_j({...r,locale:o,createCalendar:wi}),a=(0,dV.useRef)(null),{fieldProps:s,inputProps:u}=_r({...r,inputRef:a},i,n);return dU().createElement(m0,{values:[[_N,i],[wA,{...u,ref:a}],[wR,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},dU().createElement(_$,e))}),_$=(0,dV.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,dV.useContext)(_N),i=(0,dV.useContext)(_A),a=null!=o?o:i;return dU().createElement(dU().Fragment,null,dU().createElement(wN,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,dV.cloneElement)(n(e),{key:t}))),dU().createElement(wM,null))});function _L({children:e}){let t=(0,dV.useMemo)(()=>({register:()=>{}}),[]);return dU().createElement(gu.Provider,{value:t},e)}dU().forwardRef(({children:e,...t},r)=>{let n=(0,dV.useRef)(!1),o=(0,dV.useContext)(gu),i=mX(o||{},{...t,register(){n.current=!0,o&&o.register()}});return i.ref=mN(r||o?.ref),y9(o,i.ref),(0,dV.useEffect)(()=>{n.current||(n.current=!0)},[]),dU().createElement(gu.Provider,{value:i},e)});let _F=(0,dV.createContext)({}),_B=dU().createContext(null);function _V(e){let t=mz(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,i]=(0,dV.useState)(!1),a=(0,dV.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,dV.useContext)(_F)??{};if(!e.portalContainer&&s&&(r=s()),!r)return null;let u=e.children;return e.disableFocusManagement||(u=dU().createElement(wB,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},u)),u=dU().createElement(_B.Provider,{value:a},dU().createElement(_L,null,u)),gp().createPortal(u,r)}let _U=(0,dV.createContext)(null),_W=(0,dV.createContext)(null),_H=(0,dV.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=m3(e,t,_U);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=mZ();i=e["aria-label"]?void 0:i;let a=(0,dV.useRef)(!1);return(0,dV.useEffect)(()=>{if(t.current&&!yp(t.current)){y6(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),y6(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),r=(0,dV.useContext)(_B),m$(()=>{n?.(!0)},[n=r?.setContain]),(0,dV.useRef)(!1),(0,dV.useEffect)(()=>{}),{dialogProps:{...ya(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,dV.useContext)(_W);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=m1({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return dU().createElement("section",{...ya(e),...n,...a,ref:t,slot:e.slot||void 0},dU().createElement(m0,{values:[[g$,{slots:{[mQ]:{},title:{...o,level:2}}}],[gM,{slots:{[mQ]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),_K=(0,dV.createContext)(null),_z=(0,dV.forwardRef)(function(e,t){let r=(0,dV.useContext)(_K);return(null==r?void 0:r.isInvalid)?dU().createElement(_G,{...e,ref:t}):null}),_G=(0,dV.forwardRef)((e,t)=>{let r=(0,dV.useContext)(_K),n=ya(e),o=m1({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:dU().createElement(gF,{slot:"errorMessage",...n,...o,ref:t})}),_q=(0,dV.createContext)(null),_Y=(0,dV.createContext)({}),_Z=gN(function(e,t){[e,t]=m3(e,t,_Y);let{elementType:r="label",...n}=e;return dU().createElement(r,{className:"react-aria-Label",...n,ref:t})}),_J=(0,dV.createContext)({placement:"bottom"}),_X="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,_Q=new WeakMap,_0=[];function _1(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function _2(e,t){let r=e,n=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)n=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(n=o.length-e)}if(n>0){let e=Math.pow(10,n);r=Math.round(r*e)/e}return r}function _3(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=_2(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(_2(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(_2((r-t)/n,n))*n),i=_2(i,n)}let _4={top:"top",bottom:"top",left:"left",right:"left"},_6={top:"bottom",bottom:"top",left:"right",right:"left"},_5={top:"left",left:"top"},_8={top:"height",left:"width"},_9={width:"totalWidth",height:"totalHeight"},_7={};function xe(e,t){let r=0,n=0,o=0,i=0,a=0,s=0,u={},l=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let l=document.documentElement;o=l.clientWidth,i=l.clientHeight,r=t?.width??o,n=t?.height??i,u.top=l.scrollTop||e.scrollTop,u.left=l.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:a,left:s}=xa(e,!1)),u.top=e.scrollTop,u.left=e.scrollLeft,o=r,i=n;return yN()&&("BODY"===e.tagName||"HTML"===e.tagName)&&l&&(u.top=0,u.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:u,top:a,left:s}}function xt(e,t,r,n,o,i,a){let s=o.scroll[e]??0,u=n[_8[e]],l=a[e]+n.scroll[_4[e]]+i,c=a[e]+n.scroll[_4[e]]+u-i,d=t-s+n.scroll[_4[e]]+a[e]-n[_4[e]],f=t-s+r+n.scroll[_4[e]]+a[e]-n[_4[e]];return d<l?l-d:f>c?Math.max(c-f,l-d):0}function xr(e){if(_7[e])return _7[e];let[t,r]=e.split(" "),n=_4[t]||"right",o=_5[n];_4[r]||(r="center");let i=_8[n],a=_8[o];return _7[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},_7[e]}function xn(e,t,r,n,o,i,a,s,u,l,c){let{placement:d,crossPlacement:f,axis:p,crossAxis:h,size:m,crossSize:y}=n,g={};g[h]=e[h]??0,"center"===f?g[h]+=((e[y]??0)-(r[y]??0))/2:f!==h&&(g[h]+=(e[y]??0)-(r[y]??0)),g[h]+=i;let b=e[h]-r[y]+u+l,v=e[h]+e[y]-u-l;if(g[h]=_1(g[h],b,v),d===p){let t=s?c[m]:c[_9[m]];g[_6[p]]=Math.floor(t-e[p]+o)}else g[p]=Math.floor(e[p]+e[m]+o);return g}function xo(e,t,r,n,o,i,a,s){let{placement:u,axis:l,size:c}=i;return u===l?Math.max(0,r[l]-(a.scroll[l]??0)-(e[l]+(s?t[l]:0))-(n[l]??0)-n[_6[l]]-o):Math.max(0,e[c]+e[l]+(s?t[l]:0)-r[l]-r[c]+(a.scroll[l]??0)-(n[l]??0)-n[_6[l]]-o)}function xi(e,t){let{top:r,left:n,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:r,left:n,width:o,height:i}}function xa(e,t){let{top:r,left:n,width:o,height:i}=xi(e,t),{scrollTop:a,scrollLeft:s,clientTop:u,clientLeft:l}=document.documentElement;return{top:r+a-u,left:n+s-l,width:o,height:i}}function xs(e,t,r){let n,o=window.getComputedStyle(e);if("fixed"===o.position)n=xi(e,r);else{n=xa(e,r);let o=xa(t,r),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(o.marginTop,10)||0,n.left-=parseInt(o.marginLeft,10)||0,n}function xu(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let xl=new WeakMap;function xc(e){let{ref:t,box:r,onResize:n}=e,o=gc(n);(0,dV.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[t,r])}let xd="u">typeof document?window.visualViewport:null;function xf(e,t){if(e.button>0)return!1;let r=yf(e);if(r){let e=r.ownerDocument;if(!e||!yd(e.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let xp=[],xh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xm(e){return e instanceof HTMLInputElement&&!xh.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let xy="u">typeof document&&window.visualViewport,xg=0;function xb(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function xv(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function xw(e,t){t||!xy?x_(e):xy.addEventListener("resize",()=>x_(e),{once:!0})}function x_(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=v_(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect(),n=r.getBoundingClientRect();if(n.top<t.top||n.bottom>t.top+r.clientHeight){let r=t.bottom;xy&&(r=Math.min(r,xy.offsetTop+xy.height));let o=n.top-t.top-((r-t.top)/2-n.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}r=e.parentElement}}var xx={};function xE(e){var t;let{onDismiss:r,...n}=e,o=vh(n,bd((t=xx)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return dU().createElement(vb,null,dU().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function xS(e,t,r){m$(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{n||(0,gf.flushSync)(()=>{r()})}),()=>{n=!0}}},[e,t,r])}xx={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let xO=null,xD=new Set,xP=new Map,xk=!1,xC=!1;function xT(e,t){for(let r of xD)r(e,t)}function xj(e){xk=!0,e.metaKey||!yC()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(xO="keyboard",xT("keyboard",e))}function xR(e){xO="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(xk=!0,xT("pointer",e))}function xN(e){y$(e)&&(xk=!0,xO="virtual")}function xA(e){e.target!==window&&e.target!==document&&e.isTrusted&&(xk||xC||(xO="virtual",xT("virtual",e)),xk=!1,xC=!1)}function xM(){xk=!1,xC=!0}function xI(e){if("u"<typeof window||"u"<typeof document||xP.get(yc(e)))return;let t=yc(e),r=yl(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){xk=!0,n.apply(this,arguments)},r.addEventListener("keydown",xj,!0),r.addEventListener("keyup",xj,!0),r.addEventListener("click",xN,!0),t.addEventListener("focus",xA,!0),t.addEventListener("blur",xM,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",xR,!0),r.addEventListener("pointermove",xR,!0),r.addEventListener("pointerup",xR,!0)),t.addEventListener("beforeunload",()=>{x$(e)},{once:!0}),xP.set(t,{focus:n})}let x$=(e,t)=>{let r=yc(e),n=yl(e);t&&n.removeEventListener("DOMContentLoaded",t),xP.has(r)&&(r.HTMLElement.prototype.focus=xP.get(r).focus,n.removeEventListener("keydown",xj,!0),n.removeEventListener("keyup",xj,!0),n.removeEventListener("click",xN,!0),r.removeEventListener("focus",xA,!0),r.removeEventListener("blur",xM,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",xR,!0),n.removeEventListener("pointermove",xR,!0),n.removeEventListener("pointerup",xR,!0)),xP.delete(r))};function xL(e){let[t,r]=wh(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,dV.useCallback)(()=>{r(!0)},[r]),o=(0,dV.useCallback)(()=>{r(!1)},[r]),i=(0,dV.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}"u">typeof document&&("loading"!==(h=yl(void 0)).readyState?xI(void 0):h.addEventListener("DOMContentLoaded",()=>{xI(void 0)}));let xF=(0,dV.createContext)(null),xB=(0,dV.createContext)(null),xV=(0,dV.forwardRef)(function(e,t){[e,t]=m3(e,t,xF);let r=(0,dV.useContext)(_W),n=xL(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,dV.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return xS(e,o,(0,dV.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,dV.useContext)(gR),{direction:s}=gQ();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),dU().createElement(dU().Fragment,null,t)}return!o||o.isOpen||i?dU().createElement(xU,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function xU({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,dV.useRef)(null),[s,u]=(0,dV.useState)(0),l=(0,dV.useRef)(null),d=(0,dV.useContext)(xB),f=d&&"SubmenuTrigger"===n.trigger;m$(()=>{a.current&&e.isOpen&&u(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...u}=e,l="SubmenuTrigger"===u.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,u=(0,dV.useRef)(void 0);(0,dV.useEffect)(()=>{if(o&&!xp.includes(t))return xp.push(t),()=>{let e=xp.indexOf(t);e>=0&&xp.splice(e,1)}},[o,t]);let l=()=>{xp[xp.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,dV.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=gc(e=>{r&&xf(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=gc(e=>{r&&r(e)});(0,dV.useEffect)(()=>{let e=i.current;if(n)return;let r=yl(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&xf(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("click",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("click",n,!0)}}},[t,n])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(yf(e)))&&(xp[xp.length-1]===t&&e.stopPropagation(),u.current===t&&l()),u.current=void 0}:void 0,onInteractOutsideStart:e=>{let r=xp[xp.length-1];u.current=r,(!s||s(yf(e)))&&r===t&&e.stopPropagation()}});let{focusWithinProps:c}=gO({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||wH(e.relatedTarget,wF))&&(!s||s(e.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||l,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:r}=gQ(),{arrowSize:n,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:u="bottom",containerPadding:l=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,dV.useState)(null),x=[h,u,i.current,o.current,a?.current,s.current,l,c,d,f,p,m,r,g,b,n],E=(0,dV.useRef)(xd?.scale);(0,dV.useEffect)(()=>{m&&(E.current=xd?.scale)},[m]);let S=(0,dV.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||xd?.scale!==E.current)return;let t=null;if(s.current&&yp(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),r=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-r.top}).offset>r.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-r.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,r,{placement:n,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:u,boundaryElement:l,offset:c,crossOffset:d,maxHeight:f,arrowSize:p=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!xu(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!xu(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?xa(o,!1):xs(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=xa(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let E=xe(l,m),S=xe(y,m);if("BODY"!==l.tagName&&"HTML"!==l.tagName||g)r=("BODY"===l.tagName||"HTML"===l.tagName)&&g?{top:0,left:0,width:0,height:0}:xs(l,y,!1);else{let e=xi(y,!1);r={top:-(e.top-E.top),left:-(e.left-E.left),width:0,height:0}}return function(e,t,r,n,o,i,a,s,u,l,c,d,f,p,h,m,y){var g,b,v;let w,x,E,S=xr(e),{size:O,crossAxis:D,crossSize:P,placement:k,crossPlacement:C}=S,T=xn(t,a,r,S,l,c,u,d,p,h,s),j=l,R=xo(a,u,t,n,o+l,S,s,m);if(i&&r[O]>R){let e=xr(`${_6[k]} ${C}`),i=xn(t,a,r,e,l,c,u,d,p,h,s);xo(a,u,t,n,o+l,e,s,m)>R&&(S=e,T=i,j=l)}let N="bottom";"top"===S.axis?"top"===S.placement?N="top":"bottom"===S.placement&&(N="bottom"):"top"===S.crossAxis&&("top"===S.crossPlacement?N="bottom":"bottom"===S.crossPlacement&&(N="top"));let A=xt(D,T[D],r[P],a,s,o,u);T[D]+=A;let M=(g=T,b=r.height,v=N,w=(null!=g.top?g.top:s[_9.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?u.top:0,E={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,E.bottom-w-((n.top??0)+(n.bottom??0)+o)):Math.max(0,w+b-E.top-((n.top??0)+(n.bottom??0)+o)));f&&f<M&&(M=f),r.height=Math.min(r.height,M),A=xt(D,(T=xn(t,a,r,S,j,c,u,d,p,h,s))[D],r[P],a,s,o,u),T[D]+=A;let I={},$=t[D]-T[D]-n[_4[D]],L=$+.5*t[P],F=p/2+h,B="left"===_4[D]?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),V=r[P]-B-p/2-h,U=_1(L,t[D]+p/2-(T[D]+n[_4[D]]),t[D]+t[P]-p/2-(T[D]+n[_4[D]]));I[D]=_1(U,F,V),({placement:k,crossPlacement:C}=S),p?$=I[D]:"right"===C?$+=t[P]:"center"===C&&($+=t[P]/2);let W="left"===k||"top"===k?r[O]:0,H={x:"top"===k||"bottom"===k?$:W,y:"left"===k||"right"===k?$:W};return{position:T,maxHeight:M,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:k,triggerAnchorPoint:H}}(n,v,w,x,s,u,E,S,r,c,d,!!b&&"static"!==b,f,p,h,yd(l,y),m)}({placement:(e=u,"rtl"===r?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:l,shouldFlip:c,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:n??(a?.current?xi(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),r=s.current.getBoundingClientRect(),n=e[t.type]-r[t.type];s.current.scrollTop+=n-t.offset}w(v)},x);m$(S,x),m$(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=S]),xc({ref:i,onResize:S}),xc({ref:o,onResize:S});let O=(0,dV.useRef)(!1);m$(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),S()},r=()=>{O.current&&t()};return xd?.addEventListener("resize",t),xd?.addEventListener("scroll",r),()=>{xd?.removeEventListener("resize",t),xd?.removeEventListener("scroll",r)}},[S]);let D=(0,dV.useCallback)(()=>{O.current||y?.()},[y,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,dV.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=yf(e);if(!t.current||r instanceof Node&&!yd(r,t.current)||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return;let o=n||xl.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:o,isOpen:m,onClose:y&&D}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:S}}({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!l?t.close:null});return!function(e={}){let{isDisabled:t}=e;m$(()=>{if(!t){let e,t,r,n,o,i,a,s;return 1==++xg&&(c=yR()?(t=xb(document.documentElement,"overflow","hidden"),r=!1,n=document.createElement("style"),(o=gs())&&(n.nonce=o),n.textContent=`
38
+ `.trim(),e.head.prepend(t)},[f]),(0,dU.useEffect)(()=>{let e=y.current;return()=>{for(let t of(d||gi(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:u||h,pressProps:mQ(p,C,{[gb]:!0})}}function gw(e){return"A"===e.tagName&&e.hasAttribute("href")}function g_(e,t){let{key:r,code:n}=e,o=t.getAttribute("role");return("Enter"===r||" "===r||"Spacebar"===r||"Space"===n)&&!(t instanceof yd(t).HTMLInputElement&&!gO(t,r)||t instanceof yd(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===o||!o&&gw(t))&&"Enter"!==r)}function gx(e,t){let r=t.clientX,n=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:n,key:t.key}}function gE(e,t){return e instanceof HTMLInputElement?!gO(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!gw(e))}let gS=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gO(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:gS.has(e.type)}function gD(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=(0,dU.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=gf(),u=(0,dU.useCallback)(e=>{yf(e.currentTarget,yp(e))&&i.current.isFocusWithin&&!yf(e.currentTarget,e.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(e),o&&o(!1))},[r,o,i,s]),l=yO(u),c=(0,dU.useCallback)(e=>{if(!yf(e.currentTarget,yp(e)))return;let t=yp(e),r=yc(t),s=((e=document)=>e.activeElement)(r);if(!i.current.isFocusWithin&&s===t){n&&n(e),o&&o(!0),i.current.isFocusWithin=!0,l(e);let t=e.currentTarget;a(r,"focus",e=>{let n=yp(e);if(i.current.isFocusWithin&&!yf(t,n)){let e=new r.defaultView.FocusEvent("blur",{relatedTarget:n});yS(e,t),u(yE(e))}},{capture:!0})}},[n,o,l,a,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:u}}}function gP(e={}){var t;let{autoFocus:r=!1,isTextInput:n,within:o}=e,i=(0,dU.useRef)({isFocused:!1,isFocusVisible:r||y0()}),[a,s]=(0,dU.useState)(!1),[u,l]=(0,dU.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),c=(0,dU.useCallback)(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,dU.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=y0(),s(e),c()},[c]);t={enabled:a,isTextInput:n},yX(),(0,dU.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,r)=>{var n;let o,a,s,u,l,d,f,p;n=!!t?.isTextInput,a=yc(o=r?yp(r):void 0),u=void 0!==(s=yd(o))?s.HTMLInputElement:HTMLInputElement,l=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,f=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(a),(n=n||p instanceof u&&!y1.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&r instanceof f&&!yK[r.key]||(e=>{i.current.isFocusVisible=e,c()})(y0())};return yV.add(e),()=>{yV.delete(e)}},[n,a]);let{focusProps:f}=y8({isDisabled:o,onFocusChange:d}),{focusWithinProps:p}=gD({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:u,focusProps:o?p:f}}let gk=!1,gC=0;function gT(e){"touch"===e.pointerType&&(gk=!0,setTimeout(()=>{gk=!1},500))}function gj(){let e=yc(null);if(void 0!==e)return 0===gC&&"u">typeof PointerEvent&&e.addEventListener("pointerup",gT),gC++,()=>{!(--gC>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",gT)}}function gR(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,a]=(0,dU.useState)(!1),s=(0,dU.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,dU.useEffect)(gj,[]);let{addGlobalListener:u,removeAllGlobalListeners:l}=gf(),{hoverProps:c,triggerHoverEnd:d}=(0,dU.useMemo)(()=>{let e=(e,t)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&o&&(s.isHovered=!1,l(),n&&n({type:"hoverend",target:o,pointerType:t}),r&&r(!1),a(!1))},i={};return"u">typeof PointerEvent&&(i.onPointerEnter=n=>{gk&&"mouse"===n.pointerType||((n,i)=>{if(s.pointerType=i,o||"touch"===i||s.isHovered||!yf(n.currentTarget,yp(n)))return;s.isHovered=!0;let l=n.currentTarget;s.target=l,u(yc(yp(n)),"pointerover",t=>{s.isHovered&&s.target&&!yf(s.target,yp(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:l,pointerType:i}),r&&r(!0),a(!0)})(n,n.pointerType)},i.onPointerLeave=t=>{!o&&yf(t.currentTarget,yp(t))&&e(t,t.pointerType)}),{hoverProps:i,triggerHoverEnd:e}},[t,r,n,o,s,u,l]);return(0,dU.useEffect)(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:i}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let gN=(0,dU.createContext)(!1);function gA(e){let t=(t,r)=>(0,dU.useContext)(gN)?null:e(t,r);return t.displayName=e.displayName||e.name,(0,dU.forwardRef)(t)}let gM=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),gI=(0,dU.createContext)({}),g$=gA(function(e,t){var r;[e,t]=m4(e,t,gI);let n=((r=e).isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),e=r),{isPending:o}=n,{buttonProps:i,isPressed:a}=function(e,t){let r,{elementType:n="button",isDisabled:o,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:u,onPressChange:l,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:y="button"}=e;r="button"===n?{type:y,disabled:o,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==n||o?void 0:p,target:"a"===n?h:void 0,type:"input"===n?y:void 0,disabled:"input"===n?o:void 0,"aria-disabled":o&&"input"!==n?o:void 0,rel:"a"===n?m:void 0};let{pressProps:g,isPressed:b}=gv({onPressStart:a,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:u,onClick:f,isDisabled:o,preventFocusOnPress:c,ref:t}),{focusableProps:v}=gt(e,t);d&&(v.tabIndex=o?-1:v.tabIndex);let w=mQ(v,g,ys(e,{labelable:!0}));return{isPressed:b,buttonProps:mQ(r,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:u,isFocusVisible:l}=gP(e),{hoverProps:c,isHovered:d}=gR({...e,isDisabled:e.isDisabled||o}),f={isHovered:d,isPressed:(n.isPressed||a)&&!o,isFocused:u,isFocusVisible:l,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},p=m2({...e,values:f,defaultClassName:"react-aria-Button"}),h=mZ(i.id),m=mZ(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let g=(0,dU.useRef)(o);return(0,dU.useEffect)(()=>{let e={"aria-labelledby":y||h};!g.current&&u&&o?m7(e,"assertive"):g.current&&u&&!o&&m7(e,"assertive"),g.current=o},[o,u,y,h]),dW().createElement("button",{...ys(e,{propNames:gM}),...mQ(i,s,c),...p,type:"submit"===i.type&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":f.isPressed||void 0,"data-hovered":d||void 0,"data-focused":u||void 0,"data-pending":o||void 0,"data-focus-visible":l||void 0},dW().createElement(m8.Provider,{value:{id:m}},p.children))});(0,dU.createContext)(null),(0,dU.createContext)(null),(0,dU.createContext)(null),(0,dU.createContext)(null),(0,dU.createContext)(null);let gL=(0,dU.createContext)({}),gF=(0,dU.createContext)({}),gB=(0,dU.forwardRef)(function(e,t){[e,t]=m4(e,t,gF);let{elementType:r="span",...n}=e;return dW().createElement(r,{className:"react-aria-Text",...n,ref:t})}),gV=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gU=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function gW(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),r="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(r)return"rtl"===r.direction;if(t.script)return gV.has(t.script)}let t=e.split("-")[0];return gU.has(t)}let gH=Symbol.for("react-aria.i18n.locale");function gK(){let e="u">typeof window&&window[gH]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:gW(e)?"rtl":"ltr"}}let gz=gK(),gG=new Set;function gq(){for(let e of(gz=gK(),gG))e(gz)}function gY(){let e=mG(),[t,r]=(0,dU.useState)(gz);return((0,dU.useEffect)(()=>(0===gG.size&&window.addEventListener("languagechange",gq),gG.add(r),()=>{gG.delete(r),0===gG.size&&window.removeEventListener("languagechange",gq)}),[]),e)?{locale:"u">typeof window&&window[gH]||"en-US",direction:"ltr"}:t}let gZ=dW().createContext(null);function gJ(e){let{locale:t,children:r}=e,n=dW().useMemo(()=>({locale:t,direction:gW(t)?"rtl":"ltr"}),[t]);return dW().createElement(gZ.Provider,{value:n},r)}function gX(e){let{children:t}=e,r=gY();return dW().createElement(gZ.Provider,{value:r},t)}function gQ(e){let{locale:t,children:r}=e;return t?dW().createElement(gJ,{locale:t,children:r}):dW().createElement(gX,{children:r})}function g0(){let e=gY();return(0,dU.useContext)(gZ)||e}let g1=null;function g2(e,t="assertive",r=7e3){g1?g1.announce(e,t,r):(g1=new g3,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?g1.announce(e,t,r):setTimeout(()=>{g1?.isAttached()&&g1?.announce(e,t,r)},100))}class g3{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",r=7e3){if(!this.node)return;let n=document.createElement("div");"object"==typeof e?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(n):this.politeLog?.appendChild(n),""!==e&&setTimeout(()=>{n.remove()},r)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var g4={};function g6(e,t){let r=(0,dU.useRef)(null);return e&&r.current&&t(e,r.current)&&(e=r.current),r.current=e,e}g4={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let g5=new Map;class g8{constructor(e,t={}){this.formatter=g7(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),n=this.formatter.formatToParts(t);return[...r.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...n.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==bt&&(bt="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),bt&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let r=g7(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===n&&23===o)return"h23";if(24===n&&23===o)return"h24";if(0===n&&11===o)return"h11";if(12===n&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let g9={true:{ja:"h11"},false:{}};function g7(e,t={}){if("boolean"==typeof t.hour12&&(null==be&&(be="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),be)){let r=g9[String((t={...t}).hour12)][e.split("-")[0]],n=t.hour12?"h12":"h23";t.hourCycle=r??n,delete t.hour12}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(g5.has(r))return g5.get(r);let n=new Intl.DateTimeFormat(e,t);return g5.set(r,n),n}let be=null,bt=null;function br(e){e=g6(e??{},bn);let{locale:t}=g0();return(0,dU.useMemo)(()=>new g8(t,e),[t,e])}function bn(e,t){if(e===t)return!0;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(t[n]!==e[n])return!1;return!0}let bo=Symbol.for("react-aria.i18n.locale"),bi=Symbol.for("react-aria.i18n.strings");class ba{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let r=this.getStringsForLocale(t)[e];if(!r)throw Error(`Could not find intl message ${e} in ${t} locale`);return r}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,r="en-US"){var n;if(t[e])return t[e];let o=(n=e,Intl.Locale?new Intl.Locale(n).language:n.split("-")[0]);if(t[o])return t[o];for(let e in t)if(e.startsWith(o+"-"))return t[e];return t[r]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[bo];if(void 0===p){let e=window[bi];if(!e)return null;for(let r in p={},e)p[r]=new ba({[t]:e[r]},t)}let r=p?.[e];if(!r)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}let bs=new Map,bu=new Map;class bl{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let r=this.strings.getStringForLocale(e,this.locale);return"function"==typeof r?r(t,this):r}plural(e,t,r="cardinal"){let n=t["="+e];if(n)return"function"==typeof n?n():n;let o=this.locale+":"+r,i=bs.get(o);return i||(i=new Intl.PluralRules(this.locale,{type:r}),bs.set(o,i)),"function"==typeof(n=t[i.select(e)]||t.other)?n():n}number(e){let t=bu.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),bu.set(this.locale,t)),t.format(e)}select(e,t){let r=e[t]||e.other;return"function"==typeof r?r():r}}let bc=new WeakMap;function bd(e,t){let r;return t&&ba.getGlobalDictionaryForPackage(t)||((r=bc.get(e))||(r=new ba(e),bc.set(e,r)),r)}function bf(e,t){let{locale:r}=g0(),n=bd(e,t);return(0,dU.useMemo)(()=>new bl(r,n),[r,n])}function bp(e,t){return e-t*Math.floor(e/t)}function bh(e,t,r,n){let o=(t=by(e,t))-1,i=-2;return r<=2?i=0:bm(t)&&(i=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+n)}function bm(e){return e%4==0&&(e%100!=0||e%400==0)}function by(e,t){return"BC"===e?1-t:t}function bg(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let bb={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class bv{fromJulianDay(e){let t=e-1721426,r=Math.floor(t/146097),n=bp(t,146097),o=Math.floor(n/36524),i=bp(n,36524),a=Math.floor(i/1461),s=Math.floor(bp(i,1461)/365),[u,l]=bg(400*r+100*o+4*a+s+ +(4!==o&&4!==s)),c=e-bh(u,l,1,1),d=2;e<bh(u,l,3,1)?d=0:bm(l)&&(d=1);let f=Math.floor(((c+d)*12+373)/367),p=e-bh(u,l,f,1)+1;return new bB(u,l,f,p)}toJulianDay(e){return bh(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return bb[bm(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return bm(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function bw(e,t){let r=e.copy(),n="hour"in r?bT(r,t):0;b_(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,bx(r),bE(r),r.day+=7*(t.weeks||0),r.day+=t.days||0,r.day+=n,function(e){for(;e.day<1;)e.month--,bx(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,bx(e)}(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){let e=r.calendar.isInverseEra?.(r);r.year=o,r.month=e?1:r.calendar.getMonthsInYear(r),r.day=e?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function b_(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function bx(e){for(;e.month<1;)b_(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,b_(e,1)}function bE(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function bS(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),bE(e)}function bO(e){let t={};for(let r in e)"number"==typeof e[r]&&(t[r]=-e[r]);return t}function bD(e,t){let r=e.copy();return null!=t.era&&(r.era=t.era),null!=t.year&&(r.year=t.year),null!=t.month&&(r.month=t.month),null!=t.day&&(r.day=t.day),bS(r),r}function bP(e,t){let r=e.copy();return null!=t.hour&&(r.hour=t.hour),null!=t.minute&&(r.minute=t.minute),null!=t.second&&(r.second=t.second),null!=t.millisecond&&(r.millisecond=t.millisecond),bk(r),r}function bk(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bC(e,t){let r=e%t;return r<0&&(r+=t),r}function bT(e,t){let r;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bC(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bC(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bC(e.minute,60),r=Math.floor(e.hour/24),e.hour=bC(e.hour,24),r}function bj(e,t){let r=e.copy();return bT(r,t),r}function bR(e,t,r,n){let o=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),i=t.indexOf(e.era);if(i<0)throw Error("Invalid era: "+e.era);i=bA(i,r,0,t.length-1,n?.round),o.era=t[i],bS(o);break}case"year":o.calendar.isInverseEra?.(o)&&(r=-r),o.year=bA(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bA(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=bA(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),bS(o),o}function bN(e,t,r,n){let o=e.copy();switch(t){case"hour":{let t=e.hour,i=0,a=23;if(n?.hourCycle===12){let e=t>=12;i=12*!!e,a=e?23:11}o.hour=bA(t,r,i,a,n?.round);break}case"minute":o.minute=bA(e.minute,r,0,59,n?.round);break;case"second":o.second=bA(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=bA(e.millisecond,r,0,999,n?.round);break;default:throw Error("Unsupported field "+t)}return o}function bA(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function bM(e,t){let r;return r=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?bY(bw(bQ(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):bH(e)-e.offset)+(t.milliseconds||0),r+=1e3*(t.seconds||0),r+=6e4*(t.minutes||0),b0(bJ(r+=36e5*(t.hours||0),e.timeZone),e.calendar)}function bI(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function b$(e){let t,r=b0(e,new bv);return t="BC"===r.era?1===r.year?"0000":"-"+String(Math.abs(1-r.year)).padStart(6,"00"):String(r.year).padStart(4,"0"),`${t}-${String(r.month).padStart(2,"0")}-${String(r.day).padStart(2,"0")}`}function bL(e){return`${b$(e)}T${bI(e)}`}function bF(e){let t,r="object"==typeof e[0]?e.shift():new bv;if("string"==typeof e[0])t=e.shift();else{let e=r.getEras();t=e[e.length-1]}return[r,t,e.shift(),e.shift(),e.shift()]}class bB{#t;constructor(...e){let[t,r,n,o,i]=bF(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,bS(this)}copy(){return this.era?new bB(this.calendar,this.era,this.year,this.month,this.day):new bB(this.calendar,this.year,this.month,this.day)}add(e){return bw(this,e)}subtract(e){return bw(this,bO(e))}set(e){return bD(this,e)}cycle(e,t,r){return bR(this,e,t,r)}toDate(e){return bZ(this,e)}toString(){return b$(this)}compare(e){return b7(this,e)}}class bV{#t;constructor(e=0,t=0,r=0,n=0){this.hour=e,this.minute=t,this.second=r,this.millisecond=n,bk(this)}copy(){return new bV(this.hour,this.minute,this.second,this.millisecond)}add(e){return bj(this,e)}subtract(e){return bj(this,bO(e))}set(e){return bP(this,e)}cycle(e,t,r){return bN(this,e,t,r)}toString(){return bI(this)}compare(e){var t,r;return t=this,r=e,ve(t)-ve(r)}}class bU{#t;constructor(...e){let[t,r,n,o,i]=bF(e);this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bS(this)}copy(){return this.era?new bU(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bU(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return bw(this,e)}subtract(e){return bw(this,bO(e))}set(e){return bD(bP(this,e),e)}cycle(e,t,r){switch(e){case"era":case"year":case"month":case"day":return bR(this,e,t,r);default:return bN(this,e,t,r)}}toDate(e,t){return bZ(this,e,t)}toString(){return bL(this)}compare(e){var t,r;let n=b7(this,e);return 0===n?(t=this,r=bQ(e),ve(t)-ve(r)):n}}class bW{#t;constructor(...e){let[t,r,n,o,i]=bF(e),a=e.shift(),s=e.shift();this.calendar=t,this.era=r,this.year=n,this.month=o,this.day=i,this.timeZone=a,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bS(this)}copy(){return this.era?new bW(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bW(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bM(this,e)}subtract(e){return bM(this,bO(e))}set(e,t){let r,n;return 0===(n=bP(bD(r=bQ(this),e),e)).compare(r)?this:b0(bJ(bY(n,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,r){return function(e,t,r,n){switch(t){case"hour":{let t=0,o=23;if(n?.hourCycle===12){let r=e.hour>=12;t=12*!!r,o=r?23:11}let i=bQ(e),a=b0(bP(i,{hour:t}),new bv),s=[bY(a,e.timeZone,"earlier"),bY(a,e.timeZone,"later")].filter(t=>bJ(t,e.timeZone).day===a.day)[0],u=b0(bP(i,{hour:o}),new bv),l=[bY(u,e.timeZone,"earlier"),bY(u,e.timeZone,"later")].filter(t=>bJ(t,e.timeZone).day===u.day).pop(),c=bH(e)-e.offset,d=Math.floor(c/36e5),f=c%36e5;return b0(bJ(c=36e5*bA(d,r,Math.floor(s/36e5),Math.floor(l/36e5),n?.round)+f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bN(e,t,r,n);case"era":case"year":case"month":case"day":return b0(bJ(bY(bR(bQ(e),t,r,n),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,r)}toDate(){var e;return e=this,new Date(bH(e)-e.offset)}toString(){var e;let t,r,n,o,i;return`${bL(this)}${t=0>Math.sign(e=this.offset)?"-":"+",r=Math.floor((e=Math.abs(e))/36e5),n=Math.floor(e%36e5/6e4),o=Math.floor(e%36e5%6e4/1e3),i=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`,0!==o&&(i+=`:${String(o).padStart(2,"0")}`),i}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof bW){var r,n;return e.timeZone===t?e:(r=e,n=t,b0(bJ(bH(r)-r.offset,n),r.calendar))}return bJ(bY(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function bH(e){return bK(by((e=b0(e,new bv)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bK(e,t,r,n,o,i,a){let s=new Date;return s.setUTCHours(n,o,i,a),s.setUTCFullYear(e,t-1,r),s.getTime()}function bz(e,t){if("UTC"===t)return 0;if(e>0&&t===vr())return -6e4*new Date(e).getTimezoneOffset();let{year:r,month:n,day:o,hour:i,minute:a,second:s}=bq(e,t);return bK(r,n,o,i,a,s,0)-1e3*Math.floor(e/1e3)}let bG=new Map;function bq(e,t){let r=bG.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),bG.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let e of n)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function bY(e,t,r="compatible"){var n,o,i;let a=bQ(e);if("UTC"===t)return bH(a);if(t===vr()&&"compatible"===r){a=b0(a,new bv);let e=new Date,t=by(a.era,a.year);return e.setFullYear(t,a.month-1,a.day),e.setHours(a.hour,a.minute,a.second,a.millisecond),e.getTime()}let s=bH(a),u=bz(s-864e5,t),l=bz(s+864e5,t),c=(n=a,((o=s-u)==(i=s-l)?[o]:[o,i]).filter(e=>{var r;let o;return r=n,o=bq(e,t),r.year===o.year&&r.month===o.month&&r.day===o.day&&r.hour===o.hour&&r.minute===o.minute&&r.second===o.second}));if(1===c.length)return c[0];if(c.length>1)switch(r){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(s-u,s-l);case"compatible":case"later":return Math.max(s-u,s-l);case"reject":throw RangeError("No such absolute time found")}}function bZ(e,t,r="compatible"){return new Date(bY(e,t,r))}function bJ(e,t){let r=bz(e,t),n=new Date(e+r),o=n.getUTCFullYear();return new bW(o<1?"BC":"AD",o<1?-o+1:o,n.getUTCMonth()+1,n.getUTCDate(),t,r,n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds())}function bX(e){return new bB(e.calendar,e.era,e.year,e.month,e.day)}function bQ(e,t){let r=0,n=0,o=0,i=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:i}=t),new bU(e.calendar,e.era,e.year,e.month,e.day,r,n,o,i)}function b0(e,t){if(b4(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,bS(n),n}let b1={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function b2(e,t){return t=b0(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function b3(e,t){return b4(e.calendar,t.calendar)&&b2(e,t)}function b4(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let b6={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function b5(e,t,r){let n=Math.ceil(e.calendar.toJulianDay(e)+1-(r?b6[r]:function(e){let t=vs.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo()))return vs.set(e,t),t.firstDay}let r=function(e){if(Intl.Locale){let t=va.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&va.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];t="mon"===r?{firstDay:1}:"tue"===r?{firstDay:2}:"wed"===r?{firstDay:3}:"thu"===r?{firstDay:4}:"fri"===r?{firstDay:5}:"sat"===r?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:r&&b1[r]||0};vs.set(e,t)}return t.firstDay}(t)))%7;return n<0&&(n+=7),n}function b8(e){return bJ(Date.now(),e)}function b9(e){return bX(b8(e))}function b7(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ve(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let vt=null;function vr(){return null==vt&&(vt=new Intl.DateTimeFormat().resolvedOptions().timeZone),vt}function vn(e){return e.subtract({days:e.day-1})}function vo(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function vi(e,t,r){let n=b5(e,t,r);return e.subtract({days:n})}let va=new Map,vs=new Map;function vu(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function vl(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function vc(e){return e&&e.__esModule?e.default:e}let vd=new WeakMap;function vf(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function vp(e,t,r,n){let o=bf(vc(g4),"@react-aria/calendar"),i=vf(e)||vf(t),a=br({month:"long",year:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r}),s=br({month:"long",year:"numeric",day:"numeric",era:i,calendar:e.calendar.identifier,timeZone:r});return(0,dU.useMemo)(()=>{if(b2(e,vn(e))){let i=e,s=t;if(e.calendar.getFormattableMonth&&(i=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),b2(t,vo(e)))return a.format(i.toDate(r));if(b2(t,vo(t)))return n?vh(a,o,i,s,r):a.formatRange(i.toDate(r),s.toDate(r))}return n?vh(s,o,e,t,r):s.formatRange(e.toDate(r),t.toDate(r))},[e,t,a,s,o,r,n])}function vh(e,t,r,n,o){let i=e.formatRangeToParts(r.toDate(o),n.toDate(o)),a=-1;for(let e=0;e<i.length;e++){let t=i[e];if("shared"===t.source&&"literal"===t.type)a=e;else if("endRange"===t.source)break}let s="",u="";for(let e=0;e<i.length;e++)e<a?s+=i[e].value:e>a&&(u+=i[e].value);return t.format("dateRange",{startDate:s,endDate:u})}function vm(e,t){let{id:r,"aria-label":n,"aria-labelledby":o}=e;return r=mZ(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),n||o||!t||(n=t),{id:r,"aria-label":n,"aria-labelledby":o}}function vy(e,t){let r=(0,dU.useRef)(!0),n=(0,dU.useRef)(null),o=gd(e);(0,dU.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),(0,dU.useEffect)(()=>{let e=n.current;r.current?r.current=!1:(!e||t.some((t,r)=>!Object.is(t,e[r])))&&o(),n.current=t},t)}function vg(e,t){var r;let n,o,i,a,s,u=bf((r=g4)&&r.__esModule?r.default:r,"@react-aria/calendar"),l=ys(e),c=vp(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=vp(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);vy(()=>{t.isFocused||g2(d)},[d]);let f=(i=bf(vc(g4),"@react-aria/calendar"),"highlightedRange"in t?{start:n,end:o}=t.highlightedRange||{}:n=o=t.value??void 0,a=br({weekday:"long",month:"long",year:"numeric",day:"numeric",era:vf(n)||vf(o),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,dU.useMemo)(()=>{if(!s&&n&&o)if(b2(n,o)){let e=a.format(n.toDate(t.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=vh(a,i,n,o,t.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[n,o,s,t.timeZone,i,a]));vy(()=>{f&&g2(f,"polite",4e3)},[f]);let p=mJ([!!e.errorMessage,e.isInvalid,e.validationState]);vd.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:f});let[h,m]=(0,dU.useState)(!1),y=e.isDisabled||t.isNextVisibleRangeInvalid();y&&h&&(m(!1),t.setFocused(!0));let[g,b]=(0,dU.useState)(!1),v=e.isDisabled||t.isPreviousVisibleRangeInvalid();return v&&g&&(b(!1),t.setFocused(!0)),{calendarProps:mQ(l,vm({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":u.format("next"),isDisabled:y,onFocusChange:m},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":u.format("previous"),isDisabled:v,onFocusChange:b},errorMessageProps:{id:p},title:c}}let vb={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function vv(e){let{children:t,elementType:r="div",isFocusable:n,style:o,...i}=e,{visuallyHiddenProps:a}=function(e={}){let{style:t,isFocusable:r}=e,[n,o]=(0,dU.useState)(!1),{focusWithinProps:i}=gD({isDisabled:!r,onFocusWithinChange:e=>o(e)}),a=(0,dU.useMemo)(()=>n?t:t?{...vb,...t}:vb,[n]);return{visuallyHiddenProps:{...i,style:a}}}(e);return dW().createElement(r,mQ(i,a),t)}function vw(e,t,r,n){let o=gd(r),i=null==r;(0,dU.useEffect)(()=>{if(i||!e.current)return;let r=e.current;return r.addEventListener(t,o,n),()=>{r.removeEventListener(t,o,n)}},[e,t,n,i])}function v_(e,t){if(!e)return!1;let r=window.getComputedStyle(e),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return e===n&&"hidden"!==r.overflow&&(o=!0),o&&t&&(o=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),o}function vx(e,t){let r=e;for(v_(r,t)&&(r=r.parentElement);r&&!v_(r,t);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function vE(e,t){let r=[],n=document.scrollingElement||document.documentElement;do v_(e,t)&&r.push(e),e=e.parentElement;while(e&&e!==n);return r}function vS(e,t,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(e===t)return;let i=e.scrollTop,a=e.scrollLeft,s=t.getBoundingClientRect(),u=e.getBoundingClientRect(),l=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d?0:u.top,p=e===d?e.clientHeight:u.bottom,h=e===d?0:u.left,m=e===d?e.clientWidth:u.right,y=parseInt(l.scrollMarginTop,10)||0,g=parseInt(l.scrollMarginBottom,10)||0,b=parseInt(l.scrollMarginLeft,10)||0,v=parseInt(l.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,E=parseInt(c.scrollPaddingLeft,10)||0,S=parseInt(c.scrollPaddingRight,10)||0,O=parseInt(c.borderTopWidth,10)||0,D=parseInt(c.borderBottomWidth,10)||0,P=parseInt(c.borderLeftWidth,10)||0,k=parseInt(c.borderRightWidth,10)||0,C=s.top-y,T=s.bottom+g,j=s.left-b,R=s.right+v,N=e===d?0:P+k,A=e===d?0:O+D,M=e.offsetWidth-e.clientWidth-N,I=e.offsetHeight-e.clientHeight-A,$=f+O+w,L=p-D-x-I,F=h+P+E,B=m-k-S;"rtl"!==c.direction||yN()?B-=M:F+=M;let V=C<$||T>L,U=j<F||R>B;if(V&&"start"===n)i+=C-$;else if(V&&"center"===n)i+=(C+T)/2-($+L)/2;else if(V&&"end"===n)i+=T-L;else if(V&&"nearest"===n){let e=C-$,t=T-L;i+=Math.abs(e)<=Math.abs(t)?e:t}if(U&&"start"===o)a+=j-F;else if(U&&"center"===o)a+=(j+R)/2-(F+B)/2;else if(U&&"end"===o)a+=R-B;else if(U&&"nearest"===o){let e=j-F,t=R-B;a+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:a,top:i})}function vO(e,t={}){let{containingElement:r}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:n}=e.getBoundingClientRect(),o=vE(e,!0);for(let t of o)vS(t,e);let{left:i,top:a}=e.getBoundingClientRect();if(Math.abs(t-i)>1||Math.abs(n-a)>1)for(let e of o=r?vE(r,!0):[])vS(e,r,{block:"center",inline:"center"})}else{let{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:o,top:i}=e.getBoundingClientRect();(Math.abs(t-o)>1||Math.abs(n-i)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let vD=0,vP=new Map;function vk(e){let[t,r]=(0,dU.useState)();return mL(()=>{if(!e)return;let t=vP.get(e);if(t)r(t.element.id);else{let n=`react-aria-description-${vD++}`;r(n);let o=document.createElement("div");o.id=n,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},vP.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),vP.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class vC extends bv{fromJulianDay(e){let t=super.fromJulianDay(e);return new bB(this,by(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(vT(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(vT(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function vT(e){let[t,r]=bg(e.year+-543);return new bB(t,r,e.month,e.day)}function vj(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function vR(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-vj(e,r,1,1))/30),o=t+1-vj(e,r,n,1);return[r,n,o]}function vN(e){return Math.floor(e%4/3)}function vA(e,t){return t%13!=0?30:vN(e)+5}class vM{fromJulianDay(e){let[t,r,n]=vR(1723856,e),o="AM";return t<=0&&(o="AA",t+=5500),new bB(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),vj(1723856,t,e.month,e.day)}getDaysInMonth(e){return vA(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+vN(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class vI extends vM{fromJulianDay(e){let[t,r,n]=vR(1723856,e);return new bB(this,"AA",t+=5500,r,n)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class v$ extends vM{fromJulianDay(e){let[t,r,n]=vR(1824665,e),o="CE";return t<=0&&(o="BCE",t=1-t),new bB(this,o,t,r,n)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vj(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),vA(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let vL=765433;function vF(e){return 7>bp(7*e+1,19)}function vB(e){let t=Math.floor((235*e-234)/19),r=29*t+Math.floor((12084+13753*t)/25920);return 3>bp(3*(r+1),7)&&(r+=1),r}function vV(e){let t,r;return vB(e)+(t=vB(e-1),r=vB(e),vB(e+1)-r==356?2:+(r-t==382))}function vU(e){return vV(e+1)-vV(e)}function vW(e,t){if(t>=6&&!vF(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let r=function(e){let t=vU(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===r?30:29:3===t?0===r?29:30:6===t?30*!!vF(e):30}class vH{fromJulianDay(e){let t=e-347997,r=Math.floor((25920*t/vL*19+234)/235)+1,n=vV(r),o=Math.floor(t-n);for(;o<1;)o=Math.floor(t-(n=vV(--r)));let i=1,a=0;for(;a<o;)a+=vW(r,i),i++;let s=o-(a-=vW(r,--i));return new bB(this,r,i,s)}toJulianDay(e){let t=vV(e.year);for(let r=1;r<e.month;r++)t+=vW(e.year,r);return t+e.day+347997}getDaysInMonth(e){return vW(e.year,e.month)}getMonthsInYear(e){return vF(e.year)?13:12}getDaysInYear(e){return vU(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(vF(t.year)&&!vF(e.year)&&t.month>6?e.month--:!vF(t.year)&&vF(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class vK extends bv{fromJulianDay(e){let t,r,n,o=super.fromJulianDay(e),i=o.year-78,a=e-bh(o.era,o.year,1,1);if(a<80?(i--,a+=(t=bm(o.year-1)?31:30)+155+90+10):(t=bm(o.year)?31:30,a-=80),a<t)r=1,n=a+1;else{let e=a-t;e<155?(r=Math.floor(e/31)+2,n=e%31+1):(e-=155,r=Math.floor(e/30)+7,n=e%30+1)}return new bB(this,i,r,n)}toJulianDay(e){let t,r,[n,o]=bg(e.year+78);return(bm(o)?(t=31,r=bh(n,o,3,21)):(t=30,r=bh(n,o,3,22)),1===e.month)?r+e.day-1:(r+=t+31*Math.min(e.month-2,5),e.month>=8&&(r+=(e.month-7)*30),r+=e.day-1)}getDaysInMonth(e){return 1===e.month&&bm(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function vz(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function vG(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+vz(t,n,1,1)))/29.5)+1),i=r-vz(t,n,o,1)+1;return new bB(e,n,o,i)}function vq(e){return(14+11*e)%30<11}class vY{fromJulianDay(e){return vG(this,1948440,e)}toJulianDay(e){return vz(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&vq(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return vq(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class vZ extends vY{fromJulianDay(e){return vG(this,1948439,e)}toJulianDay(e){return vz(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function vJ(e){return 460322+l[e-1300]}function vX(e,t){return(u[e-1300]&1<<11-(t-1))==0?29:30}function vQ(e,t){let r=vJ(e);for(let n=1;n<t;n++)r+=vX(e,n);return r}function v0(e){return l[e+1-1300]-l[e-1300]}class v1 extends vY{constructor(){if(super(),this.identifier="islamic-umalqura",u||(u=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let r=1;r<=12;r++)e+=vX(t,r)}}}fromJulianDay(e){let t=e-1948440,r=vJ(1300),n=vJ(1600);if(t<r||t>n)return super.fromJulianDay(e);{let e=1299,r=1,n=1;for(;n>0;){n=t-vJ(++e)+1;let o=v0(e);if(n===o){r=12;break}if(n<o){let t=vX(e,r);for(r=1;n>t;)n-=t,t=vX(e,++r);break}}return new bB(this,e,r,t-vQ(e,r)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+vQ(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):vX(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):v0(e.year)}}let v2=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],v3=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],v4=[1867,1911,1925,1988,2018],v6=["meiji","taisho","showa","heisei","reiwa"];function v5(e){let t=v2.findIndex(([t,r,n])=>!!(e.year<t)||e.year===t&&!!(e.month<r)||e.year===t&&e.month===r&&!!(e.day<n));return -1===t?v2.length-1:0===t?0:t-1}function v8(e){let t=v4[v6.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new bB(e.year+t,e.month,e.day)}class v9 extends bv{fromJulianDay(e){let t=super.fromJulianDay(e),r=v5(t);return new bB(this,v6[r],t.year-v4[r],t.month,t.day)}toJulianDay(e){return super.toJulianDay(v8(e))}balanceDate(e){let t=v8(e),r=v5(t);v6[r]!==e.era&&(e.era=v6[r],e.year=t.year-v4[r]),this.constrainDate(e)}constrainDate(e){let t=v6.indexOf(e.era),r=v3[t];if(null!=r){let[n,o,i]=r,a=n-v4[t];e.year=Math.max(1,Math.min(a,e.year)),e.year===a&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(i,e.day)))}if(1===e.year&&t>=0){let[,r,n]=v2[t];e.month=Math.max(r,e.month),e.month===r&&(e.day=Math.max(n,e.day))}}getEras(){return v6}getYearsInEra(e){let t=v6.indexOf(e.era),r=v2[t],n=v2[t+1];if(null==n)return 9999-r[0]+1;let o=n[0]-r[0];return(e.month<n[1]||e.month===n[1]&&e.day<n[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(v8(e))}getMinimumMonthInYear(e){let t=v7(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=v7(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function v7(e){if(1===e.year)return v2[v6.indexOf(e.era)]}let we=[0,31,62,93,124,155,186,216,246,276,306,336];class wt{fromJulianDay(e){let t=e-1948320,r=1+Math.floor((33*t+3)/12053),n=t-(365*(r-1)+Math.floor((8*r+21)/33)),o=n<216?Math.floor(n/31):Math.floor((n-6)/30),i=n-we[o]+1;return new bB(this,r,o+1,i)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=we[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>bp(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function wr(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function wn(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class wo extends bv{fromJulianDay(e){let t=super.fromJulianDay(e),[r,n]=wn(by(t.era,t.year));return new bB(this,r,n,t.month,t.day)}toJulianDay(e){return super.toJulianDay(wi(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,r]=wn(wr(e));e.era=t,e.year=r}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(wi(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function wi(e){let[t,r]=bg(wr(e));return new bB(t,r,e.month,e.day)}function wa(e){switch(e){case"buddhist":return new vC;case"ethiopic":return new vM;case"ethioaa":return new vI;case"coptic":return new v$;case"hebrew":return new vH;case"indian":return new vK;case"islamic-civil":return new vY;case"islamic-tbla":return new vZ;case"islamic-umalqura":return new v1;case"japanese":return new v9;case"persian":return new wt;case"roc":return new wo;default:return new bv}}function ws(e,t,r){return null!=t&&0>e.compare(t)||null!=r&&e.compare(r)>0}function wu(e,t,r,n,o){let i={};for(let e in t)i[e]=Math.floor(t[e]/2),i[e]>0&&t[e]%2==0&&i[e]--;let a=wl(e,t,r).subtract(i);return wd(e,a,t,r,n,o)}function wl(e,t,r,n,o){let i=e;if(t.years)i=vn(e.subtract({months:e.month-1}));else t.months?i=vn(e):t.weeks&&(i=vi(e,r));return wd(e,i,t,r,n,o)}function wc(e,t,r,n,o){let i={...t};i.days?i.days--:i.weeks?i.weeks--:i.months?i.months--:i.years&&i.years--;let a=wl(e,t,r).subtract(i);return wd(e,a,t,r,n,o)}function wd(e,t,r,n,o,i){if(o&&e.compare(o)>=0){let e=vl(t,wl(bX(o),r,n));e&&(t=e)}if(i&&0>=e.compare(i)){let e=vu(t,wc(bX(i),r,n));e&&(t=e)}return t}function wf(e,t,r){if(t){let r=vl(e,bX(t));r&&(e=r)}if(r){let t=vu(e,bX(r));t&&(e=t)}return e}function wp(e,t,r){if(!r)return e;for(;e.compare(t)>=0&&r(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let wh="u">typeof document?dW().useInsertionEffect??dW().useLayoutEffect:()=>{};function wm(e,t,r){let[n,o]=(0,dU.useState)(e||t),i=(0,dU.useRef)(n),a=(0,dU.useRef)(void 0!==e),s=void 0!==e;(0,dU.useEffect)(()=>{a.current,a.current=s},[s]);let u=s?e:n;wh(()=>{i.current=u});let[,l]=(0,dU.useReducer)(()=>({}),{});return[u,(0,dU.useCallback)((e,...t)=>{let n="function"==typeof e?e(i.current):e;Object.is(i.current,n)||(i.current=n,o(n),l(),r?.(n,...t))},[r])]}function wy(e){let t=(0,dU.useMemo)(()=>new g8(e.locale),[e.locale]),r=(0,dU.useMemo)(()=>t.resolvedOptions(),[t]),{locale:n,createCalendar:o,visibleDuration:i={months:1},minValue:a,maxValue:s,selectionAlignment:u,isDateUnavailable:l,pageBehavior:c="visible",firstDayOfWeek:d}=e,f=(0,dU.useMemo)(()=>o(r.calendar),[o,r.calendar]),[p,h]=wm(e.value,e.defaultValue??null,e.onChange),m=(0,dU.useMemo)(()=>p?b0(bX(p),f):null,[p,f]),y=(0,dU.useMemo)(()=>p&&"timeZone"in p?p.timeZone:r.timeZone,[p,r.timeZone]),[g,b]=wm((0,dU.useMemo)(()=>e.focusedValue?wf(b0(bX(e.focusedValue),f),a,s):void 0,[e.focusedValue,f,a,s]),(0,dU.useMemo)(()=>wf(e.defaultFocusedValue?b0(bX(e.defaultFocusedValue),f):m||b0(b9(y),f),a,s),[e.defaultFocusedValue,m,y,f,a,s]),e.onFocusChange),[v,w]=(0,dU.useState)(()=>{switch(u){case"start":return wl(g,i,n,a,s);case"end":return wc(g,i,n,a,s);default:return wu(g,i,n,a,s)}}),[x,E]=(0,dU.useState)(e.autoFocus||!1),S=(0,dU.useMemo)(()=>{let e={...i};return e.days?e.days--:e.days=-1,v.add(e)},[v,i]),[O,D]=(0,dU.useState)(f);if(!b4(f,O)){let e=b0(g,f);w(wu(e,i,n,a,s)),b(e),D(f)}function P(e){b(e=wf(e,a,s))}function k(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void h(null);(e=wp(e=wf(e,a,s),v,l))&&(e=b0(e,p?.calendar||new bv),p&&"hour"in p?h(p.set(e)):h(e))}}ws(g,a,s)?b(wf(g,a,s)):0>g.compare(v)?w(wc(g,i,n,a,s)):g.compare(S)>0&&w(wl(g,i,n,a,s));let C=(0,dU.useMemo)(()=>!!m&&(!!(l&&l(m))||ws(m,a,s)),[m,l,a,s]),T=e.isInvalid||"invalid"===e.validationState||C,j=(0,dU.useMemo)(()=>"visible"===c?i:wg(i),[c,i]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:m,setValue:k,visibleRange:{start:v,end:S},minValue:a,maxValue:s,focusedDate:g,timeZone:y,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){P(e)},focusNextDay(){P(g.add({days:1}))},focusPreviousDay(){P(g.subtract({days:1}))},focusNextRow(){i.days?this.focusNextPage():(i.weeks||i.months||i.years)&&P(g.add({weeks:1}))},focusPreviousRow(){i.days?this.focusPreviousPage():(i.weeks||i.months||i.years)&&P(g.subtract({weeks:1}))},focusNextPage(){let e=v.add(j);b(wf(g.add(j),a,s)),w(wl(wd(g,e,j,n,a,s),j,n))},focusPreviousPage(){let e=v.subtract(j);b(wf(g.subtract(j),a,s)),w(wl(wd(g,e,j,n,a,s),j,n))},focusSectionStart(){i.days?P(v):i.weeks?P(vi(g,n)):(i.months||i.years)&&P(vn(g))},focusSectionEnd(){i.days?P(S):i.weeks?P(vi(g,n,void 0).add({days:6})):(i.months||i.years)&&P(vo(g))},focusNextSection(e){e||i.days?i.days?this.focusNextPage():i.weeks?P(g.add({months:1})):(i.months||i.years)&&P(g.add({years:1})):P(g.add(wg(i)))},focusPreviousSection(e){e||i.days?i.days?this.focusPreviousPage():i.weeks?P(g.subtract({months:1})):(i.months||i.years)&&P(g.subtract({years:1})):P(g.subtract(wg(i)))},selectFocusedDate(){l&&l(g)||k(g)},selectDate(e){k(e)},isFocused:x,setFocused:E,isInvalid:e=>ws(e,a,s),isSelected(e){return null!=m&&b2(e,m)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&g&&b2(e,g),isCellDisabled(t){return e.isDisabled||0>t.compare(v)||t.compare(S)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=v.subtract({days:1});return b2(e,v)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=S.add({days:1});return b2(e,S)||this.isInvalid(e)},getDatesInWeek(e,t=v){let r=t.add({weeks:e}),o=[],i=b5(r=vi(r,n,d),n,d);for(let e=0;e<i;e++)o.push(null);for(;o.length<7;){o.push(r);let e=r.add({days:1});if(b2(r,e))break;r=e}for(;o.length<7;)o.push(null);return o}}}function wg(e){let t={...e};for(let r in e)t[r]=1;return t}function wb(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:bX(e),end:bX(t)}):null}function wv(e,t){return(e=b0(e,t?.calendar||new bv),t&&"hour"in t)?t.set(e):e}function ww(e,t,r){let n=e.add({days:r});for(;(r<0?n.compare(t.visibleRange.start)>=0:0>=n.compare(t.visibleRange.end))&&!t.isCellUnavailable(n);)n=n.add({days:r});if(t.isCellUnavailable(n))return n.add({days:-r})}let w_=(0,dU.createContext)(null),wx=(0,dU.createContext)(null),wE=(0,dU.createContext)(null),wS=(0,dU.createContext)(null),wO=(0,dU.forwardRef)(function(e,t){[e,t]=m4(e,t,w_);let{locale:r}=g0(),n=wy({...e,locale:r,createCalendar:e.createCalendar||wa}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:u}=vg(e,n),l=m2({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-Calendar"});return dW().createElement("div",{...l,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},dW().createElement(m1,{values:[[gI,{slots:{previous:i,next:a}}],[gL,{"aria-hidden":!0,level:2,children:u}],[wE,n],[w_,e],[gF,{slots:{errorMessage:s}}]]},dW().createElement(vv,null,dW().createElement("h2",null,o["aria-label"])),l.children,dW().createElement(vv,null,dW().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),wD=(0,dU.forwardRef)(function(e,t){[e,t]=m4(e,t,wx);let{locale:r}=g0(),n=function(e){let{value:t,defaultValue:r,onChange:n,createCalendar:o,locale:i,visibleDuration:a={months:1},minValue:s,maxValue:u,...l}=e,[c,d]=wm(t,r||null,n),[f,p]=(0,dU.useState)(null),h="center";if(c&&c.start&&c.end){let e=wu(bX(c.start),a,i,s,u).add(a).subtract({days:1});c.end.compare(e)>0&&(h="start")}let m=(0,dU.useRef)(null),[y,g]=(0,dU.useState)(null),b=(0,dU.useMemo)(()=>vl(s,y?.start),[s,y]),v=(0,dU.useMemo)(()=>vu(u,y?.end),[u,y]),w=wy({...l,value:c&&c.start,createCalendar:o,locale:i,visibleDuration:a,minValue:b,maxValue:v,selectionAlignment:e.selectionAlignment||h}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:ww(t,w,-1),end:ww(t,w,1)},g(m.current)):(m.current=null,g(null))},[E,S]=(0,dU.useState)(w.visibleRange);b3(w.visibleRange.start,E.start)&&b3(w.visibleRange.end,E.end)||(x(f),S(w.visibleRange));let O=e=>{e?(p(e),x(e)):(p(null),x(null))},D=f?wb(f,w.focusedDate):c&&wb(c.start,c.end),P=t=>{if(e.isReadOnly)return;let r=wp(wf(t,b,v),w.visibleRange.start,e.isDateUnavailable);if(r)if(f){let e=wb(f,r);e&&d({start:wv(e.start,c?.start),end:wv(e.end,c?.end)}),O(null)}else O(r)},[k,C]=(0,dU.useState)(!1),{isDateUnavailable:T}=e,j=(0,dU.useMemo)(()=>!!c&&!f&&(!!(T&&(T(c.start)||T(c.end)))||ws(c.start,s,u)||ws(c.end,s,u)),[T,c,f,s,u]),R=e.isInvalid||"invalid"===e.validationState||j;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:O,highlightedRange:D,validationState:R?"invalid":null,isValueInvalid:R,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(e){f&&w.setFocusedDate(e)},isSelected:e=>!!(D&&e.compare(D.start)>=0&&0>=e.compare(D.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||ws(e,m.current?.start,m.current?.end),isDragging:k,setDragging:C,clearSelection(){O(null),d(null)}}}({...e,locale:r,createCalendar:e.createCalendar||wa}),{calendarProps:o,prevButtonProps:i,nextButtonProps:a,errorMessageProps:s,title:u}=function(e,t,r){let{commitBehavior:n="select",...o}=e,i=vg(o,t),a=(0,dU.useRef)(!1),s=(0,dU.useRef)("u">typeof window?window:null);vw(s,"pointerdown",e=>{a.current=0===e.width&&0===e.height});let u={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return vw(s,"pointerup",e=>{if(a.current){a.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let o=e.target;r.current&&yh(r.current)&&(!yf(r.current,o)||!o.closest('button, [role="button"]'))&&u[n]()}),i.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&yf(r.current,e.relatedTarget)||!t.anchorDate||u[n]())},vw(r,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),i}(e,n,t),l=m2({...e,values:{state:n,isDisabled:e.isDisabled||!1,isInvalid:n.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return dW().createElement("div",{...l,...o,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":n.isValueInvalid||void 0},dW().createElement(m1,{values:[[gI,{slots:{previous:i,next:a}}],[gL,{"aria-hidden":!0,level:2,children:u}],[wS,n],[wx,e],[gF,{slots:{errorMessage:s}}]]},dW().createElement(vv,null,dW().createElement("h2",null,o["aria-label"])),l.children,dW().createElement(vv,null,dW().createElement("button",{"aria-label":a["aria-label"],disabled:a.isDisabled,onClick:()=>n.focusNextPage(),tabIndex:-1}))))}),wP=(0,dU.createContext)(null),wk=(0,dU.forwardRef)(function(e,t){var r,n;let o=(0,dU.useContext)(wE),i=(0,dU.useContext)(wS),a=m3(w_),s=m3(wx),u=null!=o?o:i,l=u.visibleRange.start;e.offset&&(l=l.add(e.offset));let c=null!=(r=null==a?void 0:a.firstDayOfWeek)?r:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:f,weekDays:p,weeksInMonth:h}=function(e,t){let r,{startDate:n=t.visibleRange.start,endDate:o=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=g0(),s=vp(n,o,t.timeZone,!0),{ariaLabel:u,ariaLabelledBy:l}=vd.get(t),c=vm({"aria-label":[u,s].filter(Boolean).join(", "),"aria-labelledby":l}),d=br({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:f}=g0(),p=(0,dU.useMemo)(()=>{let e=vi(b9(t.timeZone),f,i);return[...Array(7).keys()].map(r=>{let n=e.add({days:r}).toDate(t.timeZone);return d.format(n)})},[f,t.timeZone,d,i]),h=(r=n.calendar.getDaysInMonth(n),Math.ceil((b5(vn(n),f,i)+r)/7));return{gridProps:mQ(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===a?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:p,weeksInMonth:h}}({startDate:l,endDate:vo(l),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},u);return dW().createElement(wP.Provider,{value:{headerProps:f,weekDays:p,startDate:l,weeksInMonth:h}},dW().createElement("table",{...ys(e),...d,ref:t,style:e.style,className:null!=(n=e.className)?n:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:dW().createElement(dW().Fragment,null,dW().createElement(wC,null,e=>dW().createElement(wT,null,e)),dW().createElement(wj,null,e.children))))}),wC=(0,dU.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,{headerProps:i,weekDays:a}=(0,dU.useContext)(wP);return dW().createElement("thead",{...ys(e),...i,ref:t,style:n,className:o||"react-aria-CalendarGridHeader"},dW().createElement("tr",null,a.map((e,t)=>dW().cloneElement(r(e),{key:t}))))}),wT=(0,dU.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e;return dW().createElement("th",{...ys(e),ref:t,style:n,className:o||"react-aria-CalendarHeaderCell"},r)}),wj=(0,dU.forwardRef)(function(e,t){let{children:r,style:n,className:o}=e,i=(0,dU.useContext)(wE),a=(0,dU.useContext)(wS),s=null!=i?i:a,{startDate:u,weeksInMonth:l}=(0,dU.useContext)(wP);return dW().createElement("tbody",{...ys(e),ref:t,style:n,className:o||"react-aria-CalendarGridBody"},[...Array(l).keys()].map(e=>dW().createElement("tr",{key:e},s.getDatesInWeek(e,u).map((e,t)=>e?dW().cloneElement(r(e),{key:t}):dW().createElement("td",{key:t})))))}),wR=(0,dU.forwardRef)(function({date:e,...t},r){var n,o,i;let a=(0,dU.useContext)(wE),s=(0,dU.useContext)(wS),u=null!=a?a:s,{startDate:l}=null!=(n=(0,dU.useContext)(wP))?n:{startDate:u.visibleRange.start},c=(0,dU.useRef)(null),{cellProps:d,buttonProps:f,...p}=function(e,t,r){var n;let o,{date:i,isDisabled:a}=e,{errorMessageId:s,selectedDateDescription:u}=vd.get(t),l=bf((n=g4)&&n.__esModule?n.default:n,"@react-aria/calendar"),c=br({weekday:"long",day:"numeric",month:"long",year:"numeric",era:vf(i),timeZone:t.timeZone}),d=t.isSelected(i),f=t.isCellFocused(i)&&!e.isOutsideMonth;a=a||t.isCellDisabled(i);let p=t.isCellUnavailable(i),h=!a&&!p,m=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&i.compare(t.highlightedRange.start)>=0&&0>=i.compare(t.highlightedRange.end):t.value&&b2(t.value,i));m&&(d=!0),i=g6(i,b3);let y=(0,dU.useMemo)(()=>i.toDate(t.timeZone),[i,t.timeZone]),g=b2(i,b9(t.timeZone)),b=(0,dU.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(b2(i,t.value.start)||b2(i,t.value.end))&&(e=u+", "),e+=c.format(y),g?e=l.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=l.format("dateSelected",{date:e})),t.minValue&&b2(i,t.minValue)?e+=", "+l.format("minimumDate"):t.maxValue&&b2(i,t.maxValue)&&(e+=", "+l.format("maximumDate")),e},[c,y,l,d,g,i,t,u]),v="";"anchorDate"in t&&f&&!t.isReadOnly&&h&&(v=t.anchorDate?l.format("finishRangeSelectionPrompt"):l.format("startRangeSelectionPrompt"));let w=vk(v),x=(0,dU.useRef)(!1),E=(0,dU.useRef)(!1),S=(0,dU.useRef)(void 0),{pressProps:O,isPressed:D}=gv({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!h||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(i),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!m){if(b2(i,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}else if(b2(i,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(i),t.setFocused(!0),t.setDragging(!0),E.current=!0;return}}let r=()=>{t.setDragging(!0),S.current=void 0,t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?S.current=setTimeout(r,200):r()}},onPressEnd(){E.current=!1,x.current=!1,clearTimeout(S.current),S.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&S.current&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0)),"anchorDate"in t))if(E.current)t.setAnchorDate(i);else if(t.anchorDate&&!x.current)t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(i),t.setFocusedDate(i),t.setFocused(!0));else{t.selectDate(i);let e=i.add({days:1});t.isInvalid(e)&&(e=i.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});a||(o=b2(i,t.focusedDate)?0:-1),(0,dU.useEffect)(()=>{f&&r.current&&(yu(r.current),"pointer"!==yB&&((e=document)=>e.activeElement)()===r.current&&vO(r.current,{containingElement:vx(r.current)}))},[f,r]);let P=br({day:"numeric",timeZone:t.timeZone,calendar:i.calendar.identifier}),k=(0,dU.useMemo)(()=>P.formatToParts(y).find(e=>"day"===e.type).value,[P,y]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":d||void 0,"aria-invalid":m||void 0},buttonProps:mQ(O,{onFocus(){a||(t.setFocusedDate(i),t.setFocused(!0))},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&h&&t.highlightDate(i)},onPointerDown(e){let t=yp(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:D,isFocused:f,isSelected:d,isDisabled:a,isUnavailable:p,isOutsideVisibleRange:0>i.compare(t.visibleRange.start)||i.compare(t.visibleRange.end)>0,isInvalid:m,formattedDate:k}}({date:e},u,c),{hoverProps:h,isHovered:m}=gR({...t,isDisabled:p.isDisabled}),{focusProps:y,isFocusVisible:g}=gP();g&&(g=p.isFocused);let b=(o=l,i=b0(i=e,o.calendar),o=vn(o),i=vn(i),o.era!==i.era||o.year!==i.year||o.month!==i.month),v=!1,w=!1;"highlightedRange"in u&&u.highlightedRange&&(v=b2(e,u.highlightedRange.start),w=b2(e,u.highlightedRange.end));let x=m2({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:g,isSelectionStart:v,isSelectionEnd:w,...p}}),E={"data-focused":p.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return dW().createElement("td",{...d,ref:r},dW().createElement("div",{...mQ(ys(t),f,y,h,E,x),ref:c}))}),wN=(0,dU.createContext)({}),wA=(0,dU.forwardRef)(function(e,t){var r,n;[e,t]=m4(e,t,wN);let{isDisabled:o,isInvalid:i,onHoverStart:a,onHoverChange:s,onHoverEnd:u,...l}=e,{hoverProps:c,isHovered:d}=gR({onHoverStart:a,onHoverChange:s,onHoverEnd:u,isDisabled:o}),{isFocused:f,isFocusVisible:p,focusProps:h}=gP({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=i||(i=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=m2({...e,values:{isHovered:d,isFocusWithin:f,isFocusVisible:p,isDisabled:o,isInvalid:i},defaultClassName:"react-aria-Group"});return dW().createElement("div",{...mQ(l,h,c),...m,ref:t,role:null!=(r=e.role)?r:"group",slot:null!=(n=e.slot)?n:void 0,"data-focus-within":f||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":o||void 0,"data-invalid":i||void 0},m.children)}),wM=(0,dU.createContext)({}),wI=gA(function(e,t){[e,t]=m4(e,t,wM);let{hoverProps:r,isHovered:n}=gR(e),{isFocused:o,isFocusVisible:i,focusProps:a}=gP({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],u=m2({...e,values:{isHovered:n,isFocused:o,isFocusVisible:i,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return dW().createElement("input",{...mQ((e=>{let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,...o}=e;return o})(e),a,r),...u,ref:t,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":n||void 0,"data-focus-visible":i||void 0,"data-invalid":s||void 0})});function w$(e,t,r,n){return e.createTreeWalker(t,r,n)}let wL=dW().createContext(null),wF="react-aria-focus-scope-restore",wB=null;function wV(e){var t,r,n,o,i,a,s,u,l,c;let d,f,p,h,{children:m,contain:y,restoreFocus:g,autoFocus:b}=e,v=(0,dU.useRef)(null),w=(0,dU.useRef)(null),x=(0,dU.useRef)([]),{parentNode:E}=(0,dU.useContext)(wL)||{},S=(0,dU.useMemo)(()=>new w2({scopeRef:x}),[x]);mL(()=>{let e=E||w3.root;if(w3.getTreeNode(e.scopeRef)&&wB&&!wz(wB,e.scopeRef)){let t=w3.getTreeNode(wB);t&&(e=t)}e.addChild(S),w3.addNode(S)},[S,E]),mL(()=>{let e=w3.getTreeNode(x);e&&(e.contain=!!y)},[y]),mL(()=>{let e=v.current?.nextSibling,t=[],r=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(wF,r),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(wF,r)}},[m]),mL(()=>{if(r||n)return;let e=t.current,o=yc(e?e[0]:void 0),i=e=>{let r=yp(e);wH(r,t.current)?wB=t:wK(r)||(wB=null)};return o.addEventListener("focusin",i,!1),e?.forEach(e=>e.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),e?.forEach(e=>e.removeEventListener("focusin",i,!1))}},[t=x,r=g,n=y]),o=x,i=y,d=(0,dU.useRef)(void 0),f=(0,dU.useRef)(void 0),mL(()=>{let e=o.current;if(!i){f.current&&(cancelAnimationFrame(f.current),f.current=void 0);return}let t=yc(e?e[0]:void 0),r=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!wW(o)||e.isComposing)return;let r=((e=document)=>e.activeElement)(t),n=o.current;if(!n||!wH(r,n))return;let i=wX(wU(n),{tabbable:!0},n);if(!r)return;i.currentNode=r;let a=e.shiftKey?i.previousNode():i.nextNode();a||(i.currentNode=e.shiftKey?n[n.length-1].nextElementSibling:n[0].previousElementSibling,a=e.shiftKey?i.previousNode():i.nextNode()),e.preventDefault(),a&&(wG(a,!0),a instanceof yd(a).HTMLInputElement&&a.select())},n=e=>{(!wB||wz(wB,o))&&wH(yp(e),o.current)?(wB=o,d.current=yp(e)):wW(o)&&!wK(yp(e),o)?d.current?d.current.focus():wB&&wB.current&&wY(wB.current):wW(o)&&(d.current=yp(e))},a=e=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{let r=yB,n=("virtual"===r||null===r)&&yI()&&yM(),i=((e=document)=>e.activeElement)(t);if(!n&&i&&wW(o)&&!wK(i,o)){wB=o;let t=yp(e);t&&t.isConnected?(d.current=t,d.current?.focus()):wB.current&&wY(wB.current)}})};return t.addEventListener("keydown",r,!1),t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),e?.forEach(e=>e.addEventListener("focusout",a,!1)),()=>{t.removeEventListener("keydown",r,!1),t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1)),e?.forEach(e=>e.removeEventListener("focusout",a,!1))}},[o,i]),mL(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[f]),a=x,s=g,u=y,p=(0,dU.useRef)("u">typeof document?((e=document)=>e.activeElement)(yc(a.current?a.current[0]:void 0)):null),mL(()=>{let e=a.current,t=yc(e?e[0]:void 0);if(!s||u)return;let r=()=>{(!wB||wz(wB,a))&&wH(((e=document)=>e.activeElement)(t),a.current)&&(wB=a)};return t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),()=>{t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1))}},[a,u]),mL(()=>{let e=yc(a.current?a.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!wW(a)||t.isComposing)return;let r=e.activeElement;if(!wK(r,a)||!wZ(a))return;let n=w3.getTreeNode(a);if(!n)return;let o=n.nodeToRestore,i=wX(e.body,{tabbable:!0});i.currentNode=r;let s=t.shiftKey?i.previousNode():i.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,n.nodeToRestore=void 0),(!s||!wK(s,a))&&o){i.currentNode=o;do s=t.shiftKey?i.previousNode():i.nextNode();while(wK(s,a));(t.preventDefault(),t.stopPropagation(),s)?wG(s,!0):wK(o)?wG(o,!0):r.blur()}};return u||e.addEventListener("keydown",t,!0),()=>{u||e.removeEventListener("keydown",t,!0)}},[a,s,u]),mL(()=>{let e=yc(a.current?a.current[0]:void 0);if(!s)return;let t=w3.getTreeNode(a);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=w3.getTreeNode(a);if(!t)return;let r=t.nodeToRestore,n=((e=document)=>e.activeElement)(e);if(s&&r&&(n&&wK(n,a)||n===e.body&&wZ(a))){let t=w3.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(a);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void wJ(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(a);e;){if(e.scopeRef&&e.scopeRef.current&&w3.getTreeNode(e.scopeRef))return void wJ(wq(e.scopeRef.current,!0));e=e.parent}}})}}},[a,s]),l=x,c=b,h=dW().useRef(c),(0,dU.useEffect)(()=>{h.current&&(wB=l,!wH(((e=document)=>e.activeElement)(yc(l.current?l.current[0]:void 0)),wB.current)&&l.current&&wY(l.current)),h.current=!1},[l]),(0,dU.useEffect)(()=>{let e=((e=document)=>e.activeElement)(yc(x.current?x.current[0]:void 0)),t=null;if(wH(e,x.current)){for(let r of w3.traverse())r.scopeRef&&wH(e,r.scopeRef.current)&&(t=r);t===w3.getTreeNode(x)&&(wB=t.scopeRef)}},[x]),mL(()=>()=>{let e=w3.getTreeNode(x)?.parent?.scopeRef??null;(x===wB||wz(x,wB))&&(!e||w3.getTreeNode(e))&&(wB=e),w3.removeTreeNode(x)},[x]);let O=(0,dU.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(yc(r[0]??void 0)),u=r[0].previousElementSibling,l=wX(wU(r),{tabbable:o,accept:a},r);l.currentNode=wH(s,r)?s:u;let c=l.nextNode();return!c&&i&&(l.currentNode=u,c=l.nextNode()),c&&wG(c,!0),c},focusPrevious(t={}){let r=e.current,{from:n,tabbable:o,wrap:i,accept:a}=t,s=n||((e=document)=>e.activeElement)(yc(r[0]??void 0)),u=r[r.length-1].nextElementSibling,l=wX(wU(r),{tabbable:o,accept:a},r);l.currentNode=wH(s,r)?s:u;let c=l.previousNode();return!c&&i&&(l.currentNode=u,c=l.previousNode()),c&&wG(c,!0),c},focusFirst(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=wX(wU(r),{tabbable:n,accept:o},r);i.currentNode=r[0].previousElementSibling;let a=i.nextNode();return a&&wG(a,!0),a},focusLast(t={}){let r=e.current,{tabbable:n,accept:o}=t,i=wX(wU(r),{tabbable:n,accept:o},r);i.currentNode=r[r.length-1].nextElementSibling;let a=i.previousNode();return a&&wG(a,!0),a}}},[]),D=(0,dU.useMemo)(()=>({focusManager:O,parentNode:S}),[S,O]);return dW().createElement(wL.Provider,{value:D},dW().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,dW().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function wU(e){return e[0].parentElement}function wW(e){let t=w3.getTreeNode(wB);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function wH(e,t){return!!e&&!!t&&t.some(t=>yf(t,e))}function wK(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of w3.traverse(w3.getTreeNode(t)))if(r&&wH(e,r.current))return!0;return!1}function wz(e,t){let r=w3.getTreeNode(t)?.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function wG(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{y5(e)}catch{}}function wq(e,t=!0){let r=e[0].previousElementSibling,n=wU(e),o=wX(n,{tabbable:t},e);o.currentNode=r;let i=o.nextNode();return t&&!i&&((o=wX(n=wU(e),{tabbable:!1},e)).currentNode=r,i=o.nextNode()),i}function wY(e,t=!0){wG(wq(e,t))}function wZ(e){let t=w3.getTreeNode(wB);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function wJ(e){e.dispatchEvent(new CustomEvent(wF,{bubbles:!0,cancelable:!0}))&&wG(e)}function wX(e,t,r){let n=t?.tabbable?y_:yw,o=yc(e?.nodeType===Node.ELEMENT_NODE?e:null),i=w$(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>yf(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(yc(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),r=yd(e);return t instanceof r.RadioNodeList?Array.from(t).filter(e=>e instanceof r.HTMLInputElement):t instanceof r.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===i.currentNode.tagName&&"radio"===i.currentNode.type&&i.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:n(e)&&(!r||wH(e,r))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(i.currentNode=t.from),i}function wQ(e,t={}){return{focusNext(r={}){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,u=o||((e=document)=>e.activeElement)(yc(n)),l=wX(n,{tabbable:i,accept:s});yf(n,u)&&(l.currentNode=u);let c=l.nextNode();return!c&&a&&(l.currentNode=n,c=l.nextNode()),c&&wG(c,!0),c},focusPrevious(r=t){let n=e.current;if(!n)return null;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=r,u=o||((e=document)=>e.activeElement)(yc(n)),l=wX(n,{tabbable:i,accept:s});if(yf(n,u))l.currentNode=u;else{let e=w0(l);return e&&wG(e,!0),e??null}let c=l.previousNode();if(!c&&a){l.currentNode=n;let e=w0(l);if(!e)return null;c=e}return c&&wG(c,!0),c??null},focusFirst(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=wX(n,{tabbable:o,accept:i}).nextNode();return a&&wG(a,!0),a},focusLast(r=t){let n=e.current;if(!n)return null;let{tabbable:o=t.tabbable,accept:i=t.accept}=r,a=w0(wX(n,{tabbable:o,accept:i}));return a&&wG(a,!0),a??null}}}function w0(e){let t,r;do(t=e.lastChild())&&(r=t);while(t);return r}class w1{constructor(){this.fastMap=new Map,this.root=new w2({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,r){let n=this.fastMap.get(t??null);if(!n)return;let o=new w2({scopeRef:e});n.addChild(o),o.parent=n,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let r=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&wH(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let n=t.children;r&&(r.removeChild(t),n.size>0&&n.forEach(e=>r&&r.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new w1;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class w2{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let w3=new w1;var w4={};function w6(e,t,r){let{direction:n}=g0(),o=(0,dU.useMemo)(()=>wQ(t),[t]),i=()=>{if(!t.current)return;let e=window.event?yp(window.event):null,r=wX(t.current,{tabbable:!0});if(e&&(r.currentNode=e,e=r.previousNode()),!e){let t;do(t=r.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=r.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:a}=gv({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&i()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&i()}});return mQ(a,{onKeyDown:i=>{if(yf(i.currentTarget,yp(i))&&(i.altKey&&("ArrowDown"===i.key||"ArrowUp"===i.key)&&"setOpen"in e&&(i.preventDefault(),i.stopPropagation(),e.setOpen(!0)),!r))switch(i.key){case"ArrowLeft":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=yp(i),r=w5(t.current,e.getBoundingClientRect().left,-1);r&&r.focus()}}else o.focusPrevious();break;case"ArrowRight":if(i.preventDefault(),i.stopPropagation(),"rtl"===n){if(t.current){let e=yp(i),r=w5(t.current,e.getBoundingClientRect().left,1);r&&r.focus()}}else o.focusNext()}}})}function w5(e,t,r){let n=wX(e,{tabbable:!0}),o=n.nextNode(),i=null,a=1/0;for(;o;){let e=o.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===r&&s<a&&(i=o,a=s),o=n.nextNode()}return i}function w8(e){let{description:t,errorMessage:r,isInvalid:n,validationState:o}=e,{labelProps:i,fieldProps:a}=function(e){let{id:t,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=e;t=mZ(t);let a=mZ(),s={};return r&&(n=n?`${a} ${n}`:a,s={id:a,htmlFor:"label"===i?t:void 0}),{labelProps:s,fieldProps:vm({id:t,"aria-label":o,"aria-labelledby":n})}}(e),s=mJ([!!t,!!r,n,o]),u=mJ([!!t,!!r,n,o]);return{labelProps:i,fieldProps:a=mQ(a,{"aria-describedby":[s,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:u}}}function w9(e,t,r){let n=gd(e=>{r&&!e.defaultPrevented&&r(t)});(0,dU.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",n),()=>{t?.removeEventListener("reset",n)}},[e])}function w7(e,t,r){let{validationBehavior:n,focus:o}=e;mL(()=>{if("native"===n&&r?.current&&!r.current.disabled){var e;let n,o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(o),r.current.hasAttribute("title")||(r.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=r.current).validity.valid,validationDetails:{badInput:(n=e.validity).badInput,customError:n.customError,patternMismatch:n.patternMismatch,rangeOverflow:n.rangeOverflow,rangeUnderflow:n.rangeUnderflow,stepMismatch:n.stepMismatch,tooLong:n.tooLong,tooShort:n.tooShort,typeMismatch:n.typeMismatch,valueMissing:n.valueMissing,valid:n.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let i=(0,dU.useRef)(!1),a=gd(()=>{i.current||t.resetValidation()}),s=gd(e=>{t.displayValidation.isInvalid||t.commitValidation();let n=r?.current?.form;!e.defaultPrevented&&r&&n&&function(e){for(let t=0;t<e.elements.length;t++){let r=e.elements[t];if(r.validity?.valid===!1)return r}return null}(n)===r.current&&(o?o():r.current?.focus(),yB="keyboard",yz("keyboard",null));e.preventDefault()}),u=gd(()=>{t.commitValidation()});(0,dU.useEffect)(()=>{let e=r?.current;if(!e)return;let t=e.form,n=t?.reset;return t&&(t.reset=()=>{i.current=!window.event||"message"===window.event.type&&yp(window.event)instanceof MessagePort,n?.call(t),i.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",u),t?.addEventListener("reset",a),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",u),t?.removeEventListener("reset",a),t&&(t.reset=n)}},[r,n])}w4={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let _e=new WeakMap,_t="__reactAriaDateFieldRole",_r="__reactAriaDateFieldFocusManager";function _n(e,t,r){var n;let o,{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:u,fieldProps:l,descriptionProps:c,errorMessageProps:d}=w8({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=(0,dU.useRef)(null),{focusWithinProps:p}=gD({...e,onFocusWithin(r){f.current=t.value,e.onFocus?.(r)},onBlurWithin:r=>{t.confirmPlaceholder(),t.value!==f.current&&t.commitValidation(),e.onBlur?.(r)},onFocusWithinChange:e.onFocusChange}),h=bf((n=w4)&&n.__esModule?n.default:n,"@react-aria/datepicker"),m="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===t.maxGranularity?"time":"date",g=vk(t.value?h.format(m,{[y]:t.formatValue({month:"long"})}):""),b="presentation"===e[_t]?l["aria-describedby"]:[g["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,v=e[_r],w=(0,dU.useMemo)(()=>v||wQ(r),[v,r]),x=w6(t,r,"presentation"===e[_t]);_e.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[u.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:b,focusManager:w});let E=(0,dU.useRef)(e.autoFocus);o="presentation"===e[_t]?{role:"presentation"}:mQ(l,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":b}),(0,dU.useEffect)(()=>{E.current&&w.focusFirst(),E.current=!1},[w]),w9(e.inputRef,t.defaultValue,t.setValue),w7({...e,focus(){w.focusFirst()}},t,e.inputRef);let S={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(S.type="text",S.hidden=!0,S.required=e.isRequired,S.onChange=()=>{});let O=ys(e);return{labelProps:{...u,onClick:()=>{w.focusFirst()}},fieldProps:mQ(O,o,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:S,descriptionProps:c,errorMessageProps:d,isInvalid:i,validationErrors:a,validationDetails:s}}var _o={};_o={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let _i={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},_a={..._i,customError:!0,valid:!1},_s={isInvalid:!1,validationDetails:_i,validationErrors:[]},_u=(0,dU.createContext)({}),_l="__reactAriaFormValidationState";function _c(e){if(e[_l]){let{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=e[_l];return{realtimeValidation:t,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return function(e){let{isInvalid:t,validationState:r,name:n,value:o,builtinValidation:i,validate:a,validationBehavior:s="aria"}=e;r&&(t||="invalid"===r);let u=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:_a}:null,l=(0,dU.useMemo)(()=>a&&null!=o?_f(function(e,t){if("function"==typeof e){let r=e(t);if(r&&"boolean"!=typeof r)return _d(r)}return[]}(a,o)):null,[a,o]);i?.validationDetails.valid&&(i=void 0);let c=(0,dU.useContext)(_u),d=(0,dU.useMemo)(()=>n?Array.isArray(n)?n.flatMap(e=>_d(c[e])):_d(c[n]):[],[c,n]),[f,p]=(0,dU.useState)(c),[h,m]=(0,dU.useState)(!1);c!==f&&(p(c),m(!1));let y=(0,dU.useMemo)(()=>_f(h?[]:d),[h,d]),g=(0,dU.useRef)(_s),[b,v]=(0,dU.useState)(_s),w=(0,dU.useRef)(_s),[x,E]=(0,dU.useState)(!1);return(0,dU.useEffect)(()=>{if(!x)return;E(!1);let e=l||i||g.current;_p(e,w.current)||(w.current=e,v(e))}),{realtimeValidation:u||y||l||i||_s,displayValidation:"native"===s?u||y||b:u||y||l||i||b,updateValidation(e){"aria"!==s||_p(b,e)?g.current=e:v(e)},resetValidation(){_p(_s,w.current)||(w.current=_s,v(_s)),"native"===s&&E(!1),m(!0)},commitValidation(){"native"===s&&E(!0),m(!0)}}}(e)}function _d(e){return e?Array.isArray(e)?e:[e]:[]}function _f(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:_a}:null}function _p(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,r)=>e===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([e,r])=>t.validationDetails[e]===r)}function _h(...e){let t=new Set,r=!1,n={..._i};for(let o of e){for(let e of o.validationErrors)t.add(e);for(let e in r||=o.isInvalid,n)n[e]||=o.validationDetails[e]}return n.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:n}}let _m=new ba((er=_o)&&er.__esModule?er.default:er);function _y(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function _g(e,t,r,n,o){let i=null!=e&&null!=r&&e.compare(r)>0,a=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&n?.(e)||!1,u=i||a||s,l=[];if(u){let e=_y(),n=new bl(e,ba.getGlobalDictionaryForPackage("@react-stately/datepicker")||_m),u=new g8(e,_w({},o)),c=u.resolvedOptions().timeZone;a&&null!=t&&l.push(n.format("rangeUnderflow",{minValue:u.format(t.toDate(c))})),i&&null!=r&&l.push(n.format("rangeOverflow",{maxValue:u.format(r.toDate(c))})),s&&l.push(n.format("unavailableDate"))}return{isInvalid:u,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:a,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!u}}}let _b={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},_v={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function _w(e,t){e={...t.shouldForceLeadingZeros?_v:_b,...e};let r=t.granularity||"minute",n=Object.keys(e),o=n.indexOf(t.maxGranularity??"year");o<0&&(o=0);let i=n.indexOf(r);if(i<0&&(i=2),o>i)throw Error("maxGranularity must be greater than granularity");let a=n.slice(o,i+1).reduce((t,r)=>(t[r]=e[r],t),{});return null!=t.hourCycle&&(a.hour12=12===t.hourCycle),a.timeZone=t.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&t.timeZone&&!t.hideTimeZone&&(a.timeZoneName="short"),t.showEra&&0===o&&(a.era="short"),a}function __(e){return e&&"hour"in e?e:new bV}function _x(e,t){return null===e?null:e?b0(e,t):void 0}function _E(e,t){let r=e&&"timeZone"in e?e.timeZone:void 0,n=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[o,i]=(0,dU.useState)([n,r]);return e&&(o[0]!==n||o[1]!==r)&&i([n,r]),t||(t=e?n:o[0]),[t,e?r:o[1]]}let _S=new ba({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class _O{constructor(e,t,r){if(this.era=r?.era??null,this.calendar=e,this.year=r?.year??null,this.month=r?.month??null,this.day=r?.day??null,this.hour=r?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=r?.minute??null,this.second=r?.second??null,this.millisecond=r?.millisecond??null,this.offset="offset"in(r??{})?r.offset:null,null!=this.hour){let[e,r]=_P(this.hour,t);this.dayPeriod=e,this.hour=r}}copy(){let e=new _O(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,r]=_P(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===r}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,r){let n=this.copy();return n[e]=t,"hour"===e&&null==n.dayPeriod&&"hour"in r&&(n.dayPeriod=_P(r.hour,this.hourCycle)[0]),"year"===e&&null==n.era&&(n.era=r.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(n.offset=null),n}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,r,n){let o=this.copy();if(null==o[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in r){let[e,t]=_P(r.hour,this.hourCycle);o.dayPeriod=e,o.hour=t}else o[e]=r[e];return"year"===e&&null==o.era&&(o.era=r.era),o}switch(e){case"era":{let e=this.calendar.getEras(),r=e.indexOf(o.era);r=_D(r,t,0,e.length-1),o.era=e[r];break}case"year":{let n=new bB(this.calendar,this.era??r.era,this.year??r.year,this.month??1,this.day??1);o.era=(n=n.cycle(e,t,{round:"year"===e})).era,o.year=n.year;break}case"month":o.month=_D(o.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":o.day=_D(o.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=n.some(e=>["year","month","day"].includes(e));if("timeZone"in r&&(!e||null!=o.year&&null!=o.month&&null!=o.day)){let e=this.toValue(r),[n,i]=_P((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);o.hour=i,o.dayPeriod=n,o.offset=e.offset}else{let e=o.hour??0,n=this.getSegmentLimits("hour");o.hour=_D(e,t,n.minValue,n.maxValue),null==o.dayPeriod&&"hour"in r&&(o.dayPeriod=_P(r.hour,this.hourCycle)[0])}break}case"dayPeriod":o.dayPeriod=_D(o.dayPeriod??0,t,0,1);break;case"minute":o.minute=_D(o.minute??0,t,0,59,!0);break;case"second":o.second=_D(o.second??0,t,0,59,!0)}return o}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,r){switch(r){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let r=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in r&&null!=this.offset&&r.offset!==this.offset&&(r=r.add({milliseconds:r.offset-this.offset})),r}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function _D(e,t,r,n,o=!1){if(o){(e+=Math.sign(t))<r&&(e=n);let o=Math.abs(t);(e=t>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>n&&(e=r)}else(e+=t)<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function _P(e,t){let r=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":r=null;break;case"h24":e+=1,r=null}return[r,e]}var _k=r(9381);let _C={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},_T={year:5,month:2,day:7,hour:2,minute:15,second:15},_j={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function _R(e){let{locale:t,createCalendar:r,hideTimeZone:n,isDisabled:o=!1,isReadOnly:i=!1,isRequired:a=!1,minValue:s,maxValue:u,isDateUnavailable:l}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=_E(c,e.granularity),p=f||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[h,m]=(0,dU.useMemo)(()=>{let n=new g8(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[r(n.calendar),n.hourCycle]},[t,e.hourCycle,r]),[y,g]=wm(e.value,e.defaultValue??null,e.onChange),[b]=(0,dU.useState)(y),v=(0,dU.useMemo)(()=>_x(y,h)??null,[y,h]),[w,x]=(0,dU.useState)(()=>new _O(h,m,v)),E="gregory"===h.identifier&&"BC"===w.era,S=(0,dU.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:f,hideTimeZone:n,hourCycle:e.hourCycle,showEra:E,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,n,E]),O=(0,dU.useMemo)(()=>_w({},S),[S]),D=(0,dU.useMemo)(()=>new g8(t,O),[t,O]),P=(0,dU.useMemo)(()=>D.resolvedOptions(),[D]),k=(0,dU.useMemo)(()=>(function(e,t,r,n){if(e)return _x(e,r);let o=b0(b8(n??vr()).set({hour:0,minute:0,second:0,millisecond:0}),r);return"year"===t||"month"===t||"day"===t?bX(o):n?o:bQ(o)})(e.placeholderValue,d,h,f),[e.placeholderValue,d,h,f]),C=(0,dU.useMemo)(()=>{let t="h11"===m||"h12"===m,r=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],n=r.indexOf(e.maxGranularity||"era"),o=r.indexOf("hour"===d&&t?"dayPeriod":d);return r.slice(n,o+1)},[e.maxGranularity,d,m]),[T,j]=(0,dU.useState)(v),[R,N]=(0,dU.useState)(h),[A,M]=(0,dU.useState)(m);v===T&&m===A&&b4(h,R)||(w=new _O(h,m,v),j(v),N(h),M(m),x(w));let I=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof _O&&t.isCleared(C))x(new _O(h,m,v)),g(null);else if(t instanceof _O){if(t.isComplete(C)){let e=t.toValue(v??k);if(t.validate(e,C)){let t=b0(e,c?.calendar||new bv);if(!y||0!==t.compare(y)){x(new _O(h,m,v)),g(t);return}}}x(t)}else t=b0(t,c?.calendar||new bv),x(new _O(h,m,v)),g(t)},$=(0,dU.useMemo)(()=>w.toValue(v??k).toDate(p),[w,p,v,k]),L=(0,dU.useMemo)(()=>(function(e,t,r,n,o,i,a){let s=["hour","minute","second"],u=r.formatToParts(e),l=new(0,_k.K)(i,{useGrouping:!1}),c=new(0,_k.K)(i,{useGrouping:!1,minimumIntegerDigits:2});for(let e of u)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let r=t[e.type]??0;"2-digit"===n[e.type]?e.value=c.format(r):e.value=l.format(r)}let d=[];for(let e of u){var f;let r=_j[e.type]||e.type,n=_C[r];"era"===r&&1===o.getEras().length&&(n=!1);let u=_C[r]&&null==t[e.type],l=_C[r]?(f=e.value,"era"===r||"dayPeriod"===r?f:"year"===r||"month"===r||"day"===r?_S.getStringForLocale(r,i):"––"):null,c={type:r,text:u?l:e.value,...t.getSegmentLimits(r),isPlaceholder:u,placeholder:l,isEditable:n};"hour"===r?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),r===a&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(r)&&r===a?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})($,w,D,P,h,t,d),[$,D,P,w,h,t,d]),F=(e,t)=>{I(w.cycle(e,t,k,C))},B=(0,dU.useMemo)(()=>_g(y,s,u,l,S),[y,s,u,l,S]),V=_c({...e,value:y,builtinValidation:B}),U=V.displayValidation.isInvalid,W=e.validationState||(U?"invalid":null);return{...V,value:v,defaultValue:e.defaultValue??b,dateValue:$,calendar:h,setValue:I,segments:L,dateFormatter:D,validationState:W,isInvalid:U,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:o,isReadOnly:i,isRequired:a,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,_T[e]||1)},decrementPage(e){F(e,-(_T[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===m?11:w.getSegmentLimits(e).maxValue;I(w.set(e,t,k))},decrementToMin(e){let t="hour"===e&&"h12"===m?12:w.getSegmentLimits(e).minValue;I(w.set(e,t,k))},setSegment(e,t){I(w.set(e,t,k))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(C)){let e=b0(w.toValue(v??k),c?.calendar||new bv);y&&0===e.compare(y)||g(e),x(new _O(h,m,v))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),I(t)},formatValue:e=>v?new g8(t,_w(e,S)).format($):"",getDateFormatter:(e,t)=>new g8(e,_w({},{...S,...t}))}}let _N=(0,dU.createContext)(null),_A=(0,dU.createContext)(null),_M=(0,dU.createContext)(null),_I=(0,dU.forwardRef)(function(e,t){let r=(0,dU.useContext)(_A),n=(0,dU.useContext)(_M);return r||n?dW().createElement(_L,{...e,ref:t}):dW().createElement(_$,{...e,ref:t})}),_$=(0,dU.forwardRef)((e,t)=>{let[r,n]=m4({slot:e.slot},t,_N),{locale:o}=g0(),i=_R({...r,locale:o,createCalendar:wa}),a=(0,dU.useRef)(null),{fieldProps:s,inputProps:u}=_n({...r,inputRef:a},i,n);return dW().createElement(m1,{values:[[_A,i],[wM,{...u,ref:a}],[wN,{...s,ref:n,isInvalid:i.isInvalid,isDisabled:i.isDisabled}]]},dW().createElement(_L,e))}),_L=(0,dU.forwardRef)((e,t)=>{let{className:r,children:n}=e,o=(0,dU.useContext)(_A),i=(0,dU.useContext)(_M),a=null!=o?o:i;return dW().createElement(dW().Fragment,null,dW().createElement(wA,{...e,ref:t,slot:e.slot||void 0,className:null!=r?r:"react-aria-DateInput",isInvalid:a.isInvalid,isDisabled:a.isDisabled},a.segments.map((e,t)=>(0,dU.cloneElement)(n(e),{key:t}))),dW().createElement(wI,null))});function _F({children:e}){let t=(0,dU.useMemo)(()=>({register:()=>{}}),[]);return dW().createElement(gl.Provider,{value:t},e)}dW().forwardRef(({children:e,...t},r)=>{let n=(0,dU.useRef)(!1),o=(0,dU.useContext)(gl),i=mQ(o||{},{...t,register(){n.current=!0,o&&o.register()}});return i.ref=mA(r||o?.ref),y7(o,i.ref),(0,dU.useEffect)(()=>{n.current||(n.current=!0)},[]),dW().createElement(gl.Provider,{value:i},e)});let _B=(0,dU.createContext)({}),_V=dW().createContext(null);function _U(e){let t=mG(),{portalContainer:r=t?null:document.body,isExiting:n}=e,[o,i]=(0,dU.useState)(!1),a=(0,dU.useMemo)(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=(0,dU.useContext)(_B)??{};if(!e.portalContainer&&s&&(r=s()),!r)return null;let u=e.children;return e.disableFocusManagement||(u=dW().createElement(wV,{restoreFocus:!0,contain:(e.shouldContainFocus||o)&&!n},u)),u=dW().createElement(_V.Provider,{value:a},dW().createElement(_F,null,u)),gh().createPortal(u,r)}let _W=(0,dU.createContext)(null),_H=(0,dU.createContext)(null),_K=(0,dU.forwardRef)(function(e,t){let r=e["aria-labelledby"];[e,t]=m4(e,t,_W);let{dialogProps:n,titleProps:o}=function(e,t){let r,n,{role:o="dialog"}=e,i=mJ();i=e["aria-label"]?void 0:i;let a=(0,dU.useRef)(!1);return(0,dU.useEffect)(()=>{if(t.current&&!yh(t.current)){y5(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(a.current=!0,t.current&&(t.current.blur(),y5(t.current)),a.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),r=(0,dU.useContext)(_V),mL(()=>{n?.(!0)},[n=r?.setContain]),(0,dU.useRef)(!1),(0,dU.useEffect)(()=>{}),{dialogProps:{...ys(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||i,onBlur:e=>{a.current&&e.stopPropagation()}},titleProps:{id:i}}}({...e,"aria-labelledby":r},t),i=(0,dU.useContext)(_H);n["aria-label"]||n["aria-labelledby"]||e["aria-labelledby"]&&(n["aria-labelledby"]=e["aria-labelledby"]);let a=m2({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==i?void 0:i.close)||(()=>{})}});return dW().createElement("section",{...ys(e),...n,...a,ref:t,slot:e.slot||void 0},dW().createElement(m1,{values:[[gL,{slots:{[m0]:{},title:{...o,level:2}}}],[gI,{slots:{[m0]:{},close:{onPress:()=>null==i?void 0:i.close()}}}]]},a.children))}),_z=(0,dU.createContext)(null),_G=(0,dU.forwardRef)(function(e,t){let r=(0,dU.useContext)(_z);return(null==r?void 0:r.isInvalid)?dW().createElement(_q,{...e,ref:t}):null}),_q=(0,dU.forwardRef)((e,t)=>{let r=(0,dU.useContext)(_z),n=ys(e),o=m2({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===r.validationErrors.length?void 0:r.validationErrors.join(" "),values:r});return null==o.children?null:dW().createElement(gB,{slot:"errorMessage",...n,...o,ref:t})}),_Y=(0,dU.createContext)(null),_Z=(0,dU.createContext)({}),_J=gA(function(e,t){[e,t]=m4(e,t,_Z);let{elementType:r="label",...n}=e;return dW().createElement(r,{className:"react-aria-Label",...n,ref:t})}),_X=(0,dU.createContext)({placement:"bottom"}),_Q="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,_0=new WeakMap,_1=[];function _2(e,t=-1/0,r=1/0){return Math.min(Math.max(e,t),r)}function _3(e,t){let r=e,n=0,o=t.toString(),i=o.toLowerCase().indexOf("e-");if(i>0)n=Math.abs(Math.floor(Math.log10(Math.abs(t))))+i;else{let e=o.indexOf(".");e>=0&&(n=o.length-e)}if(n>0){let e=Math.pow(10,n);r=Math.round(r*e)/e}return r}function _4(e,t,r,n){t=Number(t),r=Number(r);let o=(e-(isNaN(t)?0:t))%n,i=_3(2*Math.abs(o)>=n?e+Math.sign(o)*(n-Math.abs(o)):e-o,n);return isNaN(t)?!isNaN(r)&&i>r&&(i=Math.floor(_3(r/n,n))*n):i<t?i=t:!isNaN(r)&&i>r&&(i=t+Math.floor(_3((r-t)/n,n))*n),i=_3(i,n)}let _6={top:"top",bottom:"top",left:"left",right:"left"},_5={top:"bottom",bottom:"top",left:"right",right:"left"},_8={top:"left",left:"top"},_9={top:"height",left:"width"},_7={width:"totalWidth",height:"totalHeight"},xe={};function xt(e,t){let r=0,n=0,o=0,i=0,a=0,s=0,u={},l=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let l=document.documentElement;o=l.clientWidth,i=l.clientHeight,r=t?.width??o,n=t?.height??i,u.top=l.scrollTop||e.scrollTop,u.left=l.scrollLeft||e.scrollLeft,t&&(a=t.offsetTop,s=t.offsetLeft)}else({width:r,height:n,top:a,left:s}=xs(e,!1)),u.top=e.scrollTop,u.left=e.scrollLeft,o=r,i=n;return yA()&&("BODY"===e.tagName||"HTML"===e.tagName)&&l&&(u.top=0,u.left=0,a=t?.pageTop??0,s=t?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:u,top:a,left:s}}function xr(e,t,r,n,o,i,a){let s=o.scroll[e]??0,u=n[_9[e]],l=a[e]+n.scroll[_6[e]]+i,c=a[e]+n.scroll[_6[e]]+u-i,d=t-s+n.scroll[_6[e]]+a[e]-n[_6[e]],f=t-s+r+n.scroll[_6[e]]+a[e]-n[_6[e]];return d<l?l-d:f>c?Math.max(c-f,l-d):0}function xn(e){if(xe[e])return xe[e];let[t,r]=e.split(" "),n=_6[t]||"right",o=_8[n];_6[r]||(r="center");let i=_9[n],a=_9[o];return xe[e]={placement:t,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:a},xe[e]}function xo(e,t,r,n,o,i,a,s,u,l,c){let{placement:d,crossPlacement:f,axis:p,crossAxis:h,size:m,crossSize:y}=n,g={};g[h]=e[h]??0,"center"===f?g[h]+=((e[y]??0)-(r[y]??0))/2:f!==h&&(g[h]+=(e[y]??0)-(r[y]??0)),g[h]+=i;let b=e[h]-r[y]+u+l,v=e[h]+e[y]-u-l;if(g[h]=_2(g[h],b,v),d===p){let t=s?c[m]:c[_7[m]];g[_5[p]]=Math.floor(t-e[p]+o)}else g[p]=Math.floor(e[p]+e[m]+o);return g}function xi(e,t,r,n,o,i,a,s){let{placement:u,axis:l,size:c}=i;return u===l?Math.max(0,r[l]-(a.scroll[l]??0)-(e[l]+(s?t[l]:0))-(n[l]??0)-n[_5[l]]-o):Math.max(0,e[c]+e[l]+(s?t[l]:0)-r[l]-r[c]+(a.scroll[l]??0)-(n[l]??0)-n[_5[l]]-o)}function xa(e,t){let{top:r,left:n,width:o,height:i}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(o=e.offsetWidth,i=e.offsetHeight),{top:r,left:n,width:o,height:i}}function xs(e,t){let{top:r,left:n,width:o,height:i}=xa(e,t),{scrollTop:a,scrollLeft:s,clientTop:u,clientLeft:l}=document.documentElement;return{top:r+a-u,left:n+s-l,width:o,height:i}}function xu(e,t,r){let n,o=window.getComputedStyle(e);if("fixed"===o.position)n=xa(e,r);else{n=xs(e,r);let o=xs(t,r),i=window.getComputedStyle(t);o.top+=(parseInt(i.borderTopWidth,10)||0)-t.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-t.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(o.marginTop,10)||0,n.left-=parseInt(o.marginLeft,10)||0,n}function xl(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let xc=new WeakMap;function xd(e){let{ref:t,box:r,onResize:n}=e,o=gd(n);(0,dU.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&o()});return t.observe(e,{box:r}),()=>{e&&t.unobserve(e)}}},[t,r])}let xf="u">typeof document?window.visualViewport:null;function xp(e,t){if(e.button>0)return!1;let r=yp(e);if(r){let e=r.ownerDocument;if(!e||!yf(e.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let xh=[],xm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xy(e){return e instanceof HTMLInputElement&&!xm.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let xg="u">typeof document&&window.visualViewport,xb=0;function xv(e,t,r){let n=e.style[t];return e.style[t]=r,()=>{e.style[t]=n}}function xw(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}function x_(e,t){t||!xg?xx(e):xg.addEventListener("resize",()=>xx(e),{once:!0})}function xx(e){let t=document.scrollingElement||document.documentElement,r=e;for(;r&&r!==t;){let e=vx(r);if(e!==document.documentElement&&e!==document.body&&e!==r){let t=e.getBoundingClientRect(),n=r.getBoundingClientRect();if(n.top<t.top||n.bottom>t.top+r.clientHeight){let r=t.bottom;xg&&(r=Math.min(r,xg.offsetTop+xg.height));let o=n.top-t.top-((r-t.top)/2-n.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+o)),behavior:"smooth"})}}r=e.parentElement}}var xE={};function xS(e){var t;let{onDismiss:r,...n}=e,o=vm(n,bf((t=xE)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return dW().createElement(vv,null,dW().createElement("button",{...o,tabIndex:-1,onClick:()=>{r&&r()},style:{width:1,height:1}}))}function xO(e,t,r){mL(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void r();let t=e.current.getAnimations();if(0===t.length)return void r();let n=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{n||(0,gp.flushSync)(()=>{r()})}),()=>{n=!0}}},[e,t,r])}xE={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let xD=null,xP=new Set,xk=new Map,xC=!1,xT=!1;function xj(e,t){for(let r of xP)r(e,t)}function xR(e){xC=!0,e.metaKey||!yT()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(xD="keyboard",xj("keyboard",e))}function xN(e){xD="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(xC=!0,xj("pointer",e))}function xA(e){yL(e)&&(xC=!0,xD="virtual")}function xM(e){e.target!==window&&e.target!==document&&e.isTrusted&&(xC||xT||(xD="virtual",xj("virtual",e)),xC=!1,xT=!1)}function xI(){xC=!1,xT=!0}function x$(e){if("u"<typeof window||"u"<typeof document||xk.get(yd(e)))return;let t=yd(e),r=yc(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){xC=!0,n.apply(this,arguments)},r.addEventListener("keydown",xR,!0),r.addEventListener("keyup",xR,!0),r.addEventListener("click",xA,!0),t.addEventListener("focus",xM,!0),t.addEventListener("blur",xI,!1),"u">typeof PointerEvent&&(r.addEventListener("pointerdown",xN,!0),r.addEventListener("pointermove",xN,!0),r.addEventListener("pointerup",xN,!0)),t.addEventListener("beforeunload",()=>{xL(e)},{once:!0}),xk.set(t,{focus:n})}let xL=(e,t)=>{let r=yd(e),n=yc(e);t&&n.removeEventListener("DOMContentLoaded",t),xk.has(r)&&(r.HTMLElement.prototype.focus=xk.get(r).focus,n.removeEventListener("keydown",xR,!0),n.removeEventListener("keyup",xR,!0),n.removeEventListener("click",xA,!0),r.removeEventListener("focus",xM,!0),r.removeEventListener("blur",xI,!1),"u">typeof PointerEvent&&(n.removeEventListener("pointerdown",xN,!0),n.removeEventListener("pointermove",xN,!0),n.removeEventListener("pointerup",xN,!0)),xk.delete(r))};function xF(e){let[t,r]=wm(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,dU.useCallback)(()=>{r(!0)},[r]),o=(0,dU.useCallback)(()=>{r(!1)},[r]),i=(0,dU.useCallback)(()=>{r(!t)},[r,t]);return{isOpen:t,setOpen:r,open:n,close:o,toggle:i}}"u">typeof document&&("loading"!==(h=yc(void 0)).readyState?x$(void 0):h.addEventListener("DOMContentLoaded",()=>{x$(void 0)}));let xB=(0,dU.createContext)(null),xV=(0,dU.createContext)(null),xU=(0,dU.forwardRef)(function(e,t){[e,t]=m4(e,t,xB);let r=(0,dU.useContext)(_H),n=xF(e),o=null==e.isOpen&&null==e.defaultOpen&&r?r:n,i=function(e,t){let[r,n]=(0,dU.useState)(t?"open":"closed");switch(r){case"open":t||n("exiting");break;case"closed":case"exiting":t&&n("open")}let o="exiting"===r;return xO(e,o,(0,dU.useCallback)(()=>{n(e=>"exiting"===e?"closed":e)},[])),o}(t,o.isOpen)||e.isExiting||!1,a=(0,dU.useContext)(gN),{direction:s}=g0();if(a){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),dW().createElement(dW().Fragment,null,t)}return!o||o.isOpen||i?dW().createElement(xW,{...e,triggerRef:e.triggerRef,state:o,popoverRef:t,isExiting:i,dir:s}):null});function xW({state:e,isExiting:t,UNSTABLE_portalContainer:r,...n}){var o,i;let a=(0,dU.useRef)(null),[s,u]=(0,dU.useState)(0),l=(0,dU.useRef)(null),d=(0,dU.useContext)(xV),f=d&&"SubmenuTrigger"===n.trigger;mL(()=>{a.current&&e.isOpen&&u(a.current.getBoundingClientRect().width)},[e.isOpen,a]);let{popoverProps:p,underlayProps:h,arrowProps:m,placement:y}=function(e,t){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...u}=e,l="SubmenuTrigger"===u.trigger,{overlayProps:d,underlayProps:f}=function(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e,u=(0,dU.useRef)(void 0);(0,dU.useEffect)(()=>{if(o&&!xh.includes(t))return xh.push(t),()=>{let e=xh.indexOf(t);e>=0&&xh.splice(e,1)}},[o,t]);let l=()=>{xh[xh.length-1]===t&&r&&r()};!function(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,i=(0,dU.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=gd(e=>{r&&xp(e,t)&&(o&&o(e),i.current.isPointerDown=!0)}),s=gd(e=>{r&&r(e)});(0,dU.useEffect)(()=>{let e=i.current;if(n)return;let r=yc(t.current);if("u">typeof PointerEvent){let n=r=>{e.isPointerDown&&xp(r,t)&&s(r),e.isPointerDown=!1};return r.addEventListener("pointerdown",a,!0),r.addEventListener("click",n,!0),()=>{r.removeEventListener("pointerdown",a,!0),r.removeEventListener("click",n,!0)}}},[t,n])}({ref:t,onInteractOutside:i&&o?e=>{(!s||s(yp(e)))&&(xh[xh.length-1]===t&&e.stopPropagation(),u.current===t&&l()),u.current=void 0}:void 0,onInteractOutsideStart:e=>{let r=xh[xh.length-1];u.current=r,(!s||s(yp(e)))&&r===t&&e.stopPropagation()}});let{focusWithinProps:c}=gD({isDisabled:!n,onBlurWithin:e=>{!(!e.relatedTarget||wK(e.relatedTarget,wB))&&(!s||s(e.relatedTarget))&&r?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||a||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i||l,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:y}=function(e){var t;let{direction:r}=g0(),{arrowSize:n,targetRef:o,overlayRef:i,arrowRef:a,scrollRef:s=i,placement:u="bottom",containerPadding:l=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:y,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,w]=(0,dU.useState)(null),x=[h,u,i.current,o.current,a?.current,s.current,l,c,d,f,p,m,r,g,b,n],E=(0,dU.useRef)(xf?.scale);(0,dU.useEffect)(()=>{m&&(E.current=xf?.scale)},[m]);let S=(0,dU.useCallback)(()=>{var e;if(!1===h||!m||!i.current||!o.current||!d||xf?.scale!==E.current)return;let t=null;if(s.current&&yh(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),r=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-r.top}).offset>r.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-r.bottom)}let y=i.current;!g&&i.current&&(y.style.top="0px",y.style.bottom="",y.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let v=function(e){let t,r,{placement:n,targetNode:o,overlayNode:i,scrollNode:a,padding:s,shouldFlip:u,boundaryElement:l,offset:c,crossOffset:d,maxHeight:f,arrowSize:p=0,arrowBoundaryOffset:h=0}=e,m="u">typeof document?window.visualViewport:null,y=i instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!xl(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!xl(t);)t=t.parentElement;return t||document.documentElement}(i):document.documentElement,g=y===document.documentElement,b=window.getComputedStyle(y).position,v=g?xs(o,!1):xu(o,y,!1);if(!g){let{marginTop:e,marginLeft:t}=window.getComputedStyle(o);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let w=xs(i,!0),x={top:parseInt((t=window.getComputedStyle(i)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),a.scrollTop,a.scrollLeft,a.scrollWidth,a.scrollHeight;let E=xt(l,m),S=xt(y,m);if("BODY"!==l.tagName&&"HTML"!==l.tagName||g)r=("BODY"===l.tagName||"HTML"===l.tagName)&&g?{top:0,left:0,width:0,height:0}:xu(l,y,!1);else{let e=xa(y,!1);r={top:-(e.top-E.top),left:-(e.left-E.left),width:0,height:0}}return function(e,t,r,n,o,i,a,s,u,l,c,d,f,p,h,m,y){var g,b,v;let w,x,E,S=xn(e),{size:O,crossAxis:D,crossSize:P,placement:k,crossPlacement:C}=S,T=xo(t,a,r,S,l,c,u,d,p,h,s),j=l,R=xi(a,u,t,n,o+l,S,s,m);if(i&&r[O]>R){let e=xn(`${_5[k]} ${C}`),i=xo(t,a,r,e,l,c,u,d,p,h,s);xi(a,u,t,n,o+l,e,s,m)>R&&(S=e,T=i,j=l)}let N="bottom";"top"===S.axis?"top"===S.placement?N="top":"bottom"===S.placement&&(N="bottom"):"top"===S.crossAxis&&("top"===S.crossPlacement?N="bottom":"bottom"===S.crossPlacement&&(N="top"));let A=xr(D,T[D],r[P],a,s,o,u);T[D]+=A;let M=(g=T,b=r.height,v=N,w=(null!=g.top?g.top:s[_7.height]-(g.bottom??0)-b)-(s.scroll.top??0),x=m?u.top:0,E={top:Math.max(a.top+x,(y?.offsetTop??a.top)+x),bottom:Math.min(a.top+a.height+x,(y?.offsetTop??0)+(y?.height??0))},"top"!==v?Math.max(0,E.bottom-w-((n.top??0)+(n.bottom??0)+o)):Math.max(0,w+b-E.top-((n.top??0)+(n.bottom??0)+o)));f&&f<M&&(M=f),r.height=Math.min(r.height,M),A=xr(D,(T=xo(t,a,r,S,j,c,u,d,p,h,s))[D],r[P],a,s,o,u),T[D]+=A;let I={},$=t[D]-T[D]-n[_6[D]],L=$+.5*t[P],F=p/2+h,B="left"===_6[D]?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),V=r[P]-B-p/2-h,U=_2(L,t[D]+p/2-(T[D]+n[_6[D]]),t[D]+t[P]-p/2-(T[D]+n[_6[D]]));I[D]=_2(U,F,V),({placement:k,crossPlacement:C}=S),p?$=I[D]:"right"===C?$+=t[P]:"center"===C&&($+=t[P]/2);let W="left"===k||"top"===k?r[O]:0,H={x:"top"===k||"bottom"===k?$:W,y:"left"===k||"right"===k?$:W};return{position:T,maxHeight:M,arrowOffsetLeft:I.left,arrowOffsetTop:I.top,placement:k,triggerAnchorPoint:H}}(n,v,w,x,s,u,E,S,r,c,d,!!b&&"static"!==b,f,p,h,yf(l,y),m)}({placement:(e=u,"rtl"===r?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:i.current,targetNode:o.current,scrollNode:s.current||i.current,padding:l,shouldFlip:c,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:n??(a?.current?xa(a.current,!0).width:0),arrowBoundaryOffset:b});if(!v.position)return;y.style.top="",y.style.bottom="",y.style.left="",y.style.right="",Object.keys(v.position).forEach(e=>y.style[e]=v.position[e]+"px"),y.style.maxHeight=null!=v.maxHeight?v.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),r=s.current.getBoundingClientRect(),n=e[t.type]-r[t.type];s.current.scrollTop+=n-t.offset}w(v)},x);mL(S,x),mL(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=S]),xd({ref:i,onResize:S}),xd({ref:o,onResize:S});let O=(0,dU.useRef)(!1);mL(()=>{let e,t=()=>{O.current=!0,clearTimeout(e),e=setTimeout(()=>{O.current=!1},500),S()},r=()=>{O.current&&t()};return xf?.addEventListener("resize",t),xf?.addEventListener("scroll",r),()=>{xf?.removeEventListener("resize",t),xf?.removeEventListener("scroll",r)}},[S]);let D=(0,dU.useCallback)(()=>{O.current||y?.()},[y,O]);return!function(e){let{triggerRef:t,isOpen:r,onClose:n}=e;(0,dU.useEffect)(()=>{if(!r||null===n)return;let e=e=>{let r=yp(e);if(!t.current||r instanceof Node&&!yf(r,t.current)||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)return;let o=n||xc.get(t.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[r,n,t])}({triggerRef:o,isOpen:m,onClose:y&&D}),{overlayProps:{style:{position:v?"absolute":"fixed",top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??"100vh"}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:S}}({...u,targetRef:r,overlayRef:n,isOpen:t.isOpen,onClose:i&&!l?t.close:null});return!function(e={}){let{isDisabled:t}=e;mL(()=>{if(!t){let e,t,r,n,o,i,a,s;return 1==++xb&&(c=yN()?(t=xv(document.documentElement,"overflow","hidden"),r=!1,n=document.createElement("style"),(o=gu())&&(n.nonce=o),n.textContent=`
39
39
  @layer {
40
40
  * {
41
41
  overscroll-behavior: contain;
42
42
  }
43
- }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&xm(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||xw(this,r)},a=mI(xv(document,"touchstart",t=>{let n=yf(t);e=vw(n)?n:v_(n,!0),r=!1;let o=n.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(n,!0)&&(r=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(r=!0),"selectionStart"in n&&"selectionEnd"in n&&n.selectionStart<n.selectionEnd&&n.ownerDocument.activeElement===n&&(r=!0)},{passive:!1,capture:!0}),xv(document,"touchmove",t=>{if(2!==t.touches.length&&!r){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),xv(document,"blur",e=>{let t=yf(e),r=e.relatedTarget;if(r&&xm(r))r.focus({preventScroll:!0}),xw(r,xm(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),HTMLElement.prototype.focus=i}):mI((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?xb(document.documentElement,"scrollbarGutter","stable"):xb(document.documentElement,"paddingRight",`${s}px`)),xb(document.documentElement,"overflow","hidden"))),()=>{0==--xg&&c()}}},[t])}({isDisabled:i||!t.isOpen}),(0,dV.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=_0[_0.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,u,l,c,d,f,p,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=yc(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&_X,u=new Set(e),l=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))u.add(t);let t=e=>{if(l.has(e)||u.has(e)||e.parentElement&&l.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of u)if(yd(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=wI(yl(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&f(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)f(e),e=r.nextNode()}},f=e=>{let r=_Q.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),l.add(e),_Q.set(e,r+1))},_0.length&&_0[_0.length-1].disconnect(),d(a),(p=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...u,...l].some(e=>yd(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?u.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:u,hiddenNodes:l,observe(){p.observe(a,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},_0.push(h),()=>{for(let e of(p.disconnect(),l)){let t=_Q.get(e);null!=t&&(1===t?(c(e,!1),_Q.delete(e)):_Q.set(e,t-1))}h===_0[_0.length-1]?(_0.pop(),_0.length&&_0[_0.length-1].observe()):_0.splice(_0.indexOf(h),1)}}},[i,t.isOpen,n,o]),{popoverProps:mX(d,p),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:y}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:l},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,dV.useState)(!0),o=r&&t;return m$(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),xS(e,o,(0,dV.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=m1({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,dV.useState)(!1);m$(()=>{g.current&&E(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,dV.useEffect)(()=>{var e;let t,r;x&&g.current&&!g.current.contains(document.activeElement)&&(r=((e=document)=>e.activeElement)(t=yl(e=g.current)),"virtual"===xO?y4(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&ys(e)}):ys(e))},[x,g]);let S={...p.style,...v.style},O=dU().createElement("div",{...mX(ya(n),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&dU().createElement(xE,{onDismiss:e.close}),dU().createElement(_J.Provider,{value:{...m,placement:y,ref:a}},v.children),dU().createElement(xE,{onDismiss:e.close}));return f?dU().createElement(_V,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==d?void 0:d.current)?i:void 0},O):dU().createElement(_V,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&dU().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),dU().createElement("div",{ref:l,style:{display:"contents"}},dU().createElement(xB.Provider,{value:l},O)))}function xW(e){return e?.start!=null&&null!=e.end}let xH=(0,dV.createContext)(null),xK=(0,dV.createContext)(null),xz=(0,dV.createContext)(null),xG=(0,dV.createContext)(null),xq=(0,dV.forwardRef)(function(e,t){var r,n;[e,t]=m3(e,t,xH);let{validationBehavior:o}=m2(_q)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=xL(e),[r,n]=wh(e.value,e.defaultValue||null,e.onChange),[o]=(0,dV.useState)(r),i=r||e.placeholderValue||null,[a,s]=_x(i,e.granularity),u=null!=r?r.toDate(s??"UTC"):null,l="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,f]=(0,dV.useState)(null),[p,h]=(0,dV.useState)(null);if(r&&(d=r,"hour"in r&&(p=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=r?.calendar.identifier==="gregory"&&"BC"===r.era,y=(0,dV.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,dV.useMemo)(()=>_y(r,g,b,v,y),[r,g,b,v,y]),x=_l({...e,value:r,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),O=(e,t)=>{n("timeZone"in t?t.set(bJ(e)):bX(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:p,setDateValue:r=>{let o="function"==typeof c?c():c;l?p||o?O(r,p||_w(e.defaultValue||e.placeholderValue)):f(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?O(d,e):h(e)},granularity:a,hasTime:l,...t,setOpen(n){!n&&!r&&d&&l&&O(d,p||_w(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:S,isInvalid:E,formatValue:(e,t)=>u?new g5(e,_v(t,y)).format(u):"",getDateFormatter:(e,t)=>new g5(e,_v({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,dV.useRef)(null),[u,l]=m4(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=mY(),i=mY(),a=mY(),s=bd((n=w3)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:u,validationErrors:l,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=w5({...e,labelElementType:"span",isInvalid:u,errorMessage:e.errorMessage||l}),m=w4(t,r),y=f["aria-labelledby"]||f.id,{locale:g}=gQ(),b=t.formatValue(g,{month:"long"}),v=vP(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=ya(e),E=(0,dV.useMemo)(()=>wX(r),[r]),S=(0,dV.useRef)(!1),{focusWithinProps:O}=gO({...e,isDisabled:t.isOpen,onBlurWithin:t=>{yd(document.getElementById(i),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:mX(x,m,f,v,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...f,id:a,[_e]:"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,[_u]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:u,validationErrors:l,validationDetails:c}}({...m6(e),label:l,validationBehavior:i},a,s),[v,w]=(0,dV.useState)(null),x=(0,dV.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);xc({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:O}=gD({within:!0}),D=m1({...e,values:{state:a,isFocusWithin:S,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=ya(e);return delete P.id,dU().createElement(m0,{values:[[xz,a],[wR,{...c,ref:s,isInvalid:a.isInvalid}],[_R,f],[gM,{...p,isPressed:a.isOpen}],[_Y,{...d,ref:u,elementType:"span"}],[ww,m],[_W,a],[xF,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[_U,h],[gL,{slots:{description:y,errorMessage:g}}],[_K,b]]},dU().createElement("div",{...E,...P,...D,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),xY=(0,dV.forwardRef)(function(e,t){var r,n;[e,t]=m3(e,t,xK);let{validationBehavior:o}=m2(_q)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=xL(e),[r,n]=wh(e.value,e.defaultValue||null,e.onChange),[o]=(0,dV.useState)(r),[i,a]=(0,dV.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,u=e=>{a(s=e||{start:null,end:null}),xW(s)?n(s):n(null)},[l,c]=_x(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===l||"minute"===l||"second"===l,f=e.shouldCloseOnSelect??!0,[p,h]=(0,dV.useState)(null),[m,y]=(0,dV.useState)(null);s&&xW(s)&&(p=s,"hour"in s.start&&(m=s));let g=(e,t)=>{u({start:"timeZone"in t.start?t.start.set(bJ(e.start)):bX(e.start,t.start),end:"timeZone"in t.end?t.end.set(bJ(e.end)):bX(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=r=>{let n="function"==typeof f?f():f;d?xW(r)&&(n||m?.start&&m?.end)?g(r,{start:m?.start||_w(e.placeholderValue),end:m?.end||_w(e.placeholderValue)}):h(r):xW(r)?(u(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{xW(p)&&xW(e)?g(p,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,dV.useMemo)(()=>({granularity:l,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[l,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:E,maxValue:S,isDateUnavailable:O}=e,D=(0,dV.useMemo)(()=>{var e;let t;return e=s,t=_p(_y(e?.start??null,E,S,O,x),_y(e?.end??null,E,S,O,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=_p(t,{isInvalid:!0,validationErrors:[(bi.getGlobalDictionaryForPackage("@react-stately/datepicker")||_h).getStringForLocale("rangeReversed",_m())],validationDetails:{..._o,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,E,S,O,x]),P=_l({...e,value:r,name:(0,dV.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:D}),k=P.displayValidation.isInvalid,C=e.validationState||(k?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:u,dateRange:p,timeRange:m,granularity:l,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:p?.end??null}):b({start:p?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?u({start:t,end:s?.end??null}):u({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&xW(p)&&d&&g(p,{start:m?.start||_w(e.placeholderValue),end:m?.end||_w(e.placeholderValue)}),t.setOpen(r)},validationState:C,isInvalid:k,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,u=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),l=_v(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),f=new g5(t,l);if(o===a&&i===u&&0!==s.start.compare(s.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new g5(t,_v(r,{granularity:u,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new g5(e,_v({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,dV.useRef)(null),[u,l]=m4(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n;let o=bd((n=w3)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:u,fieldProps:l,descriptionProps:c,errorMessageProps:d}=w5({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=l["aria-labelledby"]||l.id,{locale:p}=gQ(),h=t.formatValue(p,{month:"long"}),m=vP(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":f},g={"aria-label":o.format("endDate"),"aria-labelledby":f},b=mY(),v=mY(),w=w4(t,r),x=[m["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=(0,dV.useMemo)(()=>wX(r,{accept:e=>e.id!==b}),[r,b]),S={[_t]:E,[_e]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},O=ya(e),D=(0,dV.useRef)(!1),{focusWithinProps:P}=gO({...e,isDisabled:t.isOpen,onBlurWithin:t=>{yd(document.getElementById(v),t.relatedTarget)||(D.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{D.current||(D.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),k=(0,dV.useRef)(_a),C=(0,dV.useRef)(_a);return{groupProps:mX(O,w,l,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...u,onClick:()=>{E.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${f}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${f}`},startFieldProps:{...y,...S,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[_u]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(_p(e,C.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[_u]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(_p(k.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...m6(e),label:l,validationBehavior:i},a,s),[w,x]=(0,dV.useState)(null),E=(0,dV.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);xc({ref:s,onResize:E});let{focusProps:S,isFocused:O,isFocusVisible:D}=gD({within:!0}),P=m1({...e,values:{state:a,isFocusWithin:O,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=ya(e);return delete k.id,dU().createElement(m0,{values:[[xG,a],[wR,{...c,ref:s,isInvalid:a.isInvalid}],[gM,{...h,isPressed:a.isOpen}],[_Y,{...d,ref:u,elementType:"span"}],[w_,y],[_W,a],[xF,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[_U,m],[_R,{slots:{start:f,end:p}}],[gL,{slots:{description:g,errorMessage:b}}],[_K,v]]},dU().createElement("div",{...S,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":O||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function xZ(e){return dU().createElement(gX,e)}function xJ(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof bF||e instanceof bV||e instanceof bU)return t?bQ(e,t):e;{let r=pw()(e).toDate(),n=new bF(r.getFullYear(),r.getMonth()+1,r.getDate());return t?bQ(n,t):n}}function xX(e){if(e)return e.toDate(vt())}function xQ(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function x0(e){let t=e??"",r=xQ(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function x1(){let e=window.i18next.language,t=xQ(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;en=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;en=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var x2=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(en||"en-US"),x3=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},x4={};for(let e=1;e<100;e++)x4[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var x6={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},x5="[1234567890一二三四五六七八九〇\\d]",x8={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},x9={},x7={"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},Ee={zone:x7,year:x4,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:{}},Et={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(x7).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,}"},Er={...Et,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},En={},Eo=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=x2){return En[t.toLowerCase()]||(En[t.toLowerCase()]=new e(t)),En[t.toLowerCase()]}constructor(e=x2){this.locale=e,this.lookups={...Ee},this.vars={...Et};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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=x8: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(x9[e])return x9[e];if("fullwide"===e||"hanidec"===e)return{group:x5,lookup:{...x8}};let t=x6[e];if(!t)return{group:"\\d",lookup:{...x8}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return x9[e]={group:`[${r}-${n}]`,lookup:o},x9[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Er)Er.hasOwnProperty(r)&&(this.vars[r]=Er[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},Ei=["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"],Ea={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Es=()=>new Date;function Eu(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var El=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},Ec=["year","month","day","hour","minute","second","millisecond","offset"],Ed={};function Ef(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var Ep=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],Eh={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...Ep],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:Ep,id:Ep,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Em(e,t=x2){let r=function(e){if(!Ed[e]){var t,r;let n,o,i=Eo.factory(e);Ed[e]=new El({doneChecker:Ef,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Eu(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Eu(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Eu(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${x5}{2,4})\\s*\u5E74\\s*(${x5}{1,2})\\s*\u6708\\s*(${x5}{1,2})\\s*\u65E5$`),handler:Eu(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Eu(["","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:Eu(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Es(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?Ea[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=Es();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Eu(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Eu(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:Eu(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Eu(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Eu(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Eu(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:Eu(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Eu(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Eu(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Eu(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Eu(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Eu(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Eu(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Eu(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Eu(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Eu(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Eu(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Eu(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Eu(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:Eu(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Eu(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Eu(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:Eu(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:Eu(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:Eu(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Eu(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:Eu(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:Eu(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:Eu(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:Eu(["offset"])}],o=i.baseName.slice(0,5),Ei.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(Ec.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=x4[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return Ed[e]}(t),n=function(e,t){let r=Eh[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function Ey(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new x3(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 x3(t.valueOf()-60*e.offset*1e3):t}function Eg(e,t=x2){let r=Em(e,t),n=r.invalid?new x3(NaN):Ey(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function Eb(e,t=x2){return e instanceof Date?new x3(e.valueOf()):"number"==typeof e?new x3(e):Eg(e,t)}Date.fromString=x3.fromString=Eg,Date.fromAny=x3.fromAny=Eb,"u">typeof window&&(window.anyDateParser={fromString:Eg,fromAny:Eb,fromObject:Ey,attempt:Em});var Ev=r(5238),Ew=r(1445);function E_(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}pv.extend(p_),pv.extend(Ew),pv.extend(Ev);let Ex="YYYY-MM-DDTHH:mm:ss.SSSZZ";function EE(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&pv(e,Ex).isValid()}function ES(e){return pv(e).isToday()}function EO(e){return EE(e)?pv(e,Ex).toDate():null}function ED(e,t=!1){let r=pv(e);return t&&(r=r.utc()),r.format(Ex)}function EP(e){return pv(e).toDate()}var Ek=new WeakMap;let EC=new class{register(e,t){E_(this,Ek).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(E_(this,Ek).has(t))return E_(this,Ek).get(t)}if(e.language&&E_(this,Ek).has(e.language))return E_(this,Ek).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return E_(this,Ek).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,Ek,{writable:!0,value:new Map})}};function ET(e,t){EC.register(e,t)}function Ej(e){let t=e??x1();return EC.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let ER={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EN(e,t={}){let r=Em(e,x1());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,eo.isNil)(r.day)&&(0,eo.isNil)(r.month)&&(r=Object.assign({},(0,eo.omit)(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},(0,eo.omit)(r,"day"),{date:r.day}));let n=pv().set(r).toDate();return(0,eo.isNil)(r.year)&&(t.year=!1),(0,eo.isNil)(r.month)&&(t.month=!1),(0,eo.isNil)(r.date)&&(t.day=!1),EA(n,t)}function EA(e,t){let r,n=t?.locale??x1(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:u,month:l,year:c,noToday:d,numberingSystem:f}={...ER,...{noToday:"am"===o.language},...t},p={calendar:i??Ej(o),year:c?"numeric":void 0,month:l?"short":void 0,day:u?"2-digit":void 0,numberingSystem:f},h=pv(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&u&&(t=t.map(EM("-"))),"wide"==a&&(t=t.map(EM(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${EI(e)}`),r}let EM=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function EI(e){return e.toLocaleTimeString(x1(),{hour:"2-digit",minute:"2-digit"})}function E$(e,t){return EA(e,{...t,time:!0})}function EL(e,t){let r=Ej("string"==typeof t?new Intl.Locale(t):t);return r?bQ(e,wi(r)):e}function EF(e,t){return new Intl.DurationFormat(x1(),t).format(e)}function EB(e,t){if(null==e)return null;if("string"==typeof e){let r=Em(e,x1());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...(0,eo.omit)(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...(0,eo.omit)(r,"day"),...{date:r.day}}),pv(t).set(r))}return pv(e)}let EV=["years","months","days","hours","minutes","seconds"],EU={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},EW={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function EH(e,t=pv(),r){let n,o=pv(t),i=EB(e,o);if(null==i)return null;if("string"==typeof r){let e=EU[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:u}=r??{};if(void 0!==s||void 0!==u){let e,t=u?EU[u]??u:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=EV.indexOf(r);for(let o=0;o<EV.length;o++){let i=EV[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):EU[s]??s,function(e,t,r,n){let o=EV.indexOf(r),i=EV.indexOf(n),a=EV.slice(o,i+1),s={},u=e;for(let e of a){let r=t.diff(u,e);s[e]=r,u=u.add(r,e)}return s}(i,o,e,t??e)}let l=(n=function(e){let t={...EW};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[EU[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[l]:o.diff(i,l)}}let EK={style:"short",localeMatcher:"lookup"};function Ez(e,t=pv(),r){let n=EH(e,t,r);return null==n?null:EF(n,"object"==typeof r&&r.formatOptions?{...EK,...r.formatOptions}:EK)}let EG=(0,dV.createContext)(null);function Eq(){let e=fB({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,dV.useMemo)(()=>{let t=x1();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,dV.useMemo)(()=>{let e=Ej(t);return void 0!==e?wi(e):void 0},[t]),n=(0,dV.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,dV.useMemo)(()=>r?bQ(b8(vt()),r):b8(vt()),[r]);return{calendar:r,intlLocale:n,today_:o}}let EY=new bF(1793,1,1);var EZ={};function EJ(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function EX(e={}){let{locale:t}=gQ();return(0,dV.useMemo)(()=>new(0,_P.K)(t,e),[t,e])}EZ={"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 EQ={};EQ={"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 E0=()=>{};function E1(e){var t;let r=(0,dV.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:u,isRequired:l,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=bd((t=EQ)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,dV.useRef)(!1),b=(0,dV.useCallback)(()=>{clearTimeout(r.current),g.current=!1},[]),v=gc(()=>{b()});(0,dV.useEffect)(()=>()=>v(),[]);let w=(0,dV.useRef)(!1),x=()=>{w.current=!0},E=()=>{w.current=!1},S=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,dV.useEffect)(()=>{w.current&&(g0&&g0.clear("assertive"),g1(S,"assertive"))},[S]);let O=(0,dV.useCallback)(()=>{b()},[b]),D=gc(c??E0),P=gc(f??E0),k=gc(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(D(),C(60))}),C=gc(e=>{v(),g.current=!0,r.current=window.setTimeout(k,e)}),T=gc(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(P(),j(60))}),j=gc(e=>{v(),g.current=!0,r.current=window.setTimeout(T,e)}),R=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:A}=gd(),M=(0,dV.useRef)(!1),[I,$]=(0,dV.useState)(null);(0,dV.useEffect)(()=>{"touch"===I?C(600):I&&C(400)},[I]);let[L,F]=(0,dV.useState)(null);return(0,dV.useEffect)(()=>{"touch"===L?j(600):L&&j(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":S,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":u||void 0,"aria-required":l||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!u&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:E},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(N(window,"pointercancel",O,{capture:!0}),M.current=!1,$("touch")),N(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&c?.(),M.current=!1,$(null)},onFocus:x,onBlur:E},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(f?.(),F("mouse")):(N(window,"pointercancel",O,{capture:!0}),M.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&f?.(),M.current=!1,F(null)},onFocus:x,onBlur:E}}}let E2=null;var E3=r(6284);function E4(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let E6=(0,dV.createContext)(null),E5=(0,dV.createContext)(null),E8=(0,dV.forwardRef)(function(e,t){var r,n;[e,t]=m3(e,t,E6);let{validationBehavior:o}=m2(_q)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=gQ(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:u,isDisabled:l,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let f=(0,dV.useCallback)(e=>void 0===n||isNaN(n)?_1(e,t,r):_3(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=f(i)),isNaN(a)||"snap"!==d||(a=f(a));let[p,h]=wh(i,isNaN(a)?NaN:a,s),[m]=(0,dV.useState)(p),[y,g]=(0,dV.useState)(()=>isNaN(p)?"":new(0,_P.K)(u,o).format(p)),b=(0,dV.useMemo)(()=>new(0,E3.d)(u,o),[u,o]),v=(0,dV.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,dV.useMemo)(()=>new(0,_P.K)(u,{...o,numberingSystem:v}),[u,o,v]),x=(0,dV.useMemo)(()=>w.resolvedOptions(),[w]),E=(0,dV.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),S=_l({...e,value:p}),O=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(O=.01);let[D,P]=(0,dV.useState)(p),[k,C]=(0,dV.useState)(u),[T,j]=(0,dV.useState)(o);Object.is(p,D)&&u===k&&o===T||(g(E(p)),P(p),C(u),j(o));let R=(0,dV.useMemo)(()=>b.parse(y),[b,y]),N=(e,n=0)=>{if(isNaN(R))return _3(isNaN(n)?0:n,t,r,O);{let n=_3(R,t,r,O);return"+"===e&&n>R||"-"===e&&n<R?n:_3(E4(e,R,O),t,r,O)}},A=(0,dV.useMemo)(()=>!l&&!c&&(isNaN(R)||void 0===r||isNaN(r)||_3(R,t,r,O)>R||E4("+",R,O)<=r),[l,c,t,r,O,R]),M=(0,dV.useMemo)(()=>!l&&!c&&(isNaN(R)||void 0===t||isNaN(t)||_3(R,t,r,O)<R||E4("-",R,O)>=t),[l,c,t,r,O,R]);return{...S,validate:e=>b.isValidPartialNumber(e,t,r),increment:()=>{let e=N("+",t);e===p&&g(E(e)),h(e),S.commitValidation()},incrementToMax:()=>{null!=r&&(h(_3(r,t,r,O)),S.commitValidation())},decrement:()=>{let e=N("-",r);e===p&&g(E(e)),h(e),S.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),S.commitValidation())},canIncrement:A,canDecrement:M,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":E(p));return}if(isNaN(r))return void g(E(p));let n="snap"===d?f(r):r,o=(n=b.parse(E(n)))!==p;h(n),g(E(void 0===i?n:p)),o&&S.commitValidation()}}}({...e,locale:a,validationBehavior:i}),u=(0,dV.useRef)(null),[l,c]=m4(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,u,l,c,d;let f,{id:p,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:E,formatOptions:S,onBlur:O=()=>{},onFocus:D,onFocusChange:P,onKeyDown:k,onKeyUp:C,description:T,errorMessage:j,isWheelDisabled:R,...N}=e,{increment:A,incrementToMax:M,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=bd((n=EZ)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,dV.useCallback)(()=>{let e=r.current?.value??"";(0,gf.flushSync)(()=>{B()}),r.current?.value!==e&&g1(r.current?.value??"","assertive")},[B,r]),H=mY(p),{focusProps:K}=y5({onBlur(){W()}}),z=EX(S),G=(0,dV.useMemo)(()=>z.resolvedOptions(),[z]),q=EX({...S,currencySign:void 0}),Y=(0,dV.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Z,incrementButtonProps:J,decrementButtonProps:X}=E1({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:A,onIncrementToMax:M,onDecrement:I,onDecrementToMin:$,value:L,textValue:Y}),[Q,ee]=(0,dV.useState)(!1),{focusWithinProps:et}=gO({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,dV.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);vv(t,"wheel",n?void 0:o)}({onScroll:(0,dV.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?A():e.deltaY<0&&I())},[I,A]),isDisabled:R||y||g||!Q},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";yT()?en?eo="text":er&&(eo="decimal"):yM()&&(en?eo="numeric":er&&(eo="decimal"));let ei=ya(e),ea=(0,dV.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,gf.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:eu,validationDetails:el}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ef,errorMessageProps:ep}=function(e,t,r){let n=gc(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,dV.useEffect)(()=>{if(!EJ()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=EJ()?null:e=>{let r=yf(e).value.slice(0,yf(e).selectionStart)+e.data+yf(e).value.slice(yf(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:u,...l}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[u,l]=wh(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=ge(e,t),d=_l({...e,value:u}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=w5({...e,isInvalid:f,errorMessage:e.errorMessage||p}),v=ya(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,dV.useState)(u);return w8(t,e.defaultValue??x,l),w9(e,d,t),{labelProps:m,inputProps:mX(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:u,onChange:e=>l(yf(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(dU().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,dV.useRef)(null);return{inputProps:mX(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:u,...l}}({...N,...ei,name:void 0,form:void 0,label:E,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[_u]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:H,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:O,onFocus:D,onFocusChange:P,onKeyDown:(0,dV.useMemo)(()=>mI(ea,k),[ea,k]),onKeyUp:C,onPaste:t=>{e.onPaste?.(t);let r=yf(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:T,errorMessage:j},t,r);w8(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,u=t.minValue,l=t.maxValue,c=e.step,d=t.numberValue,m$(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!E2&&"u">typeof document&&((E2=document.createElement("input")).type="number"),!E2))return;E2.min=null==u||isNaN(u)?"":String(u),E2.max=null==l||isNaN(l)?"":String(l),E2.step=null==c||isNaN(c)?"":String(c),E2.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&E2.validity.valid,r=e.validationMessage||E2.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:E2.validity.rangeOverflow,rangeUnderflow:E2.validity.rangeUnderflow,stepMismatch:E2.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(n),"native"!==i||E2.validity.valid||e.setCustomValidity(E2.validationMessage)});let eh=mX(Z,K,ed,{role:null,"aria-roledescription":yR()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(f=null!=e.label?ec.id:e["aria-labelledby"]);let eg=mY(),eb=mY(),ev=mX(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:f&&!m?eg:null,"aria-labelledby":f&&!m?`${eg} ${f}`:null,"aria-controls":H,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),ew=mX(X,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:f&&!h?eb:null,"aria-labelledby":f&&!h?`${eb} ${f}`:null,"aria-controls":H,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:ew,errorMessageProps:ep,descriptionProps:ef,isInvalid:es,validationErrors:eu,validationDetails:el}}({...m6(e),label:c,validationBehavior:i},s,u),v=m1({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=ya(e);return delete w.id,dU().createElement(m0,{values:[[E5,s],[wR,f],[wA,{...p,ref:u}],[_Y,{...d,ref:l}],[gM,{slots:{increment:h,decrement:m}}],[gL,{slots:{description:y,errorMessage:g}}],[_K,b]]},dU().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&dU().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function E9(e,t){return Number.parseInt(EA(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let E7=(0,dV.forwardRef)(function(e,t){let{className:r}=e,n=(0,dV.useContext)(wx),o=(0,dV.useContext)(wE),i=n??o,a=(0,dV.useContext)(EG),s=vt(),u=EA(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),l=E9(i.visibleRange.start.toDate(s),a),c=i.maxValue?E9(i.maxValue.toDate(s),a):void 0,d=i.minValue?E9(i.minValue.toDate(s),a):void 0,f=(0,dV.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,pB.jsxs)("span",{ref:t,className:r,children:[(0,pB.jsx)("span",{children:u}),(0,pB.jsxs)(E8,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:l,children:[(0,pB.jsx)(wM,{}),(0,pB.jsxs)(wN,{children:[(0,pB.jsx)(gI,{slot:"increment",children:(0,pB.jsx)(hu,{size:8})}),(0,pB.jsx)(gI,{slot:"decrement",children:(0,pB.jsx)(hi,{size:8})})]})]})]})}),Se="-esm-fast-data-entry__datepicker-module__inputGroup___-wpzr",St="-esm-fast-data-entry__datepicker-module__inputSegment___ocu7L",Sr="-esm-fast-data-entry__datepicker-module__dateInputWrapper___909Km",Sn="-esm-fast-data-entry__datepicker-module__invalidText___oHJHi",So="-esm-fast-data-entry__datepicker-module__flatButton___i9LDo",Si="-esm-fast-data-entry__datepicker-module__flatButtonMd___VZMkc",Sa="-esm-fast-data-entry__datepicker-module__flatButtonSm___VA5wy",Ss="-esm-fast-data-entry__datepicker-module__flatButtonLg___MnYLl";function Su({children:e}){let t=(0,dV.useContext)(xz),r=(0,dV.useContext)(xG),n=t??r,o=pu(()=>n?.close());return(0,pB.jsx)(_H,{className:"-esm-fast-data-entry__datepicker-module__dialog___2pADb",ref:o,children:e})}let Sl=(0,dV.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,pB.jsx)(xV,{ref:o,className:"-esm-fast-data-entry__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,pB.jsx)(Su,{children:(0,pB.jsxs)(i?wO:wS,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,pB.jsxs)("header",{className:"-esm-fast-data-entry__datepicker-module__header___+fi16",children:[(0,pB.jsx)(gI,{className:pU()(So,Si),slot:"previous",children:(0,pB.jsx)(hm,{size:16})}),(0,pB.jsx)(E7,{className:"-esm-fast-data-entry__datepicker-module__monthYear___mGhot"}),(0,pB.jsx)(gI,{className:pU()(So,Si),slot:"next",children:(0,pB.jsx)(hy,{size:16})})]}),(0,pB.jsx)(wP,{className:"-esm-fast-data-entry__datepicker-module__calendarGrid___z07wV",children:e=>(0,pB.jsx)(wj,{className:pU()("cds--date-picker__day",{"-esm-fast-data-entry__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),Sc=(0,dV.forwardRef)(function(e,t){let r=(0,dV.useContext)(xz),[n,o]=m3({slot:e.slot},t,_R),{locale:i}=gQ(),a=_j({...n,locale:i,createCalendar:wi}),s=(0,dV.useRef)(null),{fieldProps:u,inputProps:l}=_r({...n,inputRef:s},a,o),c=(0,dV.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,pB.jsxs)(m0,{values:[[_N,a],[wA,{...l,ref:s}],[wR,{...u,ref:o,isInvalid:a.isInvalid}]],children:[(0,pB.jsx)(wN,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,dV.cloneElement)(e.children(t),{key:r}))}),(0,pB.jsx)(wM,{})]})}),Sd=(0,dV.forwardRef)(function(e,t){let r=(0,dV.useContext)(xz),n=(0,dV.useContext)(xG);return(r??n).isInvalid?(0,pB.jsx)(mE,{ref:t,size:16,...e}):(0,pB.jsx)(ho,{ref:t,size:16,...e})});class Sf{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Sp=new Map,Sh=(0,dV.forwardRef)(function({segment:e,...t},r){let n=(0,dV.useContext)(_N),o=mN(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,dV.useRef)(""),{locale:u,direction:l}=gQ(),c=function(){var e;let{locale:t}=gQ(),r=bc((e=w3)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,dV.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Sf(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=w7.get(t),m=e.isPlaceholder?"":e.text,y=(0,dV.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=bt({month:"long",timeZone:y.timeZone}),b=bt({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=E1({value:e.value??void 0,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,dV.useMemo)(()=>new(0,E3.d)(u,{maximumFractionDigits:0}),[u]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:E}=(n=function(e){let{locale:t}=gQ(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Sp.has(r))return Sp.get(r);let n=new Intl.Collator(t,e);return Sp.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,dV.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,dV.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,dV.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,dV.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=bt({hour:"numeric",hour12:!0}),O=(0,dV.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),D=(0,dV.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=bt({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,dV.useMemo)(()=>{if("era"!==e.type)return[];let r=bQ(new bF(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),C=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(O,r))t.setSegment("dayPeriod",0);else if(E(D,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};vv((0,dV.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&yd(r.current,e?.anchorNode)&&e.collapse(r.current)});let T=(0,dV.useRef)("");vv(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&C(n.data)}}),vv(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(E(O,n)||E(D,n))&&C(n))}),m$(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let j=yR()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,dV.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let R=mY(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),M=vh({"aria-label":`${A}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===l){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:mX(v,M,{id:R,...j,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(dU().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&&(yC()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&vS(r.current,{containingElement:v_(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:u}=gD(),{hoverProps:l,isHovered:c}=gj({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,dV.useMemo)(()=>{let e,u,l;return e="function"==typeof t?t({...s,defaultClassName:o}):t,u="function"==typeof r?r({...s,defaultStyle:a||{}}):r,l="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:u||a?{...a,...u}:void 0,children:l??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:u},defaultChildren:e.text}),f=(0,dV.useCallback)(e=>{e.stopPropagation()},[]);return(0,pB.jsx)("span",{...mX(ya(t),i,a,l),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":u||void 0,onClick:f})}),Sm={short:!1,size:"md"},Sy=(0,dV.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:u,labelText:l,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:g,...b}={...Sm,...e},{calendar:v,intlLocale:w,today_:x}=Eq(),E=(0,dV.useId)(),S=!!(l??u),O=(0,dV.useMemo)(()=>xJ(n,v),[n,v]),D=(0,dV.useMemo)(()=>xJ(g,v,!0),[g,v]),P=(0,dV.useMemo)(()=>xJ(d,v),[d,v]),k=(0,dV.useMemo)(()=>xJ(f??EY,v),[f,v]),C=(0,dV.useMemo)(()=>i||s,[i,s]),T=(0,dV.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(xX(e)))),[h,p]);return(0,pB.jsx)(xZ,{locale:w.toString(),children:(0,pB.jsx)("div",{className:pU()("cds--form-item",r),children:(0,pB.jsx)(m0,{values:[[EG,w]],children:(0,pB.jsxs)(xq,{className:pU()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:O,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:D,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:T,children:[(0,pB.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,pB.jsx)(_Z,{className:pU()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:l??u}),(0,pB.jsxs)(wN,{className:Se,children:[(0,pB.jsx)(Sc,{id:S?E:void 0,ref:t,className:pU()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__inputWrapper___MHJAy",{"-esm-fast-data-entry__datepicker-module__inputWrapperSm___esx4E":"sm"===y,"-esm-fast-data-entry__datepicker-module__inputWrapperMd___VQbzP":"md"===y||!y||0===y.length,"-esm-fast-data-entry__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===y}),children:e=>"era"!==e.type?(0,pB.jsx)(Sh,{className:St,segment:e}):(0,pB.jsx)(dU().Fragment,{})}),(0,pB.jsx)(gI,{className:pU()(So,{[Sa]:"sm"===y,[Si]:"md"===y||!y||0===y.length,[Ss]:"lg"===y}),children:(0,pB.jsx)(Sd,{})})]}),(0,pB.jsx)(_z,{className:Sn,children:a})]}),(0,pB.jsx)(Sl,{variant:"single",today_:x})]})})})})}),Sg=(0,dV.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:u,maxDate:l,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=Eq(),w=(0,dV.useId)(),x=!!(s??a),E=(0,dV.useMemo)(()=>{if(h)return{start:xJ(h[0],g,!1),end:xJ(h[1],g,!1)}},[h,g]),S=(0,dV.useMemo)(()=>{if(t)return{start:xJ(t[0],g,!1),end:xJ(t[1],g,!1)}},[t,g]),O=(0,dV.useMemo)(()=>xJ(c??EY,g,!0),[c,g]),D=(0,dV.useMemo)(()=>xJ(l,g,!0),[l,g]),P=(0,dV.useMemo)(()=>r||i,[r,i]),k=(0,dV.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?.([xX(e.start),xX(e.end)]))),[f,d]);return(0,pB.jsx)(xZ,{locale:b.toString(),children:(0,pB.jsx)("div",{className:pU()("cds--form-item",e),children:(0,pB.jsx)(m0,{values:[[EG,b]],children:(0,pB.jsx)(xY,{id:x?w:void 0,className:pU()("cds--date-picker",{"cds--date-picker--light":u,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:D,minValue:O,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:k,children:(0,pB.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,pB.jsx)(_Z,{className:pU()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,pB.jsxs)(wN,{className:Se,children:[(0,pB.jsxs)("div",{className:pU()("-esm-fast-data-entry__datepicker-module__inputsWrapper___UyGoG",{"-esm-fast-data-entry__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-fast-data-entry__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-fast-data-entry__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,pB.jsx)(_M,{className:pU()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__startInput___C8vnM",Sr),slot:"start",children:e=>(0,pB.jsx)(Sh,{className:St,segment:e})}),(0,pB.jsx)("div",{className:"-esm-fast-data-entry__datepicker-module__separator___vHLFZ",children:(0,pB.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,pB.jsx)(_M,{className:pU()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__endInput___25OF9",Sr),slot:"end",children:e=>(0,pB.jsx)(Sh,{className:St,segment:e})})]}),(0,pB.jsx)(gI,{className:pU()(So,{[Sa]:"sm"===p,[Si]:"md"===p||!p||0===p.length,[Ss]:"lg"===p}),children:(0,pB.jsx)(Sd,{})})]}),(0,pB.jsx)(_z,{className:Sn,children:n}),(0,pB.jsx)(Sl,{variant:"range",today_:v,minDate:O,maxDate:D})]})})})})})}),Sb=({diagnoses:e})=>{let{diagnosisTags:t}=fB({externalModuleName:"@openmrs/esm-styleguide"});return(0,pB.jsx)("div",{className:"-esm-fast-data-entry__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,pB.jsx)(pG.Tag,{type:i,children:o},n)})})},Sv={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"},Sw=({width:e="64",height:t="64"})=>(0,pB.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,pB.jsx)("use",{href:"#omrs-empty-data-illustration"})}),S_=e=>{let t="tablet"===pn(),r=e.launchForm;return(0,pB.jsx)(pG.Layer,{className:Sv.layer,children:(0,pB.jsxs)(pG.Tile,{className:Sv.tile,children:[(0,pB.jsx)("div",{className:t?Sv.tabletHeading:Sv.desktopHeading,children:(0,pB.jsx)("h4",{children:e.headerTitle})}),(0,pB.jsx)(Sw,{}),(0,pB.jsx)("p",{className:Sv.content,children:oj("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,pB.jsx)("p",{className:Sv.action,children:r&&(0,pB.jsx)(pG.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:oj("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},Sx=({error:e,headerTitle:t})=>{let r="tablet"===pn();return(0,pB.jsx)(pG.Layer,{children:(0,pB.jsxs)(pG.Tile,{className:"-esm-fast-data-entry__error-state-module__tile___hHM56",children:[(0,pB.jsx)("div",{className:r?"-esm-fast-data-entry__error-state-module__tabletHeading___W7a4U":"-esm-fast-data-entry__error-state-module__desktopHeading___VL8Rv",children:(0,pB.jsx)("h4",{children:t})}),(0,pB.jsxs)("p",{className:"-esm-fast-data-entry__error-state-module__errorMessage___IytZy",children:[oj("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,pB.jsx)("p",{className:"-esm-fast-data-entry__error-state-module__errorCopy___E1yZO",children:oj("errorCopy")})]})})},SE=Sx,SS=dU().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=pa(),a=window.location??{pathname:""},s=d2(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,pB.jsxs)(pG.SideNav,{"aria-label":oj("leftNavigation","Left navigation"),className:"-esm-fast-data-entry__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,pB.jsx)(d6,{name:"global-nav-menu-slot"}),r?(0,pB.jsx)(fT,{value:o,fallback:(0,pB.jsx)(d6,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,pB.jsx)(dW.Provider,{value:o,children:(0,pB.jsx)(d6,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),SO=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,dV.useState)(""),s=(0,dV.useId)(),{location:u}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=fK()(t,nh,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,dV.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:l,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:h}=function(e,t=0,r=""){let n=fW(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:u}=f6()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${nd}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},nh);return(0,dV.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:u||null,setPage:s}),[i,o,a,s,u])}(r,n,i),m=(0,dV.useMemo)(()=>u&&!i&&t?[u,...l.filter(({resource:e})=>e.id!==t)]:l??[],[u,l,t,i]),y=(0,dV.useCallback)(e=>{o(),a(e.trim())},[o]),g=pl((0,dV.useCallback)(()=>{!f&&d&&h(e=>e+1)},[f,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)(pG.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:oj("searchForLocation"),id:s,placeholder:oj("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),p&&(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,pB.jsx)(pG.InlineNotification,{kind:"error",subtitle:oj("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:oj("error","Error")})}),(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__searchResults___aCL93",children:c?(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,pB.jsx)(pG.RadioButtonSkeleton,{className:"-esm-fast-data-entry__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__locationResultsContainer___5yuvs",children:m.length>0?(0,pB.jsx)(pG.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,pB.jsx)(pG.RadioButton,{className:"-esm-fast-data-entry__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,pB.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__emptyState___qiPqQ",children:(0,pB.jsx)("p",{className:"-esm-fast-data-entry__location-picker-module__locationNotFound___tKDOJ",children:oj("noResultsToDisplay")})})}),f&&(0,pB.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingIcon___PGwvc",children:(0,pB.jsx)(pG.InlineLoading,{description:oj("loading")})})]})})]})},SD=q("modalState",{modalContainer:null,modalStack:[]}),SP=0;async function Sk(e,t,r={}){let n=db(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=SP++;o=await d$({...a,name:`${t}-${s}`},{...r,domElement:e})}else M(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function SC(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function ST(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function Sj(e){return e.find(e=>!SC(e))}function SR(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let SN=window.getComputedStyle(document.body).overflow;function SA({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",SI),document.body.style.overflow="hidden",t.style.visibility="unset");let r=Sj(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=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=r,e.state="MOUNTING",Sk(r,e.modalName,e.props).then(n=>{SC(e)?ST(e.modalName,n):n?(e.parcel=n,t.prepend(r),SR(e,Sj(SD.getState().modalStack)===e),n.mountPromise.then(()=>{SC(e)||(e.state="MOUNTED")},t=>{M(t),e.parcel=null,SM(e)})):SM(e)},t=>{M(t),SM(e)});break}case"MOUNTING":case"MOUNTED":SR(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),ST(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=SD.getState();SD.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=SN,removeEventListener("keydown",SI)}function SM(e){if(SC(e))return;e.state="TO_BE_DELETED";let t=SD.getState();SD.setState({...t,modalStack:[...t.modalStack]})}function SI(e){"Escape"===e.key&&function(){let[e]=SD.getState().modalStack;e&&SM(e)}()}function S$(e){SD.subscribe(SA),SD.setState({...SD.getState(),modalContainer:e})}function SL(e,t={},r=()=>{}){let n=()=>{let e=SD.getState().modalStack.find(e=>e.onClose===r);e&&SM(e)};if(db(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=SD.getState()).modalStack],SD.setState({...i,modalStack:a})}else M(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let SF=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,pB.jsx)(pG.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},SB=({subject:e})=>{let[t,r]=(0,dV.useState)([]);return(0,dV.useEffect)(()=>{let t=e.subscribe(e=>r(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,pB.jsx)(pB.Fragment,{children:t.map(e=>(0,pB.jsx)(SF,{notification:e},e.id))})},SV=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:u,...l}=e,[c,d]=(0,dV.useState)(t);return(0,pB.jsx)(pG.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:oj("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:oj("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...l})},SU=({subject:e})=>{let[t,r]=(0,dV.useState)([]);return(0,dV.useEffect)(()=>{let t=e.subscribe(e=>r(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,pB.jsx)(pB.Fragment,{children:t.map(e=>(0,pB.jsx)(SV,{notification:e},e.id))})};var SW=r(6401);let SH=new lL,SK=0,Sz=new lL,SG=0;function Sq(e){e&&(0,d5.createRoot)(e).render((0,pB.jsx)(SB,{subject:SH}))}function SY(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,SW.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{SH.next({...e,id:SK++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function SZ(e){e&&(0,d5.createRoot)(e).render((0,pB.jsx)(SU,{subject:Sz}))}function SJ(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,SW.A)(t))?setTimeout(()=>{Sz.next({...e,id:SG++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let SX=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],SQ=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],S0={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"},S1=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let u=(0,dV.useId)(),{referenceRange:l,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${nc}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${nc}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=fK()(r,nh),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),d=o??l,f=(0,dV.useMemo)(()=>{if(n)return n?"--"===n?"normal":SX.includes(n)?n.toLowerCase():SQ.includes(n)?n:"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"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,h="normal"!==f,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${u}`:void 0,y=`omrs-numeric-obs-value-${u}`,g=`omrs-numeric-obs-unit-${u}`,b=null!=e&&""!==e,v=b?e:oj("notAvailable","Not available"),w=pU()({[S0["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[S0["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[S0.low]:"low"===f,[S0.high]:"high"===f,[S0["off-scale-low"]]:"off_scale_low"===f,[S0["off-scale-high"]]:"off_scale_high"===f}),x=pU()({[S0.container]:!0,[S0.card]:!0,[S0["critical-value"]]:p,[S0["abnormal-value"]]:h&&!p}),E=pU()({[S0.cell]:!0,[w]:!0});return"cell"===a?(0,pB.jsxs)("div",{className:E,children:[v,b&&t?` ${t}`:""]}):(0,pB.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,pB.jsxs)("div",{className:S0["label-container"],children:[(0,pB.jsx)("span",{id:m,className:S0.label,children:r}),h&&(0,pB.jsx)("span",{className:S0[f.replace("_","-")],title:oj("abnormalValue","Abnormal value")})]}),(0,pB.jsxs)("div",{className:S0["value-container"],children:[(0,pB.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:S0.value,children:v}),b&&t&&(0,pB.jsx)("span",{id:g,className:S0.units,children:t})]})]})},S2="-esm-fast-data-entry__page-header-module__pageHeader___XNJYe",S3=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,pB.jsx)("div",{className:pU()(S2,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,pB.jsx)("div",{className:pU()(S2,n),...o,children:(0,pB.jsx)(S4,{title:t,illustration:r})})}},S4=({title:e,illustration:t,className:r})=>{let[n,o]=(0,dV.useState)(null);return(0,dV.useEffect)(()=>{tt("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,pB.jsxs)("div",{className:pU()("-esm-fast-data-entry__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,pB.jsxs)("div",{className:"-esm-fast-data-entry__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,pB.jsx)("p",{children:oj(n.implementationName)}),(0,pB.jsx)("p",{className:"-esm-fast-data-entry__page-header-module__pageName___+eYMc",children:e})]})]})},S6=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:u}=pf(t,e,n,i),l="tablet"===pn(),c=oj("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:u});return(0,pB.jsx)(pB.Fragment,{children:e>0&&(0,pB.jsxs)("div",{className:pU()({"-esm-fast-data-entry__pagination-module__tablet___DdaYk":l,"-esm-fast-data-entry__pagination-module__desktop___rSwlo":!l}),children:[(0,pB.jsxs)("div",{children:[c,o&&(0,pB.jsx)(dH,{to:o,className:"-esm-fast-data-entry__pagination-module__configurableLink___cTCLf",children:a??oj("seeAll","See all")})]}),(0,pB.jsx)(pG.Pagination,{className:"-esm-fast-data-entry__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>oj("paginationOfPages","of {{count}} pages",{count:t}),size:l?"lg":"sm"})]})})};function S5(e){return S9(Oe(e,"usual","official"))}function S8(e){return S5(e)}function S9(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function S7(e){return S9(e)}function Oe(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function Ot(e,t=pv()){let r=pv(t),n=EB(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),u=r.diff(n,"years"),l={};if(o<2)l.minutes=r.diff(n,"minutes");else if(i<2)l.hours=o;else if(a<4)l.days=i;else if(u<1){let e=r.subtract(a,"weeks").diff(n,"days");l.weeks=a,l.days=e}else if(u<2){let e=r.subtract(s,"months").diff(n,"days");l.months=s,l.days=e}else if(u<18){let e=r.subtract(u,"year").diff(n,"months");l.years=u,l.months=e}else l.years=u;return l}function Or(e,t=pv()){let r=Ot(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),EF(r,n)}let On={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 Oo({showIdentifierLabel:e,type:t,value:r}){return(0,pB.jsx)("span",{className:On.primaryIdentifier,children:(0,pB.jsxs)(pG.Tag,{className:On.tag,type:"gray",children:[e&&t?.text&&(0,pB.jsxs)("span",{className:On.label,children:[t.text,": "]}),(0,pB.jsx)("span",{className:On.value,children:r})]})})}function Oi({showIdentifierLabel:e,type:t,value:r}){return(0,pB.jsxs)(pG.FormLabel,{className:On.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,pB.jsxs)("span",{className:On.label,children:[t?.text,": "]}),(0,pB.jsx)("span",{className:On.value,children:r})]})}function Oa({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=fB(),{primaryIdentifierCode:n}=pm(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,pB.jsx)(pB.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,pB.jsxs)(dU().Fragment,{children:[(0,pB.jsx)("span",{className:On.identifier,children:r?.coding?.[0]?.code===n?(0,pB.jsx)(Oo,{showIdentifierLabel:t,type:r,value:e}):(0,pB.jsx)(Oi,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,pB.jsx)("span",{className:On.separator,children:"\xb7"})]},e)):""})}let Os={Female:hk,Male:hC,Other:hT,Unknown:hj},Ou=({gender:e})=>{let t=Os[e];return t?(0,pB.jsx)(t,{fill:"#525252"}):null},Ol={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Oc({patient:e,renderedFrom:t}){var r;let n,o,i=S5(e),a=e?.gender&&(o=Ol[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:oj(n,r),iconKey:o}),s=(0,dV.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,pB.jsxs)("div",{className:On.patientInfo,children:[(0,pB.jsx)("div",{className:pU()(On.row,On.patientNameRow),children:(0,pB.jsxs)("div",{className:On.flexRow,children:[(0,pB.jsx)("span",{className:On.patientName,children:i}),a&&(0,pB.jsxs)("div",{className:On.gender,children:[(0,pB.jsx)(Ou,{gender:a.iconKey}),(0,pB.jsx)("span",{children:a.displayText})]}),(0,pB.jsx)(d6,{className:On.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,pB.jsxs)("div",{className:On.demographics,children:[e.birthDate&&(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)("span",{children:Or(e.birthDate)}),(0,pB.jsx)("span",{className:On.separator,children:"\xb7"}),(0,pB.jsx)("span",{children:EN(e.birthDate,{time:!1})}),(0,pB.jsx)("span",{className:On.separator,children:"\xb7"})]}),(0,pB.jsx)(Oa,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,pB.jsx)(d6,{className:On.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Od=r(1673);function Of({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,dV.useState)(!1),{extensions:a}=d3(r),s="tablet"===pn(),u=pu(()=>i(!1),o),l=(0,dV.useRef)(null),c=(0,dV.useRef)(null),d=(0,dV.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,h=(0,dV.useCallback)(()=>i(e=>!e),[]),m=(0,dV.useCallback)(()=>{i(!1),l.current?.focus()},[]),y=(0,dV.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,dV.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,dV.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,pB.jsx)("div",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,pB.jsxs)("div",{"data-overflow-menu":!0,className:pU()("cds--overflow-menu",pZ),ref:u,children:[(0,pB.jsxs)("button",{className:pU()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},pQ),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:h,onKeyDown:y,ref:l,children:[(0,pB.jsx)("span",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:oj("actions","Actions")})," ",(0,pB.jsx)(Od.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,pB.jsxs)("div",{className:pU()("cds--overflow-menu-options","cds--overflow-menu--flip",pJ,{[pX]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,pB.jsx)("ul",{className:pU()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,pB.jsx)(d6,{name:r,state:g},r)}),(0,pB.jsx)("span",{})]})]})})}var Op=r(6767),Oh=r.n(Op);function Om(e){let{patientPhotoConceptUuid:t}=fB({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${nc}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=ff()(e?r:null,nh),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Oy=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,fc.useTranslation)();return(0,pB.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pB.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,pB.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"})]})},Og="-esm-fast-data-entry__patient-photo-module__avatar___R93LX";function Ob({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=Om(e),[i,a]=(0,dV.useState)(null),[s,u]=(0,dV.useState)(!1),l=(0,dV.useMemo)(()=>Oh().generate(e),[e]);(0,dV.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;u(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),u(!1))},r.onerror=()=>{t||(a(null),u(!1))},r.src=e,()=>{t=!0}}a(null),u(!1)},[n?.imageSrc]);let c=(0,dV.useMemo)(()=>r||(i?oj("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):oj("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,pB.jsx)(pG.SkeletonIcon,{className:"-esm-fast-data-entry__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,pB.jsx)(Oy,{"aria-label":oj("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,pB.jsx)("div",{"aria-label":c,children:(0,pB.jsx)("img",{className:Og,src:i,alt:c,title:t})}):(0,pB.jsx)("div",{"aria-label":c,children:(0,pB.jsx)("div",{className:Og,title:t,style:{backgroundImage:l.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,pB.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 Ov=["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-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"],Ow=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),O_=Ow,Ox=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),OE=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),OS=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),OO=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),OD=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),OP=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Ok=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),OC=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),OT=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Oj=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),OR=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),ON=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),OA=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),OM=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),OI=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),O$=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OL=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),OF=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),OB=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),OV=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),OU=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),OW=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),OH=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),OK=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Oz=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),OG=(0,dV.memo)((0,dV.forwardRef)(function(e,t){return(0,pB.jsx)(OJ,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Oq=OT,OY=OL,OZ=(0,dV.memo)((0,dV.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,dV.useRef)(document.getElementById(e));return(0,dV.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pB.jsx)(fT,{value:o.current,fallback:t,children:(0,pB.jsx)(OJ,{ref:n,pictogram:e,pictogramProps:r})})})),OJ=(0,dV.memo)((0,dV.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,pB.jsx)("svg",{ref:r,className:pU()("-esm-fast-data-entry__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,pB.jsx)("use",{href:`#${e}`})})})),OX=({children:e})=>"tablet"===pn()?(0,pB.jsx)(pG.Layer,{children:e}):(0,pB.jsx)(pB.Fragment,{children:e}),OQ=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:u=5e3,autoClose:l="error"!==n,title:c,id:d,...f}=e,[p,h]=(0,dV.useState)(r),[m,y]=(0,dV.useState)(!0),[g,b]=(0,dV.useState)(!1),v=(0,dV.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,dV.useCallback)(()=>{b(!0),v()},[v]);return(0,dV.useEffect)(()=>{if(l){let e=setTimeout(w,u);return()=>clearTimeout(e)}},[u,l,w]),(0,dV.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,pB.jsx)(pG.ActionableNotification,{actionButtonLabel:p,"aria-label":oj("closeSnackbar","Close snackbar"),className:pU()("-esm-fast-data-entry__snackbar-module__slideIn___TqSN-",{"-esm-fast-data-entry__snackbar-module__animated___+XPKT":m,"-esm-fast-data-entry__snackbar-module__slideOut___1cFIY":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:oj("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},O0=({subject:e})=>{let[t,r]=(0,dV.useState)([]),n=(0,dV.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,dV.useEffect)(()=>{let t=e.subscribe(e=>r(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,pB.jsx)(pB.Fragment,{children:t.map(e=>(0,pB.jsx)(OQ,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},O1=new lL,O2=0;function O3(e){e&&(0,d5.createRoot)(e).render((0,pB.jsx)(O0,{subject:O1}))}function O4(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{O1.next({...e,id:O2++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let O6=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,u=(0,dV.useCallback)(()=>{s(),t()},[t,s]);return(0,pB.jsx)("div",{children:(0,pB.jsx)(pG.ActionableNotification,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:u,onClose:t})})},O5=({subject:e})=>{let[t,r]=(0,dV.useState)([]),n=(0,dV.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,dV.useEffect)(()=>{let t=e.subscribe(e=>r(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,pB.jsx)(pB.Fragment,{children:t.map(e=>(0,pB.jsx)(O6,{toast:e,closeToast:()=>n(e)},e.id))})},O8=new lL,O9=0;function O7(e){e&&(0,d5.createRoot)(e).render((0,pB.jsx)(O5,{subject:O8}))}function De(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,SW.A)(t))?setTimeout(()=>{O8.next({...e,id:O9++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Dt(e,t=!1){if(t)return!0;let r=Da[e];return!r||!r()}function Dr(e,t){let r=Dh.getState()?.workspaceGroup,n=r?.name;n&&e===n&&Db(()=>{let n=DE(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),Dh.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function Dn(e,t){let{name:r,additionalProps:n}=t;dS(r);let o=()=>{Dd(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Do(r,n),closeWorkspaceGroup:!1})};Dt(e.name)?o():Dw("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Do(e,t){let r=dS(e),n=Dh.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Dr(n.name,()=>{Do(e,t)});let o=Dh.getState().workspaceGroup?.name,i={...r,title:D_(r,t),closeWorkspace:(t={})=>Dd(e,t),closeWorkspaceWithSavedChanges:t=>Dd(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(Da[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,Dh.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){Dh.setState(r=>{let n=[e,...t??r.openWorkspaces],o=Dg(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&DE(o,t);let s=Dh.getState().openWorkspaces,u=s.findIndex(t=>t.name===e),l=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===u)if(u>=0){let t=s[u];a({...t,additionalProps:i.additionalProps,...t.title===D_(t,t.additionalProps)&&{title:D_(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else l?(a(l,Dh.getState().openWorkspaces.filter(e=>e.type!=i.type)),Dn(l,{name:e,additionalProps:t})):a(i);else Dn(s[0],{name:e,additionalProps:t})}function Di({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){Df(t),Do(r,n),ne({to:e})}let Da={};function Ds(e,t){Da[e]=t}function Du(e){return Da[e]}function Dl(){let e=Dh.getState();Dh.setState({...e,prompt:null})}let Dc={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Dd(e,t={}){t={...Dc,...t};let r=()=>{let r=Dh.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=Dh.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Dr(o),Da[e]=()=>!1,Dh.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:Dg(n?.[0])})),t?.onWorkspaceClose?.()};return Dt(e,t?.ignoreChanges)?(r(),!0):(Dw("closing-workspace",r,dS(e).title??e),!1)}function Df(e){Dh.getState().context!=e&&Dh.setState({context:e,openWorkspaces:[],prompt:null})}let Dp={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},Dh=q("workspace",Dp);function Dm(){return Dh}function Dy(e){let t=Dh.getState();Dh.setState({...t,workspaceWindowState:e})}function Dg(e){return e?.preferredWindowSize??"normal"}function Db(e=()=>{},t=()=>!0){let r=Dh.getState().openWorkspaces.filter(t).every(({name:e})=>Dt(e)),n=()=>{Dx(),e?.()};r?n():Dw("closing-all-workspaces",n)}function Dv(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=dY(Dh);return(0,dV.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function Dw(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:oj("unsavedChangesTitleText","Unsaved changes"),body:oj("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:oj("discard","Discard")};break;case"closing-all-workspaces":{let e=Dh.getState().openWorkspaces.filter(({name:e})=>!Dt(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:oj("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:oj("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:oj("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:oj("unsavedChangesTitleText","Unsaved changes"),body:oj("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{Dh.setState(e=>({...e,prompt:null})),t?.()},confirmText:oj("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}Dh.setState(e=>({...e,prompt:n}))}function D_(e,t){return t?.workspaceTitle??e.title}function Dx(){Dh.setState(Dp)}function DE(e,t={}){if(!e||"default"===e)return;let r=Z(e,{});return t&&r.setState(e=>({...e,...t})),r}let DS="-esm-fast-data-entry__action-menu-button-module__container___Uwne-",DO="-esm-fast-data-entry__action-menu-button-module__elementContainer___vWkQO",DD="-esm-fast-data-entry__action-menu-button-module__active___D7Idw";function DP({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,pB.jsxs)(pB.Fragment,{children:[e({size:16}),t?(0,pB.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,pB.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__countTag___XJRiM",children:r})]})}let Dk=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=pn(),{workspaces:s,workspaceWindowState:u}=Dv(),l=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==u&&0===l,d=l>0||0===l&&"hidden"===u;return"tablet"===a||"phone"===a?(0,pB.jsxs)(pG.Button,{className:pU()(DS,{[DD]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,pB.jsx)("span",{className:DO,children:(0,pB.jsx)(DP,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,pB.jsx)("span",{children:t})]}):(0,pB.jsx)(pG.IconButton,{align:"left","aria-label":r,className:pU()(DS,{[DD]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,pB.jsx)("div",{className:DO,children:(0,pB.jsx)(DP,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var DC=r(4535),DT=r(771);function Dj({contextKey:e}){let{prompt:t}=Dv();return(0,dV.useEffect)(()=>{RegExp(`/${(0,eo.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,dV.useEffect)(()=>(Df(e),()=>{Df(null)}),[e]),(0,dV.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${(0,eo.escapeRegExp)(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=Dh.getState().openWorkspaces.every(({name:e})=>Dt(e));a||(s?Dx():(r?.(),Db(()=>{ne({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,pB.jsxs)(pG.ComposedModal,{open:!0,onClose:Dl,children:[(0,pB.jsx)(pG.ModalHeader,{title:t.title}),(0,pB.jsx)(pG.ModalBody,{children:(0,pB.jsx)("p",{className:"-esm-fast-data-entry__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,pB.jsxs)(pG.ModalFooter,{children:[(0,pB.jsx)(pG.Button,{kind:"secondary",onClick:Dl,children:t.cancelText??oj("cancel")}),(0,pB.jsx)(pG.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??oj("confirm")})]})]}):null}function DR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function DN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?DR(Object(r),!0).forEach(function(t){DM(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DR(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function DA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DM(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DI(e){return(DI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D$(e,t){return(D$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DL(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var DF=function(e){var t=dV.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&D$(a,t);var r,n,o,i=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=DI(a);e=r?Reflect.construct(t,arguments,DI(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 DL(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),DM(DL(t=i.call(this,e)),"handleRef",function(e){t.el=e}),DM(DL(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),DM(DL(t),"getParcelProps",function(){var e=DN(DN({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,DN({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 fr&&fr.Consumer?dV.createElement(fr.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=fr&&fr.Consumer?dV.createElement(fr.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return dV.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],DA(a.prototype,n),o&&DA(a,o),a}();DM(DF,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function DB({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,dV.useState)(),o=function(e){let[t,r]=(0,dV.useState)({}),[n,o]=(0,dV.useState)(e);return(0,dV.useEffect)(()=>{n!==e&&o(e)},[e]),(0,dV.useEffect)(()=>{let e,t=DE(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,dV.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,dV.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,pB.jsx)(DF,{config:r,mountParcel:dF,...i},e.name):(0,pB.jsx)(pG.InlineLoading,{className:"-esm-fast-data-entry__workspace-module__loader___v7QFg",description:`${oj("loading","Loading")} ...`})}function DV({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,dV.useState)(!1),i=(0,dV.useRef)(window.innerHeight),{featureName:a}=(0,dV.useContext)(dW),s=pn();(0,dV.useEffect)(()=>{let e=()=>{o(!po(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let u=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,pB.jsx)("aside",{className:pU()("-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":n,"-esm-fast-data-entry__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,pB.jsx)("div",{className:"-esm-fast-data-entry__action-menu-module__container___mzfAh",children:(0,pB.jsx)(d6,{className:"-esm-fast-data-entry__action-menu-module__chartExtensions___DiJtm",name:u,state:r})})})}function DU({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=pn(),{workspaces:a,workspaceWindowState:s,workspaceGroup:u}=Dv(),l=u?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,dV.useMemo)(()=>r||l&&!d,[l,d,r]);return f$(!d&&!po(i)),(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsxs)("div",{className:r?"-esm-fast-data-entry__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-fast-data-entry__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,pB.jsx)("aside",{className:pU()(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,pB.jsx)("div",{className:pU()("-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:a.map((e,t)=>(0,pB.jsx)("div",{className:pU()("-esm-fast-data-entry__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-fast-data-entry__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,pB.jsx)(dV.Suspense,{fallback:null,children:(0,pB.jsx)(fc.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,pB.jsx)(DW,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,pB.jsx)(Dj,{contextKey:e})]}),p&&(0,pB.jsx)(DV,{name:l,isWithinWorkspace:!r,actionMenuProps:o})]})}function DW({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,fc.useTranslation)(),n=pn(),{workspaceWindowState:o,workspaceGroup:i}=Dv(),a=i?.name,s="maximized"===o;(0,dV.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:u}=(0,dV.useContext)(dW),l=(0,dV.useCallback)(()=>{Dy(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,dV.useMemo)(()=>e??{},[e]),h=(0,dV.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsxs)(pG.Header,{"aria-label":oj("workspaceHeader","Workspace Header"),className:"-esm-fast-data-entry__workspace-module__header___nACZO",children:[!po(n)&&!c&&(0,pB.jsx)(pG.HeaderMenuButton,{"aria-label":oj("close","Close"),renderMenuIcon:(0,pB.jsx)(p7,{}),onClick:()=>p()}),(0,pB.jsx)(pG.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,pB.jsx)("div",{className:"-esm-fast-data-entry__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,pB.jsxs)(pG.HeaderGlobalBar,{className:"-esm-fast-data-entry__workspace-module__headerButtons___heP0Q",children:[(0,pB.jsx)(d6,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,pB.jsx)(d6,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,pB.jsx)(d6,{name:`workspace-header-${u}-slot`,state:h}),po(n)&&(0,pB.jsxs)(pB.Fragment,{children:[(d||s)&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":s?oj("minimize","Minimize"):oj("maximize","Maximize"),onClick:l,children:s?(0,pB.jsx)(DC.Xj,{}):(0,pB.jsx)(DC.hz,{})}),c&&!a?(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("hide","Hide"),onClick:()=>Dy("hidden"),children:(0,pB.jsx)(he,{})}):(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("close","Close"),onClick:()=>p?.(),children:(0,pB.jsx)(hb,{})})]}),"tablet"===n&&c&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("close","Close"),onClick:()=>p?.(),children:(0,pB.jsx)(DT.d3,{})})]})]}),(0,pB.jsx)("div",{className:pU()("-esm-fast-data-entry__workspace-module__workspaceContent___oYdxI",{"-esm-fast-data-entry__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,pB.jsx)(DB,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function DH(e,t){let{openedGroup:r}=dD.getState();if(r){if(r.groupName===e&&DG(r.props,t))return!0;else if(!await Dq({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return dD.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function DK(e){let{openedGroup:t,openedWindows:r}=dD.getState();if(t){if(r.length>0&&!(e||await Dq({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;dD.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Dz(e,t=null,r=null,n=null){let o=dD.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=dP(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,u=dk(s);if(!u)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let l=dC(e);if(a&&(a.groupName!==u.name||!DG(a.props,n)))return!!await Dq({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(dD.setState({...o,openedGroup:{groupName:u.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[DQ(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(l>=0){let n=o.openedWindows[l],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(DG(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&DG(d.props,t)?((a||l!==o.openedWindows.length-1)&&dD.setState(DY.restoreWindow(o,s)),!0):!!await Dq({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(dD.setState({...o,openedGroup:{groupName:u.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==l),{windowName:s,openedWorkspaces:[DQ(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Dq({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(dD.setState({...o,openedGroup:{groupName:u.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==l),{windowName:s,openedWorkspaces:[DQ(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=u.persistence?(dD.setState({...o,openedGroup:{groupName:u.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[DQ(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Dq({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(dD.setState({...o,openedGroup:{groupName:u.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[DQ(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function DG(e,t){return null==e||null==t||L(e,t)}function Dq(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=dD.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=SL("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let DY={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=dC(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],u=s.findIndex(e=>e.workspaceName===t);if(-1===u)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let l=s.slice(0,u+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...l,DQ(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=dC(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function DZ(){return dZ(dD,DY)}let DJ=()=>(0,dV.useContext)(fr),DX=()=>Object.keys(dD.getState().registeredWorkspacesByName);function DQ(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:(0,li.A)()}}let D0={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"},D1=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=pn(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:u,registeredGroupsByName:l,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:h}=DZ(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=DJ(),v=dC(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,dV.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,dV.useEffect)(()=>{f[m]!==e&&p(m,e)},[f,m,e,p]),v<0||null==u||null==x)return null;let E=l[u.groupName];if(!E)throw Error(`Cannot find registered workspace group ${u.groupName}`);let S=d[m].window,O=c[S];if(!O)throw Error(`Cannot find registered workspace window ${S}`);let{icon:D,canMaximize:P}=O,k="closable"===E.persistence,C=!!D&&!k,{maximized:T}=w,j=O?.width??"narrow",R=Object.values(c).some(e=>e.group===u.groupName&&void 0!==e.icon),N=v<s.length-1||h;return(0,pB.jsxs)("div",{className:pU()(D0.workspaceOuterContainer,{[D0.narrowWorkspace]:"narrow"===j,[D0.widerWorkspace]:"wider"===j,[D0.extraWideWorkspace]:"extra-wide"===j,[D0.isActionMenuOpened]:R}),children:[(0,pB.jsx)("div",{className:pU()(D0.workspaceSpacer,{[D0.hidden]:N})}),(0,pB.jsx)("div",{className:pU()(D0.workspaceMiddleContainer,{[D0.maximized]:T,[D0.hidden]:N,[D0.isRootWorkspace]:y,[D0.showActionMenu]:b}),children:(0,pB.jsxs)("div",{className:pU()(D0.workspaceInnerContainer,{[D0.maximized]:T,[D0.hidden]:N,[D0.isRootWorkspace]:y}),children:[(0,pB.jsxs)(pG.Header,{"aria-label":oj("workspaceHeader"),className:D0.header,children:[(0,pB.jsx)(pG.HeaderName,{prefix:"",children:e}),(0,pB.jsx)("div",{className:D0.overlayHeaderSpacer}),(0,pB.jsx)(pG.HeaderGlobalBar,{className:D0.headerButtons,children:po(n)?(0,pB.jsxs)(pB.Fragment,{children:[(P||T)&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":T?oj("minimize"):oj("maximize"),onClick:()=>o(S,!T),children:T?(0,pB.jsx)(DC.Xj,{}):(0,pB.jsx)(DC.hz,{})}),C&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("hide"),onClick:()=>i(),children:(0,pB.jsx)(he,{})}),!k&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("close"),onClick:()=>g({closeWindow:!0}),children:(0,pB.jsx)(hb,{})})]}):(0,pB.jsxs)(pB.Fragment,{children:[C&&(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("hide"),onClick:()=>i(),children:(0,pB.jsx)(DT.d3,{})}),(0,pB.jsx)(pG.HeaderGlobalAction,{"aria-label":oj("close"),onClick:()=>{k?DK():g({closeWindow:!0})},children:(0,pB.jsx)(hb,{})})]})})]}),(0,pB.jsx)("div",{className:pU()(D0.workspaceContent),children:t})]})})]})},D2="-esm-fast-data-entry__action-menu-button2-module__container___gYRoa",D3="-esm-fast-data-entry__action-menu-button2-module__elementContainer___vBViO",D4="-esm-fast-data-entry__action-menu-button2-module__active___uRJRA",D6="-esm-fast-data-entry__action-menu-button2-module__focused___D4VYB";function D5({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,pB.jsxs)(pB.Fragment,{children:[e({size:16}),t?(0,pB.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,pB.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__countTag___l8lfc",children:r})]})}let D8=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=pn(),{openedWindows:a,restoreWindow:s,hideWindow:u,isMostRecentlyOpenedWindowHidden:l}=DZ(),{extension:c}=(0,dV.useContext)(dW),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||l),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(p)h?s(f.windowName):u();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Dz(e,t,r)}};return"tablet"===i||"phone"===i?(0,pB.jsxs)(pG.Button,{className:pU()(D2,{[D4]:p&&!m,[D6]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,pB.jsx)("span",{className:D3,children:(0,pB.jsx)(D5,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,pB.jsx)("span",{children:t})]}):(0,pB.jsx)(pG.IconButton,{align:"left","aria-label":t,className:pU()(D2,{[D4]:p&&!m,[D6]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,pB.jsx)("div",{className:D3,children:(0,pB.jsx)(D5,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function D9({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,pB.jsx)(pG.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?hg:hh,children:e?oj("showLess","Show less"):oj("showMore","Show more")})}let D7={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"},Pe=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${nc}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=ff()(t,nh),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,dV.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsxs)("p",{className:D7.heading,children:[oj("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,pB.jsx)(pG.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pB.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>EP(e?.startDate).getTime()-EP(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,pB.jsx)("li",{children:(0,pB.jsx)(dH,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,pB.jsx)("li",{children:"--"})})(),t.length>3&&(0,pB.jsx)("li",{className:D7.link,children:(0,pB.jsx)(dH,{to:`${window.spaBase}/home/patient-lists`,children:oj("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Pt=({patientId:e})=>{let{patient:t,isLoading:r}=ph(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,pB.jsx)(pG.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)("p",{className:D7.heading,children:oj("address","Address")}),(0,pB.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,pB.jsxs)("li",{children:[oj(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,pB.jsxs)("li",{children:[oj(e,e),": ",t]},`address-${e}`)):(0,pB.jsx)("li",{children:"--"})})]})},Pr=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=fB({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=fK()(`${nc}/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)))`,nh);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,dV.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,dV.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?oj(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)("p",{className:D7.heading,children:oj("contactDetails","Contact Details")}),t?(0,pB.jsx)(pG.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pB.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,pB.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,pB.jsx)("li",{children:"--"})})]})},Pn=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${nc}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=ff()(e?t:null,nh),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,pB.jsxs)(pB.Fragment,{children:[(0,pB.jsx)("p",{className:D7.heading,children:oj("relationships","Relationships")}),r?(0,pB.jsx)(pG.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pB.jsx)("ul",{children:t&&t.length>0?(0,pB.jsx)(pB.Fragment,{children:t.map(e=>(0,pB.jsxs)("li",{className:D7.relationship,children:[(0,pB.jsx)("div",{children:(0,pB.jsx)(dH,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,pB.jsx)("div",{children:e.relationshipType}),(0,pB.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?oj("yearAbbreviation","yr"):oj("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,pB.jsx)("li",{children:"--"})})]})};function Po({patientId:e,deceased:t}){return(0,pB.jsxs)("div",{className:pU()(D7.contactDetails,{[D7.deceased]:t}),children:[(0,pB.jsxs)("div",{className:D7.row,children:[(0,pB.jsx)("div",{className:D7.col,children:(0,pB.jsx)(Pt,{patientId:e})}),(0,pB.jsx)("div",{className:D7.col,children:(0,pB.jsx)(Pr,{patientUuid:e})})]}),(0,pB.jsxs)("div",{className:D7.row,children:[(0,pB.jsx)("div",{className:D7.col,children:(0,pB.jsx)(Pn,{patientId:e})}),(0,pB.jsx)("div",{className:D7.col,children:(0,pB.jsx)(Pe,{patientUuid:e})})]})]})}function Pi(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let Pa="-esm-fast-data-entry__action-menu2-module__container___4aX3S";function Ps({workspaceGroup:e,groupProps:t}){let r=pn(),{persistence:n}=e;return(0,pB.jsx)("aside",{className:"-esm-fast-data-entry__action-menu2-module__sideRail___a7qg9",children:(0,pB.jsxs)("div",{className:Pa,children:["closable"==n&&po(r)&&(0,pB.jsx)(pG.IconButton,{align:"left",onClick:()=>DK(),label:oj("close"),kind:"ghost",children:(0,pB.jsx)(hb,{})}),(0,pB.jsx)(dW.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,pB.jsx)(d6,{className:Pa,name:e.name,state:{groupProps:t}})})]})})}function Pu(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let Pl=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:u}=DZ(),l=(0,dV.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Dq({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Dq({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await Dq({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||u(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=dD.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=dD.getState(),u=o?s[o]:void 0,l=u&&u.width?u.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,pB.jsxs)("div",{className:pU()(D0.workspaceOuterContainer,{[D0.narrowWorkspace]:"narrow"===l,[D0.widerWorkspace]:"wider"===l,[D0.extraWideWorkspace]:"extra-wide"===l,[D0.isActionMenuOpened]:c}),children:[(0,pB.jsx)("div",{className:D0.workspaceSpacer}),(0,pB.jsx)("div",{className:pU()(D0.workspaceMiddleContainer,{[D0.isRootWorkspace]:n,[D0.showActionMenu]:i}),children:(0,pB.jsx)("div",{className:pU()(D0.workspaceInnerContainer,{[D0.isRootWorkspace]:n}),children:(0,pB.jsx)(pG.InlineLoading,{className:D0.loader,description:`${oj("loading")} ...`})})})]})}return(0,pB.jsx)(DF,{config:e,mountParcel:dF,...l},t.workspaceName)},Pc=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,dV.useState)({}),{registeredWorkspacesByName:i}=dD.getState();return(0,dV.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await pC(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,pB.jsx)(pB.Fragment,{children:r.map((o,i)=>(0,pB.jsx)(Pl,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function Pd(e){e&&(0,d5.createRoot)(e).render((0,pB.jsx)(Pf,{}))}function Pf(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=DZ();if((0,dV.useEffect)(()=>lC("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(DK().then(e=>!e));let s=r[e.groupName],u=s?.scopePattern;u&&function(e,t,r){try{let n=new RegExp(e),o=Pu(t),i=Pu(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(u,i,a)&&o(DK().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,pB.jsxs)("div",{className:pU()("-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-fast-data-entry__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-fast-data-entry__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":i}),children:[(0,pB.jsx)("div",{className:"-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,pB.jsx)(Pc,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,pB.jsx)(Ps,{workspaceGroup:o,groupProps:e.props})]})}function Pp(e,t,r){if(null==e)return r;let n=xQ(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=xQ(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function Ph(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Pm(e){return!!e&&e.constructor===Object}var Py=r(9589);function Pg(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Pb(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=Pg(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return Pg(e)}(t);return Py.satisfies(r,e,{includePrerelease:!0})}async function Pv(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await Pw(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function Pw(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);
43
+ }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&xy(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||x_(this,r)},a=m$(xw(document,"touchstart",t=>{let n=yp(t);e=v_(n)?n:vx(n,!0),r=!1;let o=n.ownerDocument.defaultView.getSelection();o&&!o.isCollapsed&&o.containsNode(n,!0)&&(r=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(r=!0),"selectionStart"in n&&"selectionEnd"in n&&n.selectionStart<n.selectionEnd&&n.ownerDocument.activeElement===n&&(r=!0)},{passive:!1,capture:!0}),xw(document,"touchmove",t=>{if(2!==t.touches.length&&!r){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),xw(document,"blur",e=>{let t=yp(e),r=e.relatedTarget;if(r&&xy(r))r.focus({preventScroll:!0}),x_(r,xy(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),HTMLElement.prototype.focus=i}):m$((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?xv(document.documentElement,"scrollbarGutter","stable"):xv(document.documentElement,"paddingRight",`${s}px`)),xv(document.documentElement,"overflow","hidden"))),()=>{0==--xb&&c()}}},[t])}({isDisabled:i||!t.isOpen}),(0,dU.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=_1[_1.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,u,l,c,d,f,p,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=yd(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&_Q,u=new Set(e),l=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))u.add(t);let t=e=>{if(l.has(e)||u.has(e)||e.parentElement&&l.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of u)if(yf(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=w$(yc(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&f(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)f(e),e=r.nextNode()}},f=e=>{let r=_0.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),l.add(e),_0.set(e,r+1))},_1.length&&_1[_1.length-1].disconnect(),d(a),(p=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...u,...l].some(e=>yf(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?u.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:u,hiddenNodes:l,observe(){p.observe(a,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},_1.push(h),()=>{for(let e of(p.disconnect(),l)){let t=_0.get(e);null!=t&&(1===t?(c(e,!1),_0.delete(e)):_0.set(e,t-1))}h===_1[_1.length-1]?(_1.pop(),_1.length&&_1[_1.length-1].observe()):_1.splice(_1.indexOf(h),1)}}},[i,t.isOpen,n,o]),{popoverProps:mQ(d,p),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:y}}({...n,offset:null!=(o=n.offset)?o:8,arrowSize:s,groupRef:f?d:l},e),g=n.popoverRef,b=function(e,t=!0){let[r,n]=(0,dU.useState)(!0),o=r&&t;return mL(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),xO(e,o,(0,dU.useCallback)(()=>n(!1),[])),o}(g,!!y)||n.isEntering||!1,v=m2({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:y,isEntering:b,isExiting:t}}),w=!n.isNonModal||"SubmenuTrigger"===n.trigger,[x,E]=(0,dU.useState)(!1);mL(()=>{g.current&&E(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),(0,dU.useEffect)(()=>{var e;let t,r;x&&g.current&&!g.current.contains(document.activeElement)&&(r=((e=document)=>e.activeElement)(t=yc(e=g.current)),"virtual"===xD?y6(()=>{((e=document)=>e.activeElement)(t)===r&&e.isConnected&&yu(e)}):yu(e))},[x,g]);let S={...p.style,...v.style},O=dW().createElement("div",{...mQ(ys(n),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"],ref:g,slot:n.slot||void 0,style:S,dir:n.dir,"data-trigger":n.trigger,"data-placement":y,"data-entering":b||void 0,"data-exiting":t||void 0},!n.isNonModal&&dW().createElement(xS,{onDismiss:e.close}),dW().createElement(_X.Provider,{value:{...m,placement:y,ref:a}},v.children),dW().createElement(xS,{onDismiss:e.close}));return f?dW().createElement(_U,{...n,shouldContainFocus:x,isExiting:t,portalContainer:null!=(i=null!=r?r:null==d?void 0:d.current)?i:void 0},O):dW().createElement(_U,{...n,shouldContainFocus:x,isExiting:t,portalContainer:r},!n.isNonModal&&e.isOpen&&dW().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),dW().createElement("div",{ref:l,style:{display:"contents"}},dW().createElement(xV.Provider,{value:l},O)))}function xH(e){return e?.start!=null&&null!=e.end}let xK=(0,dU.createContext)(null),xz=(0,dU.createContext)(null),xG=(0,dU.createContext)(null),xq=(0,dU.createContext)(null),xY=(0,dU.forwardRef)(function(e,t){var r,n;[e,t]=m4(e,t,xK);let{validationBehavior:o}=m3(_Y)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=xF(e),[r,n]=wm(e.value,e.defaultValue||null,e.onChange),[o]=(0,dU.useState)(r),i=r||e.placeholderValue||null,[a,s]=_E(i,e.granularity),u=null!=r?r.toDate(s??"UTC"):null,l="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,f]=(0,dU.useState)(null),[p,h]=(0,dU.useState)(null);if(r&&(d=r,"hour"in r&&(p=r)),i&&!(a in i))throw Error("Invalid granularity "+a+" for value "+i.toString());let m=r?.calendar.identifier==="gregory"&&"BC"===r.era,y=(0,dU.useMemo)(()=>({granularity:a,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[a,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:g,maxValue:b,isDateUnavailable:v}=e,w=(0,dU.useMemo)(()=>_g(r,g,b,v,y),[r,g,b,v,y]),x=_c({...e,value:r,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),O=(e,t)=>{n("timeZone"in t?t.set(bX(e)):bQ(e,t)),f(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:p,setDateValue:r=>{let o="function"==typeof c?c():c;l?p||o?O(r,p||__(e.defaultValue||e.placeholderValue)):f(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?O(d,e):h(e)},granularity:a,hasTime:l,...t,setOpen(n){!n&&!r&&d&&l&&O(d,p||__(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:S,isInvalid:E,formatValue:(e,t)=>u?new g8(e,_w(t,y)).format(u):"",getDateFormatter:(e,t)=>new g8(e,_w({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,dU.useRef)(null),[u,l]=m6(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:f,buttonProps:p,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n;let o=mZ(),i=mZ(),a=mZ(),s=bf((n=w4)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:u,validationErrors:l,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:f,descriptionProps:p,errorMessageProps:h}=w8({...e,labelElementType:"span",isInvalid:u,errorMessage:e.errorMessage||l}),m=w6(t,r),y=f["aria-labelledby"]||f.id,{locale:g}=g0(),b=t.formatValue(g,{month:"long"}),v=vk(b?s.format("selectedDateDescription",{date:b}):""),w=[v["aria-describedby"],f["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=ys(e),E=(0,dU.useMemo)(()=>wQ(r),[r]),S=(0,dU.useRef)(!1),{focusWithinProps:O}=gD({...e,isDisabled:t.isOpen,onBlurWithin:t=>{yf(document.getElementById(i),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:mQ(x,m,f,v,O,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...f,id:a,[_t]:"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,[_l]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:u,validationErrors:l,validationDetails:c}}({...m5(e),label:l,validationBehavior:i},a,s),[v,w]=(0,dU.useState)(null),x=(0,dU.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);xd({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:O}=gP({within:!0}),D=m2({...e,values:{state:a,isFocusWithin:S,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DatePicker"}),P=ys(e);return delete P.id,dW().createElement(m1,{values:[[xG,a],[wN,{...c,ref:s,isInvalid:a.isInvalid}],[_N,f],[gI,{...p,isPressed:a.isOpen}],[_Z,{...d,ref:u,elementType:"span"}],[w_,m],[_H,a],[xB,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[_W,h],[gF,{slots:{description:y,errorMessage:g}}],[_z,b]]},dW().createElement("div",{...E,...P,...D,ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))}),xZ=(0,dU.forwardRef)(function(e,t){var r,n;[e,t]=m4(e,t,xz);let{validationBehavior:o}=m3(_Y)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=xF(e),[r,n]=wm(e.value,e.defaultValue||null,e.onChange),[o]=(0,dU.useState)(r),[i,a]=(0,dU.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,u=e=>{a(s=e||{start:null,end:null}),xH(s)?n(s):n(null)},[l,c]=_E(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===l||"minute"===l||"second"===l,f=e.shouldCloseOnSelect??!0,[p,h]=(0,dU.useState)(null),[m,y]=(0,dU.useState)(null);s&&xH(s)&&(p=s,"hour"in s.start&&(m=s));let g=(e,t)=>{u({start:"timeZone"in t.start?t.start.set(bX(e.start)):bQ(e.start,t.start),end:"timeZone"in t.end?t.end.set(bX(e.end)):bQ(e.end,t.end)}),h(null),y(null),P.commitValidation()},b=r=>{let n="function"==typeof f?f():f;d?xH(r)&&(n||m?.start&&m?.end)?g(r,{start:m?.start||__(e.placeholderValue),end:m?.end||__(e.placeholderValue)}):h(r):xH(r)?(u(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{xH(p)&&xH(e)?g(p,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,dU.useMemo)(()=>({granularity:l,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[l,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:E,maxValue:S,isDateUnavailable:O}=e,D=(0,dU.useMemo)(()=>{var e;let t;return e=s,t=_h(_g(e?.start??null,E,S,O,x),_g(e?.end??null,E,S,O,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=_h(t,{isInvalid:!0,validationErrors:[(ba.getGlobalDictionaryForPackage("@react-stately/datepicker")||_m).getStringForLocale("rangeReversed",_y())],validationDetails:{..._i,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,E,S,O,x]),P=_c({...e,value:r,name:(0,dU.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:D}),k=P.displayValidation.isInvalid,C=e.validationState||(k?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:u,dateRange:p,timeRange:m,granularity:l,hasTime:d,setDate(e,t){"start"===e?b({start:t,end:p?.end??null}):b({start:p?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?u({start:t,end:s?.end??null}):u({start:s?.start??null,end:t})},setDateRange:b,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&xH(p)&&d&&g(p,{start:m?.start||__(e.placeholderValue),end:m?.end||__(e.placeholderValue)}),t.setOpen(r)},validationState:C,isInvalid:k,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,u=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),l=_w(r,{granularity:i,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(o||"UTC"),d=s.end.toDate(a||"UTC"),f=new g8(t,l);if(o===a&&i===u&&0!==s.start.compare(s.end)){try{let e=f.formatRangeToParts(c,d),t=-1;for(let r=0;r<e.length;r++){let n=e[r];if("shared"===n.source&&"literal"===n.type)t=r;else if("endRange"===n.source)break}let r="",n="";for(let o=0;o<e.length;o++)o<t?r+=e[o].value:o>t&&(n+=e[o].value);return{start:r,end:n}}catch{}n=f}else n=new g8(t,_w(r,{granularity:u,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:f.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new g8(e,_w({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,dU.useRef)(null),[u,l]=m6(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:f,endFieldProps:p,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:g,errorMessageProps:b,...v}=function(e,t,r){var n;let o=bf((n=w4)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:u,fieldProps:l,descriptionProps:c,errorMessageProps:d}=w8({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),f=l["aria-labelledby"]||l.id,{locale:p}=g0(),h=t.formatValue(p,{month:"long"}),m=vk(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":f},g={"aria-label":o.format("endDate"),"aria-labelledby":f},b=mZ(),v=mZ(),w=w6(t,r),x=[m["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=(0,dU.useMemo)(()=>wQ(r,{accept:e=>e.id!==b}),[r,b]),S={[_r]:E,[_t]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},O=ys(e),D=(0,dU.useRef)(!1),{focusWithinProps:P}=gD({...e,isDisabled:t.isOpen,onBlurWithin:t=>{yf(document.getElementById(v),t.relatedTarget)||(D.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{D.current||(D.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),k=(0,dU.useRef)(_s),C=(0,dU.useRef)(_s);return{groupProps:mQ(O,w,l,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...u,onClick:()=>{E.focusFirst()}},buttonProps:{...m,id:b,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${b} ${f}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${b} ${f}`},startFieldProps:{...y,...S,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[_l]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(_h(e,C.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[_l]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(_h(k.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...m5(e),label:l,validationBehavior:i},a,s),[w,x]=(0,dU.useState)(null),E=(0,dU.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);xd({ref:s,onResize:E});let{focusProps:S,isFocused:O,isFocusVisible:D}=gP({within:!0}),P=m2({...e,values:{state:a,isFocusWithin:O,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen},defaultClassName:"react-aria-DateRangePicker"}),k=ys(e);return delete k.id,dW().createElement(m1,{values:[[xq,a],[wN,{...c,ref:s,isInvalid:a.isInvalid}],[gI,{...h,isPressed:a.isOpen}],[_Z,{...d,ref:u,elementType:"span"}],[wx,y],[_H,a],[xB,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[_W,m],[_N,{slots:{start:f,end:p}}],[gF,{slots:{description:g,errorMessage:b}}],[_z,v]]},dW().createElement("div",{...S,...k,...P,ref:t,slot:e.slot||void 0,"data-focus-within":O||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-open":a.isOpen||void 0}))});function xJ(e){return dW().createElement(gQ,e)}function xX(e,t,r=!1){if(null==e)return r?e:void 0;if("string"==typeof e&&!e)return r?null:void 0;if(e instanceof bB||e instanceof bU||e instanceof bW)return t?b0(e,t):e;{let r=p_()(e).toDate(),n=new bB(r.getFullYear(),r.getMonth()+1,r.getDate());return t?b0(n,t):n}}function xQ(e){if(e)return e.toDate(vr())}function x0(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function x1(e){let t=e??"",r=x0(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function x2(){let e=window.i18next.language,t=x0(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;en=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;en=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var x3=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(en||"en-US"),x4=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},x6={};for(let e=1;e<100;e++)x6[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var x5={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},x8="[1234567890一二三四五六七八九〇\\d]",x9={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},x7={},Ee={"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},Et={zone:Ee,year:x6,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:{}},Er={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(Ee).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,}"},En={...Er,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}"},Eo={},Ei=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=x3){return Eo[t.toLowerCase()]||(Eo[t.toLowerCase()]=new e(t)),Eo[t.toLowerCase()]}constructor(e=x3){this.locale=e,this.lookups={...Et},this.vars={...Er};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 r=0;r<e.length;r++)t+=String(this.lookups.digit[e[r]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let r=this.lookups.meridiem[t?.toLowerCase()]||0,n=this.toInt(e);return n<12&&12===r&&(n+=12),12===n&&0===r&&(n=0),n}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,r,n]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(r)+this.toInt(n||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=x9: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(x7[e])return x7[e];if("fullwide"===e||"hanidec"===e)return{group:x8,lookup:{...x9}};let t=x5[e];if(!t)return{group:"\\d",lookup:{...x9}};let r=String.fromCharCode(t),n=String.fromCharCode(t+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(t+e)]=e;return x7[e]={group:`[${r}-${n}]`,lookup:o},x7[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,En)En.hasOwnProperty(r)&&(this.vars[r]=En[r].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((r,n)=>{["","k","kuu","kuuta"].forEach((o,i)=>{e[r+o+(i<2?"\\.?":"")]=!0,t[r+o]=n+1})});else{let r=[],n=e=>"month"===e.type;for(let e=0;e<12;e++)r.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let i=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let a=0;a<12;a++){let s=i.formatToParts(r[a]).find(n).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=a+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let i=0;i<12;i++){let a=o.formatToParts(r[i]).find(n).value.toLocaleLowerCase(this.locale);a=a.replace(/\.$/,""),e[`${a}\\.?`]=!0,t[a]=i+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let r=[],n={};for(let o of["long","short"]){let i=Intl.DateTimeFormat(this.locale,{weekday:o});for(let a=0;a<7;a++){let s=i.formatToParts(e[a]).find(t).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),r.push(`${s}\\.?`)):r.push(s),n[s]=a}}this.vars.DAYNAME=r.join("|"),this.lookups.dayname=n}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,r=[],n={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let i=0;i<2;i++){let a=o.formatToParts(e[i]).find(t);if(!a)return;let s=a.value.toLocaleLowerCase(this.locale);r.push(s),n[s]=12*i}this.vars.MERIDIEM=r.join("|"),this.lookups.meridiem=n}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},Ea=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],Es={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Eu=()=>new Date;function El(e){return function(t){let r={};for(let n=0,o=e.length;n<o;n++){let o=e[n];o&&(r[o]=t[n])}return r}}var Ec=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:r,formatter:n}){this.doneChecker=e,this.fallback=t,this.patterns=r,this.formatter=n}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),r={},n=!1;for(let e of this.patterns){let o=t.match(e.regex);if(!o)continue;n=!0;let i=e.handler(o);if(i){for(let[e,t]of Object.entries(i))e in r||void 0===t||(r[e]=t);if(t=(t=t.slice(0,o.index)+t.slice(o.index+o[0].length+1)).trim(),this.doneChecker(r,t))break}}return n?this.formatter(r):this.fallback(e)}},Ed=["year","month","day","hour","minute","second","millisecond","offset"],Ef={};function Ep(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 Eh=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],Em={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...Eh],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:Eh,id:Eh,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function Ey(e,t=x3){let r=function(e){if(!Ef[e]){var t,r;let n,o,i=Ei.factory(e);Ef[e]=new Ec({doneChecker:Ep,fallback:(t=e,function(e){let r=String(e).slice(0,50);return""===r&&(r="(empty string)"),{invalid:`Unable to parse "${r}" with locale "${t}"`}}),patterns:(n=[{name:"timestampWithOffset",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:El(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:El(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:El(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${x8}{2,4})\\s*\u5E74\\s*(${x8}{1,2})\\s*\u6708\\s*(${x8}{1,2})\\s*\u65E5$`),handler:El(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:El(["","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:El(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Eu(),r=e[0].toLowerCase(),n={now:0,today:0,tomorrow:864e5,yesterday:-864e5}[r];0!==n&&t.setTime(t.getTime()+n);let o={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===r?{...o,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:o}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,r,n]){t=parseFloat(t),"week"===(r=r.length<=2?Es[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=Eu();return"millisecond"===r?o.setUTCMilliseconds(o.getUTCMilliseconds()+t):"second"===r?o.setUTCSeconds(o.getUTCSeconds()+t):"minute"===r?o.setUTCMinutes(o.getUTCMinutes()+t):"hour"===r?o.setUTCHours(o.getUTCHours()+t):"day"===r?o.setUTCDate(o.getUTCDate()+t):"month"===r?o.setUTCMonth(o.getUTCMonth()+t):"year"===r&&o.setUTCFullYear(o.getUTCFullYear()+t),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:i.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:El(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:El(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:El(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:El(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:El(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:El(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:El(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:El(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:El(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:El(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:El(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:El(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:El(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:El(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:El(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:El(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:El(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:El(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:El(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:El(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:El(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:El(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:El(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:El(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:El(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:El(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:El(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:El(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:El(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:El(["offset"])}],o=i.baseName.slice(0,5),Ea.includes(o)?n:n.filter(e=>!["mdy","md"].includes(e.name))),formatter:(r=i,function(e){let t={};for(let[n,o]of Object.entries(e))if("monthname"===n){if(o){let e=r.monthNameToInt(o);void 0!==e&&(t.month=e)}}else if("hour"===n&&e.meridiem){let n=r.h12ToInt(o,e.meridiem);void 0!==n&&(t.hour=n)}else if("zone"===n){if(o){let e=r.zoneToOffset(o);void 0!==e&&(t.offset=e)}}else if("offset"===n){let e=r.offsetToMinutes(o);void 0!==e&&(t.offset=e)}else if("millisecond"===n){let e=r.millisecondToInt(o);"number"==typeof e&&(t.millisecond=e)}else if(Ed.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=x6[t.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return Ef[e]}(t),n=function(e,t){let r=Em[t.slice(0,2).toLowerCase()];if(!r)return e;for(let[t,n]of r)e=e.replace(t,n);return e}(e,t);return r.attempt(n)}function Eg(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new x4(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 x4(t.valueOf()-60*e.offset*1e3):t}function Eb(e,t=x3){let r=Ey(e,t),n=r.invalid?new x4(NaN):Eg(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function Ev(e,t=x3){return e instanceof Date?new x4(e.valueOf()):"number"==typeof e?new x4(e):Eb(e,t)}Date.fromString=x4.fromString=Eb,Date.fromAny=x4.fromAny=Ev,"u">typeof window&&(window.anyDateParser={fromString:Eb,fromAny:Ev,fromObject:Eg,attempt:Ey});var Ew=r(5238),E_=r(1445);function Ex(e,t){var r=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return r.get?r.get.call(e):r.value}pw.extend(px),pw.extend(E_),pw.extend(Ew);let EE="YYYY-MM-DDTHH:mm:ss.SSSZZ";function ES(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&pw(e,EE).isValid()}function EO(e){return pw(e).isToday()}function ED(e){return ES(e)?pw(e,EE).toDate():null}function EP(e,t=!1){let r=pw(e);return t&&(r=r.utc()),r.format(EE)}function Ek(e){return pw(e).toDate()}var EC=new WeakMap;let ET=new class{register(e,t){Ex(this,EC).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(Ex(this,EC).has(t))return Ex(this,EC).get(t)}if(e.language&&Ex(this,EC).has(e.language))return Ex(this,EC).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return Ex(this,EC).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,r){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,r)}(this,EC,{writable:!0,value:new Map})}};function Ej(e,t){ET.register(e,t)}function ER(e){let t=e??x2();return ET.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let EN={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function EA(e,t={}){let r=Ey(e,x2());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!(0,eo.isNil)(r.day)&&(0,eo.isNil)(r.month)&&(r=Object.assign({},(0,eo.omit)(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},(0,eo.omit)(r,"day"),{date:r.day}));let n=pw().set(r).toDate();return(0,eo.isNil)(r.year)&&(t.year=!1),(0,eo.isNil)(r.month)&&(t.month=!1),(0,eo.isNil)(r.date)&&(t.day=!1),EM(n,t)}function EM(e,t){let r,n=t?.locale??x2(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:u,month:l,year:c,noToday:d,numberingSystem:f}={...EN,...{noToday:"am"===o.language},...t},p={calendar:i??ER(o),year:c?"numeric":void 0,month:l?"short":void 0,day:u?"2-digit":void 0,numberingSystem:f},h=pw(e).isToday();if(h&&!d)r=(r=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(n)+r.slice(1);else{"en"===o.language&&(n="en-GB");let t=new Intl.DateTimeFormat(n,p).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&u&&(t=t.map(EI("-"))),"wide"==a&&(t=t.map(EI(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,r)=>"era"!==e.type&&("literal"!==e.type||!(t<r.length-1)||"era"!==r[t+1].type))),r=t.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(r+=`, ${E$(e)}`),r}let EI=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function E$(e){return e.toLocaleTimeString(x2(),{hour:"2-digit",minute:"2-digit"})}function EL(e,t){return EM(e,{...t,time:!0})}function EF(e,t){let r=ER("string"==typeof t?new Intl.Locale(t):t);return r?b0(e,wa(r)):e}function EB(e,t){return new Intl.DurationFormat(x2(),t).format(e)}function EV(e,t){if(null==e)return null;if("string"==typeof e){let r=Ey(e,x2());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...(0,eo.omit)(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...(0,eo.omit)(r,"day"),...{date:r.day}}),pw(t).set(r))}return pw(e)}let EU=["years","months","days","hours","minutes","seconds"],EW={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},EH={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function EK(e,t=pw(),r){let n,o=pw(t),i=EV(e,o);if(null==i)return null;if("string"==typeof r){let e=EW[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:u}=r??{};if(void 0!==s||void 0!==u){let e,t=u?EW[u]??u:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=EU.indexOf(r);for(let o=0;o<EU.length;o++){let i=EU[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):EW[s]??s,function(e,t,r,n){let o=EU.indexOf(r),i=EU.indexOf(n),a=EU.slice(o,i+1),s={},u=e;for(let e of a){let r=t.diff(u,e);s[e]=r,u=u.add(r,e)}return s}(i,o,e,t??e)}let l=(n=function(e){let t={...EH};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[EW[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[l]:o.diff(i,l)}}let Ez={style:"short",localeMatcher:"lookup"};function EG(e,t=pw(),r){let n=EK(e,t,r);return null==n?null:EB(n,"object"==typeof r&&r.formatOptions?{...Ez,...r.formatOptions}:Ez)}let Eq=(0,dU.createContext)(null);function EY(){let e=fV({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,dU.useMemo)(()=>{let t=x2();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,dU.useMemo)(()=>{let e=ER(t);return void 0!==e?wa(e):void 0},[t]),n=(0,dU.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,dU.useMemo)(()=>r?b0(b9(vr()),r):b9(vr()),[r]);return{calendar:r,intlLocale:n,today_:o}}let EZ=new bB(1793,1,1);var EJ={};function EX(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function EQ(e={}){let{locale:t}=g0();return(0,dU.useMemo)(()=>new(0,_k.K)(t,e),[t,e])}EJ={"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 E0={};E0={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let E1=()=>{};function E2(e){var t;let r=(0,dU.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:u,isRequired:l,onIncrement:c,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:h,onIncrementToMax:m}=e,y=bf((t=E0)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),g=(0,dU.useRef)(!1),b=(0,dU.useCallback)(()=>{clearTimeout(r.current),g.current=!1},[]),v=gd(()=>{b()});(0,dU.useEffect)(()=>()=>v(),[]);let w=(0,dU.useRef)(!1),x=()=>{w.current=!0},E=()=>{w.current=!1},S=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,dU.useEffect)(()=>{w.current&&(g1&&g1.clear("assertive"),g2(S,"assertive"))},[S]);let O=(0,dU.useCallback)(()=>{b()},[b]),D=gd(c??E1),P=gd(f??E1),k=gd(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(D(),C(60))}),C=gd(e=>{v(),g.current=!0,r.current=window.setTimeout(k,e)}),T=gd(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(P(),j(60))}),j=gd(e=>{v(),g.current=!0,r.current=window.setTimeout(T,e)}),R=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:A}=gf(),M=(0,dU.useRef)(!1),[I,$]=(0,dU.useState)(null);(0,dU.useEffect)(()=>{"touch"===I?C(600):I&&C(400)},[I]);let[L,F]=(0,dU.useState)(null);return(0,dU.useEffect)(()=>{"touch"===L?j(600):L&&j(400)},[L]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":S,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":u||void 0,"aria-required":l||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!u&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":f&&(e.preventDefault(),f?.());break;case"Home":h&&(e.preventDefault(),h?.());break;case"End":m&&(e.preventDefault(),m?.())}},onFocus:x,onBlur:E},incrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(c?.(),$("mouse")):(N(window,"pointercancel",O,{capture:!0}),M.current=!1,$("touch")),N(window,"contextmenu",R)},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),$(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&c?.(),M.current=!1,$(null)},onFocus:x,onBlur:E},decrementButtonProps:{onPressStart:e=>{b(),"touch"!==e.pointerType?(f?.(),F("mouse")):(N(window,"pointercancel",O,{capture:!0}),M.current=!1,F("touch"))},onPressUp:e=>{b(),"touch"===e.pointerType&&(M.current=!0),A(),F(null)},onPressEnd:e=>{b(),"touch"===e.pointerType&&!g.current&&M.current&&f?.(),M.current=!1,F(null)},onFocus:x,onBlur:E}}}let E3=null;var E4=r(6284);function E6(e,t,r){let n="+"===e?t+r:t-r;if(t%1!=0||r%1!=0){let o=t.toString().split("."),i=r.toString().split("."),a=Math.pow(10,Math.max(o[1]&&o[1].length||0,i[1]&&i[1].length||0));t=Math.round(t*a),r=Math.round(r*a),n=("+"===e?t+r:t-r)/a}return n}let E5=(0,dU.createContext)(null),E8=(0,dU.createContext)(null),E9=(0,dU.forwardRef)(function(e,t){var r,n;[e,t]=m4(e,t,E5);let{validationBehavior:o}=m3(_Y)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=g0(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:u,isDisabled:l,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let f=(0,dU.useCallback)(e=>void 0===n||isNaN(n)?_2(e,t,r):_4(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=f(i)),isNaN(a)||"snap"!==d||(a=f(a));let[p,h]=wm(i,isNaN(a)?NaN:a,s),[m]=(0,dU.useState)(p),[y,g]=(0,dU.useState)(()=>isNaN(p)?"":new(0,_k.K)(u,o).format(p)),b=(0,dU.useMemo)(()=>new(0,E4.d)(u,o),[u,o]),v=(0,dU.useMemo)(()=>b.getNumberingSystem(y),[b,y]),w=(0,dU.useMemo)(()=>new(0,_k.K)(u,{...o,numberingSystem:v}),[u,o,v]),x=(0,dU.useMemo)(()=>w.resolvedOptions(),[w]),E=(0,dU.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),S=_c({...e,value:p}),O=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(O=.01);let[D,P]=(0,dU.useState)(p),[k,C]=(0,dU.useState)(u),[T,j]=(0,dU.useState)(o);Object.is(p,D)&&u===k&&o===T||(g(E(p)),P(p),C(u),j(o));let R=(0,dU.useMemo)(()=>b.parse(y),[b,y]),N=(e,n=0)=>{if(isNaN(R))return _4(isNaN(n)?0:n,t,r,O);{let n=_4(R,t,r,O);return"+"===e&&n>R||"-"===e&&n<R?n:_4(E6(e,R,O),t,r,O)}},A=(0,dU.useMemo)(()=>!l&&!c&&(isNaN(R)||void 0===r||isNaN(r)||_4(R,t,r,O)>R||E6("+",R,O)<=r),[l,c,t,r,O,R]),M=(0,dU.useMemo)(()=>!l&&!c&&(isNaN(R)||void 0===t||isNaN(t)||_4(R,t,r,O)<R||E6("-",R,O)>=t),[l,c,t,r,O,R]);return{...S,validate:e=>b.isValidPartialNumber(e,t,r),increment:()=>{let e=N("+",t);e===p&&g(E(e)),h(e),S.commitValidation()},incrementToMax:()=>{null!=r&&(h(_4(r,t,r,O)),S.commitValidation())},decrement:()=>{let e=N("-",r);e===p&&g(E(e)),h(e),S.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),S.commitValidation())},canIncrement:A,canDecrement:M,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:g,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=b.parse(t)),!t.length){h(NaN),g(void 0===i?"":E(p));return}if(isNaN(r))return void g(E(p));let n="snap"===d?f(r):r,o=(n=b.parse(E(n)))!==p;h(n),g(E(void 0===i?n:p)),o&&S.commitValidation()}}}({...e,locale:a,validationBehavior:i}),u=(0,dU.useRef)(null),[l,c]=m6(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:f,inputProps:p,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:g,...b}=function(e,t,r){var n,o,i,a,s,u,l,c,d;let f,{id:p,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:g,isRequired:b,minValue:v,maxValue:w,autoFocus:x,label:E,formatOptions:S,onBlur:O=()=>{},onFocus:D,onFocusChange:P,onKeyDown:k,onKeyUp:C,description:T,errorMessage:j,isWheelDisabled:R,...N}=e,{increment:A,incrementToMax:M,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=bf((n=EJ)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,dU.useCallback)(()=>{let e=r.current?.value??"";(0,gp.flushSync)(()=>{B()}),r.current?.value!==e&&g2(r.current?.value??"","assertive")},[B,r]),H=mZ(p),{focusProps:K}=y8({onBlur(){W()}}),z=EQ(S),G=(0,dU.useMemo)(()=>z.resolvedOptions(),[z]),q=EQ({...S,currencySign:void 0}),Y=(0,dU.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Z,incrementButtonProps:J,decrementButtonProps:X}=E2({isDisabled:y,isReadOnly:g,isRequired:b,maxValue:w,minValue:v,onIncrement:A,onIncrementToMax:M,onDecrement:I,onDecrementToMin:$,value:L,textValue:Y}),[Q,ee]=(0,dU.useState)(!1),{focusWithinProps:et}=gD({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,dU.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);vw(t,"wheel",n?void 0:o)}({onScroll:(0,dU.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?A():e.deltaY<0&&I())},[I,A]),isDisabled:R||y||g||!Q},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";yj()?en?eo="text":er&&(eo="decimal"):yI()&&(en?eo="numeric":er&&(eo="decimal"));let ei=ys(e),ea=(0,dU.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,gp.flushSync)(()=>{B()}),V()):e.continuePropagation())},[B,V]),{isInvalid:es,validationErrors:eu,validationDetails:el}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ef,errorMessageProps:ep}=function(e,t,r){let n=gd(e=>{let n=r.current;if(!n)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentForward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd+1):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteContentBackward":o=n.selectionEnd===n.selectionStart?n.value.slice(0,n.selectionStart-1)+n.value.slice(n.selectionStart):n.value.slice(0,n.selectionStart)+n.value.slice(n.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=n.value.slice(n.selectionStart);break;default:null!=e.data&&(o=n.value.slice(0,n.selectionStart)+e.data+n.value.slice(n.selectionEnd))}null!=o&&t.validate(o)||e.preventDefault()});(0,dU.useEffect)(()=>{if(!EX()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=EX()?null:e=>{let r=yp(e).value.slice(0,yp(e).selectionStart)+e.data+yp(e).value.slice(yp(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:u,...l}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[u,l]=wm(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=gt(e,t),d=_c({...e,value:u}),{isInvalid:f,validationErrors:p,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:g,errorMessageProps:b}=w8({...e,isInvalid:f,errorMessage:e.errorMessage||p}),v=ys(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,dU.useState)(u);return w9(t,e.defaultValue??x,l),w7(e,d,t),{labelProps:m,inputProps:mQ(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:u,onChange:e=>l(yp(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(dW().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...y}),descriptionProps:g,errorMessageProps:b,isInvalid:f,validationErrors:p,validationDetails:h}}(e,r),c=(0,dU.useRef)(null);return{inputProps:mQ(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:u,...l}}({...N,...ei,name:void 0,form:void 0,label:E,autoFocus:x,isDisabled:y,isReadOnly:g,isRequired:b,validate:void 0,[_l]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:H,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:O,onFocus:D,onFocusChange:P,onKeyDown:(0,dU.useMemo)(()=>m$(ea,k),[ea,k]),onKeyUp:C,onPaste:t=>{e.onPaste?.(t);let r=yp(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:T,errorMessage:j},t,r);w9(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,u=t.minValue,l=t.maxValue,c=e.step,d=t.numberValue,mL(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!E3&&"u">typeof document&&((E3=document.createElement("input")).type="number"),!E3))return;E3.min=null==u||isNaN(u)?"":String(u),E3.max=null==l||isNaN(l)?"":String(l),E3.step=null==c||isNaN(c)?"":String(c),E3.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&E3.validity.valid,r=e.validationMessage||E3.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:E3.validity.rangeOverflow,rangeUnderflow:E3.validity.rangeUnderflow,stepMismatch:E3.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};o.updateValidation(n),"native"!==i||E3.validity.valid||e.setCustomValidity(E3.validationMessage)});let eh=mQ(Z,K,ed,{role:null,"aria-roledescription":yN()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(eh["aria-required"]=void 0);let em=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},ey=e["aria-label"]||("string"==typeof e.label?e.label:"");ey||(f=null!=e.label?ec.id:e["aria-labelledby"]);let eg=mZ(),eb=mZ(),ev=mQ(J,{"aria-label":m||U.format("increase",{fieldLabel:ey}).trim(),id:f&&!m?eg:null,"aria-labelledby":f&&!m?`${eg} ${f}`:null,"aria-controls":H,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:em}),ew=mQ(X,{"aria-label":h||U.format("decrease",{fieldLabel:ey}).trim(),id:f&&!h?eb:null,"aria-labelledby":f&&!h?`${eb} ${f}`:null,"aria-controls":H,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:em});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:eh,incrementButtonProps:ev,decrementButtonProps:ew,errorMessageProps:ep,descriptionProps:ef,isInvalid:es,validationErrors:eu,validationDetails:el}}({...m5(e),label:c,validationBehavior:i},s,u),v=m2({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=ys(e);return delete w.id,dW().createElement(m1,{values:[[E8,s],[wN,f],[wM,{...p,ref:u}],[_Z,{...d,ref:l}],[gI,{slots:{increment:h,decrement:m}}],[gF,{slots:{description:y,errorMessage:g}}],[_z,b]]},dW().createElement("div",{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&dW().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function E7(e,t){return Number.parseInt(EM(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let Se=(0,dU.forwardRef)(function(e,t){let{className:r}=e,n=(0,dU.useContext)(wE),o=(0,dU.useContext)(wS),i=n??o,a=(0,dU.useContext)(Eq),s=vr(),u=EM(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),l=E7(i.visibleRange.start.toDate(s),a),c=i.maxValue?E7(i.maxValue.toDate(s),a):void 0,d=i.minValue?E7(i.minValue.toDate(s),a):void 0,f=(0,dU.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,pV.jsxs)("span",{ref:t,className:r,children:[(0,pV.jsx)("span",{children:u}),(0,pV.jsxs)(E9,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:f,value:l,children:[(0,pV.jsx)(wI,{}),(0,pV.jsxs)(wA,{children:[(0,pV.jsx)(g$,{slot:"increment",children:(0,pV.jsx)(hl,{size:8})}),(0,pV.jsx)(g$,{slot:"decrement",children:(0,pV.jsx)(ha,{size:8})})]})]})]})}),St="-esm-fast-data-entry__datepicker-module__inputGroup___-wpzr",Sr="-esm-fast-data-entry__datepicker-module__inputSegment___ocu7L",Sn="-esm-fast-data-entry__datepicker-module__dateInputWrapper___909Km",So="-esm-fast-data-entry__datepicker-module__invalidText___oHJHi",Si="-esm-fast-data-entry__datepicker-module__flatButton___i9LDo",Sa="-esm-fast-data-entry__datepicker-module__flatButtonMd___VZMkc",Ss="-esm-fast-data-entry__datepicker-module__flatButtonSm___VA5wy",Su="-esm-fast-data-entry__datepicker-module__flatButtonLg___MnYLl";function Sl({children:e}){let t=(0,dU.useContext)(xG),r=(0,dU.useContext)(xq),n=t??r,o=pl(()=>n?.close());return(0,pV.jsx)(_K,{className:"-esm-fast-data-entry__datepicker-module__dialog___2pADb",ref:o,children:e})}let Sc=(0,dU.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,pV.jsx)(xU,{ref:o,className:"-esm-fast-data-entry__datepicker-module__popover___pb58i",placement:"bottom start",offset:1,isNonModal:!0,children:(0,pV.jsx)(Sl,{children:(0,pV.jsxs)(i?wD:wO,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,pV.jsxs)("header",{className:"-esm-fast-data-entry__datepicker-module__header___+fi16",children:[(0,pV.jsx)(g$,{className:pW()(Si,Sa),slot:"previous",children:(0,pV.jsx)(hy,{size:16})}),(0,pV.jsx)(Se,{className:"-esm-fast-data-entry__datepicker-module__monthYear___mGhot"}),(0,pV.jsx)(g$,{className:pW()(Si,Sa),slot:"next",children:(0,pV.jsx)(hg,{size:16})})]}),(0,pV.jsx)(wk,{className:"-esm-fast-data-entry__datepicker-module__calendarGrid___z07wV",children:e=>(0,pV.jsx)(wR,{className:pW()("cds--date-picker__day",{"-esm-fast-data-entry__datepicker-module__today___dNc4M":0===t.compare(e)}),date:e},e.toString())})]})})})}),Sd=(0,dU.forwardRef)(function(e,t){let r=(0,dU.useContext)(xG),[n,o]=m4({slot:e.slot},t,_N),{locale:i}=g0(),a=_R({...n,locale:i,createCalendar:wa}),s=(0,dU.useRef)(null),{fieldProps:u,inputProps:l}=_n({...n,inputRef:s},a,o),c=(0,dU.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,pV.jsxs)(m1,{values:[[_A,a],[wM,{...l,ref:s}],[wN,{...u,ref:o,isInvalid:a.isInvalid}]],children:[(0,pV.jsx)(wA,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:a.isDisabled,isInvalid:a.isInvalid,onClick:c,children:a.segments.map((t,r)=>(0,dU.cloneElement)(e.children(t),{key:r}))}),(0,pV.jsx)(wI,{})]})}),Sf=(0,dU.forwardRef)(function(e,t){let r=(0,dU.useContext)(xG),n=(0,dU.useContext)(xq);return(r??n).isInvalid?(0,pV.jsx)(mS,{ref:t,size:16,...e}):(0,pV.jsx)(hi,{ref:t,size:16,...e})});class Sp{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let Sh=new Map,Sm=(0,dU.forwardRef)(function({segment:e,...t},r){let n=(0,dU.useContext)(_A),o=mA(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,dU.useRef)(""),{locale:u,direction:l}=g0(),c=function(){var e;let{locale:t}=g0(),r=bd((e=w4)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,dU.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new Sp(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:f,ariaDescribedBy:p,focusManager:h}=_e.get(t),m=e.isPlaceholder?"":e.text,y=(0,dU.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),g=br({month:"long",timeZone:y.timeZone}),b=br({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(t.dateValue));else{let e=g.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=E2({value:e.value??void 0,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,dU.useMemo)(()=>new(0,E4.d)(u,{maximumFractionDigits:0}),[u]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{startsWith:E}=(n=function(e){let{locale:t}=g0(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(Sh.has(r))return Sh.get(r);let n=new Intl.Collator(t,e);return Sh.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,dU.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(0,t.length),t)),[n]),i=(0,dU.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===n.compare(e.slice(-t.length),t)),[n]),a=(0,dU.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let r=0,o=(t=t.normalize("NFC")).length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(0===n.compare(t,i))return!0}return!1},[n]),(0,dU.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),S=br({hour:"numeric",hour12:!0}),O=(0,dU.useMemo)(()=>{let e=new Date;return e.setHours(0),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),D=(0,dU.useMemo)(()=>{let e=new Date;return e.setHours(12),S.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[S]),P=br({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,dU.useMemo)(()=>{if("era"!==e.type)return[];let r=b0(new bB(1,1,1),t.calendar),n=t.calendar.getEras().map(e=>{let t=r.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:P.formatToParts(t).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let t=e[0],r=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==r[e])return e;return 0}(n.map(e=>e.formatted));if(o)for(let e of n)e.formatted=e.formatted.slice(o);return n},[P,t.calendar,e.type]),C=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(E(O,r))t.setSegment("dayPeriod",0);else if(E(D,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>E(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};vw((0,dU.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&yf(r.current,e?.anchorNode)&&e.collapse(r.current)});let T=(0,dU.useRef)("");vw(r,"beforeinput",n=>{if(r.current)switch(n.preventDefault(),n.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=r.current.textContent,r.current.textContent=r.current.textContent;break;default:null!=n.data&&C(n.data)}}),vw(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(E(O,n)||E(D,n))&&C(n))}),mL(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let j=yN()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,dU.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let R=mZ(),N=!t.isDisabled&&!t.isReadOnly&&e.isEditable,A="literal"===e.type?"":c.of(e.type),M=vm({"aria-label":`${A}${d?`, ${d}`:""}${f?", ":""}`,"aria-labelledby":f});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===l){I.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&(I.direction="ltr")}return{segmentProps:mQ(v,M,{id:R,...j,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:N,suppressContentEditableWarning:N,spellCheck:N?"false":void 0,autoCorrect:N?"off":void 0,[parseInt(dW().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&&(yT()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",r.current&&vO(r.current,{containingElement:vx(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:u}=gP(),{hoverProps:l,isHovered:c}=gR({...t,isDisabled:n.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:a,values:s}=e;return(0,dU.useMemo)(()=>{let e,u,l;return e="function"==typeof t?t({...s,defaultClassName:o}):t,u="function"==typeof r?r({...s,defaultStyle:a||{}}):r,l="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:u||a?{...a,...u}:void 0,children:l??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:u},defaultChildren:e.text}),f=(0,dU.useCallback)(e=>{e.stopPropagation()},[]);return(0,pV.jsx)("span",{...mQ(ys(t),i,a,l),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":u||void 0,onClick:f})}),Sy={short:!1,size:"md"},Sg=(0,dU.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:u,labelText:l,light:c,maxDate:d,minDate:f,onChange:p,onChangeRaw:h,short:m,size:y,value:g,...b}={...Sy,...e},{calendar:v,intlLocale:w,today_:x}=EY(),E=(0,dU.useId)(),S=!!(l??u),O=(0,dU.useMemo)(()=>xX(n,v),[n,v]),D=(0,dU.useMemo)(()=>xX(g,v,!0),[g,v]),P=(0,dU.useMemo)(()=>xX(d,v),[d,v]),k=(0,dU.useMemo)(()=>xX(f??EZ,v),[f,v]),C=(0,dU.useMemo)(()=>i||s,[i,s]),T=(0,dU.useMemo)(()=>(h&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>p?.(xQ(e)))),[h,p]);return(0,pV.jsx)(xJ,{locale:w.toString(),children:(0,pV.jsx)("div",{className:pW()("cds--form-item",r),children:(0,pV.jsx)(m1,{values:[[Eq,w]],children:(0,pV.jsxs)(xY,{className:pW()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:O,isDisabled:o,isInvalid:C,maxValue:P,minValue:k,value:D,shouldForceLeadingZeros:"en"===w.language||void 0,...b,onChange:T,children:[(0,pV.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,pV.jsx)(_J,{className:pW()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:l??u}),(0,pV.jsxs)(wA,{className:St,children:[(0,pV.jsx)(Sd,{id:S?E:void 0,ref:t,className:pW()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__inputWrapper___MHJAy",{"-esm-fast-data-entry__datepicker-module__inputWrapperSm___esx4E":"sm"===y,"-esm-fast-data-entry__datepicker-module__inputWrapperMd___VQbzP":"md"===y||!y||0===y.length,"-esm-fast-data-entry__datepicker-module__inputWrapperLg___Rk9Ce":"lg"===y}),children:e=>"era"!==e.type?(0,pV.jsx)(Sm,{className:Sr,segment:e}):(0,pV.jsx)(dW().Fragment,{})}),(0,pV.jsx)(g$,{className:pW()(Si,{[Ss]:"sm"===y,[Sa]:"md"===y||!y||0===y.length,[Su]:"lg"===y}),children:(0,pV.jsx)(Sf,{})})]}),(0,pV.jsx)(_G,{className:So,children:a})]}),(0,pV.jsx)(Sc,{variant:"single",today_:x})]})})})})}),Sb=(0,dU.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:u,maxDate:l,minDate:c,onChange:d,onChangeRaw:f,size:p="md",value:h,...m},y){let{calendar:g,intlLocale:b,today_:v}=EY(),w=(0,dU.useId)(),x=!!(s??a),E=(0,dU.useMemo)(()=>{if(h)return{start:xX(h[0],g,!1),end:xX(h[1],g,!1)}},[h,g]),S=(0,dU.useMemo)(()=>{if(t)return{start:xX(t[0],g,!1),end:xX(t[1],g,!1)}},[t,g]),O=(0,dU.useMemo)(()=>xX(c??EZ,g,!0),[c,g]),D=(0,dU.useMemo)(()=>xX(l,g,!0),[l,g]),P=(0,dU.useMemo)(()=>r||i,[r,i]),k=(0,dU.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?.([xQ(e.start),xQ(e.end)]))),[f,d]);return(0,pV.jsx)(xJ,{locale:b.toString(),children:(0,pV.jsx)("div",{className:pW()("cds--form-item",e),children:(0,pV.jsx)(m1,{values:[[Eq,b]],children:(0,pV.jsx)(xZ,{id:x?w:void 0,className:pW()("cds--date-picker",{"cds--date-picker--light":u,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:D,minValue:O,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:k,children:(0,pV.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,pV.jsx)(_J,{className:pW()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,pV.jsxs)(wA,{className:St,children:[(0,pV.jsxs)("div",{className:pW()("-esm-fast-data-entry__datepicker-module__inputsWrapper___UyGoG",{"-esm-fast-data-entry__datepicker-module__inputsWrapperSm___qrGsA":"sm"===p,"-esm-fast-data-entry__datepicker-module__inputsWrapperMd___pofu4":"md"===p||!p||0===p.length,"-esm-fast-data-entry__datepicker-module__inputsWrapperLg___eF1Im":"lg"===p}),children:[(0,pV.jsx)(_I,{className:pW()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__startInput___C8vnM",Sn),slot:"start",children:e=>(0,pV.jsx)(Sm,{className:Sr,segment:e})}),(0,pV.jsx)("div",{className:"-esm-fast-data-entry__datepicker-module__separator___vHLFZ",children:(0,pV.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,pV.jsx)(_I,{className:pW()("cds--date-picker-input__wrapper","-esm-fast-data-entry__datepicker-module__endInput___25OF9",Sn),slot:"end",children:e=>(0,pV.jsx)(Sm,{className:Sr,segment:e})})]}),(0,pV.jsx)(g$,{className:pW()(Si,{[Ss]:"sm"===p,[Sa]:"md"===p||!p||0===p.length,[Su]:"lg"===p}),children:(0,pV.jsx)(Sf,{})})]}),(0,pV.jsx)(_G,{className:So,children:n}),(0,pV.jsx)(Sc,{variant:"range",today_:v,minDate:O,maxDate:D})]})})})})})}),Sv=({diagnoses:e})=>{let{diagnosisTags:t}=fV({externalModuleName:"@openmrs/esm-styleguide"});return(0,pV.jsx)("div",{className:"-esm-fast-data-entry__diagnosis-tags-module__container___l7XiW",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,pV.jsx)(pq.Tag,{type:i,children:o},n)})})},Sw={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"},S_=({width:e="64",height:t="64"})=>(0,pV.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,pV.jsx)("use",{href:"#omrs-empty-data-illustration"})}),Sx=e=>{let t="tablet"===po(),r=e.launchForm;return(0,pV.jsx)(pq.Layer,{className:Sw.layer,children:(0,pV.jsxs)(pq.Tile,{className:Sw.tile,children:[(0,pV.jsx)("div",{className:t?Sw.tabletHeading:Sw.desktopHeading,children:(0,pV.jsx)("h4",{children:e.headerTitle})}),(0,pV.jsx)(S_,{}),(0,pV.jsx)("p",{className:Sw.content,children:oj("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,pV.jsx)("p",{className:Sw.action,children:r&&(0,pV.jsx)(pq.Button,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:oj("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},SE=({error:e,headerTitle:t})=>{let r="tablet"===po();return(0,pV.jsx)(pq.Layer,{children:(0,pV.jsxs)(pq.Tile,{className:"-esm-fast-data-entry__error-state-module__tile___hHM56",children:[(0,pV.jsx)("div",{className:r?"-esm-fast-data-entry__error-state-module__tabletHeading___W7a4U":"-esm-fast-data-entry__error-state-module__desktopHeading___VL8Rv",children:(0,pV.jsx)("h4",{children:t})}),(0,pV.jsxs)("p",{className:"-esm-fast-data-entry__error-state-module__errorMessage___IytZy",children:[oj("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,pV.jsx)("p",{className:"-esm-fast-data-entry__error-state-module__errorCopy___E1yZO",children:oj("errorCopy")})]})})},SS=SE,SO=dW().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=ps(),a=window.location??{pathname:""},s=d3(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,pV.jsxs)(pq.SideNav,{"aria-label":oj("leftNavigation","Left navigation"),className:"-esm-fast-data-entry__left-nav-module__leftNav___ZqLpw",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,pV.jsx)(d5,{name:"global-nav-menu-slot"}),r?(0,pV.jsx)(fj,{value:o,fallback:(0,pV.jsx)(d5,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,pV.jsx)(dH.Provider,{value:o,children:(0,pV.jsx)(d5,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),SD=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,dU.useState)(""),s=(0,dU.useId)(),{location:u}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=fz()(t,nh,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,dU.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:l,isLoading:c,hasMore:d,loadingNewData:f,error:p,setPage:h}=function(e,t=0,r=""){let n=fH(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:u}=f5()(function(r,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let i=`${nd}/Location?`,a=new URLSearchParams;return a.append("_summary","data"),t&&a.append("_count",""+t),r&&a.append("_getpagesoffset",""+r*t),e&&a.append("_tag",e),"string"==typeof n&&""!==n&&a.append("name:contains",n),i+a.toString()},nh);return(0,dU.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:u||null,setPage:s}),[i,o,a,s,u])}(r,n,i),m=(0,dU.useMemo)(()=>u&&!i&&t?[u,...l.filter(({resource:e})=>e.id!==t)]:l??[],[u,l,t,i]),y=(0,dU.useCallback)(e=>{o(),a(e.trim())},[o]),g=pc((0,dU.useCallback)(()=>{!f&&d&&h(e=>e+1)},[f,d,h])),b=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)(pq.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:oj("searchForLocation"),id:s,placeholder:oj("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),p&&(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__errorNotification___MBWvf",id:`${s}-error`,children:(0,pV.jsx)(pq.InlineNotification,{kind:"error",subtitle:oj("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:oj("error","Error")})}),(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__searchResults___aCL93",children:c?(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingContainer___Vn1H0",children:Array.from({length:5}).map((e,t)=>(0,pV.jsx)(pq.RadioButtonSkeleton,{className:"-esm-fast-data-entry__location-picker-module__radioButtonSkeleton___RKMHj",role:"progressbar"},t))}):(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__locationResultsContainer___5yuvs",children:m.length>0?(0,pV.jsx)(pq.RadioButtonGroup,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,pV.jsx)(pq.RadioButton,{className:"-esm-fast-data-entry__location-picker-module__locationRadioButton___b52LI",id:e.resource.id,labelText:(0,pV.jsx)("span",{ref:t===b?g:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__emptyState___qiPqQ",children:(0,pV.jsx)("p",{className:"-esm-fast-data-entry__location-picker-module__locationNotFound___tKDOJ",children:oj("noResultsToDisplay")})})}),f&&(0,pV.jsx)("div",{className:"-esm-fast-data-entry__location-picker-module__loadingIcon___PGwvc",children:(0,pV.jsx)(pq.InlineLoading,{description:oj("loading")})})]})})]})},SP=q("modalState",{modalContainer:null,modalStack:[]}),Sk=0;async function SC(e,t,r={}){let n=dv(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=Sk++;o=await dL({...a,name:`${t}-${s}`},{...r,domElement:e})}else M(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function ST(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function Sj(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function SR(e){return e.find(e=>!ST(e))}function SN(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let SA=window.getComputedStyle(document.body).overflow;function SM({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",S$),document.body.style.overflow="hidden",t.style.visibility="unset");let r=SR(e);e.forEach(e=>{switch(e.state){case"NEW":{let r=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=r,e.state="MOUNTING",SC(r,e.modalName,e.props).then(n=>{ST(e)?Sj(e.modalName,n):n?(e.parcel=n,t.prepend(r),SN(e,SR(SP.getState().modalStack)===e),n.mountPromise.then(()=>{ST(e)||(e.state="MOUNTED")},t=>{M(t),e.parcel=null,SI(e)})):SI(e)},t=>{M(t),SI(e)});break}case"MOUNTING":case"MOUNTED":SN(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),Sj(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=SP.getState();SP.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=SA,removeEventListener("keydown",S$)}function SI(e){if(ST(e))return;e.state="TO_BE_DELETED";let t=SP.getState();SP.setState({...t,modalStack:[...t.modalStack]})}function S$(e){"Escape"===e.key&&function(){let[e]=SP.getState().modalStack;e&&SI(e)}()}function SL(e){SP.subscribe(SM),SP.setState({...SP.getState(),modalContainer:e})}function SF(e,t={},r=()=>{}){let n=()=>{let e=SP.getState().modalStack.find(e=>e.onClose===r);e&&SI(e)};if(dv(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=SP.getState()).modalStack],SP.setState({...i,modalStack:a})}else M(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let SB=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,pV.jsx)(pq.ActionableNotification,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},SV=({subject:e})=>{let[t,r]=(0,dU.useState)([]);return(0,dU.useEffect)(()=>{let t=e.subscribe(e=>r(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,pV.jsx)(pV.Fragment,{children:t.map(e=>(0,pV.jsx)(SB,{notification:e},e.id))})},SU=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:u,...l}=e,[c,d]=(0,dU.useState)(t);return(0,pV.jsx)(pq.ActionableNotification,{kind:o||"info",actionButtonLabel:c,ariaLabel:oj("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:oj("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...l})},SW=({subject:e})=>{let[t,r]=(0,dU.useState)([]);return(0,dU.useEffect)(()=>{let t=e.subscribe(e=>r(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,pV.jsx)(pV.Fragment,{children:t.map(e=>(0,pV.jsx)(SU,{notification:e},e.id))})};var SH=r(6401);let SK=new lF,Sz=0,SG=new lF,Sq=0;function SY(e){e&&(0,d8.createRoot)(e).render((0,pV.jsx)(SV,{subject:SK}))}function SZ(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,SH.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{SK.next({...e,id:Sz++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function SJ(e){e&&(0,d8.createRoot)(e).render((0,pV.jsx)(SW,{subject:SG}))}function SX(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,SH.A)(t))?setTimeout(()=>{SG.next({...e,id:Sq++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let SQ=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],S0=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],S1={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"},S2=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let u=(0,dU.useId)(),{referenceRange:l,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${nc}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${nc}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=fz()(r,nh),a=n?.data?.results?.[0];return{referenceRange:a?{hiNormal:a.hiNormal??null,hiAbsolute:a.hiAbsolute??null,hiCritical:a.hiCritical??null,lowNormal:a.lowNormal??null,lowAbsolute:a.lowAbsolute??null,lowCritical:a.lowCritical??null}:void 0,error:o,isLoading:i}}(o||n?void 0:i,s),d=o??l,f=(0,dU.useMemo)(()=>{if(n)return n?"--"===n?"normal":SQ.includes(n)?n.toLowerCase():S0.includes(n)?n:"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"},[n,d,e,c])??"normal",p="critically_low"===f||"critically_high"===f||"off_scale_low"===f||"off_scale_high"===f,h="normal"!==f,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${u}`:void 0,y=`omrs-numeric-obs-value-${u}`,g=`omrs-numeric-obs-unit-${u}`,b=null!=e&&""!==e,v=b?e:oj("notAvailable","Not available"),w=pW()({[S1["critically-low"]]:"critically_low"===f||"off_scale_low"===f,[S1["critically-high"]]:"critically_high"===f||"off_scale_high"===f,[S1.low]:"low"===f,[S1.high]:"high"===f,[S1["off-scale-low"]]:"off_scale_low"===f,[S1["off-scale-high"]]:"off_scale_high"===f}),x=pW()({[S1.container]:!0,[S1.card]:!0,[S1["critical-value"]]:p,[S1["abnormal-value"]]:h&&!p}),E=pW()({[S1.cell]:!0,[w]:!0});return"cell"===a?(0,pV.jsxs)("div",{className:E,children:[v,b&&t?` ${t}`:""]}):(0,pV.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,pV.jsxs)("div",{className:S1["label-container"],children:[(0,pV.jsx)("span",{id:m,className:S1.label,children:r}),h&&(0,pV.jsx)("span",{className:S1[f.replace("_","-")],title:oj("abnormalValue","Abnormal value")})]}),(0,pV.jsxs)("div",{className:S1["value-container"],children:[(0,pV.jsx)("span",{id:y,"aria-labelledby":m&&g?`${m} ${g}`:m||g||void 0,className:S1.value,children:v}),b&&t&&(0,pV.jsx)("span",{id:g,className:S1.units,children:t})]})]})},S3="-esm-fast-data-entry__page-header-module__pageHeader___XNJYe",S4=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,pV.jsx)("div",{className:pW()(S3,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,pV.jsx)("div",{className:pW()(S3,n),...o,children:(0,pV.jsx)(S6,{title:t,illustration:r})})}},S6=({title:e,illustration:t,className:r})=>{let[n,o]=(0,dU.useState)(null);return(0,dU.useEffect)(()=>{tt("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,pV.jsxs)("div",{className:pW()("-esm-fast-data-entry__page-header-module__pageHeaderContent___V-mTz",r),children:[t,(0,pV.jsxs)("div",{className:"-esm-fast-data-entry__page-header-module__pageLabels___vGJvg",children:[n?.implementationName&&(0,pV.jsx)("p",{children:oj(n.implementationName)}),(0,pV.jsx)("p",{className:"-esm-fast-data-entry__page-header-module__pageName___+eYMc",children:e})]})]})},S5=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:u}=pp(t,e,n,i),l="tablet"===po(),c=oj("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:u});return(0,pV.jsx)(pV.Fragment,{children:e>0&&(0,pV.jsxs)("div",{className:pW()({"-esm-fast-data-entry__pagination-module__tablet___DdaYk":l,"-esm-fast-data-entry__pagination-module__desktop___rSwlo":!l}),children:[(0,pV.jsxs)("div",{children:[c,o&&(0,pV.jsx)(dK,{to:o,className:"-esm-fast-data-entry__pagination-module__configurableLink___cTCLf",children:a??oj("seeAll","See all")})]}),(0,pV.jsx)(pq.Pagination,{className:"-esm-fast-data-entry__pagination-module__pagination___U6anZ",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>oj("paginationOfPages","of {{count}} pages",{count:t}),size:l?"lg":"sm"})]})})};function S8(e){return S7(Ot(e,"usual","official"))}function S9(e){return S8(e)}function S7(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Oe(e){return S7(e)}function Ot(e,...t){for(let r of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,n;return t=e,n=r,t.use?t.use===n:"usual"===n});if(t)return t}}function Or(e,t=pw()){let r=pw(t),n=EV(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),u=r.diff(n,"years"),l={};if(o<2)l.minutes=r.diff(n,"minutes");else if(i<2)l.hours=o;else if(a<4)l.days=i;else if(u<1){let e=r.subtract(a,"weeks").diff(n,"days");l.weeks=a,l.days=e}else if(u<2){let e=r.subtract(s,"months").diff(n,"days");l.months=s,l.days=e}else if(u<18){let e=r.subtract(u,"year").diff(n,"months");l.years=u,l.months=e}else l.years=u;return l}function On(e,t=pw()){let r=Or(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),EB(r,n)}let Oo={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 Oi({showIdentifierLabel:e,type:t,value:r}){return(0,pV.jsx)("span",{className:Oo.primaryIdentifier,children:(0,pV.jsxs)(pq.Tag,{className:Oo.tag,type:"gray",children:[e&&t?.text&&(0,pV.jsxs)("span",{className:Oo.label,children:[t.text,": "]}),(0,pV.jsx)("span",{className:Oo.value,children:r})]})})}function Oa({showIdentifierLabel:e,type:t,value:r}){return(0,pV.jsxs)(pq.FormLabel,{className:Oo.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,pV.jsxs)("span",{className:Oo.label,children:[t?.text,": "]}),(0,pV.jsx)("span",{className:Oo.value,children:r})]})}function Os({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=fV(),{primaryIdentifierCode:n}=py(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,pV.jsx)(pV.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,pV.jsxs)(dW().Fragment,{children:[(0,pV.jsx)("span",{className:Oo.identifier,children:r?.coding?.[0]?.code===n?(0,pV.jsx)(Oi,{showIdentifierLabel:t,type:r,value:e}):(0,pV.jsx)(Oa,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,pV.jsx)("span",{className:Oo.separator,children:"\xb7"})]},e)):""})}let Ou={Female:hC,Male:hT,Other:hj,Unknown:hR},Ol=({gender:e})=>{let t=Ou[e];return t?(0,pV.jsx)(t,{fill:"#525252"}):null},Oc={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function Od({patient:e,renderedFrom:t}){var r;let n,o,i=S8(e),a=e?.gender&&(o=Oc[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:oj(n,r),iconKey:o}),s=(0,dU.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,pV.jsxs)("div",{className:Oo.patientInfo,children:[(0,pV.jsx)("div",{className:pW()(Oo.row,Oo.patientNameRow),children:(0,pV.jsxs)("div",{className:Oo.flexRow,children:[(0,pV.jsx)("span",{className:Oo.patientName,children:i}),a&&(0,pV.jsxs)("div",{className:Oo.gender,children:[(0,pV.jsx)(Ol,{gender:a.iconKey}),(0,pV.jsx)("span",{children:a.displayText})]}),(0,pV.jsx)(d5,{className:Oo.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,pV.jsxs)("div",{className:Oo.demographics,children:[e.birthDate&&(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)("span",{children:On(e.birthDate)}),(0,pV.jsx)("span",{className:Oo.separator,children:"\xb7"}),(0,pV.jsx)("span",{children:EA(e.birthDate,{time:!1})}),(0,pV.jsx)("span",{className:Oo.separator,children:"\xb7"})]}),(0,pV.jsx)(Os,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,pV.jsx)(d5,{className:Oo.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var Of=r(1673);function Op({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,dU.useState)(!1),{extensions:a}=d4(r),s="tablet"===po(),u=pl(()=>i(!1),o),l=(0,dU.useRef)(null),c=(0,dU.useRef)(null),d=(0,dU.useId)(),f=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,h=(0,dU.useCallback)(()=>i(e=>!e),[]),m=(0,dU.useCallback)(()=>{i(!1),l.current?.focus()},[]),y=(0,dU.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,n=Array.from(t).indexOf(r);if(-1===n)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let o=n+("ArrowDown"===e.key?1:-1),i=o<0?t.length-1:o>=t.length?0:o;t[i]?.focus()}},[m,o]);(0,dU.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let g=(0,dU.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,pV.jsx)("div",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__overflowMenuContainer___7eCLh",children:(0,pV.jsxs)("div",{"data-overflow-menu":!0,className:pW()("cds--overflow-menu",pJ),ref:u,children:[(0,pV.jsxs)("button",{className:pW()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},p0),"aria-controls":p,"aria-expanded":o,"aria-haspopup":"true",id:f,onClick:h,onKeyDown:y,ref:l,children:[(0,pV.jsx)("span",{className:"-esm-fast-data-entry__patient-banner-actions-menu-module__actionsButtonText___TbM5a",children:oj("actions","Actions")})," ",(0,pV.jsx)(Of.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,pV.jsxs)("div",{className:pW()("cds--overflow-menu-options","cds--overflow-menu--flip",pX,{[pQ]:o}),"aria-labelledby":f,"data-floating-menu-direction":"bottom",id:p,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,pV.jsx)("ul",{className:pW()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,pV.jsx)(d5,{name:r,state:g},r)}),(0,pV.jsx)("span",{})]})]})})}var Oh=r(6767),Om=r.n(Oh);function Oy(e){let{patientPhotoConceptUuid:t}=fV({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${nc}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=fp()(e?r:null,nh),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Og=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,fd.useTranslation)();return(0,pV.jsxs)("svg",{"aria-label":r??n("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pV.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,pV.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"})]})},Ob="-esm-fast-data-entry__patient-photo-module__avatar___R93LX";function Ov({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=Oy(e),[i,a]=(0,dU.useState)(null),[s,u]=(0,dU.useState)(!1),l=(0,dU.useMemo)(()=>Om().generate(e),[e]);(0,dU.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;u(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),u(!1))},r.onerror=()=>{t||(a(null),u(!1))},r.src=e,()=>{t=!0}}a(null),u(!1)},[n?.imageSrc]);let c=(0,dU.useMemo)(()=>r||(i?oj("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):oj("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,pV.jsx)(pq.SkeletonIcon,{className:"-esm-fast-data-entry__patient-photo-module__skeleton___I-6iq","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,pV.jsx)(Og,{"aria-label":oj("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,pV.jsx)("div",{"aria-label":c,children:(0,pV.jsx)("img",{className:Ob,src:i,alt:c,title:t})}):(0,pV.jsx)("div",{"aria-label":c,children:(0,pV.jsx)("div",{className:Ob,title:t,style:{backgroundImage:l.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,pV.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 Ow=["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-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"],O_=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),Ox=O_,OE=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),OS=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),OO=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),OD=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),OP=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),Ok=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),OC=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),OT=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Oj=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),OR=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),ON=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),OA=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),OM=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),OI=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),O$=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),OL=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OF=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),OB=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),OV=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),OU=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),OW=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),OH=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),OK=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Oz=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),OG=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Oq=(0,dU.memo)((0,dU.forwardRef)(function(e,t){return(0,pV.jsx)(OX,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),OY=Oj,OZ=OF,OJ=(0,dU.memo)((0,dU.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,dU.useRef)(document.getElementById(e));return(0,dU.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),r=new MutationObserver(t=>{for(let r of t)"childList"===r.type&&(o.current=document.getElementById(e))});return t&&r.observe(t,{childList:!0}),()=>r.disconnect()},[e]),(0,pV.jsx)(fj,{value:o.current,fallback:t,children:(0,pV.jsx)(OX,{ref:n,pictogram:e,pictogramProps:r})})})),OX=(0,dU.memo)((0,dU.forwardRef)(function({pictogram:e,pictogramProps:t},r){let{className:n,size:o}=Object.assign({},{size:92},t);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,pV.jsx)("svg",{ref:r,className:pW()("-esm-fast-data-entry__pictograms-module__pictogram___LTPzD",n),height:o,width:o,children:(0,pV.jsx)("use",{href:`#${e}`})})})),OQ=({children:e})=>"tablet"===po()?(0,pV.jsx)(pq.Layer,{children:e}):(0,pV.jsx)(pV.Fragment,{children:e}),O0=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:u=5e3,autoClose:l="error"!==n,title:c,id:d,...f}=e,[p,h]=(0,dU.useState)(r),[m,y]=(0,dU.useState)(!0),[g,b]=(0,dU.useState)(!1),v=(0,dU.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,dU.useCallback)(()=>{b(!0),v()},[v]);return(0,dU.useEffect)(()=>{if(l){let e=setTimeout(w,u);return()=>clearTimeout(e)}},[u,l,w]),(0,dU.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,pV.jsx)(pq.ActionableNotification,{actionButtonLabel:p,"aria-label":oj("closeSnackbar","Close snackbar"),className:pW()("-esm-fast-data-entry__snackbar-module__slideIn___TqSN-",{"-esm-fast-data-entry__snackbar-module__animated___+XPKT":m,"-esm-fast-data-entry__snackbar-module__slideOut___1cFIY":g}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:oj("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...f})},O1=({subject:e})=>{let[t,r]=(0,dU.useState)([]),n=(0,dU.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,dU.useEffect)(()=>{let t=e.subscribe(e=>r(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,pV.jsx)(pV.Fragment,{children:t.map(e=>(0,pV.jsx)(O0,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},O2=new lF,O3=0;function O4(e){e&&(0,d8.createRoot)(e).render((0,pV.jsx)(O1,{subject:O2}))}function O6(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{O2.next({...e,id:O3++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let O5=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,u=(0,dU.useCallback)(()=>{s(),t()},[t,s]);return(0,pV.jsx)("div",{children:(0,pV.jsx)(pq.ActionableNotification,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:u,onClose:t})})},O8=({subject:e})=>{let[t,r]=(0,dU.useState)([]),n=(0,dU.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,dU.useEffect)(()=>{let t=e.subscribe(e=>r(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,pV.jsx)(pV.Fragment,{children:t.map(e=>(0,pV.jsx)(O5,{toast:e,closeToast:()=>n(e)},e.id))})},O9=new lF,O7=0;function De(e){e&&(0,d8.createRoot)(e).render((0,pV.jsx)(O8,{subject:O9}))}function Dt(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,SH.A)(t))?setTimeout(()=>{O9.next({...e,id:O7++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Dr(e,t=!1){if(t)return!0;let r=Ds[e];return!r||!r()}function Dn(e,t){let r=Dm.getState()?.workspaceGroup,n=r?.name;n&&e===n&&Dv(()=>{let n=DS(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),Dm.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function Do(e,t){let{name:r,additionalProps:n}=t;dO(r);let o=()=>{Df(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Di(r,n),closeWorkspaceGroup:!1})};Dr(e.name)?o():D_("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Di(e,t){let r=dO(e),n=Dm.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Dn(n.name,()=>{Di(e,t)});let o=Dm.getState().workspaceGroup?.name,i={...r,title:Dx(r,t),closeWorkspace:(t={})=>Df(e,t),closeWorkspaceWithSavedChanges:t=>Df(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(Ds[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,Dm.setState(t=>{let r=t.openWorkspaces.map(t=>t.name===e?i:t);return{...t,openWorkspaces:r}})},currentWorkspaceGroup:o,additionalProps:t??{}};function a(e,t){Dm.setState(r=>{let n=[e,...t??r.openWorkspaces],o=Db(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&DS(o,t);let s=Dm.getState().openWorkspaces,u=s.findIndex(t=>t.name===e),l=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===u)if(u>=0){let t=s[u];a({...t,additionalProps:i.additionalProps,...t.title===Dx(t,t.additionalProps)&&{title:Dx(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else l?(a(l,Dm.getState().openWorkspaces.filter(e=>e.type!=i.type)),Do(l,{name:e,additionalProps:t})):a(i);else Do(s[0],{name:e,additionalProps:t})}function Da({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){Dp(t),Di(r,n),ne({to:e})}let Ds={};function Du(e,t){Ds[e]=t}function Dl(e){return Ds[e]}function Dc(){let e=Dm.getState();Dm.setState({...e,prompt:null})}let Dd={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Df(e,t={}){t={...Dd,...t};let r=()=>{let r=Dm.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=Dm.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Dn(o),Ds[e]=()=>!1,Dm.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:Db(n?.[0])})),t?.onWorkspaceClose?.()};return Dr(e,t?.ignoreChanges)?(r(),!0):(D_("closing-workspace",r,dO(e).title??e),!1)}function Dp(e){Dm.getState().context!=e&&Dm.setState({context:e,openWorkspaces:[],prompt:null})}let Dh={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},Dm=q("workspace",Dh);function Dy(){return Dm}function Dg(e){let t=Dm.getState();Dm.setState({...t,workspaceWindowState:e})}function Db(e){return e?.preferredWindowSize??"normal"}function Dv(e=()=>{},t=()=>!0){let r=Dm.getState().openWorkspaces.filter(t).every(({name:e})=>Dr(e)),n=()=>{DE(),e?.()};r?n():D_("closing-all-workspaces",n)}function Dw(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=dZ(Dm);return(0,dU.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function D_(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:oj("unsavedChangesTitleText","Unsaved changes"),body:oj("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:oj("discard","Discard")};break;case"closing-all-workspaces":{let e=Dm.getState().openWorkspaces.filter(({name:e})=>!Dr(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:oj("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:oj("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:oj("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:oj("unsavedChangesTitleText","Unsaved changes"),body:oj("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{Dm.setState(e=>({...e,prompt:null})),t?.()},confirmText:oj("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}Dm.setState(e=>({...e,prompt:n}))}function Dx(e,t){return t?.workspaceTitle??e.title}function DE(){Dm.setState(Dh)}function DS(e,t={}){if(!e||"default"===e)return;let r=Z(e,{});return t&&r.setState(e=>({...e,...t})),r}let DO="-esm-fast-data-entry__action-menu-button-module__container___Uwne-",DD="-esm-fast-data-entry__action-menu-button-module__elementContainer___vWkQO",DP="-esm-fast-data-entry__action-menu-button-module__active___D7Idw";function Dk({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,pV.jsxs)(pV.Fragment,{children:[e({size:16}),t?(0,pV.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__interruptedTag___7undI",children:"!"}):(0,pV.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button-module__countTag___XJRiM",children:r})]})}let DC=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=po(),{workspaces:s,workspaceWindowState:u}=Dw(),l=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==u&&0===l,d=l>0||0===l&&"hidden"===u;return"tablet"===a||"phone"===a?(0,pV.jsxs)(pq.Button,{className:pW()(DO,{[DP]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,pV.jsx)("span",{className:DD,children:(0,pV.jsx)(Dk,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,pV.jsx)("span",{children:t})]}):(0,pV.jsx)(pq.IconButton,{align:"left","aria-label":r,className:pW()(DO,{[DP]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,pV.jsx)("div",{className:DD,children:(0,pV.jsx)(Dk,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var DT=r(4535),Dj=r(771);function DR({contextKey:e}){let{prompt:t}=Dw();return(0,dU.useEffect)(()=>{RegExp(`/${(0,eo.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,dU.useEffect)(()=>(Dp(e),()=>{Dp(null)}),[e]),(0,dU.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${(0,eo.escapeRegExp)(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=Dm.getState().openWorkspaces.every(({name:e})=>Dr(e));a||(s?DE():(r?.(),Dv(()=>{ne({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,pV.jsxs)(pq.ComposedModal,{open:!0,onClose:Dc,children:[(0,pV.jsx)(pq.ModalHeader,{title:t.title}),(0,pV.jsx)(pq.ModalBody,{children:(0,pV.jsx)("p",{className:"-esm-fast-data-entry__workspace-notification-module__messageBody___M3IAD",children:t.body})}),(0,pV.jsxs)(pq.ModalFooter,{children:[(0,pV.jsx)(pq.Button,{kind:"secondary",onClick:Dc,children:t.cancelText??oj("cancel")}),(0,pV.jsx)(pq.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??oj("confirm")})]})]}):null}function DN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function DA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?DN(Object(r),!0).forEach(function(t){DI(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function DM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D$(e){return(D$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function DL(e,t){return(DL=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DF(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var DB=function(e){var t=dU.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),t&&DL(a,t);var r,n,o,i=(r=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=D$(a);e=r?Reflect.construct(t,arguments,D$(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 DF(this)});function a(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),DI(DF(t=i.call(this,e)),"handleRef",function(e){t.el=e}),DI(DF(t),"addThingToDo",function(e,r){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return r.apply(void 0,arguments)}).catch(function(r){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),r&&r.message&&(r.message="During '".concat(e,"', parcel threw an error: ").concat(r.message)),t.props.handleError?t.props.handleError(r):setTimeout(function(){throw r}),r}))}),DI(DF(t),"getParcelProps",function(){var e=DA(DA({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return n=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,r=e.props.mountParcel||e.mountParcel;if(!r)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(r){t.style[r]=e.props.wrapStyle[r]}),e.props.appendTo.appendChild(t)),e.parcel=r(e.props.config,DA({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 fn&&fn.Consumer?dU.createElement(fn.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=fn&&fn.Consumer?dU.createElement(fn.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return dU.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],DM(a.prototype,n),o&&DM(a,o),a}();DI(DB,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function DV({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,dU.useState)(),o=function(e){let[t,r]=(0,dU.useState)({}),[n,o]=(0,dU.useState)(e);return(0,dU.useEffect)(()=>{n!==e&&o(e)},[e]),(0,dU.useEffect)(()=>{let e,t=DS(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,dU.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,dU.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,pV.jsx)(DB,{config:r,mountParcel:dB,...i},e.name):(0,pV.jsx)(pq.InlineLoading,{className:"-esm-fast-data-entry__workspace-module__loader___v7QFg",description:`${oj("loading","Loading")} ...`})}function DU({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,dU.useState)(!1),i=(0,dU.useRef)(window.innerHeight),{featureName:a}=(0,dU.useContext)(dH),s=po();(0,dU.useEffect)(()=>{let e=()=>{o(!pi(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let u=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,pV.jsx)("aside",{className:pW()("-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":n,"-esm-fast-data-entry__action-menu-module__sideRailVisible___XIAk7":!n}),children:(0,pV.jsx)("div",{className:"-esm-fast-data-entry__action-menu-module__container___mzfAh",children:(0,pV.jsx)(d5,{className:"-esm-fast-data-entry__action-menu-module__chartExtensions___DiJtm",name:u,state:r})})})}function DW({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=po(),{workspaces:a,workspaceWindowState:s,workspaceGroup:u}=Dw(),l=u?.name,c=a[0],d="hidden"===s||null==c,f=c?.width??(t?"wider":"narrow"),p=(0,dU.useMemo)(()=>r||l&&!d,[l,d,r]);return fL(!d&&!pi(i)),(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsxs)("div",{className:r?"-esm-fast-data-entry__workspace-module__workspaceContainerWithActionMenu___6x1qS":"-esm-fast-data-entry__workspace-module__workspaceContainerWithoutActionMenu___TJHnt",children:[(0,pV.jsx)("aside",{className:pW()(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,pV.jsx)("div",{className:pW()("-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:a.map((e,t)=>(0,pV.jsx)("div",{className:pW()("-esm-fast-data-entry__workspace-module__workspaceInnerContainer___h3oyO",{"-esm-fast-data-entry__workspace-module__hiddenExtraWorkspace___AP+Vj":0!==t}),children:(0,pV.jsx)(dU.Suspense,{fallback:null,children:(0,pV.jsx)(fd.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,pV.jsx)(DH,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,pV.jsx)(DR,{contextKey:e})]}),p&&(0,pV.jsx)(DU,{name:l,isWithinWorkspace:!r,actionMenuProps:o})]})}function DH({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,fd.useTranslation)(),n=po(),{workspaceWindowState:o,workspaceGroup:i}=Dw(),a=i?.name,s="maximized"===o;(0,dU.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:u}=(0,dU.useContext)(dH),l=(0,dU.useCallback)(()=>{Dg(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:f="",closeWorkspace:p}=(0,dU.useMemo)(()=>e??{},[e]),h=(0,dU.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsxs)(pq.Header,{"aria-label":oj("workspaceHeader","Workspace Header"),className:"-esm-fast-data-entry__workspace-module__header___nACZO",children:[!pi(n)&&!c&&(0,pV.jsx)(pq.HeaderMenuButton,{"aria-label":oj("close","Close"),renderMenuIcon:(0,pV.jsx)(he,{}),onClick:()=>p()}),(0,pV.jsx)(pq.HeaderName,{prefix:"",children:e.titleNode??r(e.title)}),(0,pV.jsx)("div",{className:"-esm-fast-data-entry__workspace-module__overlayHeaderSpacer___HBnr+"}),(0,pV.jsxs)(pq.HeaderGlobalBar,{className:"-esm-fast-data-entry__workspace-module__headerButtons___heP0Q",children:[(0,pV.jsx)(d5,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,pV.jsx)(d5,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,pV.jsx)(d5,{name:`workspace-header-${u}-slot`,state:h}),pi(n)&&(0,pV.jsxs)(pV.Fragment,{children:[(d||s)&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":s?oj("minimize","Minimize"):oj("maximize","Maximize"),onClick:l,children:s?(0,pV.jsx)(DT.Xj,{}):(0,pV.jsx)(DT.hz,{})}),c&&!a?(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("hide","Hide"),onClick:()=>Dg("hidden"),children:(0,pV.jsx)(ht,{})}):(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("close","Close"),onClick:()=>p?.(),children:(0,pV.jsx)(hv,{})})]}),"tablet"===n&&c&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("close","Close"),onClick:()=>p?.(),children:(0,pV.jsx)(Dj.d3,{})})]})]}),(0,pV.jsx)("div",{className:pW()("-esm-fast-data-entry__workspace-module__workspaceContent___oYdxI",{"-esm-fast-data-entry__workspace-module__marginWorkspaceContent___7hwHu":!!f}),children:(0,pV.jsx)(DV,{workspace:e,additionalPropsFromPage:t},e.name)})]})}async function DK(e,t){let{openedGroup:r}=dP.getState();if(r){if(r.groupName===e&&Dq(r.props,t))return!0;else if(!await DY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return dP.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Dz(e){let{openedGroup:t,openedWindows:r}=dP.getState();if(t){if(r.length>0&&!(e||await DY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;dP.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function DG(e,t=null,r=null,n=null){let o=dP.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=dk(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,u=dC(s);if(!u)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let l=dT(e);if(a&&(a.groupName!==u.name||!Dq(a.props,n)))return!!await DY({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(dP.setState({...o,openedGroup:{groupName:u.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[D0(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(l>=0){let n=o.openedWindows[l],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Dq(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Dq(d.props,t)?((a||l!==o.openedWindows.length-1)&&dP.setState(DZ.restoreWindow(o,s)),!0):!!await DY({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(dP.setState({...o,openedGroup:{groupName:u.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==l),{windowName:s,openedWorkspaces:[D0(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await DY({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(dP.setState({...o,openedGroup:{groupName:u.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==l),{windowName:s,openedWorkspaces:[D0(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=u.persistence?(dP.setState({...o,openedGroup:{groupName:u.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[D0(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await DY({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(dP.setState({...o,openedGroup:{groupName:u.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[D0(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Dq(e,t){return null==e||null==t||L(e,t)}function DY(e){function t(e,t){let r=[];for(let n=e.openedWorkspaces.length-1;n>=0;n--){let o=e.openedWorkspaces[n];if(o.hasUnsavedChanges&&r.push(o),t&&o.workspaceName===t)break}return r}let{openedWindows:r,workspaceTitleByWorkspaceName:n}=dP.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=r.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n);break}case"CLOSE_WORKSPACE":{let n=r.find(t=>t.windowName===e.windowName);if(!n)throw Error(`Window ${e.windowName} not found in opened windows.`);o=t(n,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=r.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let t=SF("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let DZ={setWindowMaximized(e,t,r){let n=e.openedWindows.findIndex(e=>e.windowName===t),o=[...e.openedWindows],i={...o[n],maximized:r};return o[n]=i,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let r=e.openedWindows.findIndex(e=>e.windowName===t),n=e.openedWindows[r],o=[...e.openedWindows.filter((e,t)=>t!==r),n];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let r=dT(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],u=s.findIndex(e=>e.workspaceName===t);if(-1===u)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let l=s.slice(0,u+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...l,D0(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=dT(t);if(n<0)return e;let o={...e.openedWindows[n]},i=o.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(i<0)return e;o.openedWorkspaces[i]={...o.openedWorkspaces[i],hasUnsavedChanges:r};let a=[...e.openedWindows];return a[n]=o,{...e,openedWindows:a}},setWorkspaceTitle(e,t,r){let n={...e.workspaceTitleByWorkspaceName};return null===r?delete n[t]:n[t]=r,{...e,workspaceTitleByWorkspaceName:n}}};function DJ(){return dJ(dP,DZ)}let DX=()=>(0,dU.useContext)(fn),DQ=()=>Object.keys(dP.getState().registeredWorkspacesByName);function D0(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:(0,la.A)()}}let D1={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"},D2=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=po(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:u,registeredGroupsByName:l,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:f,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:h}=DJ(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:g,showActionMenu:b}=DX(),v=dT(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,dU.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,dU.useEffect)(()=>{f[m]!==e&&p(m,e)},[f,m,e,p]),v<0||null==u||null==x)return null;let E=l[u.groupName];if(!E)throw Error(`Cannot find registered workspace group ${u.groupName}`);let S=d[m].window,O=c[S];if(!O)throw Error(`Cannot find registered workspace window ${S}`);let{icon:D,canMaximize:P}=O,k="closable"===E.persistence,C=!!D&&!k,{maximized:T}=w,j=O?.width??"narrow",R=Object.values(c).some(e=>e.group===u.groupName&&void 0!==e.icon),N=v<s.length-1||h;return(0,pV.jsxs)("div",{className:pW()(D1.workspaceOuterContainer,{[D1.narrowWorkspace]:"narrow"===j,[D1.widerWorkspace]:"wider"===j,[D1.extraWideWorkspace]:"extra-wide"===j,[D1.isActionMenuOpened]:R}),children:[(0,pV.jsx)("div",{className:pW()(D1.workspaceSpacer,{[D1.hidden]:N})}),(0,pV.jsx)("div",{className:pW()(D1.workspaceMiddleContainer,{[D1.maximized]:T,[D1.hidden]:N,[D1.isRootWorkspace]:y,[D1.showActionMenu]:b}),children:(0,pV.jsxs)("div",{className:pW()(D1.workspaceInnerContainer,{[D1.maximized]:T,[D1.hidden]:N,[D1.isRootWorkspace]:y}),children:[(0,pV.jsxs)(pq.Header,{"aria-label":oj("workspaceHeader"),className:D1.header,children:[(0,pV.jsx)(pq.HeaderName,{prefix:"",children:e}),(0,pV.jsx)("div",{className:D1.overlayHeaderSpacer}),(0,pV.jsx)(pq.HeaderGlobalBar,{className:D1.headerButtons,children:pi(n)?(0,pV.jsxs)(pV.Fragment,{children:[(P||T)&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":T?oj("minimize"):oj("maximize"),onClick:()=>o(S,!T),children:T?(0,pV.jsx)(DT.Xj,{}):(0,pV.jsx)(DT.hz,{})}),C&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("hide"),onClick:()=>i(),children:(0,pV.jsx)(ht,{})}),!k&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("close"),onClick:()=>g({closeWindow:!0}),children:(0,pV.jsx)(hv,{})})]}):(0,pV.jsxs)(pV.Fragment,{children:[C&&(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("hide"),onClick:()=>i(),children:(0,pV.jsx)(Dj.d3,{})}),(0,pV.jsx)(pq.HeaderGlobalAction,{"aria-label":oj("close"),onClick:()=>{k?Dz():g({closeWindow:!0})},children:(0,pV.jsx)(hv,{})})]})})]}),(0,pV.jsx)("div",{className:pW()(D1.workspaceContent),children:t})]})})]})},D3="-esm-fast-data-entry__action-menu-button2-module__container___gYRoa",D4="-esm-fast-data-entry__action-menu-button2-module__elementContainer___vBViO",D6="-esm-fast-data-entry__action-menu-button2-module__active___uRJRA",D5="-esm-fast-data-entry__action-menu-button2-module__focused___D4VYB";function D8({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,pV.jsxs)(pV.Fragment,{children:[e({size:16}),t?(0,pV.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__interruptedTag___35fO7",children:"!"}):(0,pV.jsx)("span",{className:"-esm-fast-data-entry__action-menu-button2-module__countTag___l8lfc",children:r})]})}let D9=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=po(),{openedWindows:a,restoreWindow:s,hideWindow:u,isMostRecentlyOpenedWindowHidden:l}=DJ(),{extension:c}=(0,dU.useContext)(dH),d=a.findIndex(e=>e.windowName===c?.extensionId),f=a[d],p=null!=f,h=p&&(d<a.length-1||l),m=p&&!h,y=f?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,g=async()=>{if(p)h?s(f.windowName):u();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;DG(e,t,r)}};return"tablet"===i||"phone"===i?(0,pV.jsxs)(pq.Button,{className:pW()(D3,{[D6]:p&&!m,[D5]:m}),iconDescription:t,kind:"ghost",onClick:g,role:"button",tabIndex:0,size:"md",children:[(0,pV.jsx)("span",{className:D4,children:(0,pV.jsx)(D8,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,pV.jsx)("span",{children:t})]}):(0,pV.jsx)(pq.IconButton,{align:"left","aria-label":t,className:pW()(D3,{[D6]:p&&!m,[D5]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:g,size:"md",children:(0,pV.jsx)("div",{className:D4,children:(0,pV.jsx)(D8,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function D7({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,pV.jsx)(pq.Button,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?hb:hm,children:e?oj("showLess","Show less"):oj("showMore","Show more")})}let Pe={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"},Pt=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${nc}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=fp()(t,nh),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,dU.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsxs)("p",{className:Pe.heading,children:[oj("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,pV.jsx)(pq.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pV.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>Ek(e?.startDate).getTime()-Ek(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,pV.jsx)("li",{children:(0,pV.jsx)(dK,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,pV.jsx)("li",{children:"--"})})(),t.length>3&&(0,pV.jsx)("li",{className:Pe.link,children:(0,pV.jsx)(dK,{to:`${window.spaBase}/home/patient-lists`,children:oj("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Pr=({patientId:e})=>{let{patient:t,isLoading:r}=pm(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,pV.jsx)(pq.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)("p",{className:Pe.heading,children:oj("address","Address")}),(0,pV.jsx)("ul",{children:n?Object.entries(n).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?n.extension?.[0]?.extension?.map((t,r)=>(0,pV.jsxs)("li",{children:[oj(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,pV.jsxs)("li",{children:[oj(e,e),": ",t]},`address-${e}`)):(0,pV.jsx)("li",{children:"--"})})]})},Pn=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=fV({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=fz()(`${nc}/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)))`,nh);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,dU.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,dU.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?oj(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)("p",{className:Pe.heading,children:oj("contactDetails","Contact Details")}),t?(0,pV.jsx)(pq.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pV.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,pV.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,pV.jsx)("li",{children:"--"})})]})},Po=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${nc}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:r,error:n,isLoading:o,isValidating:i}=fp()(e?t:null,nh),a=r?.data?.results?.length?function(e,t){let r=[];for(let n of t)e===n.personA.uuid?r.push({uuid:`${n.uuid}`,display:n.personB.display,relativeAge:n.personB.age,relativeUuid:n.personB.uuid,relationshipType:n.relationshipType.bIsToA}):r.push({uuid:`${n.uuid}`,display:n.personA.display,relativeAge:n.personA.age,relativeUuid:n.personA.uuid,relationshipType:n.relationshipType.aIsToB});return r}(e,r.data.results):null;return{data:r?a:null,error:n,isLoading:o,isValidating:i}}(e);return(0,pV.jsxs)(pV.Fragment,{children:[(0,pV.jsx)("p",{className:Pe.heading,children:oj("relationships","Relationships")}),r?(0,pV.jsx)(pq.InlineLoading,{description:`${oj("loading","Loading")} ...`,role:"progressbar"}):(0,pV.jsx)("ul",{children:t&&t.length>0?(0,pV.jsx)(pV.Fragment,{children:t.map(e=>(0,pV.jsxs)("li",{className:Pe.relationship,children:[(0,pV.jsx)("div",{children:(0,pV.jsx)(dK,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,pV.jsx)("div",{children:e.relationshipType}),(0,pV.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?oj("yearAbbreviation","yr"):oj("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,pV.jsx)("li",{children:"--"})})]})};function Pi({patientId:e,deceased:t}){return(0,pV.jsxs)("div",{className:pW()(Pe.contactDetails,{[Pe.deceased]:t}),children:[(0,pV.jsxs)("div",{className:Pe.row,children:[(0,pV.jsx)("div",{className:Pe.col,children:(0,pV.jsx)(Pr,{patientId:e})}),(0,pV.jsx)("div",{className:Pe.col,children:(0,pV.jsx)(Pn,{patientUuid:e})})]}),(0,pV.jsxs)("div",{className:Pe.row,children:[(0,pV.jsx)("div",{className:Pe.col,children:(0,pV.jsx)(Po,{patientId:e})}),(0,pV.jsx)("div",{className:Pe.col,children:(0,pV.jsx)(Pt,{patientUuid:e})})]})]})}function Pa(e){let t=document.querySelector("template#loading-spinner");if(t){let r=t.content.cloneNode(!0),n=Array.prototype.map.call(r.childNodes,e=>e);return e.appendChild(r),()=>n.forEach(e=>e.remove())}return()=>{}}let Ps="-esm-fast-data-entry__action-menu2-module__container___4aX3S";function Pu({workspaceGroup:e,groupProps:t}){let r=po(),{persistence:n}=e;return(0,pV.jsx)("aside",{className:"-esm-fast-data-entry__action-menu2-module__sideRail___a7qg9",children:(0,pV.jsxs)("div",{className:Ps,children:["closable"==n&&pi(r)&&(0,pV.jsx)(pq.IconButton,{align:"left",onClick:()=>Dz(),label:oj("close"),kind:"ghost",children:(0,pV.jsx)(hv,{})}),(0,pV.jsx)(dH.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,pV.jsx)(d5,{className:Ps,name:e.name,state:{groupProps:t}})})]})})}function Pl(e){let t=new URL(e,window.location.origin).pathname,r=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,n=r.endsWith("/")?r.slice(0,-1):r,o=null;return n?n===t?o="/":t.startsWith(`${n}/`)&&(o=t.slice(n.length)):o=t,{full:t,spaRelative:o}}let Pc=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:u}=DJ(),l=(0,dU.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await DY({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await DY({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,n)=>{let o=t.workspaceName,{openedWorkspaces:i}=r,a=i.findIndex(e=>e.workspaceName===o);-1===a||a!==i.length-1&&i.slice(a+1).some(e=>e.hasUnsavedChanges)&&!await DY({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||u(o,e,n||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:r.props,groupProps:a&&a.props?a.props:null,isRootWorkspace:n,isLeafWorkspace:o,windowName:r.windowName,showActionMenu:i},[t,s,a,r]);if(!e){let{registeredWorkspacesByName:e}=dP.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=dP.getState(),u=o?s[o]:void 0,l=u&&u.width?u.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,pV.jsxs)("div",{className:pW()(D1.workspaceOuterContainer,{[D1.narrowWorkspace]:"narrow"===l,[D1.widerWorkspace]:"wider"===l,[D1.extraWideWorkspace]:"extra-wide"===l,[D1.isActionMenuOpened]:c}),children:[(0,pV.jsx)("div",{className:D1.workspaceSpacer}),(0,pV.jsx)("div",{className:pW()(D1.workspaceMiddleContainer,{[D1.isRootWorkspace]:n,[D1.showActionMenu]:i}),children:(0,pV.jsx)("div",{className:pW()(D1.workspaceInnerContainer,{[D1.isRootWorkspace]:n}),children:(0,pV.jsx)(pq.InlineLoading,{className:D1.loader,description:`${oj("loading")} ...`})})})]})}return(0,pV.jsx)(DB,{config:e,mountParcel:dB,...l},t.workspaceName)},Pd=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,dU.useState)({}),{registeredWorkspacesByName:i}=dP.getState();return(0,dU.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await pT(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,pV.jsx)(pV.Fragment,{children:r.map((o,i)=>(0,pV.jsx)(Pc,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function Pf(e){e&&(0,d8.createRoot)(e).render((0,pV.jsx)(Pp,{}))}function Pp(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=DJ();if((0,dU.useEffect)(()=>lT("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(Dz().then(e=>!e));let s=r[e.groupName],u=s?.scopePattern;u&&function(e,t,r){try{let n=new RegExp(e),o=Pl(t),i=Pl(r);if(null===o.spaRelative||null===i.spaRelative)return!0;let a=n.exec(o.spaRelative),s=n.exec(i.spaRelative);if(a&&s||(a=n.exec(o.full),s=n.exec(i.full)),!a||!s)return!0;if(a.length>1)return!a.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(u,i,a)&&o(Dz().then(e=>!e))}),[e,r]),!e)return null;let o=r[e.groupName],i=t.some(e=>e.maximized),{name:a}=o,s=Object.values(n).filter(e=>e.group===a&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,pV.jsxs)("div",{className:pW()("-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___crgqC",{"-esm-fast-data-entry__workspace-windows-and-menu-module__overlay___FCMKG":o.overlay,"-esm-fast-data-entry__workspace-windows-and-menu-module__hasMaximizedWindow___gk319":i}),children:[(0,pV.jsx)("div",{className:"-esm-fast-data-entry__workspace-windows-and-menu-module__workspaceWindowsContainer___MrLlf",children:t.map(e=>(0,pV.jsx)(Pd,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,pV.jsx)(Pu,{workspaceGroup:o,groupProps:e.props})]})}function Ph(e,t,r){if(null==e)return r;let n=x0(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=x0(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:t,original:e})}let i=n;for(;i;){let e=o.find(e=>e.canonical===i);if(e)return e.original;let t=i+"-",r=o.find(e=>e.canonical.startsWith(t));if(r)return r.original;if("ht"===i){i="fr-HT";continue}let n=i.lastIndexOf("-");if(-1===n)break;let a=(i=i.slice(0,n)).lastIndexOf("-");-1!==a&&i.length-a==2&&(i=i.slice(0,a))}return r}function Pm(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function Py(e){return!!e&&e.constructor===Object}var Pg=r(9589);function Pb(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function Pv(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=Pb(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return Pb(e)}(t);return Pg.satisfies(r,e,{includePrerelease:!0})}async function Pw(e,t={}){let r,{shouldRetry:n,getDelay:o,onError:i}=t;n=n??(e=>e<=5),o=o??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let a=0;do try{return await P_(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function P_(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);