@openmrs/esm-report-builder 0.1.1-pre.111 → 0.1.1-pre.115

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/4171.js CHANGED
@@ -1,4 +1,4 @@
1
- (globalThis.webpackChunk_openmrs_esm_report_builder=globalThis.webpackChunk_openmrs_esm_report_builder||[]).push([["4171"],{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()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l,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 p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.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,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},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),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),i=r(6743),a=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,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 p(e){return e%2==0?"#ddd":"#222"}function f(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 b(e,t,r,n,o){var i=y(n),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function g(e,t,r,n,o){var i=f(o),a=p(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,b=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(b,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(b,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(b,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(b,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=f(i=c(this.hash,r)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(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=f(n=c(this.hash,39-t)),e=p(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=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(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=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(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?g(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):b(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?b(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):g(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=f(i=c(this.hash,t+1)),e=p(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=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},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,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},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 l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},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:c="/",end:d=!0,sensitive:p=!1,trailing:f=!0}=t,h=new l("^"),m=[e],y=0;for(;m.length;){let e=m.shift();if(Array.isArray(e)){m.push(...e);continue}let l="object"==typeof e?e:function(e,t={}){let{encodePath:i=r}=t,l=[...e],u=[],c=0,d=0;function p(){let t="";if(n.test(l[c]))do t+=l[c++];while(o.test(l[c]));else if('"'===l[c]){let r=c;for(;c<l.length;){if('"'===l[++c]){c++,r=0;break}"\\"===l[c]&&c++,t+=l[c]}if(r)throw new s(`Unterminated quote at index ${r}`,e)}if(!t)throw new s(`Missing parameter name at index ${c}`,e);return t}for(;c<l.length;){let e=l[c++];"{}()[]+?!".includes(e)?u.push({type:e,index:c,value:e}):"\\"===e?u.push({type:"escape",index:c,value:l[c++]}):":"===e?u.push({type:"param",index:c,value:p()}):"*"===e?u.push({type:"wildcard",index:c,value:p()}):u.push({type:"char",index:c,value:e})}return u.push({type:"end",index:c,value:""}),new a(function t(r){let n=[];for(;;){let o=u[d++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=u[d];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=u[++d];n.push({type:"text",value:i(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 s(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(e,t);!function e(t,r,n,o){for(;r<t.length;){let i=t[r++];if("group"===i.type){e(i.tokens,0,n.slice(),n=>e(t,r,n,o));continue}n.push(i)}o(n)}(l.tokens,0,[],e=>{if(y++>=256)throw new s("Too many path combinations",l.originalPath);let t=h;for(let r of function(e,t,r){let n=[],o="",a="",l=0,c=0,d=0;for(;d<e.length;){let p=e[d++];if("text"===p.type){n.push({source:i(p.value)}),o+=p.value,2===l&&(a+=p.value),p.value.includes(t)&&(c=0);continue}if("param"===p.type||"wildcard"===p.type){if(l&&!o)throw new s(`Missing text before "${p.name}" ${p.type}`,r);"param"===p.type?(n.push({source:c?`(${u(t,o)}+?)`:!function(r,n){for(;r<e.length;){let o=e[r++];if(o.type===n)return!0;if("text"===o.type&&o.value.includes(t))break}return!1}(d,"wildcard")?`(${u(t,"")}+?)`:`(${u(t,function(t){let r="";for(;t<e.length;){let n=e[t++];if("text"!==n.type)break;r+=n.value}return r}(d))}+?)`,key:p}),c|=l=1):(n.push({source:2&c?`(${u(o,"")}+?)`:1&c?`(${u(a,"")}+?)`:a?`(${u(a,"")}+?|${u(t,"")}+?)`:"([^]+?)",key:p}),a="",c|=l=2),o="";continue}throw TypeError(`Unknown token type: ${p.type}`)}return n}(e,c,l.originalPath))t=t.add(r.source,r.key);t.add("")})}let b=[],g=function e(t,r){t.key&&r.push(t.key);let n=Object.keys(t.children),o=n.map(n=>e(t.children[n],r)).join("|");return t.source+(n.length<2?o:`(?:${o})`)}(h,b);return f&&(g+="(?:"+i(c)+"$)?"),{regexp:new RegExp(g+=d?"$":"(?="+i(c)+"|$)",p?"":"i"),keys:b}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u;function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}class l{constructor(e,t){this.source=e,this.key=t,this.children=Object.create(null)}add(e,t){var r;let n=e+":"+(t?t.name:"");return(r=this.children)[n]||(r[n]=new l(e,t))}}function u(e,t){return t.length>e.length?u(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${i(e)}|${i(t)})[^])`:e.length>1?`(?:(?!${i(e)})[^${i(t)}])`:`[^${i(e+t)}]`}},5338(e,t,r){"use strict";var n=r(6807);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 l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},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),l=r(5495),u=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 u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},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),l=r(6967),u=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 p=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 f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=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}(p);t.AnonymousSubject=f},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),l=r(4421),u=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 p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},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,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.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),l=r(1396),u=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 u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var 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._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 f(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};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._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},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),l=r(7849),u=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]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},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,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},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),l=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 u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},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 l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},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),l=r(7211),u=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 f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=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}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},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=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},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 l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(f,r,{subscriber:a,context:s})),a.add(i.schedule(p,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(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(f,r,{subscriber:n,context:i})),this.schedule(e,t))}function f(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 l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},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 l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},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 l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},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),l=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 u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},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),l=r(7849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=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(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},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 l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},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 l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},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),l=r(4579);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},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),l=r(2888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(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),p=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 f(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=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),l=r(4579);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},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 l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},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 l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},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 l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},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 l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},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 l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},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 l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},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 l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},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 l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},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 l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},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,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!r||f?(f=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){f=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(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 l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},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 l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},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 l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},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 l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},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 l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},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 l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},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 l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},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=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},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 l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},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},2284(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 l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},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 l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},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),l=r(5390),u=r(8244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new p(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),p=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(f,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 f(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),l=r(7849);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},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 l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},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 l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(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),l=r(7328),u=r(1087),c=r(2555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},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),l=r(7328),u=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(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},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(2284).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;u("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,u("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(u("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 l(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("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let i=r(8587),{safeRe:a,t:s}=r(9718),l=r(2111),u=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=>!v(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&&w(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){e=e.replace(g,"");let t=((this.options.includePrerelease&&y)|(this.options.loose&&b))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[p.HYPHENRANGELOOSE]:c[p.HYPHENRANGE];l("hyphen replace",e=e.replace(o,A(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[p.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[p.TILDETRIM],h)),l("caret trim",e=e.replace(c[p.CARETTRIM],m));let a=e.split(" ").map(e=>E(e,this.options)).join(" ").split(/\s+/).map(e=>R(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[p.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let d=[...u.values()];return i.set(t,d),d}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>x(r,t)&&e.set.some(e=>x(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 u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(M(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8794)),a=r(8587),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,src:d,t:p,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:b}=r(6874),g=RegExp(d[p.BUILD],"g"),v=e=>"<0.0.0-0"===e.value,w=e=>""===e.value,x=(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},E=(e,t)=>(l("comp",e=e.replace(c[p.BUILD],""),t),l("caret",e=P(e,t)),l("tildes",e=D(e,t)),l("xrange",e=k(e,t)),l("stars",e=T(e,t)),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(" "),O=(e,t)=>{let r=t.loose?c[p.TILDELOOSE]:c[p.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("tilde",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s=`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:a?(l("replaceTilde pr",a),s=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`):s=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,l("tilde return",s),s})},P=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{l("caret",e,t);let r=t.loose?c[p.CARETLOOSE]:c[p.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("caret",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(l("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`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),l("caret return",s),s})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>j(e,t)).join(" ")),j=(e,t)=>{e=e.trim();let r=t.loose?c[p.XRANGELOOSE]:c[p.XRANGE];return e.replace(r,(r,n,o,i,a,s)=>{let u,c,d;if(l("xRange",e,r,n,o,i,a,s),u=o,c=i,d=a,S(u)&&!S(c)||S(c)&&d&&!S(d))return e;let p=S(o),f=p||S(i),h=f||S(a);return"="===n&&h&&(n=""),s=t.includePrerelease?"-0":"",p?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(f&&(i=0),a=0,">"===n?(n=">=",f?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",f?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):f?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:h&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),l("xRange return",r),r})},T=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[p.STAR],"")),R=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),A=e=>(t,r,n,o,i,a,s,l,u,c,d,p)=>(r=S(n)?"":S(o)?`>=${n}.0.0${e?"-0":""}`:S(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=S(u)?"":S(c)?`<${+u+1}.0.0-0`:S(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),M=(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(l(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),l=r(8587),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>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 u(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 u(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]),((e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let t=0;t<r.length;t++)if(0!==u(e[t],r[t]))return!1;return!0})(this.prerelease,t)?isNaN(this.prerelease[t.split(".").length])&&(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),l=r(5200);e.exports=(e,t,r,u)=>{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,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);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],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${l}.${u}${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,l=a?o:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"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))},417(e,t,r){"use strict";let n=r(144),o=r(6874),i=r(3908),a=e=>e.startsWith("pre");e.exports=(e,t,r)=>{let s,l;if(!o.RELEASE_TYPES.includes(t))return null;let u=(s=e,l=r,n(s instanceof i?s.version:s,l));return u&&((e,t)=>{if(a(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()})(u,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),l=r(6953),u=r(7414),c=r(3007),d=r(1832),p=r(2938),f=r(6254),h=r(4493),m=r(1729),y=r(560),b=r(9970),g=r(1763),v=r(3290),w=r(3927),x=r(4277),E=r(5580),S=r(7059),D=r(4641),O=r(3999),P=r(4089),C=r(5200),k=r(2111),j=r(3789),T=r(417),R=r(3904),A=r(8311),M=r(7638),N=r(7631),I=r(9628),$=r(270),L=r(1261),F=r(3874),B=r(7075),V=r(5571),U=r(5342),W=r(6780);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:b,compareLoose:g,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:D,neq:O,gte:P,lte:C,cmp:k,coerce:j,truncate:T,Comparator:R,Range:A,satisfies:M,toComparators:N,maxSatisfying:I,minSatisfying:$,minVersion:L,validRange:F,outside:B,gtr:V,ltr:U,intersects:W,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}}},8587(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=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,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=p++;a(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[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),l=r(5580),u=r(7059),c=r(5200),d=r(4089);e.exports=(e,t,r,p)=>{let f,h,m,y,b;switch(e=new n(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",b=">=";break;case"<":f=u,h=d,m=l,y="<",b="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))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,f(e.semver,a.semver,p)?a=e:m(e.semver,s.semver,p)&&(s=e)}),a.operator===y||a.operator===b||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===b&&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,l=e.sort((e,t)=>o(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let u=[];for(let[e,t]of i)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.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),l=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,f,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?l:u;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=u;let b=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=p(o,t,r):b.add(t.semver);if(b.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 b){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 g=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(g&&1===g.prerelease.length&&"<"===o.operator&&0===g.prerelease[0]&&(g=!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((f=d(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!e.test(n.semver))return!1}if(o){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),"<"===e.operator||"<="===e.operator){if((h=p(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!e.test(o.semver))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!g&&!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},p=(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}}},4022(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,p,f,h,m;r.r(t),r.d(t,{GenderUnknownIcon:()=>mw,evaluateAsNumber:()=>cZ,getImportMapOverrideMap:()=>iC,StockManagementPictogram:()=>O2,ChemistryIcon:()=>mn,BabyIcon:()=>h4,DashboardExtension:()=>yw,openmrsComponentDecorator:()=>fi,tryRegisterExtension:()=>hw,pictogramIds:()=>OR,ActivityIcon:()=>hY,compile:()=>cQ,removeRouteMapOverride:()=>i3,checkStatus:()=>dg,TableBatchActions:()=>hL,getAsyncLifecycle:()=>fs,subscribeOpenmrsEvent:()=>cE,dispatchConnectivityChanged:()=>b,PasswordIcon:()=>mH,Assessment2Pictogram:()=>OI,CloseIcon:()=>ml,setupRouteMapOverrides:()=>i8,getWorkspaceGroupRegistration:()=>ph,registerWorkspace:()=>pc,useFeatureFlag:()=>fF,reset:()=>pt,LabOrderIcon:()=>mT,VisitMode:()=>ck,offlineUuidPrefix:()=>ce,useLocations:()=>f5,getLifecycle:()=>fa,formatDatetime:()=>SZ,getVisitsForPatient:()=>c$,subscribeConnectivity:()=>v,formatPartialDate:()=>SH,CustomOverflowMenu:()=>hH,LocationIcon:()=>mA,GroupIcon:()=>mE,canBeginEditSynchronizationItemsOfType:()=>u4,VisitStatus:()=>cj,createUseStore:()=>pB,getCurrentImportMap:()=>iB,getSessionLocation:()=>it,usePatient:()=>hn,useRenderableExtensions:()=>hi,getOpenedWindowIndexByWorkspace:()=>pg,checkStatusFor:()=>dv,clearHistory:()=>oH,clearConfigErrors:()=>ov,formatTime:()=>Sq,isDevEnabled:()=>ia,setLeftNav:()=>pn,syncOfflinePatientData:()=>cg,closeWorkspaceGroup2:()=>Ct,getCurrentRouteMap:()=>iQ,ConfigurableLink:()=>pA,sessionStore:()=>o4,subscribeSnackbarShown:()=>N,getDynamicOfflineDataEntriesFor:()=>cs,getLoggedInUser:()=>ie,GenderMaleIcon:()=>mv,getExtensionSlotConfigFromStore:()=>nN,evaluateAsNumberAsync:()=>cY,putDynamicOfflineDataFor:()=>cu,getImportMapDefaultMap:()=>iO,unregisterExtensionRendering:()=>dj,implementerToolsConfigStore:()=>nZ,Type:()=>nw,InPatientPictogram:()=>OK,cleanupObsoleteFeatureFlags:()=>dp,getAttachmentsUrl:()=>at,showSnackbar:()=>Ps,PatientBannerActionsMenu:()=>OD,PatientSearchPictogram:()=>OY,DocumentAttachmentIcon:()=>mp,Snackbar:()=>Pr,CardiologyPictogram:()=>OL,ImageMedicalIcon:()=>mO,ActionableNotificationComponent:()=>DQ,DiagnosisTags:()=>Dj,iconIds:()=>hZ,PatientsPictogram:()=>OJ,interpolateUrl:()=>o$,setupHistory:()=>oU,subscribeToastShown:()=>M,detachAll:()=>d5,convertToLocaleCalendar:()=>SY,DocumentIcon:()=>md,configInternalStore:()=>nk,ActionMenuButton2:()=>Cb,setupDynamicOfflineDataHandler:()=>ci,makeUrl:()=>oX,oneOf:()=>oO,selectPreferredName:()=>Of,launchWorkspaceGroup:()=>function e(t,r){let n=ph(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return PP}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?Pm(n?.name,()=>{e(t,r)}):PT(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),PI(t,o),i?.(),s&&Pb(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>cf,MobileCheckIcon:()=>mF,createErrorHandler:()=>$,openmrsObservableFetch:()=>o0,parseDate:()=>SF,getAttachmentByUuid:()=>i7,LeftNavMenu:()=>DI,getExtensionRegistration:()=>d4,ShoppingCartAddItemIcon:()=>yg,ReferralOrderIcon:()=>mJ,ReportIcon:()=>mQ,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>iP,registerExtension:()=>d2,setupOfflineSync:()=>u6,DownloadIcon:()=>mf,useConnectivity:()=>fj,provide:()=>n9,getSynchronizationItemsFor:()=>uJ,ShoppingCartArrowDownIcon:()=>m5,featureFlagsStore:()=>dc,promptBeforeClosing:()=>P_,removeDynamicOfflineDataFor:()=>cd,jsep:()=>cB,GeriatricsPictogram:()=>Oz,SearchIcon:()=>m4,reportError:()=>I,slugify:()=>i$,isOmrsDateToday:()=>SI,getExtensionStore:()=>dT,BloodBankPictogram:()=>O$,TriagePictogram:()=>O6,Workspace2:()=>Cd,refetchCurrentUser:()=>o8,CheckmarkOutlineIcon:()=>mr,registerExtensionSlot:()=>pe,AllergiesIcon:()=>yh,ArrowDownIcon:()=>hX,useOpenmrsInfinite:()=>fZ,getExtensionConfigFromExtensionSlotStore:()=>nF,OpenmrsDatePicker:()=>DC,getExtensionConfigFromStore:()=>nL,getDynamicOfflineDataEntries:()=>ca,getLocaleDisplayName:()=>St,messageOmrsServiceWorker:()=>a_,navigate:()=>oF,launchWorkspace2:()=>Cr,getGroupByWindowName:()=>pb,CustomOverflowMenuItem:()=>hK,isUrl:()=>oD,CaretDownIcon:()=>h6,ArrowLeftIcon:()=>hQ,FacilityPictogram:()=>OW,ViewOffIcon:()=>yd,setCurrentOfflineMode:()=>aC,updateInternalExtensionStore:()=>dS,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>i6,formatDurationBetween:()=>S3,defaultVisitCustomRepresentation:()=>cT,getBreadcrumbsFor:()=>oN,useOpenmrsPagination:()=>fV,Pagination:()=>Ol,CheckmarkFilledIcon:()=>mt,clearCurrentUser:()=>o9,showModal:()=>DY,ChevronUpIcon:()=>ms,saveVisit:()=>cN,useAttachments:()=>fS,Pictogram:()=>Pe,useExtensionSlot:()=>pK,ChevronDownIcon:()=>mo,OpenmrsDateRangePicker:()=>Dk,deleteAttachmentPermanently:()=>an,getVisitTypes:()=>cC,OverflowMenuHorizontalIcon:()=>mW,EventScheduleIcon:()=>my,getSessionStore:()=>o6,ActionMenu:()=>P2,ProcedureOrderIcon:()=>mZ,preloadImport:()=>iF,registerWorkspaceWindows2:()=>p_,useOnVisible:()=>f9,setSessionLocation:()=>ir,userHasAccess:()=>o7,ChartAverageIcon:()=>h7,getFeatureFlag:()=>df,UserAvatarIcon:()=>ys,renderExtension:()=>pk,useFhirInfinite:()=>f0,toVisitTypeObject:()=>cP,useSession:()=>ha,EmergencyDepartmentPictogram:()=>OU,Notification:()=>DJ,dispatchSnackbarShown:()=>j,getSynchronizationItem:()=>u1,navigateAndLaunchWorkspace:()=>Pg,omrsOfflineCachingStrategyHttpHeaderName:()=>av,formatDate:()=>SK,workspace2StoreActions:()=>Ci,SwitcherIcon:()=>m3,esmStyleGuideSchema:()=>hN,getImportMapDisabledOverrides:()=>ik,useAssignedExtensionIds:()=>fx,CaretRightIcon:()=>h8,evaluateAsType:()=>cJ,PageHeader:()=>Oa,TranslateIcon:()=>yn,setUserProperties:()=>io,MovementIcon:()=>mU,renderInlineNotifications:()=>D8,subscribePrecacheStaticDependencies:()=>E,PaymentsDeskPictogram:()=>OX,usePrimaryIdentifierCode:()=>ho,dispatchPrecacheStaticDependencies:()=>x,getCurrentUser:()=>o3,useLayoutType:()=>f4,XrayPictogram:()=>O5,CaretUpIcon:()=>h9,renderActionableNotifications:()=>D7,OpenmrsAppContext:()=>fb,setupModals:()=>DZ,omrsOfflineResponseBodyHttpHeaderName:()=>ab,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(CN(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;CN(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>X,recordConfigDerivationError:()=>nG,useAbortController:()=>fv,Extension:()=>pM,getFhirServerPaginationHandlers:()=>fH,useConnectedExtensions:()=>fk,registerApp:()=>hE,queueSynchronizationItemFor:()=>uZ,HospitalBedIcon:()=>mD,useExtensionInternalStore:()=>fI,configExtensionStore:()=>nT,getSynchronizationItems:()=>uQ,getExtensionSlotsConfigStore:()=>nA,registerExtensionRendering:()=>dk,RenderIfValueIsTruthy:()=>fg,registerFeatureFlag:()=>dd,useFhirFetchAll:()=>fQ,restBaseUrl:()=>oZ,CalendarHeatMapIcon:()=>h2,getWorkspaceRegistration:()=>pf,isImportMapOverrideDisabled:()=>ij,resetConfigSystem:()=>o_,getFullSynchronizationItems:()=>u0,getExtensionInternalStore:()=>dx,registerGlobalStore:()=>Y,runSynchronization:()=>uK,evaluateAsBoolean:()=>cG,PatientBannerPatientInfo:()=>OE,addRouteMapOverride:()=>i2,getDefaultCalendar:()=>SW,SettingsIcon:()=>m2,DrugOrderIcon:()=>mh,isOnline:()=>dy,ProgramsIcon:()=>mY,useAssignedExtensions:()=>pH,CloseFilledIcon:()=>mu,canAccessStorage:()=>CM,registerDefaultCalendar:()=>SU,TreeViewAltIcon:()=>yi,OverflowMenuVerticalIcon:()=>mz,clearConfigDerivationError:()=>nq,getConfigStore:()=>nR,registerWorkspaceGroup:()=>pd,InformationSquareIcon:()=>mk,EmptyCard:()=>DA,ChevronLeftIcon:()=>mi,RadiologyIcon:()=>yb,useCandidateExtensions:()=>fE,renderToasts:()=>Pp,isDesktop:()=>f2,integrateBreakpoints:()=>hC,RegistrationPictogram:()=>O1,CardHeader:()=>hR,getExtensionRegistrationFrom:()=>d1,InformationIcon:()=>mP,TrashCanIcon:()=>yo,useShallowStableValue:()=>pN,useOpenmrsSWR:()=>f7,Assessment1Pictogram:()=>ON,finishRegisteringAllApps:()=>hS,importDynamic:()=>iL,useFhirPagination:()=>fz,useVisitContextStore:()=>hh,ArrowUpIcon:()=>h1,showActionableNotification:()=>Oe,getDynamicOfflineDataHandlers:()=>co,useForceUpdate:()=>fB,updateWorkspaceWindowState:()=>Pk,useVisit:()=>hm,PatientBannerPatientIdentifiers:()=>Ov,WorkspaceNotification:()=>PG,TransferPictogram:()=>O3,usePagination:()=>he,Breakpoint:()=>hD,PatientBannerToggleContactDetailsButton:()=>Cg,CloseOutlineIcon:()=>mc,ObstetricsPictogram:()=>OZ,parseDateInput:()=>SX,getConfig:()=>oe,attach:()=>d3,getLocale:()=>Sr,ActionMenuButton:()=>PV,isUrlWithTemplateParameters:()=>oS,useEmrConfiguration:()=>fN,useLeftNav:()=>f3,ToolsIcon:()=>yr,ErrorState:()=>DM,detach:()=>d6,setCurrentVisit:()=>cM,registerOmrsServiceWorker:()=>am,ConditionsIcon:()=>yy,SaveIcon:()=>m1,activateOfflineCapability:()=>ak,useWorkspaces:()=>PR,resetWorkspaceStore:()=>PN,useConfig:()=>fC,validator:()=>nx,CalendarIcon:()=>h3,getHistory:()=>oW,StickyNoteAddIcon:()=>m8,useWorkspace2Store:()=>Ca,getPatientName:()=>Ou,getVisitStore:()=>cA,getCoreTranslation:()=>ih,registerModuleWithConfigSystem:()=>n3,isOfflineUuid:()=>cr,registerModuleLoad:()=>n6,getBreadcrumbs:()=>oR,extractVariableNames:()=>ds,getOfflineSynchronizationStore:()=>uH,translateFrom:()=>ip,EditIcon:()=>mm,useStoreWithActions:()=>pF,getCandidateExtensions:()=>d7,putDynamicOfflineData:()=>cl,shallowEqual:()=>F,subscribeNotificationShown:()=>R,MaximizeIcon:()=>mN,promptForClosingWorkspaces:()=>Co,WarningIcon:()=>yf,closeAllWorkspaces:()=>PT,fhirBaseUrl:()=>oY,matchLocale:()=>CA,registerBreadcrumb:()=>oj,usePatientPhoto:()=>OC,EventsIcon:()=>mb,createGlobalStore:()=>Z,workspaceStore:()=>PP,getCurrentOfflineMode:()=>aP,subscribeToFeatureFlag:()=>dh,useExtensionStore:()=>fL,closeWorkspace:()=>PS,createAttachment:()=>ar,useLeftNavStore:()=>f6,TableIcon:()=>ye,Icon:()=>y_,InformationFilledIcon:()=>mC,getCurrentPageMap:()=>iD,LaboratoryPictogram:()=>OG,temporaryConfigStore:()=>nj,getPromptBeforeClosingFcn:()=>Pw,toDateObjectStrict:()=>S$,defineConfigSchema:()=>n2,filterBreadcrumbs:()=>oM,invalidateImplementerToolsConfig:()=>nH,PatientBannerContactDetails:()=>CS,getAssignedExtensions:()=>d9,PatientPhoto:()=>OT,MaterialOrderIcon:()=>mM,MicroscopeIcon:()=>mL,scheduleRecomputation:()=>dI,PharmacyPictogram:()=>OQ,AttachmentIcon:()=>ym,MoneyIcon:()=>mB,getAttachments:()=>ae,getFullSynchronizationItemsFor:()=>uX,PageHeaderContent:()=>Os,MedicationIcon:()=>mI,PrinterIcon:()=>mq,getWorkspaceGroupStore:()=>PI,PatientListsPictogram:()=>O9,useAppContext:()=>f_,isOpenmrsRoutes:()=>iW,AppointmentsAltPictogram:()=>OM,GenericOrderTypeIcon:()=>mx,batchExtensionUpdates:()=>dM,useExtensionSlotStore:()=>pW,ViewIcon:()=>yp,formattedName:()=>Op,sessionEndpoint:()=>oJ,duration:()=>S4,resetImportMapOverrides:()=>iA,TableOfContentsIcon:()=>m7,CaretLeftIcon:()=>h5,getTranslationOverrides:()=>ot,isVersionSatisfied:()=>CL,EmptyCardIllustration:()=>DR,PenIcon:()=>mG,getWorkspaceStore:()=>PC,registerOfflinePatientHandler:()=>cb,setupImportMapOverrides:()=>iI,showToast:()=>Pf,useDefineAppContext:()=>fy,validators:()=>oP,getGlobalStore:()=>J,useOnClickOutside:()=>f8,getWindowByWorkspaceName:()=>py,ArrowRightIcon:()=>h0,loadLifeCycles:()=>hg,registerBreadcrumbs:()=>oT,MotherIcon:()=>mV,fetchCurrentPatient:()=>c_,Toast:()=>Pl,MessageQueueIcon:()=>m$,TwoFactorAuthenticationIcon:()=>ya,Pharmacy2Pictogram:()=>O0,goBackInHistory:()=>oz,GroupAccessIcon:()=>mS,getExtensionRenderingsStore:()=>dE,setImplementerToolsConfigRecomputer:()=>nz,getAsyncExtensionLifecycle:()=>fu,setupApiModule:()=>il,renderLoadingSpinner:()=>CD,WorkspaceContainer:()=>P3,showNotification:()=>D9,queueSynchronizationItem:()=>uY,getModalRegistration:()=>ps,ListCheckedIcon:()=>mR,ResponsiveWrapper:()=>Pt,GynaecologyPictogram:()=>OH,ShoppingCartIcon:()=>m6,getRouteMapNextPageMap:()=>i1,updateVisit:()=>cI,backendDependencies:()=>is,MaybePictogram:()=>O7,beginEditSynchronizationItem:()=>u2,createParcelMounter:()=>pP,getStartedVisit:()=>cL,omrsOfflineResponseStatusHttpHeaderName:()=>ag,isOpenmrsAppRoutes:()=>iU,openmrsFetch:()=>oQ,HomePictogram:()=>O8,DentistryPictogram:()=>OB,ServiceQueuesPictogram:()=>O4,toLanguageTag:()=>Se,launchWorkspace:()=>Pb,setFeatureFlag:()=>dm,useStore:()=>pL,DigitalTrustPictogram:()=>OV,NumericObservation:()=>Oo,attachmentUrl:()=>i9,interpolateString:()=>oL,inRange:()=>oE,useExtensionSlotMeta:()=>f$,AppointmentsPictogram:()=>OA,renderSnackbars:()=>Pa,getRegisteredWorkspace2Names:()=>Cl,toLocationObject:()=>cD,ChartLineIcon:()=>me,UserHasAccess:()=>hs,evaluateAsBooleanAsync:()=>cq,changeWorkspaceContext:()=>PD,createDashboard:()=>yx,getLocations:()=>cO,getOfflineDb:()=>uV,canCloseWorkspaceWithoutPrompting:()=>Ph,getExtensionsConfigStore:()=>nI,getRouteMapDefaultMap:()=>i0,age:()=>Om,syncAllDynamicOfflineData:()=>cp,isOmrsDateStrict:()=>SN,registerWorkspaceGroups2:()=>pv,usePaginationInfo:()=>ht,evaluateAsync:()=>cK,useOpenmrsFetchAll:()=>fJ,removeImportMapOverride:()=>iR,showWorkspacePrompts:()=>PA,useVisitTypes:()=>hy,ageAsDuration:()=>Oh,removeDynamicOfflineData:()=>cc,getExtensionNameFromId:()=>d0,deleteSynchronizationItem:()=>u3,renderParcel:()=>pO,useWorkspace2Context:()=>Cs,ResetIcon:()=>m0,RenewIcon:()=>mX,subscribeActionableNotificationShown:()=>A,ErrorCard:()=>DN,GenderFemaleIcon:()=>mg,enableImportMapOverride:()=>iM,getOfflinePatientDataStore:()=>cy,retry:()=>CF,ComponentContext:()=>pR,ExtensionSlot:()=>pq,getOmrsServiceWorker:()=>ay,addImportMapOverride:()=>iT,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>po,MaybeIcon:()=>yv,useCustomOverflowMenu:()=>hz,PedestrianFamilyIcon:()=>mK,generateOfflineUuid:()=>ct,cancelPrompt:()=>Px,CtScanPictogram:()=>OF,dispatchNotificationShown:()=>C,leftNavStore:()=>pr,OpenmrsFetchError:()=>o1,UserFollowIcon:()=>yl,launchWorkspaceGroup2:()=>Ce,ChevronRightIcon:()=>ma,UserXrayIcon:()=>yu,GenderOtherIcon:()=>m_,formatDuration:()=>SJ,toOmrsIsoString:()=>SL,Labs2Pictogram:()=>Oq,workspace2Store:()=>pm,setUserLanguage:()=>o5,useBodyScrollLock:()=>fD,getExtensionConfig:()=>n$,SyringeIcon:()=>m9,LocationPicker:()=>D$,useDebounce:()=>fT,TimeIcon:()=>yt,getExtensionSlotConfig:()=>nM,AddIcon:()=>hJ,getRouteMapOverrideMap:()=>i4,processConfig:()=>or,InventoryManagementIcon:()=>mj,registerWorkspaces2:()=>pw,UserIcon:()=>yc,formatPatientName:()=>Od,fireOpenmrsEvent:()=>cx,registerModal:()=>pa,registerTranslationNamespace:()=>n5,displayName:()=>Oc,evaluate:()=>cH,defineExtensionConfigSchema:()=>n8,renderWorkspaceWindowsAndMenu:()=>CT,getSyncLifecycle:()=>fl,evaluateAsTypeAsync:()=>cX});let y="openmrs:connectivity-changed";function b(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function v(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let w="openmrs:precache-static-dependencies";function x(e={}){window.dispatchEvent(new CustomEvent(w,{detail:e}))}function E(e){let t=t=>e(t.detail);return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}let S="openmrs:notification-shown",D="openmrs:actionable-notification-shown",O="openmrs:toast-shown",P="openmrs:snack-bar-shown";function C(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(P,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function M(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(P,t),()=>window.removeEventListener(P,t)}function I(e){let t=L(e);setTimeout(()=>{throw t})}function $(){let e=Error();return t=>{let r=L(t);r.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_report_builder=globalThis.webpackChunk_openmrs_esm_report_builder||[]).push([["4171"],{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()),l=i.year||a.year(),u=i.month>=0?i.month:i.year||i.day?0:a.month(),c=i.hour||0,d=i.minute||0,p=i.second||0,f=i.millisecond||0;return o?new Date(Date.UTC(l,u,s,c,d,p,f)):new Date(l,u,s,c,d,p,f)}return t},i=n.parse;n.parse=function(e){e.date=o.bind(this)(e),i.bind(this)(e)};var a=n.set,s=n.add,l=n.subtract,u=function(e,t,r,n){void 0===n&&(n=1);var o=Object.keys(t),i=this;return o.forEach(function(r){i=e.bind(i)(t[r]*n,r)}),i};n.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return a.bind(this)(t,e)},t,e):a.bind(this)(e,t)},n.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},n.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},3826(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var r=i(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,o){var i=this.$utils().u;if(i(n))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(r)||["-",0,0],i=o[0],a=60*o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(n)))return this;var a=16>=Math.abs(n)?60*n:n;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l,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 p=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return p.call(this,e,t,r);var n=this.local(),o=i(e).local();return p.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,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(r in t)o=l[r],l!==(i=t[r])&&(d&&i&&(n(i)||(a=Array.isArray(i)))?(a?(a=!1,s=o&&Array.isArray(o)?o:[]):s=o&&n(o)?o:{},l[r]=e(d,s,i)):void 0!==i&&(l[r]=i));return l}},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),l=(a+s)/2;if(a===s)t=r=0;else{var u=a-s;switch(r=l>.5?u/(2-a-s):u/(a+s),a){case n:t=(o-i)/u+6*(o<i);break;case o:t=(i-n)/u+2;break;case i:t=(n-o)/u+4}t/=6}return{h:t,s:r,l:l}},hsl2rgb:function(e){function t(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}var r,n,o,i=e.h,a=e.s,s=e.l;if(0===a)r=n=o=s;else{var l=s<.5?s*(1+a):s+a-s*a,u=2*s-l;r=t(u,l,i+1/3),n=t(u,l,i),o=t(u,l,i-1/3)}return{r:Math.round(255*r),g:Math.round(255*n),b:Math.round(255*o)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},6974(e,t,r){"use strict";var n=r(2849),o=r(2467),i=r(6743),a=r(8502),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,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 p(e){return e%2==0?"#ddd":"#222"}function f(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 b(e,t,r,n,o){var i=y(n),a=f(o[0]),s=p(o[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a,fill:s};e.polyline(i,l).transform({translate:[t+n,r],scale:[-1,1]}),e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":a=f(o[1]),fill:s=p(o[1])},e.polyline(i,l).transform({translate:[t+n,r+2*n],scale:[-1,-1]}),e.polyline(i,l).transform({translate:[t+n,r],scale:[1,1]})}function g(e,t,r,n,o){var i=f(o),a=p(o),s=y(n),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:a};e.polyline(s,l).transform({translate:[t,r+n],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,r+n],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*n,r+n],scale:[-1,1]})}h.prototype.toSvg=function(){return this.svg.toString()},h.prototype.toString=function(){return this.toSvg()},h.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},h.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},h.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},h.prototype.generateBackground=function(){var e,t,r,n;this.opts.color?r=o.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),n=c(this.hash,17),(e=o.rgb2hsl(o.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,n%2==0?e.s=Math.min(1,(100*e.s+n)/100):e.s=Math.max(0,(100*e.s-n)/100),r=o.hsl2rgb(e)),this.color=o.rgb2hex(r),this.svg.rect(0,0,"100%","100%",{fill:o.rgb2rgbString(r)})},h.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},h.prototype.geoHexagons=function(){var e,t,r,n,o,i,a,s,l,h=d(c(this.hash,0),0,15,8,60),m=h*Math.sqrt(3),y=2*h,b=(s=h/2,[0,l=Math.sin(60*Math.PI/180)*h,s,0,s+h,0,2*h,l,s+h,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*y+3*h),this.svg.setHeight(6*m),t=0,a=0;a<6;a++)for(i=0;i<6;i++)o=c(this.hash,t),e=i%2==0?a*m:a*m+m/2,r=f(o),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},this.svg.polyline(b,n).transform({translate:[i*h*1.5-y/2,e-m/2]}),0===i&&this.svg.polyline(b,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(b,n).transform({translate:[i*h*1.5-y/2,e-m/2]})),0===i&&0===a&&this.svg.polyline(b,n).transform({translate:[6*h*1.5-y/2,5*m+m/2]}),t++},h.prototype.geoSineWaves=function(){var e,t,r,n,o,i,a,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)r=f(i=c(this.hash,t)),e=p(i),a=s/4*.7,o={fill:"none",stroke:e,opacity:r,"stroke-width":""+u+"px"},n="M0 "+l+" C "+a+" 0, "+(s/2-a)+" 0, "+s/2+" "+l+" S "+(s-a)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-a)+" 0, "+1.5*s+", "+l,this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(n,o).transform({translate:[-s/4,u*t-1.5*l+36*u]})},h.prototype.geoChevrons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),h=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={stroke:u,"stroke-opacity":.02,fill:p(o),"fill-opacity":r,"stroke-width":1},this.svg.group(n).transform({translate:[i*s,a*l*.66-l/2]}).polyline(h).end(),0===a&&this.svg.group(n).transform({translate:[i*s,6*l*.66-l/2]}).polyline(h).end(),t+=1},h.prototype.geoPlusSigns=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,10,25),h=3*l,y=m(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),r=0,s=0;s<6;s++)for(a=0;a<6;a++)n=f(i=c(this.hash,r)),t=p(i),e=+(s%2!=0),o={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":n},this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===a&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,s*h-s*l-h/2]}).rect(y).end(),0===s&&this.svg.group(o).transform({translate:[a*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),0===a&&0===s&&this.svg.group(o).transform({translate:[4*h-a*l+e*l-l,4*h-s*l-h/2]}).rect(y).end(),r++},h.prototype.geoXes=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,25),l=m(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),e=i%2==0?a*u-.5*u:a*u-.5*u+u/4,n={fill:p(o),opacity:r},this.svg.group(n).transform({translate:[i*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-a*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===a&&(e=i%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(n).transform({translate:[i*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===a&&this.svg.group(n).transform({translate:[i*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&0===a&&this.svg.group(n).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},h.prototype.geoOverlappingCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:p(n),opacity:t},this.svg.circle(o*a,i*a,a,r),0===o&&this.svg.circle(6*a,i*a,a,r),0===i&&this.svg.circle(o*a,6*a,a,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a,r),e++},h.prototype.geoOctogons=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),r=0,a=0;a<6;a++)for(i=0;i<6;i++)n=f(o=c(this.hash,r)),t=p(o),this.svg.polyline(l,{fill:t,"fill-opacity":n,stroke:u,"stroke-opacity":.02}).transform({translate:[i*s,a*s]}),r+=1},h.prototype.geoSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*a),this.svg.setHeight(6*a),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(n),this.svg.rect(o*a,i*a,a,a,{fill:e,"fill-opacity":r,stroke:u,"stroke-opacity":.02}),t+=1},h.prototype.geoConcentricCircles=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,10,60),s=a/5;for(this.svg.setWidth((a+s)*6),this.svg.setHeight((a+s)*6),t=0,i=0;i<6;i++)for(o=0;o<6;o++)r=f(n=c(this.hash,t)),e=p(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=f(n=c(this.hash,39-t)),e=p(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=f(n=c(this.hash,e)),r={fill:"none",stroke:p(n),opacity:t,"stroke-width":s+"px"},this.svg.circle(o*a,i*a,a-s/2,r),0===o&&this.svg.circle(6*a,i*a,a-s/2,r),0===i&&this.svg.circle(o*a,6*a,a-s/2,r),0===o&&0===i&&this.svg.circle(6*a,6*a,a-s/2,r),e+=1},h.prototype.geoTriangles=function(){var e,t,r,n,o,i,a,s,l=d(c(this.hash,0),0,15,15,80),h=l/2*Math.sqrt(3),m=[s=l/2,0,l,h,0,h,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*h),e=0,a=0;a<6;a++)for(i=0;i<6;i++)t=f(o=c(this.hash,e)),n={fill:p(o),"fill-opacity":t,stroke:u,"stroke-opacity":.02},r=a%2==0?180*(i%2==0):180*(i%2!=0),this.svg.polyline(m,n).transform({translate:[i*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),0===i&&this.svg.polyline(m,n).transform({translate:[6*l*.5-l/2,h*a],rotate:[r,l/2,h/2]}),e+=1},h.prototype.geoDiamonds=function(){var e,t,r,n,o,i,a,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),h=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,a=0;a<6;a++)for(i=0;i<6;i++)r=f(o=c(this.hash,t)),n={fill:p(o),"fill-opacity":r,stroke:u,"stroke-opacity":.02},e=a%2==0?0:s/2,this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*a-l/2]}),0===i&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*a-l/2]}),0===a&&this.svg.polyline(h,n).transform({translate:[i*s-s/2+e,l/2*6-l/2]}),0===i&&0===a&&this.svg.polyline(h,n).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},h.prototype.geoNestedSquares=function(){var e,t,r,n,o,i,a=d(c(this.hash,0),0,15,4,12),s=7*a;for(this.svg.setWidth((s+a)*6+6*a),this.svg.setHeight((s+a)*6+6*a),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=f(n=c(this.hash,e)),r={fill:"none",stroke:p(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=f(n=c(this.hash,39-e)),r={fill:"none",stroke:p(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?g(this.svg,t*n*2,r*n*2,n,c(this.hash,e)):b(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):r%2==0?b(this.svg,t*n*2,r*n*2,n,[c(this.hash,e),c(this.hash,e+1)]):g(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=f(i=c(this.hash,t+1)),e=p(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=f(i=c(this.hash,t+1)),e=p(i),o=i+5,this.svg.rect(s,0,o,"100%",{opacity:r,fill:e}),s+=o,t+=2;this.svg.setWidth(s),this.svg.setHeight(a)},h.prototype.geoTessellation=function(){var e,t,r,n,o=d(c(this.hash,0),0,15,5,40),i=o*Math.sqrt(3),a=2*o,s=o/2*Math.sqrt(3),l=[0,0,s,o/2,0,o,0,0].join(","),h=3*o+2*s,m=2*i+2*o;for(this.svg.setWidth(h),this.svg.setHeight(m),e=0;e<20;e++)switch(t=f(n=c(this.hash,e)),r={stroke:u,"stroke-opacity":.02,fill:p(n),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-o/2,-o/2,o,o,r),this.svg.rect(h-o/2,-o/2,o,o,r),this.svg.rect(-o/2,m-o/2,o,o,r),this.svg.rect(h-o/2,m-o/2,o,o,r);break;case 1:this.svg.rect(a/2+s,i/2,o,o,r);break;case 2:this.svg.rect(-o/2,m/2-o/2,o,o,r),this.svg.rect(h-o/2,m/2-o/2,o,o,r);break;case 3:this.svg.rect(a/2+s,1.5*i+o,o,o,r);break;case 4:this.svg.polyline(l,r).transform({translate:[o/2,-o/2],rotate:[0,o/2,s/2]}),this.svg.polyline(l,r).transform({translate:[o/2,m- -o/2],rotate:[0,o/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,r).transform({translate:[h-o/2,-o/2],rotate:[0,o/2,s/2],scale:[-1,1]}),this.svg.polyline(l,r).transform({translate:[h-o/2,m+o/2],rotate:[0,o/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,r).transform({translate:[h/2+o/2,i/2]});break;case 7:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,i/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,r).transform({translate:[h/2+o/2,m-i/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,r).transform({translate:[h-h/2-o/2,m-i/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,r).transform({translate:[o/2,m/2-o/2]});break;case 11:this.svg.polyline(l,r).transform({translate:[h-o/2,m/2-o/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,o/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,o/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,o,o,r).transform({translate:[o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 15:this.svg.rect(0,0,o,o,r).transform({scale:[-1,1],translate:[-h+o/2,m/2-o/2-o],rotate:[30,0,o]});break;case 16:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 17:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+m/2-o/2-o],rotate:[30,0,o]});break;case 18:this.svg.rect(0,0,o,o,r).transform({scale:[1,-1],translate:[o/2,-m+o/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,o,o,r).transform({scale:[-1,-1],translate:[-h+o/2,-m+o/2],rotate:[-30,0,0]})}}},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,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=c<<1|c>>>31}var d=e,p=t,f=r,h=n,m=o;for(u=0;u<80;u++){u<20?(s=h^p&(f^h),l=0x5a827999):u<40?(s=p^f^h,l=0x6ed9eba1):u<60?(s=p&f|h&(p|f),l=0x8f1bbcdc):(s=p^f^h,l=0xca62c1d6);var y=(d<<5|d>>>27)+s+m+l+(0|i[u]);m=h,h=f,f=p<<30|p>>>2,p=d,d=y}for(u=0,e=e+d|0,t=t+p|0,r=r+f|0,n=n+h|0,o=o+m|0,a=0;u<16;u++)i[u]=0}function c(e){i[a]|=(255&e)<<s,s?s-=8:(a++,s=24),16===a&&u()}function d(e){for(var t="",r=28;r>=0;r-=4)t+=(e>>r&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var r=0;r<t;r++)c(e.charCodeAt(r));return}var n=e.length;l+=8*n;for(var o=0;o<n;o++)c(e[o])},digest:function(){c(128),(a>14||14===a&&s<24)&&u(),a=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var i=24;i>=0;i-=8)c(l>>i);return d(e)+d(t)+d(r)+d(n)+d(o)}}}e.exports=function(e){if(void 0===e)return t();var r=t();return r.update(e),r.digest()}},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 l=o("rect");return this.currentContext().appendChild(l),this.setAttributes(l,n({x:e,y:t,width:r,height:i},a)),this},i.prototype.circle=function(e,t,r,i){var a=o("circle");return this.currentContext().appendChild(a),this.setAttributes(a,n({cx:e,cy:t,r:r},i)),this},i.prototype.path=function(e,t){var r=o("path");return this.currentContext().appendChild(r),this.setAttributes(r,n({d:e},t)),this},i.prototype.polyline=function(e,t){var r=this;if(Array.isArray(e))return e.forEach(function(e){r.polyline(e,t)}),this;var i=o("polyline");return this.currentContext().appendChild(i),this.setAttributes(i,n({points:e},t)),this},i.prototype.group=function(e){var t=o("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,n({},e)),this}},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:c="/",end:d=!0,sensitive:p=!1,trailing:f=!0}=t,h=new l("^"),m=[e],y=0;for(;m.length;){let e=m.shift();if(Array.isArray(e)){m.push(...e);continue}let l="object"==typeof e?e:function(e,t={}){let{encodePath:i=r}=t,l=[...e],u=[],c=0,d=0;function p(){let t="";if(n.test(l[c]))do t+=l[c++];while(o.test(l[c]));else if('"'===l[c]){let r=c;for(;c<l.length;){if('"'===l[++c]){c++,r=0;break}"\\"===l[c]&&c++,t+=l[c]}if(r)throw new s(`Unterminated quote at index ${r}`,e)}if(!t)throw new s(`Missing parameter name at index ${c}`,e);return t}for(;c<l.length;){let e=l[c++];"{}()[]+?!".includes(e)?u.push({type:e,index:c,value:e}):"\\"===e?u.push({type:"escape",index:c,value:l[c++]}):":"===e?u.push({type:"param",index:c,value:p()}):"*"===e?u.push({type:"wildcard",index:c,value:p()}):u.push({type:"char",index:c,value:e})}return u.push({type:"end",index:c,value:""}),new a(function t(r){let n=[];for(;;){let o=u[d++];if(o.type===r)break;if("char"===o.type||"escape"===o.type){let e=o.value,t=u[d];for(;"char"===t.type||"escape"===t.type;)e+=t.value,t=u[++d];n.push({type:"text",value:i(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 s(`Unexpected ${o.type} at index ${o.index}, expected ${r}`,e)}return n}("end"),e)}(e,t);!function e(t,r,n,o){for(;r<t.length;){let i=t[r++];if("group"===i.type){e(i.tokens,0,n.slice(),n=>e(t,r,n,o));continue}n.push(i)}o(n)}(l.tokens,0,[],e=>{if(y++>=256)throw new s("Too many path combinations",l.originalPath);let t=h;for(let r of function(e,t,r){let n=[],o="",a="",l=0,c=0,d=0;for(;d<e.length;){let p=e[d++];if("text"===p.type){n.push({source:i(p.value)}),o+=p.value,2===l&&(a+=p.value),p.value.includes(t)&&(c=0);continue}if("param"===p.type||"wildcard"===p.type){if(l&&!o)throw new s(`Missing text before "${p.name}" ${p.type}`,r);"param"===p.type?(n.push({source:c?`(${u(t,o)}+?)`:!function(r,n){for(;r<e.length;){let o=e[r++];if(o.type===n)return!0;if("text"===o.type&&o.value.includes(t))break}return!1}(d,"wildcard")?`(${u(t,"")}+?)`:`(${u(t,function(t){let r="";for(;t<e.length;){let n=e[t++];if("text"!==n.type)break;r+=n.value}return r}(d))}+?)`,key:p}),c|=l=1):(n.push({source:2&c?`(${u(o,"")}+?)`:1&c?`(${u(a,"")}+?)`:a?`(${u(a,"")}+?|${u(t,"")}+?)`:"([^]+?)",key:p}),a="",c|=l=2),o="";continue}throw TypeError(`Unknown token type: ${p.type}`)}return n}(e,c,l.originalPath))t=t.add(r.source,r.key);t.add("")})}let b=[],g=function e(t,r){t.key&&r.push(t.key);let n=Object.keys(t.children),o=n.map(n=>e(t.children[n],r)).join("|");return t.source+(n.length<2?o:`(?:${o})`)}(h,b);return f&&(g+="(?:"+i(c)+"$)?"),{regexp:new RegExp(g+=d?"$":"(?="+i(c)+"|$)",p?"":"i"),keys:b}};let r=e=>e,n=/^[$_\p{ID_Start}]$/u,o=/^[$\u200c\u200d\p{ID_Continue}]$/u;function i(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class a{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let r=e;t&&(r+=`: ${t}`),super(r+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}class l{constructor(e,t){this.source=e,this.key=t,this.children=Object.create(null)}add(e,t){var r;let n=e+":"+(t?t.name:"");return(r=this.children)[n]||(r[n]=new l(e,t))}}function u(e,t){return t.length>e.length?u(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${i(e)}|${i(t)})[^])`:e.length>1?`(?:(?!${i(e)})[^${i(t)}])`:`[^${i(e+t)}]`}},5338(e,t,r){"use strict";var n=r(6807);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 l(e){if(e||(e=s.config.Promise||Promise),!e)throw Error("no Promise impl found");return e}t.Observable=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=o.toSubscriber(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||s.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=l(t))(function(t,n){var o;o=r.subscribe(function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}},n,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}()},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),l=r(5495),u=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 u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=s.Subscription.EMPTY:(this.observers.push(e),t=new c.SubjectSubscription(this,e)),o&&e.add(e=new l.ObserveOnSubscriber(e,o)),r)for(var a=0;a<i&&!e.closed;a++)e.next(n[a]);else for(var a=0;a<i&&!e.closed;a++)e.next(n[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||a.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(i.Subject);var d=function(e,t){this.time=e,this.value=t}},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),l=r(6967),u=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 p=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 f(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new l.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(!this.closed)return e.prototype._trySubscribe.call(this,t);throw new l.ObjectUnsubscribedError},t.prototype._subscribe=function(e){if(this.closed)throw new l.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),s.Subscription.EMPTY):this.isStopped?(e.complete(),s.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new f(e,t)},t}(i.Observable);t.Subject=p;var f=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}(p);t.AnonymousSubject=f},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),l=r(4421),u=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 p(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new p(i,r,n,o)}return i}return o(t,e),t.prototype[l.rxSubscriber]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(s.Subscription);t.Subscriber=d;var p=function(e){function t(t,r,n,o){var s,l=e.call(this)||this;l._parentSubscriber=t;var u=l;return i.isFunction(r)?s=r:r&&(s=r.next,n=r.error,o=r.complete,r!==a.empty&&(u=Object.create(r),i.isFunction(u.unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(l))),l._context=u,l._next=s,l._error=n,l._complete=o,l}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?this.__tryOrSetError(t,this._error,e):this.__tryOrUnsub(this._error,e),this.unsubscribe();else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):c.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;c.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;c.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{t.call(this._context,r)}catch(t){if(u.config.useDeprecatedSynchronousErrorHandling)return e.syncErrorValue=t,e.syncErrorThrown=!0,!0;return c.hostReportError(t),!0}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(d);t.SafeSubscriber=p},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,l=this._ctorUnsubscribe,u=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof t)r.remove(this);else if(null!==r)for(var d=0;d<r.length;++d)r[d].remove(this);if(i.isFunction(u)){l&&(this._unsubscribe=void 0);try{u.call(this)}catch(t){e=t instanceof a.UnsubscriptionError?s(t.errors):[t]}}if(n.isArray(c))for(var d=-1,p=c.length;++d<p;){var f=c[d];if(o.isObject(f))try{f.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),l=r(1396),u=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 u.Subscription).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return c.refCount()(this)},t}(s.Observable);t.ConnectableObservable=d,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(o=d.prototype)._subscribe},_isComplete:{value:o._isComplete,writable:!0},getSubject:{value:o.getSubject},connect:{value:o.connect},refCount:{value:o.refCount}};var 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._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 f(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o};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._unsubscribe=function(){var e=this.connectable;if(!e){this.connection=null;return}this.connectable=null;var t=e._refCount;if(t<=0||(e._refCount=t-1,t>1)){this.connection=null;return}var r=this.connection,n=e._connection;this.connection=null,n&&(!r||n===r)&&n.unsubscribe()},t}(l.Subscriber)},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),l=r(7849),u=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]),u.fromArray(e,n).lift(new d(r))};var d=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}();t.CombineLatestOperator=d;var p=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return o(t,e),t.prototype._next=function(e){this.values.push(c),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(l.subscribeToResult(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===c?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.OuterSubscriber);t.CombineLatestSubscriber=p},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,l=e[e.length-1];return(o.isScheduler(l)?(s=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof l&&(r=e.pop()),null===s&&1===e.length&&e[0]instanceof n.Observable)?e[0]:i.mergeAll(r)(a.fromArray(e,s))}},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),l=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 u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}();t.RaceOperator=u;var c=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=e[r],o=l.subscribeToResult(this,n,void 0,r);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(s.OuterSubscriber);t.RaceSubscriber=c},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 l=-1;return i.isNumeric(t)?l=1>Number(t)&&1||Number(t):a.isScheduler(t)&&(r=t),a.isScheduler(r)||(r=o.async),new n.Observable(function(t){var n=i.isNumeric(e)?e:e-r.now();return r.schedule(s,n,{index:0,period:l,subscriber:t})})}},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),l=r(7211),u=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 f(e)):"function"==typeof e[l.iterator]?t.push(new p(e[l.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0===t)return void this.destination.complete();this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++){var o=e[n];if("function"==typeof o.hasValue&&!o.hasValue())return}for(var i=!1,a=[],n=0;n<t;n++){var o=e[n],s=o.next();if(o.hasCompleted()&&(i=!0),s.done)return void r.complete();a.push(s.value)}this.resultSelector?this._tryresultSelector(a):r.next(a),i&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(s.Subscriber);t.ZipSubscriber=d;var p=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}(),f=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[l.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},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=l:this.subscriberClass=s}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.bufferSize=r,n.buffer=[],n}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.bufferSize=r,o.startBufferEvery=n,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this.bufferSize,r=this.startBufferEvery,n=this.buffers,o=this.count;this.count++,o%r==0&&n.push([]);for(var i=n.length;i--;){var a=n[i];a.push(e),a.length===t&&(n.splice(i,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,r=this.destination;t.length>0;){var n=t.shift();n.length>0&&r.next(n)}e.prototype._complete.call(this)},t}(i.Subscriber)},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 l(e,n,o,r))}};var l=function(){function e(e,t,r,n){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;a.bufferTimeSpan=r,a.bufferCreationInterval=n,a.maxBufferSize=o,a.scheduler=i,a.contexts=[];var s=a.openContext();return a.timespanOnly=null==n||n<0,a.timespanOnly?a.add(s.closeAction=i.schedule(d,r,{subscriber:a,context:s,bufferTimeSpan:r})):(a.add(s.closeAction=i.schedule(f,r,{subscriber:a,context:s})),a.add(i.schedule(p,n,{bufferTimeSpan:r,bufferCreationInterval:n,subscriber:a,scheduler:i}))),a}return o(t,e),t.prototype._next=function(e){for(var t,r=this.contexts,n=r.length,o=0;o<n;o++){var i=r[o],a=i.buffer;a.push(e),a.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,r=this.destination;t.length>0;){var n=t.shift();r.next(n.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var r=this.bufferTimeSpan,n={subscriber:this,context:e,bufferTimeSpan:r};this.add(e.closeAction=this.scheduler.schedule(d,r,n))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(a.Subscriber);function d(e){var t=e.subscriber,r=e.context;r&&t.closeContext(r),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function p(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(f,r,{subscriber:n,context:i})),this.schedule(e,t))}function f(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 l(e,t))}};var l=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.closingSelector=n,o.contexts=[],o.add(a.subscribeToResult(o,r)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,r=t.length,n=0;n<r;n++)t[n].buffer.push(e)},t.prototype._error=function(t){for(var r=this.contexts;r.length>0;){var n=r.shift();n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var r=t.shift();this.destination.next(r.buffer),r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var r=e.buffer,n=e.subscription;this.destination.next(r),t.splice(t.indexOf(e),1),this.remove(n),n.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,r=new i.Subscription,n={buffer:[],subscription:r};t.push(n);var o=a.subscribeToResult(this,e,n);!o||o.closed?this.closeBuffer(n):(o.context=n,this.add(o),r.add(o))},t}(s.OuterSubscriber)},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 l(e,this.closingSelector))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.closingSelector=r,n.subscribing=!1,n.openBuffer(),n}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e,t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var r=this.buffer;this.buffer&&this.destination.next(r),this.buffer=[];try{e=(0,this.closingSelector)()}catch(e){return this.error(e)}t=new i.Subscription,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(a.innerSubscribe(e,new a.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(a.SimpleOuterSubscriber)},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 l(e,this.dueTime,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.dueTime=r,o.scheduler=n,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},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),l=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 u(r,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.delay=r,o.scheduler=n,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,r=t.queue,n=e.scheduler,o=e.destination;r.length>0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new d(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(l.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(l.Notification.createComplete()),this.unsubscribe()},t}(s.Subscriber),d=function(e,t){this.time=e,this.notification=t}},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),l=r(7849);t.delayWhen=function(e,t){return t?function(r){return new d(r,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.delayDurationSelector))},e}(),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.delayDurationSelector=r,n.completed=!1,n.delayNotifierSubscriptions=[],n.index=0,n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var r=this.delayDurationSelector(e,t);r&&this.tryDelay(r,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return -1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var r=l.subscribeToResult(this,e,t);r&&!r.closed&&(this.destination.add(r),this.delayNotifierSubscriptions.push(r))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(s.OuterSubscriber),d=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subscriptionDelay=r,n}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new p(e,this.source))},t}(a.Observable),p=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(l){return l.pipe(o.filter(function(t,r){return r===e}),s.take(1),r?a.defaultIfEmpty(t):i.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},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 l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.hasSubscription=!1,n.hasCompleted=!1,n.index=0,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber)},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 l(e,this.callback))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.add(new a.Subscription(r)),n}return o(t,e),t}(i.Subscriber)},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),l=r(4579);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new n.EmptyError}))}}},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),l=r(2888);t.groupBy=function(e,t,r,n){return function(o){return o.lift(new u(e,t,r,n))}};var u=function(){function e(e,t,r,n){this.keySelector=e,this.elementSelector=t,this.durationSelector=r,this.subjectSelector=n}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.keySelector=r,a.elementSelector=n,a.durationSelector=o,a.subjectSelector=i,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){this.error(e);return}this._group(e,t)},t.prototype._group=function(e,t){var r,n=this.groups;n||(n=this.groups=new Map);var o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new l.Subject,n.set(t,o);var i=new p(t,o,this);if(this.destination.next(i),this.durationSelector){var a=void 0;try{a=this.durationSelector(new p(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),p=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 f(r)),t.add(n.subscribe(e)),t},t}(s.Observable);t.GroupedObservable=p;var f=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),l=r(4579);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,r){return e(t,r,u)}):l.identity,i.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new n.EmptyError}))}}},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 l(e))},e}(),l=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(a.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(a.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(a.Notification.createComplete()),e.complete()},t}(i.Subscriber)},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 l(e,t,r){return(void 0===r&&(r=1/0),"function"==typeof t)?function(n){return n.pipe(l(function(r,n){return a.from(e(r,n)).pipe(i.map(function(e,o){return t(r,e,n,o)}))},r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new u(e,r))})}t.mergeMap=l;var u=function(){function e(e,t){void 0===t&&(t=1/0),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var c=function(e){function t(t,r,n){void 0===n&&(n=1/0);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(s.SimpleOuterSubscriber);t.MergeMapSubscriber=c,t.flatMap=l},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 l(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=s;var l=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return o(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(a.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(a.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(a.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=l;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},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 l(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0;return 1===e.length&&a.isArray(e[0])&&(e=e[0]),r=e.shift(),i.from(r).lift(new l(e))};var l=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.nextSources=r,n}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new s.SimpleInnerSubscriber(this),r=this.destination;r.add(t);var n=s.innerSubscribe(e,t);n!==t&&r.add(n)}else this.destination.complete()},t}(s.SimpleOuterSubscriber)},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 l(e,this.count,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.count=r,o.source=n,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,r=this.count;if(0===r)return e.prototype.complete.call(this);r>-1&&(this.count=r-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},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 l(e,this.notifier,t))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){this.notifications=new i.Subject;try{var t;t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=a.innerSubscribe(t,new a.SimpleInnerSubscriber(this))},t}(a.SimpleOuterSubscriber)},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 l(e,this.notifier,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.notifier=r,o.source=n,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var r=this.errors,n=this.retries,o=this.retriesSubscription;if(n)this.errors=void 0,this.retriesSubscription=void 0;else{r=new i.Subject;try{n=(0,this.notifier)(r)}catch(t){return e.prototype.error.call(this,t)}o=a.innerSubscribe(n,new a.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=r,this.retries=n,this.retriesSubscription=o,r.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(a.SimpleOuterSubscriber)},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 l(e,this.period,this.scheduler))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.period=r,o.scheduler=n,o.hasValue=!1,o.add(n.schedule(u,r,{subscriber:o,period:r})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,r=e.period;t.notifyNext(),this.schedule(e,r)}},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 l(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this._a,t=this._b,r=this.comparator;e.length>0&&t.length>0;){var n=e.shift(),o=t.shift(),i=!1;try{i=r?r(n,o):n===o}catch(e){this.destination.error(e)}i||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=s;var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.parent=r,n}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},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,l,u,c,d,p,f,h;return e.lift((s=void 0===(a=(t=o).bufferSize)?1/0:a,u=void 0===(l=t.windowTime)?1/0:l,c=t.refCount,d=t.scheduler,p=0,f=!1,h=!1,function(e){var t;p++,!r||f?(f=!1,t=(r=new n.ReplaySubject(s,u,d)).subscribe(this),i=e.subscribe({next:function(e){r.next(e)},error:function(e){f=!0,r.error(e)},complete:function(){h=!0,i=void 0,r.complete()}}),h&&(i=void 0)):t=r.subscribe(this),this.add(function(){p--,t.unsubscribe(),t=void 0,i&&!h&&c&&0===p&&(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 l(e,this.predicate,this.source))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.source=n,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new a.EmptyError)},t}(i.Subscriber)},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 l(e,this._skipCount))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n._skipCount=r,n._count=0,n._ring=Array(r),n}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,r=this._count++;if(r<t)this._ring[r]=e;else{var n=r%t,o=this._ring,i=o[n];o[n]=e,this.destination.next(i)}},t}(i.Subscriber)},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 l(t))}};var l=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.project=r,n.index=0,n}return o(t,e),t.prototype._next=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){this.destination.error(e);return}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var r=new s.SimpleInnerSubscriber(this),n=this.destination;n.add(r),this.innerSubscription=s.innerSubscribe(e,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;(!t||t.closed)&&e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(s.SimpleOuterSubscriber)},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 l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},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 l(e))}};var l=function(){function e(e){if(this.total=e,this.total<0)throw new a.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.ring=[],n.count=0,n}return o(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,n=this.count++;t.length<r?t.push(e):t[n%r]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var r=this.count>=this.total?this.total:this.count,n=this.ring,o=0;o<r;o++){var i=t++%r;e.next(n[i])}e.complete()},t}(i.Subscriber)},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 l(e,t,r))}};var l=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=a.noop,i._tapError=a.noop,i._tapComplete=a.noop,i._tapError=n||a.noop,i._tapComplete=o||a.noop,s.isFunction(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||a.noop,i._tapError=r.error||a.noop,i._tapComplete=r.complete||a.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()},t}(i.Subscriber)},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 l(e,t,r.leading,r.trailing))}};var l=function(){function e(e,t,r,n){this.duration=e,this.scheduler=t,this.leading=r,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.duration=r,a.scheduler=n,a.leading=o,a.trailing=i,a._hasTrailingValue=!1,a._trailingValue=null,a}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(c,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue&&this.destination.next(this._trailingValue),this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function c(e){e.subscriber.clearThrottle()}},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=u),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.errorFactory))},e}(),l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.errorFactory=r,n.hasValue=!1,n}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(a.Subscriber);function u(){return new i.EmptyError}},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 l(i,o,t,r))}};var l=function(){function e(e,t,r,n){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,r,n,o,i){var a=e.call(this,t)||this;return a.absoluteTimeout=r,a.waitFor=n,a.withObservable=o,a.scheduler=i,a.scheduleTimeout(),a}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(s.SimpleOuterSubscriber)},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},2284(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 l(e),n=t.subscribe(r);return n.closed||r.add(a.innerSubscribe(this.windowBoundaries,new a.SimpleInnerSubscriber(r))),n},e}(),l=function(e){function t(t){var r=e.call(this,t)||this;return r.window=new i.Subject,t.next(r.window),r}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,r=this.window=new i.Subject;t.next(r)},t}(a.SimpleOuterSubscriber)},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 l(e,this.windowSize,this.startWindowEvery))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=r,o.startWindowEvery=n,o.windows=[new a.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,r=this.destination,n=this.windowSize,o=this.windows,i=o.length,s=0;s<i&&!this.closed;s++)o[s].next(e);var l=this.count-n+1;if(l>=0&&l%t==0&&!this.closed&&o.shift().complete(),++this.count%t==0&&!this.closed){var u=new a.Subject;o.push(u),r.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},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),l=r(5390),u=r(8244);t.windowTime=function(e){var t=a.async,r=null,n=1/0;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:l.isNumeric(arguments[2])&&(n=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:l.isNumeric(arguments[1])&&(r=Number(arguments[1])),function(o){return o.lift(new c(e,r,n,t))}};var c=function(){function e(e,t,r,n){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=r,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new p(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),p=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(f,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 f(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),l=r(7849);t.windowToggle=function(e,t){return function(r){return r.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.openings,this.closingSelector))},e}(),c=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.openings=r,o.closingSelector=n,o.contexts=[],o.add(o.openSubscription=l.subscribeToResult(o,r,r)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var r=t.length,n=0;n<r;n++)t[n].window.next(e)},t.prototype._error=function(t){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,o=-1;++o<n;){var i=r[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var r=t.length,n=-1;++n<r;){var o=t[n];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,r=-1;++r<t;){var n=e[r];n.window.unsubscribe(),n.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,r,n,o){if(e===this.openings){var s=void 0;try{s=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,c=new a.Subscription,d={window:u,subscription:c};this.contexts.push(d);var p=l.subscribeToResult(this,s,d);p.closed?this.closeWindow(this.contexts.length-1):(p.context=d,c.add(p)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,r=t[e],n=r.window,o=r.subscription;t.splice(e,1),n.complete(),o.unsubscribe()}},t}(s.OuterSubscriber)},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 l(e))}};var l=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,r){var n=e.call(this,t)||this;return n.destination=t,n.closingSelector=r,n.openWindow(),n}return o(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t,r=this.window;r&&r.complete();var n=this.window=new i.Subject;this.destination.next(n);try{t=(0,this.closingSelector)()}catch(e){this.destination.error(e),this.window.error(e);return}this.add(this.closingNotification=s.subscribeToResult(this,t))},t}(a.OuterSubscriber)},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 l(e,this.observables,this.project))},e}(),l=function(e){function t(t,r,n){var o=e.call(this,t)||this;o.observables=r,o.project=n,o.toRespond=[];var i=r.length;o.values=Array(i);for(var s=0;s<i;s++)o.toRespond.push(s);for(var s=0;s<i;s++){var l=r[s];o.add(a.subscribeToResult(o,l,void 0,s))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,r){this.values[r]=t;var n=this.toRespond;if(n.length>0){var o=n.indexOf(r);-1!==o&&n.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){this.destination.error(e);return}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(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),l=r(7328),u=r(1087),c=r(2555);t.scheduled=function(e,t){if(null!=e){if(s.isInteropObservable(e))return n.scheduleObservable(e,t);else if(l.isPromise(e))return o.schedulePromise(e,t);else if(u.isArrayLike(e))return i.scheduleArray(e,t);else if(c.isIterable(e)||"string"==typeof e)return a.scheduleIterable(e,t)}throw TypeError((null!==e&&typeof e||e)+" is not observable")}},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),l=r(7328),u=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(l.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[c.iterator])return i.subscribeToIterable(e);throw TypeError("You provided "+(u.isObject(e)?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},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(2284).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;u("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,u("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(u("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 l(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("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=o;let i=r(8587),{safeRe:a,t:s}=r(9718),l=r(2111),u=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=>!v(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&&w(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){e=e.replace(g,"");let t=((this.options.includePrerelease&&y)|(this.options.loose&&b))+":"+e,r=i.get(t);if(r)return r;let n=this.options.loose,o=n?c[p.HYPHENRANGELOOSE]:c[p.HYPHENRANGE];l("hyphen replace",e=e.replace(o,A(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[p.COMPARATORTRIM],f)),l("tilde trim",e=e.replace(c[p.TILDETRIM],h)),l("caret trim",e=e.replace(c[p.CARETTRIM],m));let a=e.split(" ").map(e=>E(e,this.options)).join(" ").split(/\s+/).map(e=>R(e,this.options));n&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[p.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let d=[...u.values()];return i.set(t,d),d}intersects(e,t){if(!(e instanceof o))throw TypeError("a Range is required");return this.set.some(r=>x(r,t)&&e.set.some(e=>x(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 u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(M(this.set[t],e,this.options))return!0;return!1}}e.exports=o;let i=new(r(8794)),a=r(8587),s=r(3904),l=r(7272),u=r(3908),{safeRe:c,src:d,t:p,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:m}=r(9718),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:b}=r(6874),g=RegExp(d[p.BUILD],"g"),v=e=>"<0.0.0-0"===e.value,w=e=>""===e.value,x=(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},E=(e,t)=>(l("comp",e=e.replace(c[p.BUILD],""),t),l("caret",e=P(e,t)),l("tildes",e=D(e,t)),l("xrange",e=k(e,t)),l("stars",e=T(e,t)),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(" "),O=(e,t)=>{let r=t.loose?c[p.TILDELOOSE]:c[p.TILDE],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("tilde",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s=`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:a?(l("replaceTilde pr",a),s=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`):s=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,l("tilde return",s),s})},P=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{l("caret",e,t);let r=t.loose?c[p.CARETLOOSE]:c[p.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,a)=>{let s;return l("caret",e,t,r,o,i,a),S(r)?s="":S(o)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:S(i)?s="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(l("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`):(l("no pr"),s="0"===r?"0"===o?`>=${r}.${o}.${i} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),l("caret return",s),s})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>j(e,t)).join(" ")),j=(e,t)=>{e=e.trim();let r=t.loose?c[p.XRANGELOOSE]:c[p.XRANGE];return e.replace(r,(r,n,o,i,a,s)=>{let u,c,d;if(l("xRange",e,r,n,o,i,a,s),u=o,c=i,d=a,S(u)&&!S(c)||S(c)&&d&&!S(d))return e;let p=S(o),f=p||S(i),h=f||S(a);return"="===n&&h&&(n=""),s=t.includePrerelease?"-0":"",p?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(f&&(i=0),a=0,">"===n?(n=">=",f?(o=+o+1,i=0):i=+i+1,a=0):"<="===n&&(n="<",f?o=+o+1:i=+i+1),"<"===n&&(s="-0"),r=`${n+o}.${i}.${a}${s}`):f?r=`>=${o}.0.0${s} <${+o+1}.0.0-0`:h&&(r=`>=${o}.${i}.0${s} <${o}.${+i+1}.0-0`),l("xRange return",r),r})},T=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[p.STAR],"")),R=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?p.GTE0PRE:p.GTE0],"")),A=e=>(t,r,n,o,i,a,s,l,u,c,d,p)=>(r=S(n)?"":S(o)?`>=${n}.0.0${e?"-0":""}`:S(i)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=S(u)?"":S(c)?`<${+u+1}.0.0-0`:S(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),M=(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(l(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),l=r(8587),{compareIdentifiers:u}=r(1123);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>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 u(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 u(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]),((e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let t=0;t<r.length;t++)if(0!==u(e[t],r[t]))return!1;return!0})(this.prerelease,t)?isNaN(this.prerelease[t.split(".").length])&&(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),l=r(5200);e.exports=(e,t,r,u)=>{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,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return l(e,r,u);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],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${s}.${l}.${u}${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,l=a?o:r,u=!!s.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}let c=u?"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))},417(e,t,r){"use strict";let n=r(144),o=r(6874),i=r(3908),a=e=>e.startsWith("pre");e.exports=(e,t,r)=>{let s,l;if(!o.RELEASE_TYPES.includes(t))return null;let u=(s=e,l=r,n(s instanceof i?s.version:s,l));return u&&((e,t)=>{if(a(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()})(u,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),l=r(6953),u=r(7414),c=r(3007),d=r(1832),p=r(2938),f=r(6254),h=r(4493),m=r(1729),y=r(560),b=r(9970),g=r(1763),v=r(3290),w=r(3927),x=r(4277),E=r(5580),S=r(7059),D=r(4641),O=r(3999),P=r(4089),C=r(5200),k=r(2111),j=r(3789),T=r(417),R=r(3904),A=r(8311),M=r(7638),N=r(7631),I=r(9628),$=r(270),L=r(1261),F=r(3874),B=r(7075),V=r(5571),U=r(5342),W=r(6780);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:b,compareLoose:g,compareBuild:v,sort:w,rsort:x,gt:E,lt:S,eq:D,neq:O,gte:P,lte:C,cmp:k,coerce:j,truncate:T,Comparator:R,Range:A,satisfies:M,toComparators:N,maxSatisfying:I,minSatisfying:$,minVersion:L,validRange:F,outside:B,gtr:V,ltr:U,intersects:W,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}}},8587(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=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[f,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=p++;a(e,o,t),d[e]=o,u[o]=t,c[o]=n,s[o]=new RegExp(t,r?"g":void 0),l[o]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[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),l=r(5580),u=r(7059),c=r(5200),d=r(4089);e.exports=(e,t,r,p)=>{let f,h,m,y,b;switch(e=new n(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",b=">=";break;case"<":f=u,h=d,m=l,y="<",b="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))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,f(e.semver,a.semver,p)?a=e:m(e.semver,s.semver,p)&&(s=e)}),a.operator===y||a.operator===b||(!s.operator||s.operator===y)&&h(e,s.semver)||s.operator===b&&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,l=e.sort((e,t)=>o(e,t,r));for(let e of l)n(e,t,r)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let u=[];for(let[e,t]of i)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.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),l=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],c=(e,t,r)=>{let n,o,c,f,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?l:u;if(1===t.length&&t[0].semver===i)if(r.includePrerelease)return!0;else t=u;let b=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=d(n,t,r):"<"===t.operator||"<="===t.operator?o=p(o,t,r):b.add(t.semver);if(b.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 b){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 g=!!o&&!r.includePrerelease&&!!o.semver.prerelease.length&&o.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(g&&1===g.prerelease.length&&"<"===o.operator&&0===g.prerelease[0]&&(g=!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((f=d(n,e,r))===e&&f!==n)return!1}else if(">="===n.operator&&!e.test(n.semver))return!1}if(o){if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),"<"===e.operator||"<="===e.operator){if((h=p(o,e,r))===e&&h!==o)return!1}else if("<="===o.operator&&!e.test(o.semver))return!1}if(!e.operator&&(o||n)&&0!==c)return!1}return(!n||!m||!!o||0===c)&&(!o||!y||!!n||0===c)&&!v&&!g&&!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},p=(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}}},4022(e,t,r){"use strict";let n,o,i,a,s,l,u,c,d,p,f,h,m;r.r(t),r.d(t,{GenderUnknownIcon:()=>mw,evaluateAsNumber:()=>cZ,getImportMapOverrideMap:()=>iC,StockManagementPictogram:()=>O3,ChemistryIcon:()=>mn,BabyIcon:()=>h4,DashboardExtension:()=>yw,openmrsComponentDecorator:()=>fi,tryRegisterExtension:()=>hw,pictogramIds:()=>OR,ActivityIcon:()=>hY,compile:()=>cQ,removeRouteMapOverride:()=>i3,checkStatus:()=>dg,TableBatchActions:()=>hL,getAsyncLifecycle:()=>fs,subscribeOpenmrsEvent:()=>cE,dispatchConnectivityChanged:()=>b,PasswordIcon:()=>mH,Assessment2Pictogram:()=>OI,CloseIcon:()=>ml,setupRouteMapOverrides:()=>i8,getWorkspaceGroupRegistration:()=>ph,registerWorkspace:()=>pc,useFeatureFlag:()=>fF,reset:()=>pt,LabOrderIcon:()=>mT,VisitMode:()=>ck,offlineUuidPrefix:()=>ce,useLocations:()=>f5,getLifecycle:()=>fa,formatDatetime:()=>SZ,getVisitsForPatient:()=>c$,subscribeConnectivity:()=>v,formatPartialDate:()=>SH,CustomOverflowMenu:()=>hH,LocationIcon:()=>mA,GroupIcon:()=>mE,canBeginEditSynchronizationItemsOfType:()=>u4,VisitStatus:()=>cj,createUseStore:()=>pB,getCurrentImportMap:()=>iB,getSessionLocation:()=>it,usePatient:()=>hn,useRenderableExtensions:()=>hi,getOpenedWindowIndexByWorkspace:()=>pg,checkStatusFor:()=>dv,clearHistory:()=>oH,clearConfigErrors:()=>ov,formatTime:()=>Sq,isDevEnabled:()=>ia,setLeftNav:()=>pn,syncOfflinePatientData:()=>cg,closeWorkspaceGroup2:()=>Cr,getCurrentRouteMap:()=>iQ,ConfigurableLink:()=>pA,sessionStore:()=>o4,subscribeSnackbarShown:()=>N,getDynamicOfflineDataEntriesFor:()=>cs,getLoggedInUser:()=>ie,GenderMaleIcon:()=>mv,getExtensionSlotConfigFromStore:()=>nN,evaluateAsNumberAsync:()=>cY,putDynamicOfflineDataFor:()=>cu,getImportMapDefaultMap:()=>iO,unregisterExtensionRendering:()=>dj,implementerToolsConfigStore:()=>nZ,Type:()=>nw,InPatientPictogram:()=>OK,cleanupObsoleteFeatureFlags:()=>dp,getAttachmentsUrl:()=>at,showSnackbar:()=>Pl,PatientBannerActionsMenu:()=>OD,PatientSearchPictogram:()=>OJ,DocumentAttachmentIcon:()=>mp,Snackbar:()=>Pn,CardiologyPictogram:()=>OL,ImageMedicalIcon:()=>mO,ActionableNotificationComponent:()=>DQ,DiagnosisTags:()=>Dj,iconIds:()=>hZ,PatientsPictogram:()=>OX,interpolateUrl:()=>o$,setupHistory:()=>oU,subscribeToastShown:()=>M,detachAll:()=>d5,convertToLocaleCalendar:()=>SY,DocumentIcon:()=>md,configInternalStore:()=>nk,ActionMenuButton2:()=>Cg,setupDynamicOfflineDataHandler:()=>ci,makeUrl:()=>oX,oneOf:()=>oO,selectPreferredName:()=>Of,launchWorkspaceGroup:()=>function e(t,r){let n=ph(t),{state:o,onWorkspaceGroupLaunch:i,workspaceGroupCleanup:a,workspaceToLaunch:s}=r,l=function(){return PC}();if(l.getState().openWorkspaces.length){let n=l.getState().workspaceGroup;n?Py(n?.name,()=>{e(t,r)}):PR(()=>{e(t,r)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:n.members,cleanup:a}})),P$(t,o),i?.(),s&&Pg(s.name,s.additionalProps??{})},syncDynamicOfflineData:()=>cf,MobileCheckIcon:()=>mF,createErrorHandler:()=>$,openmrsObservableFetch:()=>o0,parseDate:()=>SF,getAttachmentByUuid:()=>i7,LeftNavMenu:()=>DI,getExtensionRegistration:()=>d4,ShoppingCartAddItemIcon:()=>yg,ReferralOrderIcon:()=>mJ,ReportIcon:()=>mQ,dispatchToastShown:()=>T,getImportMapNextPageMap:()=>iP,registerExtension:()=>d2,setupOfflineSync:()=>u6,DownloadIcon:()=>mf,useConnectivity:()=>fj,provide:()=>n9,getSynchronizationItemsFor:()=>uJ,ShoppingCartArrowDownIcon:()=>m5,featureFlagsStore:()=>dc,promptBeforeClosing:()=>Pw,removeDynamicOfflineDataFor:()=>cd,jsep:()=>cB,GeriatricsPictogram:()=>Oz,SearchIcon:()=>m4,reportError:()=>I,slugify:()=>i$,isOmrsDateToday:()=>SI,getExtensionStore:()=>dT,BloodBankPictogram:()=>O$,TriagePictogram:()=>O5,Workspace2:()=>Cp,refetchCurrentUser:()=>o8,CheckmarkOutlineIcon:()=>mr,registerExtensionSlot:()=>pe,AllergiesIcon:()=>yh,ArrowDownIcon:()=>hX,useOpenmrsInfinite:()=>fZ,getExtensionConfigFromExtensionSlotStore:()=>nF,OpenmrsDatePicker:()=>DC,getExtensionConfigFromStore:()=>nL,getDynamicOfflineDataEntries:()=>ca,getLocaleDisplayName:()=>St,messageOmrsServiceWorker:()=>a_,navigate:()=>oF,launchWorkspace2:()=>Cn,getGroupByWindowName:()=>pb,CustomOverflowMenuItem:()=>hK,isUrl:()=>oD,CaretDownIcon:()=>h6,ArrowLeftIcon:()=>hQ,FacilityPictogram:()=>OW,ViewOffIcon:()=>yd,setCurrentOfflineMode:()=>aC,updateInternalExtensionStore:()=>dS,dispatchActionableNotificationShown:()=>k,resetRouteMapOverrides:()=>i6,formatDurationBetween:()=>S3,defaultVisitCustomRepresentation:()=>cT,getBreadcrumbsFor:()=>oN,useOpenmrsPagination:()=>fV,Pagination:()=>Ol,CheckmarkFilledIcon:()=>mt,clearCurrentUser:()=>o9,showModal:()=>DY,ChevronUpIcon:()=>ms,saveVisit:()=>cN,useAttachments:()=>fS,Pictogram:()=>Pt,useExtensionSlot:()=>pK,ChevronDownIcon:()=>mo,OpenmrsDateRangePicker:()=>Dk,deleteAttachmentPermanently:()=>an,getVisitTypes:()=>cC,OverflowMenuHorizontalIcon:()=>mW,EventScheduleIcon:()=>my,getSessionStore:()=>o6,ActionMenu:()=>P3,ProcedureOrderIcon:()=>mZ,preloadImport:()=>iF,registerWorkspaceWindows2:()=>p_,useOnVisible:()=>f9,setSessionLocation:()=>ir,userHasAccess:()=>o7,ChartAverageIcon:()=>h7,getFeatureFlag:()=>df,UserAvatarIcon:()=>ys,renderExtension:()=>pk,useFhirInfinite:()=>f0,toVisitTypeObject:()=>cP,useSession:()=>ha,EmergencyDepartmentPictogram:()=>OU,Notification:()=>DJ,dispatchSnackbarShown:()=>j,getSynchronizationItem:()=>u1,navigateAndLaunchWorkspace:()=>Pv,omrsOfflineCachingStrategyHttpHeaderName:()=>av,formatDate:()=>SK,workspace2StoreActions:()=>Ca,SwitcherIcon:()=>m3,esmStyleGuideSchema:()=>hN,getImportMapDisabledOverrides:()=>ik,useAssignedExtensionIds:()=>fx,CaretRightIcon:()=>h8,evaluateAsType:()=>cJ,PageHeader:()=>Oa,TranslateIcon:()=>yn,setUserProperties:()=>io,MovementIcon:()=>mU,renderInlineNotifications:()=>D8,subscribePrecacheStaticDependencies:()=>E,PaymentsDeskPictogram:()=>OQ,usePrimaryIdentifierCode:()=>ho,dispatchPrecacheStaticDependencies:()=>x,getCurrentUser:()=>o3,useLayoutType:()=>f4,XrayPictogram:()=>O8,CaretUpIcon:()=>h9,renderActionableNotifications:()=>D7,OpenmrsAppContext:()=>fb,setupModals:()=>DZ,omrsOfflineResponseBodyHttpHeaderName:()=>ab,getDefaultsFromConfigSchema:()=>function e(t){let r={};for(let n of Object.keys(t))if(CI(t[n])&&t[n].hasOwnProperty("_default"))r[n]=t[n]._default;else{if(n.startsWith("_"))continue;CI(t[n])?r[n]=e(t[n]):r[n]=t[n]}return r},subscribeTo:()=>X,recordConfigDerivationError:()=>nG,useAbortController:()=>fv,Extension:()=>pM,getFhirServerPaginationHandlers:()=>fH,useConnectedExtensions:()=>fk,registerApp:()=>hE,queueSynchronizationItemFor:()=>uZ,HospitalBedIcon:()=>mD,useExtensionInternalStore:()=>fI,configExtensionStore:()=>nT,getSynchronizationItems:()=>uQ,getExtensionSlotsConfigStore:()=>nA,registerExtensionRendering:()=>dk,RenderIfValueIsTruthy:()=>fg,registerFeatureFlag:()=>dd,useFhirFetchAll:()=>fQ,restBaseUrl:()=>oZ,CalendarHeatMapIcon:()=>h2,getWorkspaceRegistration:()=>pf,isImportMapOverrideDisabled:()=>ij,resetConfigSystem:()=>o_,getFullSynchronizationItems:()=>u0,getExtensionInternalStore:()=>dx,registerGlobalStore:()=>Y,runSynchronization:()=>uK,evaluateAsBoolean:()=>cG,PatientBannerPatientInfo:()=>OE,addRouteMapOverride:()=>i2,getDefaultCalendar:()=>SW,SettingsIcon:()=>m2,DrugOrderIcon:()=>mh,isOnline:()=>dy,ProgramsIcon:()=>mY,useAssignedExtensions:()=>pH,CloseFilledIcon:()=>mu,canAccessStorage:()=>CN,registerDefaultCalendar:()=>SU,TreeViewAltIcon:()=>yi,OverflowMenuVerticalIcon:()=>mz,clearConfigDerivationError:()=>nq,getConfigStore:()=>nR,registerWorkspaceGroup:()=>pd,InformationSquareIcon:()=>mk,EmptyCard:()=>DA,ChevronLeftIcon:()=>mi,RadiologyIcon:()=>yb,useCandidateExtensions:()=>fE,renderToasts:()=>Pf,isDesktop:()=>f2,integrateBreakpoints:()=>hC,RegistrationPictogram:()=>O4,CardHeader:()=>hR,getExtensionRegistrationFrom:()=>d1,InformationIcon:()=>mP,TrashCanIcon:()=>yo,useShallowStableValue:()=>pN,useOpenmrsSWR:()=>f7,Assessment1Pictogram:()=>ON,finishRegisteringAllApps:()=>hS,importDynamic:()=>iL,useFhirPagination:()=>fz,useVisitContextStore:()=>hh,ArrowUpIcon:()=>h1,showActionableNotification:()=>Oe,getDynamicOfflineDataHandlers:()=>co,useForceUpdate:()=>fB,updateWorkspaceWindowState:()=>Pj,useVisit:()=>hm,PatientBannerPatientIdentifiers:()=>Ov,WorkspaceNotification:()=>Pq,TransferPictogram:()=>O6,usePagination:()=>he,Breakpoint:()=>hD,PatientBannerToggleContactDetailsButton:()=>Cv,CloseOutlineIcon:()=>mc,ObstetricsPictogram:()=>OY,parseDateInput:()=>SX,getConfig:()=>oe,attach:()=>d3,getLocale:()=>Sr,ActionMenuButton:()=>PU,isUrlWithTemplateParameters:()=>oS,useEmrConfiguration:()=>fN,useLeftNav:()=>f3,ToolsIcon:()=>yr,ErrorState:()=>DM,detach:()=>d6,setCurrentVisit:()=>cM,registerOmrsServiceWorker:()=>am,ConditionsIcon:()=>yy,SaveIcon:()=>m1,activateOfflineCapability:()=>ak,useWorkspaces:()=>PA,resetWorkspaceStore:()=>PI,useConfig:()=>fC,validator:()=>nx,CalendarIcon:()=>h3,getHistory:()=>oW,StickyNoteAddIcon:()=>m8,useWorkspace2Store:()=>Cs,getPatientName:()=>Ou,getVisitStore:()=>cA,getCoreTranslation:()=>ih,registerModuleWithConfigSystem:()=>n3,isOfflineUuid:()=>cr,registerModuleLoad:()=>n6,getBreadcrumbs:()=>oR,extractVariableNames:()=>ds,getOfflineSynchronizationStore:()=>uH,translateFrom:()=>ip,EditIcon:()=>mm,useStoreWithActions:()=>pF,getCandidateExtensions:()=>d7,putDynamicOfflineData:()=>cl,shallowEqual:()=>F,subscribeNotificationShown:()=>R,MaximizeIcon:()=>mN,promptForClosingWorkspaces:()=>Ci,WarningIcon:()=>yf,closeAllWorkspaces:()=>PR,fhirBaseUrl:()=>oY,matchLocale:()=>CM,registerBreadcrumb:()=>oj,usePatientPhoto:()=>OC,EventsIcon:()=>mb,createGlobalStore:()=>Z,workspaceStore:()=>PC,getCurrentOfflineMode:()=>aP,subscribeToFeatureFlag:()=>dh,useExtensionStore:()=>fL,closeWorkspace:()=>PD,createAttachment:()=>ar,useLeftNavStore:()=>f6,TableIcon:()=>ye,Icon:()=>y_,InformationFilledIcon:()=>mC,getCurrentPageMap:()=>iD,LaboratoryPictogram:()=>OG,temporaryConfigStore:()=>nj,getPromptBeforeClosingFcn:()=>Px,toDateObjectStrict:()=>S$,defineConfigSchema:()=>n2,filterBreadcrumbs:()=>oM,invalidateImplementerToolsConfig:()=>nH,PatientBannerContactDetails:()=>CD,getAssignedExtensions:()=>d9,PatientPhoto:()=>OT,MaterialOrderIcon:()=>mM,MicroscopeIcon:()=>mL,scheduleRecomputation:()=>dI,PharmacyPictogram:()=>O0,AttachmentIcon:()=>ym,MoneyIcon:()=>mB,getAttachments:()=>ae,getFullSynchronizationItemsFor:()=>uX,PageHeaderContent:()=>Os,MedicationIcon:()=>mI,PrinterIcon:()=>mq,getWorkspaceGroupStore:()=>P$,PatientListsPictogram:()=>O7,useAppContext:()=>f_,isOpenmrsRoutes:()=>iW,AppointmentsAltPictogram:()=>OM,GenericOrderTypeIcon:()=>mx,batchExtensionUpdates:()=>dM,useExtensionSlotStore:()=>pW,ViewIcon:()=>yp,formattedName:()=>Op,sessionEndpoint:()=>oJ,duration:()=>S4,resetImportMapOverrides:()=>iA,TableOfContentsIcon:()=>m7,CaretLeftIcon:()=>h5,getTranslationOverrides:()=>ot,isVersionSatisfied:()=>CF,EmptyCardIllustration:()=>DR,PenIcon:()=>mG,getWorkspaceStore:()=>Pk,registerOfflinePatientHandler:()=>cb,setupImportMapOverrides:()=>iI,showToast:()=>Ph,useDefineAppContext:()=>fy,validators:()=>oP,getGlobalStore:()=>J,useOnClickOutside:()=>f8,getWindowByWorkspaceName:()=>py,ArrowRightIcon:()=>h0,loadLifeCycles:()=>hg,registerBreadcrumbs:()=>oT,MotherIcon:()=>mV,fetchCurrentPatient:()=>c_,Toast:()=>Pu,MessageQueueIcon:()=>m$,TwoFactorAuthenticationIcon:()=>ya,Pharmacy2Pictogram:()=>O1,goBackInHistory:()=>oz,GroupAccessIcon:()=>mS,getExtensionRenderingsStore:()=>dE,setImplementerToolsConfigRecomputer:()=>nz,getAsyncExtensionLifecycle:()=>fu,setupApiModule:()=>il,renderLoadingSpinner:()=>CO,WorkspaceContainer:()=>P6,showNotification:()=>D9,queueSynchronizationItem:()=>uY,getModalRegistration:()=>ps,ListCheckedIcon:()=>mR,ResponsiveWrapper:()=>Pr,GynaecologyPictogram:()=>OH,ShoppingCartIcon:()=>m6,getRouteMapNextPageMap:()=>i1,MetadataExportPictogram:()=>OZ,updateVisit:()=>cI,backendDependencies:()=>is,MaybePictogram:()=>Pe,beginEditSynchronizationItem:()=>u2,createParcelMounter:()=>pP,getStartedVisit:()=>cL,omrsOfflineResponseStatusHttpHeaderName:()=>ag,isOpenmrsAppRoutes:()=>iU,openmrsFetch:()=>oQ,HomePictogram:()=>O9,DentistryPictogram:()=>OB,ServiceQueuesPictogram:()=>O2,toLanguageTag:()=>Se,launchWorkspace:()=>Pg,setFeatureFlag:()=>dm,useStore:()=>pL,DigitalTrustPictogram:()=>OV,NumericObservation:()=>Oo,attachmentUrl:()=>i9,interpolateString:()=>oL,inRange:()=>oE,useExtensionSlotMeta:()=>f$,AppointmentsPictogram:()=>OA,renderSnackbars:()=>Ps,getRegisteredWorkspace2Names:()=>Cu,toLocationObject:()=>cD,ChartLineIcon:()=>me,UserHasAccess:()=>hs,evaluateAsBooleanAsync:()=>cq,changeWorkspaceContext:()=>PO,createDashboard:()=>yx,getLocations:()=>cO,getOfflineDb:()=>uV,canCloseWorkspaceWithoutPrompting:()=>Pm,getExtensionsConfigStore:()=>nI,getRouteMapDefaultMap:()=>i0,age:()=>Om,syncAllDynamicOfflineData:()=>cp,isOmrsDateStrict:()=>SN,registerWorkspaceGroups2:()=>pv,usePaginationInfo:()=>ht,evaluateAsync:()=>cK,useOpenmrsFetchAll:()=>fJ,removeImportMapOverride:()=>iR,showWorkspacePrompts:()=>PM,useVisitTypes:()=>hy,ageAsDuration:()=>Oh,removeDynamicOfflineData:()=>cc,getExtensionNameFromId:()=>d0,deleteSynchronizationItem:()=>u3,renderParcel:()=>pO,useWorkspace2Context:()=>Cl,ResetIcon:()=>m0,RenewIcon:()=>mX,subscribeActionableNotificationShown:()=>A,ErrorCard:()=>DN,GenderFemaleIcon:()=>mg,enableImportMapOverride:()=>iM,getOfflinePatientDataStore:()=>cy,retry:()=>CB,ComponentContext:()=>pR,ExtensionSlot:()=>pq,getOmrsServiceWorker:()=>ay,addImportMapOverride:()=>iT,subscribeConnectivityChanged:()=>g,unsetLeftNav:()=>po,MaybeIcon:()=>yv,useCustomOverflowMenu:()=>hz,PedestrianFamilyIcon:()=>mK,generateOfflineUuid:()=>ct,cancelPrompt:()=>PE,CtScanPictogram:()=>OF,dispatchNotificationShown:()=>C,leftNavStore:()=>pr,OpenmrsFetchError:()=>o1,UserFollowIcon:()=>yl,launchWorkspaceGroup2:()=>Ct,ChevronRightIcon:()=>ma,UserXrayIcon:()=>yu,GenderOtherIcon:()=>m_,formatDuration:()=>SJ,toOmrsIsoString:()=>SL,Labs2Pictogram:()=>Oq,workspace2Store:()=>pm,setUserLanguage:()=>o5,useBodyScrollLock:()=>fD,getExtensionConfig:()=>n$,SyringeIcon:()=>m9,LocationPicker:()=>D$,useDebounce:()=>fT,TimeIcon:()=>yt,getExtensionSlotConfig:()=>nM,AddIcon:()=>hJ,getRouteMapOverrideMap:()=>i4,processConfig:()=>or,InventoryManagementIcon:()=>mj,registerWorkspaces2:()=>pw,UserIcon:()=>yc,formatPatientName:()=>Od,fireOpenmrsEvent:()=>cx,registerModal:()=>pa,registerTranslationNamespace:()=>n5,displayName:()=>Oc,evaluate:()=>cH,defineExtensionConfigSchema:()=>n8,renderWorkspaceWindowsAndMenu:()=>CR,getSyncLifecycle:()=>fl,evaluateAsTypeAsync:()=>cX});let y="openmrs:connectivity-changed";function b(e){window.dispatchEvent(new CustomEvent(y,{detail:{online:e}}))}function g(e){if(!window.offlineEnabled)return()=>{};let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function v(e){return e({online:!window.offlineEnabled||navigator.onLine}),g(e)}let w="openmrs:precache-static-dependencies";function x(e={}){window.dispatchEvent(new CustomEvent(w,{detail:e}))}function E(e){let t=t=>e(t.detail);return window.addEventListener(w,t),()=>window.removeEventListener(w,t)}let S="openmrs:notification-shown",D="openmrs:actionable-notification-shown",O="openmrs:toast-shown",P="openmrs:snack-bar-shown";function C(e){window.dispatchEvent(new CustomEvent(S,{detail:e}))}function k(e){window.dispatchEvent(new CustomEvent(D,{detail:e}))}function j(e){window.dispatchEvent(new CustomEvent(P,{detail:e}))}function T(e){window.dispatchEvent(new CustomEvent(O,{detail:e}))}function R(e){let t=t=>e(t.detail);return window.addEventListener(S,t),()=>window.removeEventListener(S,t)}function A(e){let t=t=>e(t.detail);return window.addEventListener(D,t),()=>window.removeEventListener(D,t)}function M(e){let t=t=>e(t.detail);return window.addEventListener(O,t),()=>window.removeEventListener(O,t)}function N(e){let t=t=>e(t.detail);return window.addEventListener(P,t),()=>window.removeEventListener(P,t)}function I(e){let t=L(e);setTimeout(()=>{throw t})}function $(){let e=Error();return t=>{let r=L(t);r.stack+=`
2
2
  Async stacktrace:
3
3
  ${e.stack}`,I(t)}}function L(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 F(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 B(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 V=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>V(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>V(t)(e)}}},U=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},W=e=>e?U(e):U;function z(){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"),G=globalThis,q=(G[K]??0)+1;function Z(e,t,r="none"){let n=H[e];if(n)return n.active?z()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{let n=Q(e,t,r);return H[e]={value:n,active:!0},n}}function Y(e,t){let r=H[e];return r?(r.active?z()||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 J(e,t,r="none"){let n=H[e];if(!n){let n=Q(e,t??{},r);return H[e]={value:n,active:!1},n}return n.value}function X(...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);F(a,t)||(a=t,o(t))})}function Q(e,t,r){return"sessionStorage"===r?W()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(r,n,o)=>{let i,a,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{i=s.getStorage()}catch(e){}if(!i)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=V(s.serialize),p=()=>{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},f=o.setState;o.setState=(e,t)=>{f(e,t),p()};let h=e((...e)=>{r(...e),p()},n,o),m=()=>{var e;if(!i)return;l=!1,u.forEach(e=>e(n()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,n()))||void 0;return V(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),p()}).then(()=>{null==t||t(a,void 0),l=!0,c.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return o.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(i=e.getStorage())},clearStorage:()=>{null==i||i.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),a||h};return(r,n,o)=>{let i,a={storage:B(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=a.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,o);let d=()=>{let e=a.partialize({...n()});return c.setItem(a.name,{state:e,version:a.version})},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};let f=e((...e)=>{r(...e),d()},n,o);o.getInitialState=()=>f;let h=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let o=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=n())?e:f))||void 0;return V(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:f),!0),o)return d()}).then(()=>{null==o||o(i,void 0),i=n(),s=!0,u.forEach(e=>e(i))}).catch(e=>{null==o||o(void 0,e)})};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},a.skipHydration||h(),i||f}})(()=>t,{name:e,storage:B(()=>sessionStorage)})):W()(()=>t)}G[K]=q,q>1&&!z()&&console.error(`Detected ${q} 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);let ee=function(e){return void 0===e};var et,er,en,eo,ei,ea,es,el,eu,ec,ed,ep,ef=r(3522),eh="object"==typeof global&&global&&global.Object===Object&&global,em="object"==typeof self&&self&&self.Object===Object&&self,ey=eh||em||Function("return this")(),eb=ey.Symbol,eg=Object.prototype,ev=eg.hasOwnProperty,e_=eg.toString,ew=eb?eb.toStringTag:void 0;let ex=function(e){var t=ev.call(e,ew),r=e[ew];try{e[ew]=void 0;var n=!0}catch(e){}var o=e_.call(e);return n&&(t?e[ew]=r:delete e[ew]),o};var eE=Object.prototype.toString,eS=eb?eb.toStringTag:void 0;let eD=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":eS&&eS in Object(e)?ex(e):eE.call(e)},eO=function(e,t){return function(r){return e(t(r))}};var eP=eO(Object.getPrototypeOf,Object);let eC=function(e){return null!=e&&"object"==typeof e};var ek=Object.prototype,ej=Function.prototype.toString,eT=ek.hasOwnProperty,eR=ej.call(Object);let eA=function(e){if(!eC(e)||"[object Object]"!=eD(e))return!1;var t=eP(e);if(null===t)return!0;var r=eT.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ej.call(r)==eR},eM=function(e,t){return e===t||e!=e&&t!=t},eN=function(e,t){for(var r=e.length;r--;)if(eM(e[r][0],t))return r;return -1};var eI=Array.prototype.splice;function e$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}e$.prototype.clear=function(){this.__data__=[],this.size=0},e$.prototype.delete=function(e){var t=this.__data__,r=eN(t,e);return!(r<0)&&(r==t.length-1?t.pop():eI.call(t,r,1),--this.size,!0)},e$.prototype.get=function(e){var t=this.__data__,r=eN(t,e);return r<0?void 0:t[r][1]},e$.prototype.has=function(e){return eN(this.__data__,e)>-1},e$.prototype.set=function(e,t){var r=this.__data__,n=eN(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};let eL=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},eF=function(e){if(!eL(e))return!1;var t=eD(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var eB=ey["__core-js_shared__"],eV=(et=/[^.]+$/.exec(eB&&eB.keys&&eB.keys.IE_PROTO||""))?"Symbol(src)_1."+et:"",eU=Function.prototype.toString;let eW=function(e){if(null!=e){try{return eU.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ez=/^\[object .+?Constructor\]$/,eH=Object.prototype,eK=Function.prototype.toString,eG=eH.hasOwnProperty,eq=RegExp("^"+eK.call(eG).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let eZ=function(e){return!!eL(e)&&(!eV||!(eV in e))&&(eF(e)?eq:ez).test(eW(e))},eY=function(e,t){var r=null==e?void 0:e[t];return eZ(r)?r:void 0};var eJ=eY(ey,"Map"),eX=eY(Object,"create"),eQ=Object.prototype.hasOwnProperty,e0=Object.prototype.hasOwnProperty;function e1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}e1.prototype.clear=function(){this.__data__=eX?eX(null):{},this.size=0},e1.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},e1.prototype.get=function(e){var t=this.__data__;if(eX){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return eQ.call(t,e)?t[e]:void 0},e1.prototype.has=function(e){var t=this.__data__;return eX?void 0!==t[e]:e0.call(t,e)},e1.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=eX&&void 0===t?"__lodash_hash_undefined__":t,this};let e4=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},e2=function(e,t){var r=e.__data__;return e4(t)?r["string"==typeof t?"string":"hash"]:r.map};function e3(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e6(e){var t=this.__data__=new e$(e);this.size=t.size}e3.prototype.clear=function(){this.size=0,this.__data__={hash:new e1,map:new(eJ||e$),string:new e1}},e3.prototype.delete=function(e){var t=e2(this,e).delete(e);return this.size-=!!t,t},e3.prototype.get=function(e){return e2(this,e).get(e)},e3.prototype.has=function(e){return e2(this,e).has(e)},e3.prototype.set=function(e,t){var r=e2(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},e6.prototype.clear=function(){this.__data__=new e$,this.size=0},e6.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},e6.prototype.get=function(e){return this.__data__.get(e)},e6.prototype.has=function(e){return this.__data__.has(e)},e6.prototype.set=function(e,t){var r=this.__data__;if(r instanceof e$){var n=r.__data__;if(!eJ||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new e3(n)}return r.set(e,t),this.size=r.size,this};var e5=function(){try{var e=eY(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let e8=function(e,t,r){"__proto__"==t&&e5?e5(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},e9=function(e,t,r){(void 0===r||eM(e[t],r))&&(void 0!==r||t in e)||e8(e,t,r)},e7=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var te="object"==typeof exports&&exports&&!exports.nodeType&&exports,tt=te&&"object"==typeof module&&module&&!module.nodeType&&module,tr=tt&&tt.exports===te?ey.Buffer:void 0,tn=tr?tr.allocUnsafe:void 0;let to=function(e,t){if(t)return e.slice();var r=e.length,n=tn?tn(r):new e.constructor(r);return e.copy(n),n};var ti=ey.Uint8Array;let ta=function(e){var t=new e.constructor(e.byteLength);return new ti(t).set(new ti(e)),t},ts=function(e,t){var r=t?ta(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},tl=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var tu=Object.create,tc=function(){function e(){}return function(t){if(!eL(t))return{};if(tu)return tu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),td=Object.prototype;let tp=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||td)},tf=function(e){return"function"!=typeof e.constructor||tp(e)?{}:tc(eP(e))},th=function(e){return eC(e)&&"[object Arguments]"==eD(e)};var tm=Object.prototype,ty=tm.hasOwnProperty,tb=tm.propertyIsEnumerable,tg=th(function(){return arguments}())?th:function(e){return eC(e)&&ty.call(e,"callee")&&!tb.call(e,"callee")},tv=Array.isArray;let t_=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff},tw=function(e){return null!=e&&t_(e.length)&&!eF(e)};var tx="object"==typeof exports&&exports&&!exports.nodeType&&exports,tE=tx&&"object"==typeof module&&module&&!module.nodeType&&module,tS=tE&&tE.exports===tx?ey.Buffer:void 0;let tD=(tS?tS.isBuffer:void 0)||function(){return!1};var tO={};tO["[object Float32Array]"]=tO["[object Float64Array]"]=tO["[object Int8Array]"]=tO["[object Int16Array]"]=tO["[object Int32Array]"]=tO["[object Uint8Array]"]=tO["[object Uint8ClampedArray]"]=tO["[object Uint16Array]"]=tO["[object Uint32Array]"]=!0,tO["[object Arguments]"]=tO["[object Array]"]=tO["[object ArrayBuffer]"]=tO["[object Boolean]"]=tO["[object DataView]"]=tO["[object Date]"]=tO["[object Error]"]=tO["[object Function]"]=tO["[object Map]"]=tO["[object Number]"]=tO["[object Object]"]=tO["[object RegExp]"]=tO["[object Set]"]=tO["[object String]"]=tO["[object WeakMap]"]=!1;let tP=function(e){return function(t){return e(t)}};var tC="object"==typeof exports&&exports&&!exports.nodeType&&exports,tk=tC&&"object"==typeof module&&module&&!module.nodeType&&module,tj=tk&&tk.exports===tC&&eh.process,tT=function(){try{var e=tk&&tk.require&&tk.require("util").types;if(e)return e;return tj&&tj.binding&&tj.binding("util")}catch(e){}}(),tR=tT&&tT.isTypedArray,tA=tR?tP(tR):function(e){return eC(e)&&t_(e.length)&&!!tO[eD(e)]};let tM=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var tN=Object.prototype.hasOwnProperty;let tI=function(e,t,r){var n=e[t];tN.call(e,t)&&eM(n,r)&&(void 0!==r||t in e)||e8(e,t,r)},t$=function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),o?e8(r,s,l):tI(r,s,l)}return r},tL=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var tF=/^(?:0|[1-9]\d*)$/;let tB=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&tF.test(e))&&e>-1&&e%1==0&&e<t};var tV=Object.prototype.hasOwnProperty;let tU=function(e,t){var r=tv(e),n=!r&&tg(e),o=!r&&!n&&tD(e),i=!r&&!n&&!o&&tA(e),a=r||n||o||i,s=a?tL(e.length,String):[],l=s.length;for(var u in e)(t||tV.call(e,u))&&!(a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tB(u,l)))&&s.push(u);return s},tW=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var tz=Object.prototype.hasOwnProperty;let tH=function(e){if(!eL(e))return tW(e);var t=tp(e),r=[];for(var n in e)"constructor"==n&&(t||!tz.call(e,n))||r.push(n);return r},tK=function(e){return tw(e)?tU(e,!0):tH(e)},tG=function(e,t,r,n,o,i,a){var s=tM(e,r),l=tM(t,r),u=a.get(l);if(u)return void e9(e,r,u);var c=i?i(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var p=tv(l),f=!p&&tD(l),h=!p&&!f&&tA(l);(c=l,p||f||h)?tv(s)?c=s:eC(s)&&tw(s)?c=tl(s):f?(d=!1,c=to(l,!0)):h?(d=!1,c=ts(l,!0)):c=[]:eA(l)||tg(l)?(c=s,tg(s))?c=t$(s,tK(s)):(!eL(s)||eF(s))&&(c=tf(l)):d=!1}d&&(a.set(l,c),o(c,l,n,i,a),a.delete(l)),e9(e,r,c)},tq=function e(t,r,n,o,i){t!==r&&e7(r,function(a,s){if(i||(i=new e6),eL(a))tG(t,r,s,n,e,o,i);else{var l=o?o(tM(t,s),a,s+"",t,r,i):void 0;void 0===l&&(l=a),e9(t,s,l)}},tK)},tZ=function(e){return e},tY=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var tJ=Math.max;let tX=function(e,t,r){return t=tJ(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=tJ(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),tY(e,this,s)}};var tQ=Date.now,t0=(er=e5?function(e,t){return e5(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:tZ,en=0,eo=0,function(){var e=tQ(),t=16-(e-eo);if(eo=e,t>0){if(++en>=800)return arguments[0]}else en=0;return er.apply(void 0,arguments)});let t1=function(e,t,r){if(!eL(r))return!1;var n=typeof t;return("number"==n?!!(tw(r)&&tB(t,r.length)):"string"==n&&t in r)&&eM(r[t],e)},t4=function(e){var t;return t0(tX(t=function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&t1(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t},void 0,tZ),t+"")};var t2=t4(function(e,t,r,n){tq(e,t,r,n)});function t3(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new e3;++t<r;)this.add(e[t])}t3.prototype.add=t3.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},t3.prototype.has=function(e){return this.__data__.has(e)};let t6=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},t5=function(e,t,r,n,o,i){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,f=2&r?new t3:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(n)var y=a?n(m,h,d,t,e,i):n(h,m,d,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(f){if(!t6(t,function(e,t){if(!f.has(t)&&(h===e||o(h,e,r,n,i)))return f.push(t)})){p=!1;break}}else if(!(h===m||o(h,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p},t8=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},t9=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r};var t7=eb?eb.prototype:void 0,re=t7?t7.valueOf:void 0;let rt=function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!i(new ti(e),new ti(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return eM(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=t8;case"[object Set]":var l=1&n;if(s||(s=t9),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=t5(s(e),s(t),n,o,i,a);return a.delete(e),c;case"[object Symbol]":if(re)return re.call(e)==re.call(t)}return!1},rr=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},rn=function(e,t,r){var n=t(e);return tv(e)?n:rr(n,r(e))},ro=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i},ri=function(){return[]};var ra=Object.prototype.propertyIsEnumerable,rs=Object.getOwnPropertySymbols,rl=rs?function(e){return null==e?[]:ro(rs(e=Object(e)),function(t){return ra.call(e,t)})}:ri,ru=eO(Object.keys,Object),rc=Object.prototype.hasOwnProperty;let rd=function(e){if(!tp(e))return ru(e);var t=[];for(var r in Object(e))rc.call(e,r)&&"constructor"!=r&&t.push(r);return t},rp=function(e){return tw(e)?tU(e):rd(e)},rf=function(e){return rn(e,rp,rl)};var rh=Object.prototype.hasOwnProperty;let rm=function(e,t,r,n,o,i){var a=1&r,s=rf(e),l=s.length;if(l!=rf(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:rh.call(t,c)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var m=e[c=s[u]],y=t[c];if(n)var b=a?n(y,m,c,t,e,i):n(m,y,c,e,t,i);if(!(void 0===b?m===y||o(m,y,r,n,i):b)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var g=e.constructor,v=t.constructor;g!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v)&&(f=!1)}return i.delete(e),i.delete(t),f};var ry=eY(ey,"DataView"),rb=eY(ey,"Promise"),rg=eY(ey,"Set"),rv=eY(ey,"WeakMap"),r_="[object Map]",rw="[object Promise]",rx="[object Set]",rE="[object WeakMap]",rS="[object DataView]",rD=eW(ry),rO=eW(eJ),rP=eW(rb),rC=eW(rg),rk=eW(rv),rj=eD;(ry&&rj(new ry(new ArrayBuffer(1)))!=rS||eJ&&rj(new eJ)!=r_||rb&&rj(rb.resolve())!=rw||rg&&rj(new rg)!=rx||rv&&rj(new rv)!=rE)&&(rj=function(e){var t=eD(e),r="[object Object]"==t?e.constructor:void 0,n=r?eW(r):"";if(n)switch(n){case rD:return rS;case rO:return r_;case rP:return rw;case rC:return rx;case rk:return rE}return t});let rT=rj;var rR="[object Arguments]",rA="[object Array]",rM="[object Object]",rN=Object.prototype.hasOwnProperty;let rI=function(e,t,r,n,o,i){var a=tv(e),s=tv(t),l=a?rA:rT(e),u=s?rA:rT(t);l=l==rR?rM:l,u=u==rR?rM:u;var c=l==rM,d=u==rM,p=l==u;if(p&&tD(e)){if(!tD(t))return!1;a=!0,c=!1}if(p&&!c)return i||(i=new e6),a||tA(e)?t5(e,t,r,n,o,i):rt(e,t,l,r,n,o,i);if(!(1&r)){var f=c&&rN.call(e,"__wrapped__"),h=d&&rN.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,y=h?t.value():t;return i||(i=new e6),o(m,y,r,n,i)}}return!!p&&(i||(i=new e6),rm(e,t,r,n,o,i))},r$=function(e,t){return function e(t,r,n,o,i){return t===r||(null!=t&&null!=r&&(eC(t)||eC(r))?rI(t,r,n,o,e,i):t!=t&&r!=r)}(e,t)},rL=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},rF=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var rB=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)rr(t,rl(e)),e=eP(e);return t}:ri;let rV=function(e){return rn(e,tK,rB)};var rU=Object.prototype.hasOwnProperty;let rW=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&rU.call(e,"index")&&(r.index=e.index,r.input=e.input),r},rz=function(e,t){var r=t?ta(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var rH=/\w*$/;let rK=function(e){var t=new e.constructor(e.source,rH.exec(e));return t.lastIndex=e.lastIndex,t};var rG=eb?eb.prototype:void 0,rq=rG?rG.valueOf:void 0;let rZ=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ta(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return rz(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ts(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return rK(e);case"[object Symbol]":return rq?Object(rq.call(e)):{}}};var rY=tT&&tT.isMap,rJ=rY?tP(rY):function(e){return eC(e)&&"[object Map]"==rT(e)},rX=tT&&tT.isSet,rQ=rX?tP(rX):function(e){return eC(e)&&"[object Set]"==rT(e)},r0="[object Arguments]",r1="[object Function]",r4="[object Object]",r2={};r2[r0]=r2["[object Array]"]=r2["[object ArrayBuffer]"]=r2["[object DataView]"]=r2["[object Boolean]"]=r2["[object Date]"]=r2["[object Float32Array]"]=r2["[object Float64Array]"]=r2["[object Int8Array]"]=r2["[object Int16Array]"]=r2["[object Int32Array]"]=r2["[object Map]"]=r2["[object Number]"]=r2[r4]=r2["[object RegExp]"]=r2["[object Set]"]=r2["[object String]"]=r2["[object Symbol]"]=r2["[object Uint8Array]"]=r2["[object Uint8ClampedArray]"]=r2["[object Uint16Array]"]=r2["[object Uint32Array]"]=!0,r2["[object Error]"]=r2[r1]=r2["[object WeakMap]"]=!1;let r3=function e(t,r,n,o,i,a){var s,l=1&r,u=2&r,c=4&r;if(n&&(s=i?n(t,o,i,a):n(t)),void 0!==s)return s;if(!eL(t))return t;var d=tv(t);if(d){if(s=rW(t),!l)return tl(t,s)}else{var p,f,h,m,y=rT(t),b=y==r1||"[object GeneratorFunction]"==y;if(tD(t))return to(t,l);if(y==r4||y==r0||b&&!i){if(s=u||b?{}:tf(t),!l)return u?(f=(p=s)&&t$(t,tK(t),p),t$(t,rB(t),f)):(m=(h=s)&&t$(t,rp(t),h),t$(t,rl(t),m))}else{if(!r2[y])return i?t:{};s=rZ(t,y,l)}}a||(a=new e6);var g=a.get(t);if(g)return g;a.set(t,s),rQ(t)?t.forEach(function(o){s.add(e(o,r,n,o,t,a))}):rJ(t)&&t.forEach(function(o,i){s.set(i,e(o,r,n,i,t,a))});var v=c?u?rV:rf:u?tK:rp,w=d?void 0:v(t);return rF(w||t,function(o,i){w&&(o=t[i=o]),tI(s,i,e(o,r,n,i,t,a))}),s},r6=function(e){return"symbol"==typeof e||eC(e)&&"[object Symbol]"==eD(e)};var r5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r8=/^\w*$/;let r9=function(e,t){if(tv(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||r6(e))||r8.test(e)||!r5.test(e)||null!=t&&e in Object(t)};function r7(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(r7.Cache||e3),r}r7.Cache=e3;var ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/\\(\\)?/g,nr=(ea=(ei=r7(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,function(e,r,n,o){t.push(n?o.replace(nt,"$1"):r||e)}),t},function(e){return 500===ea.size&&ea.clear(),e})).cache,ei),nn=1/0,no=eb?eb.prototype:void 0,ni=no?no.toString:void 0;let na=function e(t){if("string"==typeof t)return t;if(tv(t))return rL(t,e)+"";if(r6(t))return ni?ni.call(t):"";var r=t+"";return"0"==r&&1/t==-nn?"-0":r},ns=function(e){return null==e?"":na(e)},nl=function(e,t){return tv(e)?e:r9(e,t)?[e]:nr(ns(e))},nu=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var nc=1/0;let nd=function(e){if("string"==typeof e||r6(e))return e;var t=e+"";return"0"==t&&1/e==-nc?"-0":t},np=function(e,t){t=nl(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[nd(t[r++])];return r&&r==n?e:void 0},nf=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i};var nh=Object.prototype.hasOwnProperty;let nm=function(e,t){t=nl(t,e);var r,n=-1,o=t.length;if(!o)return!0;for(var i=null==e||"object"!=typeof e&&"function"!=typeof e;++n<o;){var a=t[n];if("string"==typeof a){if("__proto__"===a&&!nh.call(e,"__proto__"))return!1;if("constructor"===a&&n+1<o&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(i&&0===n)continue;return!1}}}var s=(r=t).length<2?e:np(e,nf(r,0,-1));return null==s||delete s[nd(nu(t))]},ny=function(e){return eA(e)?void 0:e};var nb=eb?eb.isConcatSpreadable:void 0;let ng=function(e){return tv(e)||tg(e)||!!(nb&&e&&e[nb])},nv=function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=ng),i||(i=[]);++a<s;){var l=t[a];r>0&&n(l)?r>1?e(l,r-1,n,o,i):rr(i,l):o||(i[i.length]=l)}return i};var n_=t0(tX(es=function(e,t){var r={};if(null==e)return r;var n=!1;t=rL(t,function(t){return t=nl(t,e),n||(n=t.length>1),t}),t$(e,rV(e),r),n&&(r=r3(r,7,ny));for(var o=t.length;o--;)nm(r,t[o]);return r},void 0,function(e){return(null==e?0:e.length)?nv(e,1):[]}),es+""),nw=((el={}).Array="Array",el.Boolean="Boolean",el.ConceptUuid="ConceptUuid",el.Number="Number",el.Object="Object",el.String="String",el.UUID="UUID",el.PersonAttributeTypeUuid="PersonAttributeTypeUuid",el.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",el);function nx(e,t){return r=>{if(!e(r))if("function"==typeof t)return t(r);else return t}}let nE=nx(e=>Array.isArray(e),"must be an array"),nS=nx(e=>"boolean"==typeof e,"must be a boolean"),nD=nx(e=>"number"==typeof e,"must be a number"),nO=nx(e=>"string"==typeof e,"must be a string"),nP=nx(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),nC=nx(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"),nk=Z("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),nj=Z("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});nj.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let nT=Z("config-store-of-extension-state",{mountedExtensions:[]});function nR(e){return J(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function nA(){return J("config-extension-slots",{slots:{}})}function nM(e){return nN(nA().getState(),e)}function nN(e,t){return e.slots[t]??{loaded:!1,config:{}}}function nI(){return J("config-extensions",{configs:{}})}function n$(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=nI(),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);F(o,i)||e(o,i)})}}function nL(e,t,r){return e.configs[t]?.[r]??{loaded:!1,config:null}}function nF(e,t,r){return e.configure?.[r]??null}let nB=W()(()=>({config:{}})),nV=0,nU=!0,nW=!1;function nz(e){n=e}function nH(){nU=!0,nV>0&&nK()}function nK(){if(nU&&n&&!nW){nW=!0,nU=!1;try{n()}catch(e){nU=!0,nG(e),console.error("Failed to derive the implementer tools config",e)}finally{nW=!1}}}function nG(e){nB.setState({derivationError:e instanceof Error?e.message:String(e)})}function nq(){nB.getState().derivationError&&nB.setState({derivationError:void 0})}let nZ=Y("config-implementer-tools",{...nB,getState:()=>(0===nV&&nK(),nB.getState()),setState:(...e)=>(nU=!1,nB.setState(...e)),subscribe(e){nV++,nK();let t=nB.subscribe(e),r=!1;return()=>{!r&&(r=!0,nV--),t()}}});function nY(e,t){if(Array.isArray(t))return t}function nJ(e,t){return t2({},e,t,nY)}let nX=[];function nQ(){let e=nk.getState(),t=nj.getState(),r=nT.getState();!function(e,t){for(let r of Object.keys(e.schemas)){let n,o=nR(r),i=e.schemas[r],a=!!e.moduleLoaded[r],s=n4.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=ol(e,oa(t,r));oc(n,o,e);let i=oh(n,o);return od(n,i,e),delete i.extensionSlots,i}(r,e,t):function(e,t,r){let n=oh(ox,ol(e,oa(t,r)));return od(ox,n,e),delete n.extensionSlots,n}(r,e,t);n={translationOverridesLoaded:!0,loaded:a,config:o},n4.set(r,{schema:i,moduleLoaded:a,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:n})}let l=o.getState();l.loaded===n.loaded&&l.translationOverridesLoaded===n.translationOverridesLoaded&&r$(l.config,n.config)||o.setState(n)}}(e,t);let n=function(e,t){let r=ou(oa(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&&og(n,o+`' contains invalid keys '${i.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||og(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)||og(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)||og(n,o+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!oy(e.configure)&&og(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]:ou(t);i[e].configure!==r&&(i[e]={...i[e],configure:r})}return i}(e,t);(function(e){let t=nA(),r=t.getState().slots,n={},o=!1;for(let[t,i]of Object.entries(e)){let e=r[t];e?.loaded&&r$(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=nI(),i=o.getState().configs,a={},s=!1,l=0;for(let o of t.mountedExtensions){let t=function(e,t,r,n,o,i,a){let s=function(e){let[t]=e.split("#");return t}(n),l=o.schemas[s],u=JSON.stringify([r,n,e,t]),c=on.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===o.schemas[t]&&c.providedConfigs===o.providedConfigs&&c.temporaryConfig===i.config)return c.config;let d=l?s:t,p=oa(o,i),f=a?.configure?.[n]??{},h=ol(e,p),m=h?.extensionSlots?.[r]?.configure?.[n]??{},y=ou([ol(d,p),f,m]),b=l??o.schemas[t];oc(b,y,d);let g=oh(b,y);return od(b,g,d),delete g.extensionSlots,on.set(u,{extensionSchema:l,extensionModuleSchema:o.schemas[t],providedConfigs:o.providedConfigs,temporaryConfig:i.config,config:g}),g}(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,r,n[o.slotName]),u=i[o.slotName]?.[o.extensionId],c=u?.loaded&&r$(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),a[o.slotName]||(a[o.slotName]={}),a[o.slotName][o.extensionId]=c,l++}for(let[e,t]of Object.entries(a)){let r=i[e];r&&Object.keys(r).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>r[e]===t)&&(a[e]=r)}s||(s=Object.keys(i).length!==Object.keys(a).length||Object.values(i).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&o.setState({configs:a})}(e,r,t,n),nH()}function n0(){n=()=>{var e,t;let r,n;return e=nk.getState(),t=nj.getState(),r=nZ.getState(),n={config:function(e,t){let r=function(e){let t={};for(let[r,n]of Object.entries(e)){let e=oi.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"}:oy(t)?Object.keys(t).reduce((r,n)=>(r[n]=e(t[n]),r),{}):{}}(r3(n,5));oi.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=oo.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===o.length&&s.configSlices.every((e,t)=>e===o[t])&&s.sources.every((e,t)=>e===a[t])){i[e]=s.result;continue}let l=t??{};n.forEach(([,e],t)=>{let r=o[t];void 0!==r&&(l=nJ(l,function e(t,r){return oy(t)?Object.keys(t).reduce((n,o)=>(n[o]=e(t[o],r),n),{}):{_value:t,_source:r}}(r,e)))}),oo.set(e,{annotatedSchema:t,configSlices:o,sources:a,result:l}),i[e]=l}return i}(e,t)},void(r$(r.config,n.config)||nZ.setState(n))},nQ(),nX.push(nk.subscribe(n1),nj.subscribe(n1),nT.subscribe(n1))}function n1(){nq();try{nQ()}catch(e){nG(e),console.error("Failed to recompute the configuration",e)}}n0();let n4=new Map;function n2(e,t){os(e,t);let r=nJ(t,ox);nk.setState(t=>({...t,schemas:{...t.schemas,[e]:r},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function n3(e){nk.setState(t=>({...t,schemas:{...t.schemas,[e]:ox}}))}function n6(e){nk.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function n5(e){nk.setState(t=>({...t,schemas:{...t.schemas,[e]:ow}}))}function n8(e,t){os(e,t);let r=nJ(t,ox);nk.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.`),nk.setState(t=>({...t,schemas:{...t.schemas,[e]:r}}))}function n9(e,t="provided"){nk.setState(r=>({...r,providedConfigs:[...r.providedConfigs,{source:t,config:e}]}))}function n7(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 oe(e){return n7(nR(e),e=>!!(e.loaded&&e.config),e=>n_(e.config,["Display conditions","Translation overrides"]))}function ot(e,t,r){let n=[n7(nR(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&r&&n.push(n7(n$(t,r),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(n)}function or(e,t,r){oc(e,t,r);let n=oh(e,t);return od(e,n,r),n}let on=new Map,oo=new Map,oi=new Map;function oa(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function os(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}`),!oy(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${n}`);continue}a.hasOwnProperty("_default")||os(e,a,i);let s=a._elements;if(om(s)&&os(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
 
@@ -40,4 +40,4 @@ To fix this, ensure that you define the "component" field inside the page defini
40
40
  * {
41
41
  overscroll-behavior: contain;
42
42
  }
43
- }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&EP(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||Ej(this,r)}}),a=yO(ba(document,"touchstart",t=>{let n=bu(t);e=_k(n)?n:_j(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}),ba(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}),ba(document,"blur",e=>{let t=bu(e),r=e.relatedTarget;if(r&&EP(r))r.focus({preventScroll:!0}),Ej(r,EP(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:i})}):yO((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?bs(document.documentElement,"scrollbar-gutter","stable"):bs(document.documentElement,"padding-right",`${s}px`)),bs(document.documentElement,"overflow","hidden"))),()=>{0==--Ek&&c()}}},[t])}({isDisabled:i||!t.isOpen}),(0,pj.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=Er[Er.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,p,f,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=bo(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&Ee,l=new Set(e),u=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(bl(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=wH(bn(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&p(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)p(e),e=r.nextNode()}},p=e=>{let r=Et.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),u.add(e),Et.set(e,r+1))},Er.length&&Er[Er.length-1].disconnect(),d(a),(f=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...l,...u].some(e=>bl(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){f.observe(a,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}},Er.push(h),()=>{for(let e of(f.disconnect(),u)){let t=Et.get(e);null!=t&&(1===t?(c(e,!1),Et.delete(e)):Et.set(e,t-1))}h===Er[Er.length-1]?(Er.pop(),Er.length&&Er[Er.length-1].observe()):Er.splice(Er.indexOf(h),1)}}},[i,t.isOpen,n,o]);let{focusWithinProps:b}=gC(e);return{popoverProps:yW(d,f,b),arrowProps:h,underlayProps:p,placement:m,triggerAnchorPoint:y}}({...o,offset:null!=(i=o.offset)?i:8,arrowRef:s,groupRef:d?u:l},e),b=o.popoverRef,g=function(e,t=!0){let[r,n]=(0,pj.useState)(!0),o=r&&t;return yP(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),EM(e,o,(0,pj.useCallback)(()=>n(!1),[])),o}(b,!!m)||o.isEntering||!1,v=yK({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:m,isEntering:g,isExiting:t}}),w=!o.isNonModal||"SubmenuTrigger"===o.trigger,[x,E]=(0,pj.useState)(!1);yP(()=>{b.current&&E(w&&!b.current.querySelector("[role=dialog]"))},[b,w]),(0,pj.useEffect)(()=>{x&&("SubmenuTrigger"!==o.trigger||"pointer"!==EN)&&b.current&&!bd(b.current)&&function(e){if(!e.isConnected)return;let t=bn(e);if("virtual"===EN){let r=((e=document)=>e.activeElement)(t);b4(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&bt(e)})}else bt(e)}(b.current)},[x,b,o.trigger]);let S=(0,pj.useMemo)(()=>{let e=v.children;if(n)for(let t of n)e=pT().createElement(t.Provider,{value:null},e);return e},[v.children,n]),D={...p.style,"--trigger-anchor-point":y?`${y.x}px ${y.y}px`:void 0,...v.style},O=pT().createElement(yQ.div,{...yW(be(o,{global:!0}),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:b,slot:o.slot||void 0,style:D,dir:o.dir,"data-trigger":o.trigger,"data-placement":m,"data-entering":g||void 0,"data-exiting":t||void 0},!o.isNonModal&&pT().createElement(EA,{onDismiss:e.close}),pT().createElement(x7.Provider,{value:{...h,placement:m,ref:s}},S),pT().createElement(EA,{onDismiss:e.close}));return d?pT().createElement(xY,{...o,shouldContainFocus:x,isExiting:t,portalContainer:null!=(a=null!=r?r:null==u?void 0:u.current)?a:void 0},O):pT().createElement(xY,{...o,shouldContainFocus:x,isExiting:t,portalContainer:r},!o.isNonModal&&e.isOpen&&pT().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),pT().createElement("div",{ref:l,style:{display:"contents"}},pT().createElement(EY.Provider,{value:l},O)))}function EQ(e){return e?.start!=null&&null!=e.end}let E0=(0,pj.createContext)(null),E1=(0,pj.createContext)(null),E4=(0,pj.createContext)(null),E2=(0,pj.createContext)(null),E3=[wV,g$,x8,gV],E6=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,E0);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=Eq(e),[r,n]=wE(e.value,e.defaultValue||null,e.onChange),[o]=(0,pj.useState)(r),i=r||e.placeholderValue||null,[a,s]=xT(i,e.granularity),l=null!=r?r.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,p]=(0,pj.useState)(null),[f,h]=(0,pj.useState)(null);if(r&&(d=r,"hour"in r&&(f=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,pj.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:b,maxValue:g,isDateUnavailable:v}=e,w=(0,pj.useMemo)(()=>xD(r,b,g,v,y),[r,b,g,v,y]),x=xg({...e,value:r,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{n("timeZone"in t?t.set(v3(e)):v6(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:f,setDateValue:r=>{let o="function"==typeof c?c():c;u?f||o?D(r,f||xk(e.defaultValue||e.placeholderValue)):p(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(n){!n&&!r&&d&&u&&D(d,f||xk(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new g7(e,xC(t,y)).format(l):"",getDateFormatter:(e,t)=>new g7(e,xC({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,pj.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:b,...g}=function(e,t,r){var n;let o=yB(),i=yB(),a=yB(),s=vh((n=xr)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=xi({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=xn(t,r),y=p["aria-labelledby"]||p.id,{locale:b}=g4(),g=t.formatValue(b,{month:"long"}),v=_I(g?s.format("selectedDateDescription",{date:g}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=be(e),E=(0,pj.useMemo)(()=>w8(r),[r]),S=(0,pj.useRef)(!1),{focusWithinProps:D}=gC({...e,isDisabled:t.isOpen,onBlurWithin:t=>{bl(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:yW(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...p,id:a,[xu]:"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,[xb]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...yY(e),label:u,validationBehavior:i},a,s),[v,w]=(0,pj.useState)(null),x=(0,pj.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);Ex({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=gk({within:!0}),O=yK({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DatePicker"}),P=be(e,{global:!0});return delete P.id,pT().createElement(yH,{values:[[E4,a],[wV,{...c,ref:s,isInvalid:a.isInvalid}],[xV,p],[g$,{...f,isPressed:a.isOpen}],[x8,{...d,ref:l,elementType:"span"}],[wk,m],[xX,a],[EZ,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v},clearContexts:E3}],[xJ,h],[gV,{slots:{description:y,errorMessage:b}}],[x0,g]]},pT().createElement(yQ.div,{...yW(P,O,E),ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":a.isOpen||void 0}),pT().createElement(x5,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:a}))}),E5=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,E1);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=Eq(e),[r,n]=wE(e.value,e.defaultValue||null,e.onChange),[o]=(0,pj.useState)(r),[i,a]=(0,pj.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,l=e=>{a(s=e||{start:null,end:null}),EQ(s)?n(s):n(null)},[u,c]=xT(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,p=e.shouldCloseOnSelect??!0,[f,h]=(0,pj.useState)(null),[m,y]=(0,pj.useState)(null);s&&EQ(s)&&(f=s,"hour"in s.start&&(m=s));let b=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(v3(e.start)):v6(e.start,t.start),end:"timeZone"in t.end?t.end.set(v3(e.end)):v6(e.end,t.end)}),h(null),y(null),P.commitValidation()},g=r=>{let n="function"==typeof p?p():p;d?EQ(r)&&(n||m?.start&&m?.end)?b(r,{start:m?.start||xk(e.placeholderValue),end:m?.end||xk(e.placeholderValue)}):h(r):EQ(r)?(l(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{EQ(f)&&EQ(e)?b(f,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,pj.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:E,maxValue:S,isDateUnavailable:D}=e,O=(0,pj.useMemo)(()=>{var e,t;let r;return e=s,t=D?e=>D(e,null):void 0,r=xx(xD(e?.start??null,E,S,t,x),xD(e?.end??null,E,S,t,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(r=xx(r,{isInvalid:!0,validationErrors:[(vl.getGlobalDictionaryForPackage("@react-stately/datepicker")||xE).getStringForLocale("rangeReversed",xS())],validationDetails:{...xf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[s,E,S,D,x]),P=xg({...e,value:r,name:(0,pj.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),C=P.displayValidation.isInvalid,k=e.validationState||(C?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:f,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?g({start:t,end:f?.end??null}):g({start:f?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:g,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&EQ(f)&&d&&b(f,{start:m?.start||xk(e.placeholderValue),end:m?.end||xk(e.placeholderValue)}),t.setOpen(r)},validationState:k,isInvalid:C,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=xC(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"),p=new g7(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=p.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=p}else n=new g7(t,xC(r,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new g7(e,xC({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,pj.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:b,errorMessageProps:g,...v}=function(e,t,r){var n;let o=vh((n=xr)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=xi({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=u["aria-labelledby"]||u.id,{locale:f}=g4(),h=t.formatValue(f,{month:"long"}),m=_I(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":p},b={"aria-label":o.format("endDate"),"aria-labelledby":p},g=yB(),v=yB(),w=xn(t,r),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=(0,pj.useMemo)(()=>w8(r,{accept:e=>e.id!==g}),[r,g]),S={[xc]:E,[xu]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=be(e),O=(0,pj.useRef)(!1),{focusWithinProps:P}=gC({...e,isDisabled:t.isOpen,onBlurWithin:t=>{bl(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,pj.useRef)(xm),k=(0,pj.useRef)(xm);return{groupProps:yW(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...l,onClick:()=>{E.focusFirst()}},buttonProps:{...m,id:g,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${g} ${p}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${g} ${p}`},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,[xb]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(xx(e,k.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...b,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[xb]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(xx(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...yY(e),label:u,validationBehavior:i},a,s),[w,x]=(0,pj.useState)(null),E=(0,pj.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);Ex({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=gk({within:!0}),P=yK({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DateRangePicker"}),C=be(e,{global:!0});return delete C.id,pT().createElement(yH,{values:[[E2,a],[wV,{...c,ref:s,isInvalid:a.isInvalid}],[g$,{...h,isPressed:a.isOpen}],[x8,{...d,ref:l,elementType:"span"}],[wj,y],[xX,a],[EZ,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w},clearContexts:E3}],[xJ,m],[xV,{slots:{start:p,end:f}}],[gV,{slots:{description:b,errorMessage:g}}],[x0,v]]},pT().createElement(yQ.div,{...yW(C,P,S),ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":a.isOpen||void 0}))});function E8(e){return pT().createElement(g1,e)}function E9(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 vK||e instanceof vq||e instanceof vZ)return t?v5(e,t):e;{let r=hu()(e).toDate(),n=new vK(r.getFullYear(),r.getMonth()+1,r.getDate());return t?v5(n,t):n}}function E7(e){if(e)return e.toDate(_u())}function Se(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function St(e){let t=e??"",r=Se(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Sr(){let e=window.i18next.language,t=Se(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ep=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ep=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Sn=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ep||"en-US"),So=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Si={};for(let e=0;e<100;e++)Si[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Sa={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},Ss="[1234567890一二三四五六七八九〇\\d]",Sl={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},Su={},Sc={"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},Sd={zone:Sc,year:Si,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:{}},Sp={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(Sc).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,}"},Sf={...Sp,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}"},Sh={},Sm=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Sn){return Sh[t.toLowerCase()]||(Sh[t.toLowerCase()]=new e(t)),Sh[t.toLowerCase()]}constructor(e=Sn){this.locale=e,this.lookups={...Sd},this.vars={...Sp};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=Sl: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(Su[e])return Su[e];if("fullwide"===e||"hanidec"===e)return{group:Ss,lookup:{...Sl}};let t=Sa[e];if(!t)return{group:"\\d",lookup:{...Sl}};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 Su[e]={group:`[${r}-${n}]`,lookup:o},Su[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Sf)Sf.hasOwnProperty(r)&&(this.vars[r]=Sf[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")}},Sy=["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"],Sb={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Sg=()=>new Date;function Sv(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 S_=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)}},Sw=["year","month","day","hour","minute","second","millisecond","offset"],Sx={};function SE(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 SS=[[/([^\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"]],SD={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," "],...SS],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:SS,id:SS,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function SO(e,t=Sn){let r=function(e){if(!Sx[e]){var t,r;let n,o,i=Sm.factory(e);Sx[e]=new S_({doneChecker:SE,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:Sv(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Sv(["","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:Sv(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${Ss}{2,4})\\s*\u5E74\\s*(${Ss}{1,2})\\s*\u6708\\s*(${Ss}{1,2})\\s*\u65E5$`),handler:Sv(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Sv(["","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:Sv(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Sg(),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?Sb[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=Sg();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:Sv(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Sv(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:Sv(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Sv(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:Sv(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Sv(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Sv(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Sv(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Sv(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Sv(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Sv(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Sv(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Sv(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:Sv(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Sv(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Sv(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:Sv(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Sv(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Sv(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:Sv(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:Sv(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:Sv(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Sv(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:Sv(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:Sv(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:Sv(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:Sv(["offset"])}],o=i.baseName.slice(0,5),Sy.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(Sw.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Si[e.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return Sx[e]}(t),n=function(e,t){let r=SD[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 SP(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new So(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 So(t.valueOf()-60*e.offset*1e3):t}function SC(e,t=Sn){let r=SO(e,t),n=r.invalid?new So(NaN):SP(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function Sk(e,t=Sn){return e instanceof Date?new So(e.valueOf()):"number"==typeof e?new So(e):SC(e,t)}Date.fromString=So.fromString=SC,Date.fromAny=So.fromAny=Sk,"u">typeof window&&(window.anyDateParser={fromString:SC,fromAny:Sk,fromObject:SP,attempt:SO});var Sj=r(5238),ST=r(3826);let SR=function(e){return null==e};function SA(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}hl.extend(hc),hl.extend(ST),hl.extend(Sj);let SM="YYYY-MM-DDTHH:mm:ss.SSSZZ";function SN(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&hl(e,SM).isValid()}function SI(e){return hl(e).isToday()}function S$(e){return SN(e)?hl(e,SM).toDate():null}function SL(e,t=!1){let r=hl(e);return t&&(r=r.utc()),r.format(SM)}function SF(e){return hl(e).toDate()}var SB=new WeakMap;let SV=new class{register(e,t){SA(this,SB).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(SA(this,SB).has(t))return SA(this,SB).get(t)}if(e.language&&SA(this,SB).has(e.language))return SA(this,SB).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return SA(this,SB).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,SB,{writable:!0,value:new Map})}};function SU(e,t){SV.register(e,t)}function SW(e){let t=e??Sr();return SV.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let Sz={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function SH(e,t={}){let r=SO(e,Sr());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!SR(r.day)&&SR(r.month)&&(r=Object.assign({},n_(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},n_(r,"day"),{date:r.day}));let n=hl().set(r).toDate();return SR(r.year)&&(t.year=!1),SR(r.month)&&(t.month=!1),SR(r.date)&&(t.day=!1),SK(n,t)}function SK(e,t){let r,n=t?.locale??Sr(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...Sz,...{noToday:"am"===o.language},...t},f={calendar:i??SW(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=hl(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,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(SG("-"))),"wide"==a&&(t=t.map(SG(" — "))),"ethiopic"===f.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+=`, ${Sq(e)}`),r}let SG=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function Sq(e){return e.toLocaleTimeString(Sr(),{hour:"2-digit",minute:"2-digit"})}function SZ(e,t){return SK(e,{...t,time:!0})}function SY(e,t){let r=SW("string"==typeof t?new Intl.Locale(t):t);return r?v5(e,wh(r)):e}function SJ(e,t){return new Intl.DurationFormat(Sr(),t).format(e)}function SX(e,t){if(null==e)return null;if("string"==typeof e){let r=SO(e,Sr());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...n_(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...n_(r,"day"),...{date:r.day}}),hl(t).set(r))}return hl(e)}let SQ=["years","months","days","hours","minutes","seconds"],S0={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},S1={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function S4(e,t=hl(),r){let n,o=hl(t),i=SX(e,o);if(null==i)return null;if("string"==typeof r){let e=S0[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?S0[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=SQ.indexOf(r);for(let o=0;o<SQ.length;o++){let i=SQ[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):S0[s]??s,function(e,t,r,n){let o=SQ.indexOf(r),i=SQ.indexOf(n),a=SQ.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...S1};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[S0[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let S2={style:"short",localeMatcher:"lookup"};function S3(e,t=hl(),r){let n=S4(e,t,r);return null==n?null:SJ(n,"object"==typeof r&&r.formatOptions?{...S2,...r.formatOptions}:S2)}let S6=(0,pj.createContext)(null);function S5(){let e=fC({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,pj.useMemo)(()=>{let t=Sr();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,pj.useMemo)(()=>{let e=SW(t);return void 0!==e?wh(e):void 0},[t]),n=(0,pj.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,pj.useMemo)(()=>r?v5(_i(_u()),r):_i(_u()),[r]);return{calendar:r,intlLocale:n,today_:o}}let S8=new vK(1793,1,1);var S9={};function S7(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function De(e={}){let{locale:t}=g4();return(0,pj.useMemo)(()=>new(0,xI.K)(t,e),[t,e])}S9={"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 Dt={};Dt={"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 Dr=()=>{};function Dn(e){var t;let r=(0,pj.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=vh((t=Dt)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),b=(0,pj.useRef)(!1),g=(0,pj.useCallback)(()=>{clearTimeout(r.current),b.current=!1},[]),v=gf(()=>{g()});(0,pj.useEffect)(()=>()=>v(),[]);let{keyboardProps:w}=gt({isDisabled:s||l,shortcuts:{PageUp:()=>d?void d():!!c&&void c(),ArrowUp:()=>!!c&&void c(),PageDown:()=>f?void f():!!p&&void p(),ArrowDown:()=>!!p&&void p(),Home:()=>!!h&&void h(),End:()=>!!m&&void m()},allowRepeats:!0}),x=(0,pj.useRef)(!1),E=()=>{x.current=!0},S=()=>{x.current=!1},D=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,pj.useEffect)(()=>{x.current&&(g2&&g2.clear("assertive"),g3(D,"assertive"))},[D]);let O=(0,pj.useCallback)(()=>{g()},[g]),P=gf(c??Dr),C=gf(p??Dr),k=gf(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(P(),j(60))}),j=gf(e=>{v(),b.current=!0,r.current=window.setTimeout(k,e)}),T=gf(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(C(),R(60))}),R=gf(e=>{v(),b.current=!0,r.current=window.setTimeout(T,e)}),A=e=>{e.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:N}=gh(),I=(0,pj.useRef)(!1),[$,L]=(0,pj.useState)(null);(0,pj.useEffect)(()=>{"touch"===$?j(600):$?j(400):$||v()},[$]);let[F,B]=(0,pj.useState)(null);return(0,pj.useEffect)(()=>{"touch"===F?R(600):F?R(400):F||v()},[F]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":D,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,...w,onFocus:E,onBlur:S},incrementButtonProps:{onPressStart:e=>{g(),"touch"!==e.pointerType?(c?.(),L("mouse")):(M(window,"pointercancel",O,{capture:!0}),I.current=!1,L("touch")),M(window,"contextmenu",A)},onPressUp:e=>{g(),"touch"===e.pointerType&&(I.current=!0),N(),L(null)},onPressEnd:e=>{g(),"touch"===e.pointerType&&!b.current&&I.current&&c?.(),I.current=!1,L(null)},onFocus:E,onBlur:S},decrementButtonProps:{onPressStart:e=>{g(),"touch"!==e.pointerType?(p?.(),B("mouse")):(M(window,"pointercancel",O,{capture:!0}),I.current=!1,B("touch"))},onPressUp:e=>{g(),"touch"===e.pointerType&&(I.current=!0),N(),B(null)},onPressEnd:e=>{g(),"touch"===e.pointerType&&!b.current&&I.current&&p?.(),I.current=!1,B(null)},onFocus:E,onBlur:S}}}let Do=null;var Di=r(6284);function Da(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 Ds=(0,pj.createContext)(null),Dl=(0,pj.createContext)(null),Du=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,Ds);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=g4(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let p=(0,pj.useCallback)(e=>void 0===n||isNaN(n)?En(e,t,r):Ei(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=p(i)),isNaN(a)||"snap"!==d||(a=p(a));let[f,h]=wE(i,isNaN(a)?NaN:a,s),[m]=(0,pj.useState)(f),[y,b]=(0,pj.useState)(()=>isNaN(f)?"":new(0,xI.K)(l,o).format(f)),g=(0,pj.useMemo)(()=>new(0,Di.d)(l,o),[l,o]),v=(0,pj.useMemo)(()=>g.getNumberingSystem(y),[g,y]),w=(0,pj.useMemo)(()=>new(0,xI.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,pj.useMemo)(()=>w.resolvedOptions(),[w]),E=(0,pj.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),S=xg({...e,value:f}),D=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(D=.01);let[O,P]=(0,pj.useState)(f),[C,k]=(0,pj.useState)(l),[j,T]=(0,pj.useState)(o);Object.is(f,O)&&l===C&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;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}(o,j)||(b(E(f)),P(f),k(l),T(o));let R=(0,pj.useMemo)(()=>g.parse(y),[g,y]),A=(e,n=0)=>{if(isNaN(R))return Ei(isNaN(n)?0:n,t,r,D);{let n=Ei(R,t,r,D);return"+"===e&&n>R||"-"===e&&n<R?n:Ei(Da(e,R,D),t,r,D)}},M=(0,pj.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===r||isNaN(r)||Ei(R,t,r,D)>R||Da("+",R,D)<=r),[u,c,t,r,D,R]),N=(0,pj.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||Ei(R,t,r,D)<R||Da("-",R,D)>=t),[u,c,t,r,D,R]);return{...S,validate:e=>g.isValidPartialNumber(e,t,r),increment:()=>{let e=A("+",t);e===f&&b(E(e)),h(e),S.commitValidation()},incrementToMax:()=>{null!=r&&(h(Ei(r,t,r,D)),S.commitValidation())},decrement:()=>{let e=A("-",r);e===f&&b(E(e)),h(e),S.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),S.commitValidation())},canIncrement:M,canDecrement:N,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:b,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=g.parse(t)),!t.length){h(NaN),b(void 0===i?"":E(f));return}if(isNaN(r))return void b(E(f));let n="snap"===d?p(r):r,o=(n=g.parse(E(n)))!==f;h(n),b(E(void 0===i?n:f)),o&&S.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,pj.useRef)(null),[u,c]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:b,...g}=function(e,t,r){var n,o,i,a,s,l,u,c,d;let p,{id:f,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:b,isRequired:g,minValue:v,maxValue:w,autoFocus:x,label:E,formatOptions:S,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:C,onKeyUp:k,description:j,errorMessage:T,isWheelDisabled:R,...A}=e,{increment:M,incrementToMax:N,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=vh((n=S9)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,pj.useCallback)(()=>{let e=r.current?.value??"";(0,gm.flushSync)(()=>{B()}),r.current?.value!==e&&g3(r.current?.value??"","assertive")},[B,r]),z=yB(f),{focusProps:H}=b3({onBlur(){W()}}),K=De(S),G=(0,pj.useMemo)(()=>K.resolvedOptions(),[K]),q=De({...S,currencySign:void 0}),Z=(0,pj.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Y,incrementButtonProps:J,decrementButtonProps:X}=Dn({isDisabled:y,isReadOnly:b,isRequired:g,maxValue:w,minValue:v,onIncrement:M,onIncrementToMax:N,onDecrement:I,onDecrementToMin:$,value:L,textValue:Z}),[Q,ee]=(0,pj.useState)(!1),{focusWithinProps:et}=gC({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,pj.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);_C(t,"wheel",n?void 0:o)}({onScroll:(0,pj.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?M():e.deltaY<0&&I())},[I,M]),isDisabled:R||y||b||!Q},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";bC()?en?eo="text":er&&(eo="decimal"):bA()&&(en?eo="numeric":er&&(eo="decimal"));let ei=be(e),{keyboardProps:ea}=gt({isDisabled:y||b,shortcuts:{Enter:()=>((0,gm.flushSync)(()=>{B()}),V(),{shouldPreventDefault:!1})},onKeyDown:C,onKeyUp:k}),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ep,errorMessageProps:ef}=function(e,t,r){let n=gf(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,pj.useEffect)(()=>{if(!S7()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=S7()?null:e=>{let r=bu(e).value.slice(0,bu(e).selectionStart)+e.data+bu(e).value.slice(bu(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=wE(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=go(e,t),d=xg({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:b,errorMessageProps:g}=xi({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=be(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,pj.useState)(l);return xa(t,e.defaultValue??x,u),xs(e,d,t),{labelProps:m,inputProps:yW(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(bu(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(pT().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:b,errorMessageProps:g,isInvalid:p,validationErrors:f,validationDetails:h}}(e,r),c=(0,pj.useRef)(null);return{inputProps:yW(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...A,...ei,name:void 0,form:void 0,label:E,autoFocus:x,isDisabled:y,isReadOnly:b,isRequired:g,validate:void 0,[xb]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:z,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onPaste:t=>{e.onPaste?.(t);let r=bu(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,r),eh=yW(ea,ed);xa(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,yP(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!Do&&"u">typeof document&&((Do=document.createElement("input")).type="number"),!Do))return;Do.min=null==l||isNaN(l)?"":String(l),Do.max=null==u||isNaN(u)?"":String(u),Do.step=null==c||isNaN(c)?"":String(c),Do.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&Do.validity.valid,r=e.validationMessage||Do.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:Do.validity.rangeOverflow,rangeUnderflow:Do.validity.rangeUnderflow,stepMismatch:Do.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||Do.validity.valid||e.setCustomValidity(Do.validationMessage)});let em=yW(Y,H,eh,{role:null,"aria-roledescription":bj()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(em["aria-required"]=void 0);let ey=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},eb=e["aria-label"]||("string"==typeof e.label?e.label:"");eb||(p=null!=e.label?ec.id:e["aria-labelledby"]);let eg=yB(),ev=yB(),e_=yW(J,{"aria-label":m||U.format("increase",{fieldLabel:eb}).trim(),id:p&&!m?eg:null,"aria-labelledby":p&&!m?`${eg} ${p}`:null,"aria-controls":z,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ey}),ew=yW(X,{"aria-label":h||U.format("decrease",{fieldLabel:eb}).trim(),id:p&&!h?ev:null,"aria-labelledby":p&&!h?`${ev} ${p}`:null,"aria-controls":z,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ey});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:em,incrementButtonProps:e_,decrementButtonProps:ew,errorMessageProps:ef,descriptionProps:ep,isInvalid:es,validationErrors:el,validationDetails:eu}}({...yY(e),label:c,validationBehavior:i},s,l),v=yK({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=be(e,{global:!0});return delete w.id,pT().createElement(yH,{values:[[Dl,s],[wV,p],[wW,{...f,ref:l}],[x8,{...d,ref:u}],[g$,{slots:{increment:h,decrement:m}}],[gV,{slots:{description:y,errorMessage:b}}],[x0,g]]},pT().createElement(yQ.div,{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&pT().createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(s.numberValue)?"":s.numberValue,disabled:e.isDisabled||void 0}))});function Dc(e,t){return Number.parseInt(SK(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let Dd=(0,pj.forwardRef)(function(e,t){let{className:r}=e,n=(0,pj.useContext)(wT),o=(0,pj.useContext)(wR),i=n??o,a=(0,pj.useContext)(S6),s=_u(),l=SK(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=Dc(i.visibleRange.start.toDate(s),a),c=i.maxValue?Dc(i.maxValue.toDate(s),a):void 0,d=i.minValue?Dc(i.minValue.toDate(s),a):void 0,p=(0,pj.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,hk.jsxs)("span",{ref:t,className:r,children:[(0,hk.jsx)("span",{children:l}),(0,hk.jsxs)(Du,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,hk.jsx)(wz,{}),(0,hk.jsxs)(wU,{children:[(0,hk.jsx)(gL,{slot:"increment",children:(0,hk.jsx)(h9,{size:8})}),(0,hk.jsx)(gL,{slot:"decrement",children:(0,hk.jsx)(h6,{size:8})})]})]})]})}),Dp="-esm-report-builder__datepicker-module__inputGroup___8HE83",Df="-esm-report-builder__datepicker-module__inputSegment___bZPCL",Dh="-esm-report-builder__datepicker-module__dateInputWrapper___ZGn+P",Dm="-esm-report-builder__datepicker-module__invalidText___mb1DW",Dy="-esm-report-builder__datepicker-module__flatButton___DL7RZ",Db="-esm-report-builder__datepicker-module__flatButtonMd___JZlIZ",Dg="-esm-report-builder__datepicker-module__flatButtonSm___bOLZt",Dv="-esm-report-builder__datepicker-module__flatButtonLg___IQPkt";function D_({children:e}){let t=(0,pj.useContext)(E4),r=(0,pj.useContext)(E2),n=t??r,o=f8(()=>n?.close());return(0,hk.jsx)(xQ,{className:"-esm-report-builder__datepicker-module__dialog___vu+V8",ref:o,children:e})}let Dw=(0,pj.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,hk.jsx)(EJ,{ref:o,className:"-esm-report-builder__datepicker-module__popover___rJRGV",placement:"bottom start",offset:1,isNonModal:!0,children:(0,hk.jsx)(D_,{children:(0,hk.jsxs)(i?wM:wA,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,hk.jsxs)("header",{className:"-esm-report-builder__datepicker-module__header___8V465",children:[(0,hk.jsx)(gL,{className:hT()(Dy,Db),slot:"previous",children:(0,hk.jsx)(mi,{size:16})}),(0,hk.jsx)(Dd,{className:"-esm-report-builder__datepicker-module__monthYear___kwBXn"}),(0,hk.jsx)(gL,{className:hT()(Dy,Db),slot:"next",children:(0,hk.jsx)(ma,{size:16})})]}),(0,hk.jsx)(wI,{className:"-esm-report-builder__datepicker-module__calendarGrid___Po5J8",children:e=>(0,hk.jsx)(wB,{className:hT()("cds--date-picker__day",{"-esm-report-builder__datepicker-module__today___EotRU":0===t.compare(e)}),date:e},e.toString())})]})})})}),Dx=(0,pj.forwardRef)(function(e,t){let r=(0,pj.useContext)(E4),[n,o]=yq({slot:e.slot},t,xV),{locale:i}=g4(),a=xB({...n,locale:i,createCalendar:wh}),s=(0,pj.useRef)(null),{fieldProps:l,inputProps:u}=xd({...n,inputRef:s},a,o),c=(0,pj.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,hk.jsxs)(yH,{values:[[xU,a],[wW,{...u,ref:s}],[wV,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,hk.jsx)(wU,{...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,pj.cloneElement)(e.children(t),{key:r}))}),(0,hk.jsx)(wz,{})]})}),DE=(0,pj.forwardRef)(function(e,t){let r=(0,pj.useContext)(E4),n=(0,pj.useContext)(E2);return(r??n).isInvalid?(0,hk.jsx)(yf,{ref:t,size:16,...e}):(0,hk.jsx)(h3,{ref:t,size:16,...e})});class DS{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let DD=new Map,DO=(0,pj.forwardRef)(function({segment:e,...t},r){let n=(0,pj.useContext)(xU),o=yE(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,pj.useRef)(""),{locale:l,direction:u}=g4(),c=function(){var e;let{locale:t}=g4(),r=vf((e=xr)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,pj.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new DS(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=xl.get(t),m=e.isPlaceholder?"":e.text,y=(0,pj.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),b=vo({month:"long",timeZone:y.timeZone}),g=vo({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=g.format(t.dateValue));else{let e=b.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=Dn({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,pj.useMemo)(()=>new(0,Di.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{keyboardProps:E}=gt({shortcuts:{Backspace:()=>{x()},Delete:()=>{x()},"Mod+a":()=>{}},allowRepeats:!0}),{startsWith:S}=(n=function(e){let{locale:t}=g4(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(DD.has(r))return DD.get(r);let n=new Intl.Collator(t,e);return DD.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,pj.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,pj.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,pj.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,pj.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),D=vo({hour:"numeric",hour12:!0}),O=(0,pj.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),P=(0,pj.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=vo({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,pj.useMemo)(()=>{if("era"!==e.type)return[];let r=v5(new vK(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:C.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},[C,t.calendar,e.type]),j=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(S(O,r))t.setSegment("dayPeriod",0);else if(S(P,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>S(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};_C((0,pj.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&bl(r.current,e?.anchorNode)&&((e=document)=>e.activeElement)()===r.current&&e.collapse(r.current)});let T=(0,pj.useRef)("");_C(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&&j(n.data)}}),_C(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(S(O,n)||S(P,n))&&j(n))}),yP(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let R=bj()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,pj.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let A=yB(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),I=_x({"aria-label":`${N}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:yW(v,I,{id:A,...R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(pT().version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onFocus:()=>{s.current="",r.current&&_A(r.current,{containingElement:_j(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=gk(),{hoverProps:u,isHovered:c}=gM({...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,pj.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,pj.useCallback)(e=>{e.stopPropagation()},[]);return(0,hk.jsx)("span",{...yW(be(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),DP={short:!1,size:"md"},DC=(0,pj.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:b,...g}={...DP,...e},{calendar:v,intlLocale:w,today_:x}=S5(),E=(0,pj.useId)(),S=!!(u??l),D=(0,pj.useMemo)(()=>E9(n,v),[n,v]),O=(0,pj.useMemo)(()=>E9(b,v,!0),[b,v]),P=(0,pj.useMemo)(()=>E9(d,v),[d,v]),C=(0,pj.useMemo)(()=>E9(p??S8,v),[p,v]),k=(0,pj.useMemo)(()=>i||s,[i,s]),j=(0,pj.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(E7(e)))),[h,f]);return(0,hk.jsx)(E8,{locale:w.toString(),children:(0,hk.jsx)("div",{className:hT()("cds--form-item",r),children:(0,hk.jsx)(yH,{values:[[S6,w]],children:(0,hk.jsxs)(E6,{className:hT()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:k,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...g,onChange:j,children:[(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,hk.jsx)(x9,{className:hT()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,hk.jsxs)(wU,{className:Dp,children:[(0,hk.jsx)(Dx,{id:S?E:void 0,ref:t,className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__inputWrapper___y+8gr",{"-esm-report-builder__datepicker-module__inputWrapperSm___tpcoF":"sm"===y,"-esm-report-builder__datepicker-module__inputWrapperMd___1hH89":"md"===y||!y||0===y.length,"-esm-report-builder__datepicker-module__inputWrapperLg___CRsQW":"lg"===y}),children:e=>"era"!==e.type?(0,hk.jsx)(DO,{className:Df,segment:e}):(0,hk.jsx)(pT().Fragment,{})}),(0,hk.jsx)(gL,{className:hT()(Dy,{[Dg]:"sm"===y,[Db]:"md"===y||!y||0===y.length,[Dv]:"lg"===y}),children:(0,hk.jsx)(DE,{})})]}),(0,hk.jsx)(x1,{className:Dm,children:a})]}),(0,hk.jsx)(Dw,{variant:"single",today_:x})]})})})})}),Dk=(0,pj.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:b,intlLocale:g,today_:v}=S5(),w=(0,pj.useId)(),x=!!(s??a),E=(0,pj.useMemo)(()=>{if(h)return{start:E9(h[0],b,!1),end:E9(h[1],b,!1)}},[h,b]),S=(0,pj.useMemo)(()=>{if(t)return{start:E9(t[0],b,!1),end:E9(t[1],b,!1)}},[t,b]),D=(0,pj.useMemo)(()=>E9(c??S8,b,!0),[c,b]),O=(0,pj.useMemo)(()=>E9(u,b,!0),[u,b]),P=(0,pj.useMemo)(()=>r||i,[r,i]),C=(0,pj.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([E7(e.start),E7(e.end)]))),[p,d]);return(0,hk.jsx)(E8,{locale:g.toString(),children:(0,hk.jsx)("div",{className:hT()("cds--form-item",e),children:(0,hk.jsx)(yH,{values:[[S6,g]],children:(0,hk.jsx)(E5,{id:x?w:void 0,className:hT()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===g.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:C,children:(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,hk.jsx)(x9,{className:hT()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,hk.jsxs)(wU,{className:Dp,children:[(0,hk.jsxs)("div",{className:hT()("-esm-report-builder__datepicker-module__inputsWrapper___soXTl",{"-esm-report-builder__datepicker-module__inputsWrapperSm___ES6Mr":"sm"===f,"-esm-report-builder__datepicker-module__inputsWrapperMd___4qQj-":"md"===f||!f||0===f.length,"-esm-report-builder__datepicker-module__inputsWrapperLg___apyRG":"lg"===f}),children:[(0,hk.jsx)(xz,{className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__startInput___Rc6pT",Dh),slot:"start",children:e=>(0,hk.jsx)(DO,{className:Df,segment:e})}),(0,hk.jsx)("div",{className:"-esm-report-builder__datepicker-module__separator___YpWmV",children:(0,hk.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,hk.jsx)(xz,{className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__endInput___euNmk",Dh),slot:"end",children:e=>(0,hk.jsx)(DO,{className:Df,segment:e})})]}),(0,hk.jsx)(gL,{className:hT()(Dy,{[Dg]:"sm"===f,[Db]:"md"===f||!f||0===f.length,[Dv]:"lg"===f}),children:(0,hk.jsx)(DE,{})})]}),(0,hk.jsx)(x1,{className:Dm,children:n}),(0,hk.jsx)(Dw,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Dj=({diagnoses:e})=>{let{diagnosisTags:t}=fC({externalModuleName:"@openmrs/esm-styleguide"});return(0,hk.jsx)("div",{className:"-esm-report-builder__diagnosis-tags-module__container___B0P1c",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,hk.jsx)(hI.vwO,{type:i,children:o},n)})})},DT={action:"-esm-report-builder__empty-card-module__action___sBzfy",content:"-esm-report-builder__empty-card-module__content___oLLP3",desktopHeading:"-esm-report-builder__empty-card-module__desktopHeading___61tqo",tabletHeading:"-esm-report-builder__empty-card-module__tabletHeading___8GoOd",tile:"-esm-report-builder__empty-card-module__tile___THTb6"},DR=({width:e="64",height:t="64"})=>(0,hk.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,hk.jsx)("use",{href:"#omrs-empty-data-illustration"})}),DA=e=>{let t="tablet"===f4(),r=e.launchForm;return(0,hk.jsx)(hI.Wdr,{className:DT.layer,children:(0,hk.jsxs)(hI.FAs,{className:DT.tile,children:[(0,hk.jsx)("div",{className:t?DT.tabletHeading:DT.desktopHeading,children:(0,hk.jsx)("h4",{children:e.headerTitle})}),(0,hk.jsx)(DR,{}),(0,hk.jsx)("p",{className:DT.content,children:ih("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,hk.jsx)("p",{className:DT.action,children:r&&(0,hk.jsx)(hI.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:ih("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},DM=({error:e,headerTitle:t})=>{let r="tablet"===f4();return(0,hk.jsx)(hI.Wdr,{children:(0,hk.jsxs)(hI.FAs,{className:"-esm-report-builder__error-state-module__tile___cCC0p",children:[(0,hk.jsx)("div",{className:r?"-esm-report-builder__error-state-module__tabletHeading___bj95p":"-esm-report-builder__error-state-module__desktopHeading___cT4Z6",children:(0,hk.jsx)("h4",{children:t})}),(0,hk.jsxs)("p",{className:"-esm-report-builder__error-state-module__errorMessage___0VxgF",children:[ih("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,hk.jsx)("p",{className:"-esm-report-builder__error-state-module__errorCopy___eiDlp",children:ih("errorCopy")})]})})},DN=DM,DI=pT().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=f6(),a=window.location??{pathname:""},s=pH(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,hk.jsxs)(hI.f8J,{"aria-label":ih("leftNavigation","Left navigation"),className:"-esm-report-builder__left-nav-module__leftNav___+tHzD",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,hk.jsx)(pq,{name:"global-nav-menu-slot"}),r?(0,hk.jsx)(fg,{value:o,fallback:(0,hk.jsx)(pq,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,hk.jsx)(pR.Provider,{value:o,children:(0,hk.jsx)(pq,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),D$=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,pj.useState)(""),s=(0,pj.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=fA(t,oQ,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,pj.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:h}=function(e,t=0,r=""){let n=fT(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=fq(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=`${oY}/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()},oQ);return(0,pj.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,pj.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,pj.useCallback)(e=>{o(),a(e.trim())},[o]),b=f9((0,pj.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),g=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)(hI.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:ih("searchForLocation"),id:s,placeholder:ih("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__errorNotification___sh9BG",id:`${s}-error`,children:(0,hk.jsx)(hI.jeF,{kind:"error",subtitle:ih("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:ih("error","Error")})}),(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__searchResults___gvBsQ",children:c?(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__loadingContainer___PR-AY",children:Array.from({length:5}).map((e,t)=>(0,hk.jsx)(hI.Psq,{className:"-esm-report-builder__location-picker-module__radioButtonSkeleton___Y913N",role:"progressbar"},t))}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__locationResultsContainer___eH1Nw",children:m.length>0?(0,hk.jsx)(hI.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,hk.jsx)(hI.aaP,{className:"-esm-report-builder__location-picker-module__locationRadioButton___5tzhj",id:e.resource.id,labelText:(0,hk.jsx)("span",{ref:t===g?b:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__emptyState___+68uf",children:(0,hk.jsx)("p",{className:"-esm-report-builder__location-picker-module__locationNotFound___PBqCF",children:ih("noResultsToDisplay")})})}),p&&(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__loadingIcon___fSVp7",children:(0,hk.jsx)(hI.OuH,{description:ih("loading")})})]})})]})},DL=Z("modalState",{modalContainer:null,modalStack:[]}),DF=0;async function DB(e,t,r={}){let n=ps(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=DF++;o=await pO({...a,name:`${t}-${s}`},{...r,domElement:e})}else I(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function DV(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function DU(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function DW(e){return e.find(e=>!DV(e))}function Dz(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let DH=window.getComputedStyle(document.body).overflow;function DK({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Dq),document.body.style.overflow="hidden",t.style.visibility="unset");let r=DW(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",DB(r,e.modalName,e.props).then(n=>{DV(e)?DU(e.modalName,n):n?(e.parcel=n,t.prepend(r),Dz(e,DW(DL.getState().modalStack)===e),n.mountPromise.then(()=>{DV(e)||(e.state="MOUNTED")},t=>{I(t),e.parcel=null,DG(e)})):DG(e)},t=>{I(t),DG(e)});break}case"MOUNTING":case"MOUNTED":Dz(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),DU(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=DL.getState();DL.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=DH,removeEventListener("keydown",Dq)}function DG(e){if(DV(e))return;e.state="TO_BE_DELETED";let t=DL.getState();DL.setState({...t,modalStack:[...t.modalStack]})}function Dq(e){"Escape"===e.key&&function(){let[e]=DL.getState().modalStack;e&&DG(e)}()}function DZ(e){DL.subscribe(DK),DL.setState({...DL.getState(),modalContainer:e})}function DY(e,t={},r=()=>{}){let n=()=>{let e=DL.getState().modalStack.find(e=>e.onClose===r);e&&DG(e)};if(ps(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=DL.getState()).modalStack],DL.setState({...i,modalStack:a})}else I(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let DJ=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,hk.jsx)(hI.kZS,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},DX=({subject:e})=>{let[t,r]=(0,pj.useState)([]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DJ,{notification:e},e.id))})},DQ=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,pj.useState)(t);return(0,hk.jsx)(hI.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:ih("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:ih("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},D0=({subject:e})=>{let[t,r]=(0,pj.useState)([]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DQ,{notification:e},e.id))})};var D1=Object.prototype.hasOwnProperty;let D4=function(e){if(null==e)return!0;if(tw(e)&&(tv(e)||"string"==typeof e||"function"==typeof e.splice||tD(e)||tA(e)||tg(e)))return!e.length;var t=rT(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tp(e))return!rd(e).length;for(var r in e)if(D1.call(e,r))return!1;return!0},D2=new ef.Subject,D3=0,D6=new ef.Subject,D5=0;function D8(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(DX,{subject:D2}))}function D9(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!D4(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{D2.next({...e,id:D3++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function D7(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(D0,{subject:D6}))}function Oe(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!D4(t))?setTimeout(()=>{D6.next({...e,id:D5++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Ot=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Or=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],On={container:"-esm-report-builder__numeric-observation-module__container___YMIz1",card:"-esm-report-builder__numeric-observation-module__card___ZLBwz","abnormal-value":"-esm-report-builder__numeric-observation-module__abnormal-value___bzIYd","critical-value":"-esm-report-builder__numeric-observation-module__critical-value___S2-yh",cell:"-esm-report-builder__numeric-observation-module__cell___ZiLtj","critically-high":"-esm-report-builder__numeric-observation-module__critically-high___NaPDB","critically-low":"-esm-report-builder__numeric-observation-module__critically-low___S29+P",high:"-esm-report-builder__numeric-observation-module__high___qk85l",low:"-esm-report-builder__numeric-observation-module__low___Rh+hW","label-container":"-esm-report-builder__numeric-observation-module__label-container___OHVTn","value-container":"-esm-report-builder__numeric-observation-module__value-container___-5c7b",label:"-esm-report-builder__numeric-observation-module__label___MVUkz",value:"-esm-report-builder__numeric-observation-module__value___Ne+ED",units:"-esm-report-builder__numeric-observation-module__units___7BIK5","pad-right":"-esm-report-builder__numeric-observation-module__pad-right___8vJsT","off-scale-low":"-esm-report-builder__numeric-observation-module__off-scale-low___3TolK","off-scale-high":"-esm-report-builder__numeric-observation-module__off-scale-high___xMngl",arrow:"-esm-report-builder__numeric-observation-module__arrow___6Jyji"},Oo=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,pj.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${oZ}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${oZ}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=fA(r,oQ),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??u,p=(0,pj.useMemo)(()=>{if(n)return n?"--"===n?"normal":Ot.includes(n)?n.toLowerCase():Or.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",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,g=null!=e&&""!==e,v=g?e:ih("notAvailable","Not available"),w=hT()({[On["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[On["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[On.low]:"low"===p,[On.high]:"high"===p,[On["off-scale-low"]]:"off_scale_low"===p,[On["off-scale-high"]]:"off_scale_high"===p}),x=hT()({[On.container]:!0,[On.card]:!0,[On["critical-value"]]:f,[On["abnormal-value"]]:h&&!f}),E=hT()({[On.cell]:!0,[w]:!0});return"cell"===a?(0,hk.jsxs)("div",{className:E,children:[v,g&&t?` ${t}`:""]}):(0,hk.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,hk.jsxs)("div",{className:On["label-container"],children:[(0,hk.jsx)("span",{id:m,className:On.label,children:r}),h&&(0,hk.jsx)("span",{className:On[p.replace("_","-")],title:ih("abnormalValue","Abnormal value")})]}),(0,hk.jsxs)("div",{className:On["value-container"],children:[(0,hk.jsx)("span",{id:y,"aria-labelledby":m&&b?`${m} ${b}`:m||b||void 0,className:On.value,children:v}),g&&t&&(0,hk.jsx)("span",{id:b,className:On.units,children:t})]})]})},Oi="-esm-report-builder__page-header-module__pageHeader___sRmJ1",Oa=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,hk.jsx)("div",{className:hT()(Oi,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,hk.jsx)("div",{className:hT()(Oi,n),...o,children:(0,hk.jsx)(Os,{title:t,illustration:r})})}},Os=({title:e,illustration:t,className:r})=>{let[n,o]=(0,pj.useState)(null);return(0,pj.useEffect)(()=>{oe("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,hk.jsxs)("div",{className:hT()("-esm-report-builder__page-header-module__pageHeaderContent___9CRks",r),children:[t,(0,hk.jsxs)("div",{className:"-esm-report-builder__page-header-module__pageLabels___mIsS6",children:[n?.implementationName&&(0,hk.jsx)("p",{children:ih(n.implementationName)}),(0,hk.jsx)("p",{className:"-esm-report-builder__page-header-module__pageName___kvdCd",children:e})]})]})},Ol=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=ht(t,e,n,i),u="tablet"===f4(),c=ih("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,hk.jsx)(hk.Fragment,{children:e>0&&(0,hk.jsxs)("div",{className:hT()({"-esm-report-builder__pagination-module__tablet___-EohH":u,"-esm-report-builder__pagination-module__desktop___lJwLA":!u}),children:[(0,hk.jsxs)("div",{children:[c,o&&(0,hk.jsx)(pA,{to:o,className:"-esm-report-builder__pagination-module__configurableLink___f-IJ9",children:a??ih("seeAll","See all")})]}),(0,hk.jsx)(hI.dKS,{className:"-esm-report-builder__pagination-module__pagination___XBkRY",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>ih("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Ou(e){return Od(Of(e,"usual","official"))}function Oc(e){return Ou(e)}function Od(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Op(e){return Od(e)}function Of(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 Oh(e,t=hl()){let r=hl(t),n=SX(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function Om(e,t=hl()){let r=Oh(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),SJ(r,n)}let Oy={container:"-esm-report-builder__patient-banner-patient-info-module__container___SbFly",activePatientContainer:"-esm-report-builder__patient-banner-patient-info-module__activePatientContainer___dPAI3",patientBanner:"-esm-report-builder__patient-banner-patient-info-module__patientBanner___RKK5o",patientName:"-esm-report-builder__patient-banner-patient-info-module__patientName___N4cBt",patientAvatar:"-esm-report-builder__patient-banner-patient-info-module__patientAvatar___S5B6e",patientAvatarButton:"-esm-report-builder__patient-banner-patient-info-module__patientAvatarButton___b4TpF",patientInfo:"-esm-report-builder__patient-banner-patient-info-module__patientInfo___k4TpF",demographics:"-esm-report-builder__patient-banner-patient-info-module__demographics___kUxEK",row:"-esm-report-builder__patient-banner-patient-info-module__row___aBH+R",flexRow:"-esm-report-builder__patient-banner-patient-info-module__flexRow___iE9YF",tagsSlot:"-esm-report-builder__patient-banner-patient-info-module__tagsSlot___qQx0X",identifiers:"-esm-report-builder__patient-banner-patient-info-module__identifiers___S+i2W",identifier:"-esm-report-builder__patient-banner-patient-info-module__identifier___V3fBY",primaryIdentifier:"-esm-report-builder__patient-banner-patient-info-module__primaryIdentifier___MGool",secondaryIdentifier:"-esm-report-builder__patient-banner-patient-info-module__secondaryIdentifier___ORbJn",value:"-esm-report-builder__patient-banner-patient-info-module__value___rZXrd",tag:"-esm-report-builder__patient-banner-patient-info-module__tag___l5yM7",gender:"-esm-report-builder__patient-banner-patient-info-module__gender___pBoq+",separator:"-esm-report-builder__patient-banner-patient-info-module__separator___kqhkj",tooltipPadding:"-esm-report-builder__patient-banner-patient-info-module__tooltipPadding___aca85",tooltipSmallText:"-esm-report-builder__patient-banner-patient-info-module__tooltipSmallText___KSHWn",actionsButtonText:"-esm-report-builder__patient-banner-patient-info-module__actionsButtonText___dfkx2"};function Ob({showIdentifierLabel:e,type:t,value:r}){return(0,hk.jsx)("span",{className:Oy.primaryIdentifier,children:(0,hk.jsxs)(hI.vwO,{className:Oy.tag,type:"gray",children:[e&&t?.text&&(0,hk.jsxs)("span",{className:Oy.label,children:[t.text,": "]}),(0,hk.jsx)("span",{className:Oy.value,children:r})]})})}function Og({showIdentifierLabel:e,type:t,value:r}){return(0,hk.jsxs)(hI.lRv,{className:Oy.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,hk.jsxs)("span",{className:Oy.label,children:[t?.text,": "]}),(0,hk.jsx)("span",{className:Oy.value,children:r})]})}function Ov({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=fC(),{primaryIdentifierCode:n}=ho(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,hk.jsx)(hk.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,hk.jsxs)(pT().Fragment,{children:[(0,hk.jsx)("span",{className:Oy.identifier,children:r?.coding?.[0]?.code===n?(0,hk.jsx)(Ob,{showIdentifierLabel:t,type:r,value:e}):(0,hk.jsx)(Og,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"})]},e)):""})}let O_={Female:mg,Male:mv,Other:m_,Unknown:mw},Ow=({gender:e})=>{let t=O_[e];return t?(0,hk.jsx)(t,{fill:"#525252"}):null},Ox={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function OE({patient:e,renderedFrom:t}){var r;let n,o,i=Ou(e),a=e?.gender&&(o=Ox[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:ih(n,r),iconKey:o}),s=(0,pj.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,hk.jsxs)("div",{className:Oy.patientInfo,children:[(0,hk.jsx)("div",{className:hT()(Oy.row,Oy.patientNameRow),children:(0,hk.jsxs)("div",{className:Oy.flexRow,children:[(0,hk.jsx)("span",{className:Oy.patientName,children:i}),a&&(0,hk.jsxs)("div",{className:Oy.gender,children:[(0,hk.jsx)(Ow,{gender:a.iconKey}),(0,hk.jsx)("span",{children:a.displayText})]}),(0,hk.jsx)(pq,{className:Oy.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,hk.jsxs)("div",{className:Oy.demographics,children:[e.birthDate&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("span",{children:Om(e.birthDate)}),(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"}),(0,hk.jsx)("span",{children:SH(e.birthDate,{time:!1})}),(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"})]}),(0,hk.jsx)(Ov,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,hk.jsx)(pq,{className:Oy.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var OS=r(1673);function OD({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,pj.useState)(!1),{extensions:a}=pK(r),s="tablet"===f4(),l=f8(()=>i(!1),o),u=(0,pj.useRef)(null),c=(0,pj.useRef)(null),d=(0,pj.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,pj.useCallback)(()=>i(e=>!e),[]),m=(0,pj.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,pj.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,pj.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let b=(0,pj.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,hk.jsx)("div",{className:"-esm-report-builder__patient-banner-actions-menu-module__overflowMenuContainer___kcHLp",children:(0,hk.jsxs)("div",{"data-overflow-menu":!0,className:hT()("cds--overflow-menu",hF),ref:l,children:[(0,hk.jsxs)("button",{className:hT()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},hU),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,hk.jsx)("span",{className:"-esm-report-builder__patient-banner-actions-menu-module__actionsButtonText___w2rar",children:ih("actions","Actions")})," ",(0,hk.jsx)(OS.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,hk.jsxs)("div",{className:hT()("cds--overflow-menu-options","cds--overflow-menu--flip",hB,{[hV]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,hk.jsx)("ul",{className:hT()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,hk.jsx)(pq,{name:r,state:b},r)}),(0,hk.jsx)("span",{})]})]})})}var OO=r(6767),OP=r.n(OO);function OC(e){let{patientPhotoConceptUuid:t}=fC({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${oZ}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=(0,fe.u)(e?r:null,oQ),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Ok=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,p7.useTranslation)();return(0,hk.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,hk.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,hk.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"})]})},Oj="-esm-report-builder__patient-photo-module__avatar___SjWI2";function OT({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=OC(e),[i,a]=(0,pj.useState)(null),[s,l]=(0,pj.useState)(!1),u=(0,pj.useMemo)(()=>OP().generate(e),[e]);(0,pj.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,pj.useMemo)(()=>r||(i?ih("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):ih("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,hk.jsx)(hI.ryE,{className:"-esm-report-builder__patient-photo-module__skeleton___YkxcQ","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,hk.jsx)(Ok,{"aria-label":ih("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("img",{className:Oj,src:i,alt:c,title:t})}):(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("div",{className:Oj,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,hk.jsx)("span",{className:"-esm-report-builder__patient-photo-module__initials___GrIHj",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let OR=["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"],OA=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),OM=OA,ON=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),OI=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),O$=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),OL=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),OF=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),OB=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),OV=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),OU=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),OW=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Oz=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),OH=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),OK=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),OG=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Oq=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),OZ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),OY=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OJ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),OX=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),OQ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),O0=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),O1=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),O4=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),O2=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),O3=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),O6=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),O5=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pe,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),O8=OW,O9=OJ,O7=(0,pj.memo)((0,pj.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,pj.useRef)(document.getElementById(e));return(0,pj.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,hk.jsx)(fg,{value:o.current,fallback:t,children:(0,hk.jsx)(Pe,{ref:n,pictogram:e,pictogramProps:r})})})),Pe=(0,pj.memo)((0,pj.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,hk.jsx)("svg",{ref:r,className:hT()("-esm-report-builder__pictograms-module__pictogram___ej8c6",n),height:o,width:o,children:(0,hk.jsx)("use",{href:`#${e}`})})})),Pt=({children:e})=>"tablet"===f4()?(0,hk.jsx)(hI.Wdr,{children:e}):(0,hk.jsx)(hk.Fragment,{children:e}),Pr=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,h]=(0,pj.useState)(r),[m,y]=(0,pj.useState)(!0),[b,g]=(0,pj.useState)(!1),v=(0,pj.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,pj.useCallback)(()=>{g(!0),v()},[v]);return(0,pj.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,pj.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,hk.jsx)(hI.kZS,{actionButtonLabel:f,"aria-label":ih("closeSnackbar","Close snackbar"),className:hT()("-esm-report-builder__snackbar-module__slideIn___hMvlf",{"-esm-report-builder__snackbar-module__animated___c+ZXw":m,"-esm-report-builder__snackbar-module__slideOut___ymbgm":b}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:ih("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},Pn=({subject:e})=>{let[t,r]=(0,pj.useState)([]),n=(0,pj.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(Pr,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},Po=new ef.Subject,Pi=0;function Pa(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(Pn,{subject:Po}))}function Ps(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{Po.next({...e,id:Pi++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Pl=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,pj.useCallback)(()=>{s(),t()},[t,s]);return(0,hk.jsx)("div",{children:(0,hk.jsx)(hI.kZS,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},Pu=({subject:e})=>{let[t,r]=(0,pj.useState)([]),n=(0,pj.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(Pl,{toast:e,closeToast:()=>n(e)},e.id))})},Pc=new ef.Subject,Pd=0;function Pp(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(Pu,{subject:Pc}))}function Pf(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!D4(t))?setTimeout(()=>{Pc.next({...e,id:Pd++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Ph(e,t=!1){if(t)return!0;let r=Pv[e];return!r||!r()}function Pm(e,t){let r=PP.getState()?.workspaceGroup,n=r?.name;n&&e===n&&PT(()=>{let n=PI(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),PP.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function Py(e,t){let{name:r,additionalProps:n}=t;pf(r);let o=()=>{PS(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Pb(r,n),closeWorkspaceGroup:!1})};Ph(e.name)?o():PA("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Pb(e,t){let r=pf(e),n=PP.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Pm(n.name,()=>{Pb(e,t)});let o=PP.getState().workspaceGroup?.name,i={...r,title:PM(r,t),closeWorkspace:(t={})=>PS(e,t),closeWorkspaceWithSavedChanges:t=>PS(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(Pv[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,PP.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){PP.setState(r=>{let n=[e,...t??r.openWorkspaces],o=Pj(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&PI(o,t);let s=PP.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===PM(t,t.additionalProps)&&{title:PM(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,PP.getState().openWorkspaces.filter(e=>e.type!=i.type)),Py(u,{name:e,additionalProps:t})):a(i);else Py(s[0],{name:e,additionalProps:t})}function Pg({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){PD(t),Pb(r,n),oF({to:e})}let Pv={};function P_(e,t){Pv[e]=t}function Pw(e){return Pv[e]}function Px(){let e=PP.getState();PP.setState({...e,prompt:null})}let PE={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function PS(e,t={}){t={...PE,...t};let r=()=>{let r=PP.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=PP.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Pm(o),Pv[e]=()=>!1,PP.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:Pj(n?.[0])})),t?.onWorkspaceClose?.()};return Ph(e,t?.ignoreChanges)?(r(),!0):(PA("closing-workspace",r,pf(e).title??e),!1)}function PD(e){PP.getState().context!=e&&PP.setState({context:e,openWorkspaces:[],prompt:null})}let PO={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},PP=Z("workspace",PO);function PC(){return PP}function Pk(e){let t=PP.getState();PP.setState({...t,workspaceWindowState:e})}function Pj(e){return e?.preferredWindowSize??"normal"}function PT(e=()=>{},t=()=>!0){let r=PP.getState().openWorkspaces.filter(t).every(({name:e})=>Ph(e)),n=()=>{PN(),e?.()};r?n():PA("closing-all-workspaces",n)}function PR(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=pL(PP);return(0,pj.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function PA(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:ih("unsavedChangesTitleText","Unsaved changes"),body:ih("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:ih("discard","Discard")};break;case"closing-all-workspaces":{let e=PP.getState().openWorkspaces.filter(({name:e})=>!Ph(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:ih("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:ih("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:ih("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:ih("unsavedChangesTitleText","Unsaved changes"),body:ih("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{PP.setState(e=>({...e,prompt:null})),t?.()},confirmText:ih("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}PP.setState(e=>({...e,prompt:n}))}function PM(e,t){return t?.workspaceTitle??e.title}function PN(){PP.setState(PO)}function PI(e,t={}){if(!e||"default"===e)return;let r=J(e,{});return t&&r.setState(e=>({...e,...t})),r}let P$="-esm-report-builder__action-menu-button-module__container___flRDv",PL="-esm-report-builder__action-menu-button-module__elementContainer___iAHLw",PF="-esm-report-builder__action-menu-button-module__active___IwBtr";function PB({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button-module__interruptedTag___WtUuQ",children:"!"}):(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button-module__countTag___JHlDT",children:r})]})}let PV=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=f4(),{workspaces:s,workspaceWindowState:l}=PR(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,hk.jsxs)(hI.$nd,{className:hT()(P$,{[PF]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:PL,children:(0,hk.jsx)(PB,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hI.K0,{align:"left","aria-label":r,className:hT()(P$,{[PF]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,hk.jsx)("div",{className:PL,children:(0,hk.jsx)(PB,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var PU=r(810),PW=r(771),Pz=/[\\^$.*+?()[\]{}|]/g,PH=RegExp(Pz.source);let PK=function(e){return(e=ns(e))&&PH.test(e)?e.replace(Pz,"\\$&"):e};function PG({contextKey:e}){let{prompt:t}=PR();return(0,pj.useEffect)(()=>{RegExp(`/${PK(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,pj.useEffect)(()=>(PD(e),()=>{PD(null)}),[e]),(0,pj.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${PK(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=PP.getState().openWorkspaces.every(({name:e})=>Ph(e));a||(s?PN():(r?.(),PT(()=>{oF({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,hk.jsxs)(hI.KXP,{open:!0,onClose:Px,children:[(0,hk.jsx)(hI.rQ0,{title:t.title}),(0,hk.jsx)(hI.cwr,{children:(0,hk.jsx)("p",{className:"-esm-report-builder__workspace-notification-module__messageBody___LuOaq",children:t.body})}),(0,hk.jsxs)(hI.jlY,{children:[(0,hk.jsx)(hI.$nd,{kind:"secondary",onClick:Px,children:t.cancelText??ih("cancel")}),(0,hk.jsx)(hI.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??ih("confirm")})]})]}):null}function Pq(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 PZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pq(Object(r),!0).forEach(function(t){PJ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function PY(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 PJ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PX(e){return(PX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PQ(e,t){return(PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P0(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var P1=function(e){var t=pj.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&&PQ(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=PX(a);e=r?Reflect.construct(t,arguments,PX(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 P0(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),PJ(P0(t=i.call(this,e)),"handleRef",function(e){t.el=e}),PJ(P0(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}))}),PJ(P0(t),"getParcelProps",function(){var e=PZ(PZ({},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,PZ({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 p1&&p1.Consumer?pj.createElement(p1.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=p1&&p1.Consumer?pj.createElement(p1.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return pj.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],PY(a.prototype,n),o&&PY(a,o),a}();PJ(P1,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function P4({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,pj.useState)(),o=function(e){let[t,r]=(0,pj.useState)({}),[n,o]=(0,pj.useState)(e);return(0,pj.useEffect)(()=>{n!==e&&o(e)},[e]),(0,pj.useEffect)(()=>{let e,t=PI(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,pj.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,pj.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,hk.jsx)(P1,{config:r,mountParcel:pC,...i},e.name):(0,hk.jsx)(hI.OuH,{className:"-esm-report-builder__workspace-module__loader___qwZ71",description:`${ih("loading","Loading")} ...`})}function P2({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,pj.useState)(!1),i=(0,pj.useRef)(window.innerHeight),{featureName:a}=(0,pj.useContext)(pR),s=f4();(0,pj.useEffect)(()=>{let e=()=>{o(!f2(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,hk.jsx)("aside",{className:hT()("-esm-report-builder__action-menu-module__sideRail___e98is",{"-esm-report-builder__action-menu-module__withinWorkspace___M79JV":e,"-esm-report-builder__action-menu-module__sideRailHidden___YiJLl":n,"-esm-report-builder__action-menu-module__sideRailVisible___2FAOp":!n}),children:(0,hk.jsx)("div",{className:"-esm-report-builder__action-menu-module__container___OOD1K",children:(0,hk.jsx)(pq,{className:"-esm-report-builder__action-menu-module__chartExtensions___WxddU",name:l,state:r})})})}function P3({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=f4(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=PR(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,pj.useMemo)(()=>r||u&&!d,[u,d,r]);return fD(!d&&!f2(i)),(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("div",{className:r?"-esm-report-builder__workspace-module__workspaceContainerWithActionMenu___ICW-m":"-esm-report-builder__workspace-module__workspaceContainerWithoutActionMenu___LfZGa",children:[(0,hk.jsx)("aside",{className:hT()(t?"-esm-report-builder__workspace-module__workspaceOverlayOuterContainer___9JiRR":"-esm-report-builder__workspace-module__workspaceWindowSpacer___wmOFv",{"-esm-report-builder__workspace-module__hiddenRelative___4RP3l":d,"-esm-report-builder__workspace-module__narrowWorkspace___hjAco":"narrow"===p,"-esm-report-builder__workspace-module__widerWorkspace___+e9xX":"wider"===p,"-esm-report-builder__workspace-module__extraWideWorkspace___y+68g":"extra-wide"===p}),children:(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceFixedContainer___gGK0B",{"-esm-report-builder__workspace-module__maximizedWindow___spirq":"maximized"===s,"-esm-report-builder__workspace-module__hiddenFixed___qzxpg":d}),children:a.map((e,t)=>(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceInnerContainer___1Z0Qp",{"-esm-report-builder__workspace-module__hiddenExtraWorkspace___+tmaj":0!==t}),children:(0,hk.jsx)(pj.Suspense,{fallback:null,children:(0,hk.jsx)(p7.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,hk.jsx)(P6,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,hk.jsx)(PG,{contextKey:e})]}),f&&(0,hk.jsx)(P2,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function P6({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,p7.useTranslation)(),n=f4(),{workspaceWindowState:o,workspaceGroup:i}=PR(),a=i?.name,s="maximized"===o;(0,pj.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,pj.useContext)(pR),u=(0,pj.useCallback)(()=>{Pk(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,pj.useMemo)(()=>e??{},[e]),h=(0,pj.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)(hI.Y9Y,{"aria-label":ih("workspaceHeader","Workspace Header"),className:"-esm-report-builder__workspace-module__header___NhAJ5",children:[!f2(n)&&!c&&(0,hk.jsx)(hI.dJ2,{"aria-label":ih("close","Close"),renderMenuIcon:(0,hk.jsx)(hQ,{}),onClick:()=>f()}),(0,hk.jsx)(hI.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,hk.jsx)("div",{className:"-esm-report-builder__workspace-module__overlayHeaderSpacer___gwXPJ"}),(0,hk.jsxs)(hI.wdv,{className:"-esm-report-builder__workspace-module__headerButtons___vkBTc",children:[(0,hk.jsx)(pq,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,hk.jsx)(pq,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,hk.jsx)(pq,{name:`workspace-header-${l}-slot`,state:h}),f2(n)&&(0,hk.jsxs)(hk.Fragment,{children:[(d||s)&&(0,hk.jsx)(hI.V8d,{"aria-label":s?ih("minimize","Minimize"):ih("maximize","Maximize"),onClick:u,children:s?(0,hk.jsx)(PU.Xj,{}):(0,hk.jsx)(PU.hz,{})}),c&&!a?(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide","Hide"),onClick:()=>Pk("hidden"),children:(0,hk.jsx)(h0,{})}):(0,hk.jsx)(hI.V8d,{"aria-label":ih("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(ml,{})})]}),"tablet"===n&&c&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(PW.d3,{})})]})]}),(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceContent___1IXNi",{"-esm-report-builder__workspace-module__marginWorkspaceContent___8QfwE":!!p}),children:(0,hk.jsx)(P4,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let P5="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),P8=new Uint8Array(16),P9=[];for(let e=0;e<256;++e)P9.push((e+256).toString(16).slice(1));let P7=function(e,t,r){if(P5&&!t&&!e)return P5();let n=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(P8)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(P9[e[t+0]]+P9[e[t+1]]+P9[e[t+2]]+P9[e[t+3]]+"-"+P9[e[t+4]]+P9[e[t+5]]+"-"+P9[e[t+6]]+P9[e[t+7]]+"-"+P9[e[t+8]]+P9[e[t+9]]+"-"+P9[e[t+10]]+P9[e[t+11]]+P9[e[t+12]]+P9[e[t+13]]+P9[e[t+14]]+P9[e[t+15]]).toLowerCase()}(n)};async function Ce(e,t){let{openedGroup:r}=pm.getState();if(r){if(r.groupName===e&&Cn(r.props,t))return!0;else if(!await Co({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return pm.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Ct(e){let{openedGroup:t,openedWindows:r}=pm.getState();if(t){if(r.length>0&&!(e||await Co({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;pm.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Cr(e,t=null,r=null,n=null){let o=pm.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=py(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=pb(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=pg(e);if(a&&(a.groupName!==l.name||!Cn(a.props,n)))return!!await Co({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Cu(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Cn(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Cn(d.props,t)?((a||u!==o.openedWindows.length-1)&&pm.setState(Ci.restoreWindow(o,s)),!0):!!await Co({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Cu(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Co({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Cu(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(pm.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Cu(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Co({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Cu(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Cn(e,t){return null==e||null==t||F(e,t)}function Co(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}=pm.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=DY("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Ci={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=pg(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,Cu(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=pg(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 Ca(){return pF(pm,Ci)}let Cs=()=>(0,pj.useContext)(p1),Cl=()=>Object.keys(pm.getState().registeredWorkspacesByName);function Cu(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:P7()}}let Cc={workspaceOuterContainer:"-esm-report-builder__workspace2-module__workspaceOuterContainer___W9iJN",narrowWorkspace:"-esm-report-builder__workspace2-module__narrowWorkspace___6pFGF",widerWorkspace:"-esm-report-builder__workspace2-module__widerWorkspace___aQBxL",extraWideWorkspace:"-esm-report-builder__workspace2-module__extraWideWorkspace___Hcpmd",workspaceMiddleContainer:"-esm-report-builder__workspace2-module__workspaceMiddleContainer___DlVKb",maximized:"-esm-report-builder__workspace2-module__maximized___GqZm5",hidden:"-esm-report-builder__workspace2-module__hidden___KSjDv",workspaceInnerContainer:"-esm-report-builder__workspace2-module__workspaceInnerContainer___qQKWW",workspaceSpacer:"-esm-report-builder__workspace2-module__workspaceSpacer___tx3mR",loader:"-esm-report-builder__workspace2-module__loader___f9ttF",hiddenExtraWorkspace:"-esm-report-builder__workspace2-module__hiddenExtraWorkspace___o2RHo",header:"-esm-report-builder__workspace2-module__header___4cJjV",headerButtons:"-esm-report-builder__workspace2-module__headerButtons___5vIhN",workspaceContent:"-esm-report-builder__workspace2-module__workspaceContent___ROBU9",overlayHeaderSpacer:"-esm-report-builder__workspace2-module__overlayHeaderSpacer___CFci9",isActionMenuOpened:"-esm-report-builder__workspace2-module__isActionMenuOpened___TlyIU",showActionMenu:"-esm-report-builder__workspace2-module__showActionMenu___5qVqE",marginWorkspaceContent:"-esm-report-builder__workspace2-module__marginWorkspaceContent___jB4mY",workspaceContainerWithActionMenu:"-esm-report-builder__workspace2-module__workspaceContainerWithActionMenu___+EHP1",workspaceFixedContainer:"-esm-report-builder__workspace2-module__workspaceFixedContainer___PV5s-",workspaceContainerWithoutActionMenu:"-esm-report-builder__workspace2-module__workspaceContainerWithoutActionMenu___pJYA1"},Cd=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=f4(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=Ca(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:b,showActionMenu:g}=Cs(),v=pg(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,pj.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,pj.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let E=u[l.groupName];if(!E)throw Error(`Cannot find registered workspace group ${l.groupName}`);let S=d[m].window,D=c[S];if(!D)throw Error(`Cannot find registered workspace window ${S}`);let{icon:O,canMaximize:P}=D,C="closable"===E.persistence,k=!!O&&!C,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),A=v<s.length-1||h;return(0,hk.jsxs)("div",{className:hT()(Cc.workspaceOuterContainer,{[Cc.narrowWorkspace]:"narrow"===T,[Cc.widerWorkspace]:"wider"===T,[Cc.extraWideWorkspace]:"extra-wide"===T,[Cc.isActionMenuOpened]:R}),children:[(0,hk.jsx)("div",{className:hT()(Cc.workspaceSpacer,{[Cc.hidden]:A})}),(0,hk.jsx)("div",{className:hT()(Cc.workspaceMiddleContainer,{[Cc.maximized]:j,[Cc.hidden]:A,[Cc.isRootWorkspace]:y,[Cc.showActionMenu]:g}),children:(0,hk.jsxs)("div",{className:hT()(Cc.workspaceInnerContainer,{[Cc.maximized]:j,[Cc.hidden]:A,[Cc.isRootWorkspace]:y}),children:[(0,hk.jsxs)(hI.Y9Y,{"aria-label":ih("workspaceHeader"),className:Cc.header,children:[(0,hk.jsx)(hI.bCw,{prefix:"",children:e}),(0,hk.jsx)("div",{className:Cc.overlayHeaderSpacer}),(0,hk.jsx)(hI.wdv,{className:Cc.headerButtons,children:f2(n)?(0,hk.jsxs)(hk.Fragment,{children:[(P||j)&&(0,hk.jsx)(hI.V8d,{"aria-label":j?ih("minimize"):ih("maximize"),onClick:()=>o(S,!j),children:j?(0,hk.jsx)(PU.Xj,{}):(0,hk.jsx)(PU.hz,{})}),k&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide"),onClick:()=>i(),children:(0,hk.jsx)(h0,{})}),!C&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("close"),onClick:()=>b({closeWindow:!0}),children:(0,hk.jsx)(ml,{})})]}):(0,hk.jsxs)(hk.Fragment,{children:[k&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide"),onClick:()=>i(),children:(0,hk.jsx)(PW.d3,{})}),(0,hk.jsx)(hI.V8d,{"aria-label":ih("close"),onClick:()=>{C?Ct():b({closeWindow:!0})},children:(0,hk.jsx)(ml,{})})]})})]}),(0,hk.jsx)("div",{className:hT()(Cc.workspaceContent),children:t})]})})]})},Cp="-esm-report-builder__action-menu-button2-module__container___qxTbB",Cf="-esm-report-builder__action-menu-button2-module__elementContainer___MzyUg",Ch="-esm-report-builder__action-menu-button2-module__active___nMKHE",Cm="-esm-report-builder__action-menu-button2-module__focused___ncbDv";function Cy({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button2-module__interruptedTag___HSn-T",children:"!"}):(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button2-module__countTag___bUcY2",children:r})]})}let Cb=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=f4(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Ca(),{extension:c}=(0,pj.useContext)(pR),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Cr(e,t,r)}};return"tablet"===i||"phone"===i?(0,hk.jsxs)(hI.$nd,{className:hT()(Cp,{[Ch]:f&&!m,[Cm]:m}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:Cf,children:(0,hk.jsx)(Cy,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hI.K0,{align:"left","aria-label":t,className:hT()(Cp,{[Ch]:f&&!m,[Cm]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",children:(0,hk.jsx)("div",{className:Cf,children:(0,hk.jsx)(Cy,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function Cg({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,hk.jsx)(hI.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?ms:mo,children:e?ih("showLess","Show less"):ih("showMore","Show more")})}let Cv={contactDetails:"-esm-report-builder__patient-banner-contact-details-module__contactDetails___+ytje",deceased:"-esm-report-builder__patient-banner-contact-details-module__deceased___mxjtl",heading:"-esm-report-builder__patient-banner-contact-details-module__heading___wxIC0",row:"-esm-report-builder__patient-banner-contact-details-module__row___dafkX",col:"-esm-report-builder__patient-banner-contact-details-module__col___vGkbd",relationship:"-esm-report-builder__patient-banner-contact-details-module__relationship___ZOV9O"},C_=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${oZ}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=(0,fe.u)(t,oQ),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,pj.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("p",{className:Cv.heading,children:[ih("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>SF(e?.startDate).getTime()-SF(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,hk.jsx)("li",{children:(0,hk.jsx)(pA,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,hk.jsx)("li",{children:"--"})})(),t.length>3&&(0,hk.jsx)("li",{className:Cv.link,children:(0,hk.jsx)(pA,{to:`${window.spaBase}/home/patient-lists`,children:ih("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Cw=({patientId:e})=>{let{patient:t,isLoading:r}=hn(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:Cv.heading,children:ih("address","Address")}),(0,hk.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,hk.jsxs)("li",{children:[ih(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,hk.jsxs)("li",{children:[ih(e,e),": ",t]},`address-${e}`)):(0,hk.jsx)("li",{children:"--"})})]})},Cx=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=fC({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=fA(`${oZ}/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)))`,oQ);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,pj.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,pj.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?ih(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:Cv.heading,children:ih("contactDetails","Contact Details")}),t?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,hk.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,hk.jsx)("li",{children:"--"})})]})},CE=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${oZ}/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}=(0,fe.u)(e?t:null,oQ),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,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:Cv.heading,children:ih("relationships","Relationships")}),r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:t&&t.length>0?(0,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsxs)("li",{className:Cv.relationship,children:[(0,hk.jsx)("div",{children:(0,hk.jsx)(pA,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,hk.jsx)("div",{children:e.relationshipType}),(0,hk.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?ih("yearAbbreviation","yr"):ih("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,hk.jsx)("li",{children:"--"})})]})};function CS({patientId:e,deceased:t}){return(0,hk.jsxs)("div",{className:hT()(Cv.contactDetails,{[Cv.deceased]:t}),children:[(0,hk.jsxs)("div",{className:Cv.row,children:[(0,hk.jsx)("div",{className:Cv.col,children:(0,hk.jsx)(Cw,{patientId:e})}),(0,hk.jsx)("div",{className:Cv.col,children:(0,hk.jsx)(Cx,{patientUuid:e})})]}),(0,hk.jsxs)("div",{className:Cv.row,children:[(0,hk.jsx)("div",{className:Cv.col,children:(0,hk.jsx)(CE,{patientId:e})}),(0,hk.jsx)("div",{className:Cv.col,children:(0,hk.jsx)(C_,{patientUuid:e})})]})]})}function CD(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 CO="-esm-report-builder__action-menu2-module__container___usAej";function CP({workspaceGroup:e,groupProps:t}){let r=f4(),{persistence:n}=e;return(0,hk.jsx)("aside",{className:"-esm-report-builder__action-menu2-module__sideRail___dTm93",children:(0,hk.jsxs)("div",{className:CO,children:["closable"==n&&f2(r)&&(0,hk.jsx)(hI.K0,{align:"left",onClick:()=>Ct(),label:ih("close"),kind:"ghost",children:(0,hk.jsx)(ml,{})}),(0,hk.jsx)(pR.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,hk.jsx)(pq,{className:CO,name:e.name,state:{groupProps:t}})})]})})}function CC(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 Ck=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=Ca(),u=(0,pj.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Co({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Co({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 Co({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(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}=pm.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=pm.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,hk.jsxs)("div",{className:hT()(Cc.workspaceOuterContainer,{[Cc.narrowWorkspace]:"narrow"===u,[Cc.widerWorkspace]:"wider"===u,[Cc.extraWideWorkspace]:"extra-wide"===u,[Cc.isActionMenuOpened]:c}),children:[(0,hk.jsx)("div",{className:Cc.workspaceSpacer}),(0,hk.jsx)("div",{className:hT()(Cc.workspaceMiddleContainer,{[Cc.isRootWorkspace]:n,[Cc.showActionMenu]:i}),children:(0,hk.jsx)("div",{className:hT()(Cc.workspaceInnerContainer,{[Cc.isRootWorkspace]:n}),children:(0,hk.jsx)(hI.OuH,{className:Cc.loader,description:`${ih("loading")} ...`})})})]})}return(0,hk.jsx)(P1,{config:e,mountParcel:pC,...u},t.workspaceName)},Cj=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,pj.useState)({}),{registeredWorkspacesByName:i}=pm.getState();return(0,pj.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await hg(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,hk.jsx)(hk.Fragment,{children:r.map((o,i)=>(0,hk.jsx)(Ck,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function CT(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(CR,{}))}function CR(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Ca();if((0,pj.useEffect)(()=>cE("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(Ct().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=CC(t),i=CC(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}}(l,i,a)&&o(Ct().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,hk.jsxs)("div",{className:hT()("-esm-report-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___CSZs-",{"-esm-report-builder__workspace-windows-and-menu-module__overlay___0kl8U":o.overlay,"-esm-report-builder__workspace-windows-and-menu-module__hasMaximizedWindow___+DcH9":i}),children:[(0,hk.jsx)("div",{className:"-esm-report-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___s8ddv",children:t.map(e=>(0,hk.jsx)(Cj,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,hk.jsx)(CP,{workspaceGroup:o,groupProps:e.props})]})}function CA(e,t,r){if(null==e)return r;let n=Se(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Se(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 CM(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function CN(e){return!!e&&e.constructor===Object}var CI=r(9589);function C$(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function CL(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=C$(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return C$(e)}(t);return CI.satisfies(r,e,{includePrerelease:!0})}async function CF(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 CB(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function CB(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);
43
+ }`.trim(),document.head.prepend(n),i=HTMLElement.prototype.focus,Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(e){let t=((e=document)=>e.activeElement)(),r=null!=t&&EP(t);i.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||Ej(this,r)}}),a=yO(ba(document,"touchstart",t=>{let n=bu(t);e=_k(n)?n:_j(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}),ba(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}),ba(document,"blur",e=>{let t=bu(e),r=e.relatedTarget;if(r&&EP(r))r.focus({preventScroll:!0}),Ej(r,EP(t));else if(!r){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),a(),n.remove(),Reflect.defineProperty(HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:i})}):yO((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?bs(document.documentElement,"scrollbar-gutter","stable"):bs(document.documentElement,"padding-right",`${s}px`)),bs(document.documentElement,"overflow","hidden"))),()=>{0==--Ek&&c()}}},[t])}({isDisabled:i||!t.isOpen}),(0,pj.useEffect)(()=>{if(t.isOpen&&n.current)if(i){var e,r,a=o?.current??n.current;let t=Er[Er.length-1];return t&&!t.visibleNodes.has(a)?(t.visibleNodes.add(a),()=>{t.visibleNodes.delete(a)}):void 0}else{let t,i,a,s,l,u,c,d,p,f,h;return e=[o?.current??n.current],i=(r={shouldUseInert:!0})instanceof(t=bo(e?.[0])).Element?{root:r}:r,a=i?.root??document.body,s=i?.shouldUseInert&&Ee,l=new Set(e),u=new Set,c=(e,r)=>{s&&e instanceof t.HTMLElement?e.inert=r:r?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(bl(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},r=wH(bn(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),n=t(e);if(n===NodeFilter.FILTER_ACCEPT&&p(e),n!==NodeFilter.FILTER_REJECT){let e=r.nextNode();for(;null!=e;)p(e),e=r.nextNode()}},p=e=>{let r=Et.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===r||(0===r&&c(e,!0),u.add(e),Et.set(e,r+1))},Er.length&&Er[Er.length-1].disconnect(),d(a),(f=new MutationObserver(e=>{for(let r of e)if("childList"===r.type&&r.target.isConnected&&![...l,...u].some(e=>bl(e,r.target)))for(let e of r.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(a,{childList:!0,subtree:!0}),h={visibleNodes:l,hiddenNodes:u,observe(){f.observe(a,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}},Er.push(h),()=>{for(let e of(f.disconnect(),u)){let t=Et.get(e);null!=t&&(1===t?(c(e,!1),Et.delete(e)):Et.set(e,t-1))}h===Er[Er.length-1]?(Er.pop(),Er.length&&Er[Er.length-1].observe()):Er.splice(Er.indexOf(h),1)}}},[i,t.isOpen,n,o]);let{focusWithinProps:b}=gC(e);return{popoverProps:yW(d,f,b),arrowProps:h,underlayProps:p,placement:m,triggerAnchorPoint:y}}({...o,offset:null!=(i=o.offset)?i:8,arrowRef:s,groupRef:d?u:l},e),b=o.popoverRef,g=function(e,t=!0){let[r,n]=(0,pj.useState)(!0),o=r&&t;return yP(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,o]),EM(e,o,(0,pj.useCallback)(()=>n(!1),[])),o}(b,!!m)||o.isEntering||!1,v=yK({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:m,isEntering:g,isExiting:t}}),w=!o.isNonModal||"SubmenuTrigger"===o.trigger,[x,E]=(0,pj.useState)(!1);yP(()=>{b.current&&E(w&&!b.current.querySelector("[role=dialog]"))},[b,w]),(0,pj.useEffect)(()=>{x&&("SubmenuTrigger"!==o.trigger||"pointer"!==EN)&&b.current&&!bd(b.current)&&function(e){if(!e.isConnected)return;let t=bn(e);if("virtual"===EN){let r=((e=document)=>e.activeElement)(t);b4(()=>{let n=((e=document)=>e.activeElement)(t);(n===r||n===t.body)&&e.isConnected&&bt(e)})}else bt(e)}(b.current)},[x,b,o.trigger]);let S=(0,pj.useMemo)(()=>{let e=v.children;if(n)for(let t of n)e=pT().createElement(t.Provider,{value:null},e);return e},[v.children,n]),D={...p.style,"--trigger-anchor-point":y?`${y.x}px ${y.y}px`:void 0,...v.style},O=pT().createElement(yQ.div,{...yW(be(o,{global:!0}),p),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:b,slot:o.slot||void 0,style:D,dir:o.dir,"data-trigger":o.trigger,"data-placement":m,"data-entering":g||void 0,"data-exiting":t||void 0},!o.isNonModal&&pT().createElement(EA,{onDismiss:e.close}),pT().createElement(x7.Provider,{value:{...h,placement:m,ref:s}},S),pT().createElement(EA,{onDismiss:e.close}));return d?pT().createElement(xY,{...o,shouldContainFocus:x,isExiting:t,portalContainer:null!=(a=null!=r?r:null==u?void 0:u.current)?a:void 0},O):pT().createElement(xY,{...o,shouldContainFocus:x,isExiting:t,portalContainer:r},!o.isNonModal&&e.isOpen&&pT().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),pT().createElement("div",{ref:l,style:{display:"contents"}},pT().createElement(EY.Provider,{value:l},O)))}function EQ(e){return e?.start!=null&&null!=e.end}let E0=(0,pj.createContext)(null),E1=(0,pj.createContext)(null),E4=(0,pj.createContext)(null),E2=(0,pj.createContext)(null),E3=[wV,g$,x8,gV],E6=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,E0);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=Eq(e),[r,n]=wE(e.value,e.defaultValue||null,e.onChange),[o]=(0,pj.useState)(r),i=r||e.placeholderValue||null,[a,s]=xT(i,e.granularity),l=null!=r?r.toDate(s??"UTC"):null,u="hour"===a||"minute"===a||"second"===a,c=e.shouldCloseOnSelect??!0,[d,p]=(0,pj.useState)(null),[f,h]=(0,pj.useState)(null);if(r&&(d=r,"hour"in r&&(f=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,pj.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:b,maxValue:g,isDateUnavailable:v}=e,w=(0,pj.useMemo)(()=>xD(r,b,g,v,y),[r,b,g,v,y]),x=xg({...e,value:r,builtinValidation:w}),E=x.displayValidation.isInvalid,S=e.validationState||(E?"invalid":null),D=(e,t)=>{n("timeZone"in t?t.set(v3(e)):v6(e,t)),p(null),h(null),x.commitValidation()};return{...x,value:r,defaultValue:e.defaultValue??o,setValue:n,dateValue:d,timeValue:f,setDateValue:r=>{let o="function"==typeof c?c():c;u?f||o?D(r,f||xk(e.defaultValue||e.placeholderValue)):p(r):(n(r),x.commitValidation()),o&&t.setOpen(!1)},setTimeValue:e=>{d&&e?D(d,e):h(e)},granularity:a,hasTime:u,...t,setOpen(n){!n&&!r&&d&&u&&D(d,f||xk(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:S,isInvalid:E,formatValue:(e,t)=>l?new g7(e,xC(t,y)).format(l):"",getDateFormatter:(e,t)=>new g7(e,xC({},{...y,...t}))}}({...e,validationBehavior:i}),s=(0,pj.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:p,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:y,errorMessageProps:b,...g}=function(e,t,r){var n;let o=yB(),i=yB(),a=yB(),s=vh((n=xr)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:p,descriptionProps:f,errorMessageProps:h}=xi({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),m=xn(t,r),y=p["aria-labelledby"]||p.id,{locale:b}=g4(),g=t.formatValue(b,{month:"long"}),v=_I(g?s.format("selectedDateDescription",{date:g}):""),w=[v["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=be(e),E=(0,pj.useMemo)(()=>w8(r),[r]),S=(0,pj.useRef)(!1),{focusWithinProps:D}=gC({...e,isDisabled:t.isOpen,onBlurWithin:t=>{bl(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:yW(x,m,p,v,D,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":y,"aria-describedby":w,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...d,onClick:()=>{E.focusFirst()}},fieldProps:{...p,id:a,[xu]:"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,[xb]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${y}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${o} ${y}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...yY(e),label:u,validationBehavior:i},a,s),[v,w]=(0,pj.useState)(null),x=(0,pj.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);Ex({ref:s,onResize:x});let{focusProps:E,isFocused:S,isFocusVisible:D}=gk({within:!0}),O=yK({...e,values:{state:a,isFocusWithin:S,isFocusVisible:D,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DatePicker"}),P=be(e,{global:!0});return delete P.id,pT().createElement(yH,{values:[[E4,a],[wV,{...c,ref:s,isInvalid:a.isInvalid}],[xV,p],[g$,{...f,isPressed:a.isOpen}],[x8,{...d,ref:l,elementType:"span"}],[wk,m],[xX,a],[EZ,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v},clearContexts:E3}],[xJ,h],[gV,{slots:{description:y,errorMessage:b}}],[x0,g]]},pT().createElement(yQ.div,{...yW(P,O,E),ref:t,slot:e.slot||void 0,"data-focus-within":S||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":D||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":a.isOpen||void 0}),pT().createElement(x5,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:a}))}),E5=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,E1);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",a=function(e){let t=Eq(e),[r,n]=wE(e.value,e.defaultValue||null,e.onChange),[o]=(0,pj.useState)(r),[i,a]=(0,pj.useState)(()=>r||{start:null,end:null});null==r&&i.start&&i.end&&a(i={start:null,end:null});let s=r||i,l=e=>{a(s=e||{start:null,end:null}),EQ(s)?n(s):n(null)},[u,c]=xT(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,p=e.shouldCloseOnSelect??!0,[f,h]=(0,pj.useState)(null),[m,y]=(0,pj.useState)(null);s&&EQ(s)&&(f=s,"hour"in s.start&&(m=s));let b=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(v3(e.start)):v6(e.start,t.start),end:"timeZone"in t.end?t.end.set(v3(e.end)):v6(e.end,t.end)}),h(null),y(null),P.commitValidation()},g=r=>{let n="function"==typeof p?p():p;d?EQ(r)&&(n||m?.start&&m?.end)?b(r,{start:m?.start||xk(e.placeholderValue),end:m?.end||xk(e.placeholderValue)}):h(r):EQ(r)?(l(r),P.commitValidation()):h(r),n&&t.setOpen(!1)},v=e=>{EQ(f)&&EQ(e)?b(f,e):y(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,pj.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:E,maxValue:S,isDateUnavailable:D}=e,O=(0,pj.useMemo)(()=>{var e,t;let r;return e=s,t=D?e=>D(e,null):void 0,r=xx(xD(e?.start??null,E,S,t,x),xD(e?.end??null,E,S,t,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(r=xx(r,{isInvalid:!0,validationErrors:[(vl.getGlobalDictionaryForPackage("@react-stately/datepicker")||xE).getStringForLocale("rangeReversed",xS())],validationDetails:{...xf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),r},[s,E,S,D,x]),P=xg({...e,value:r,name:(0,pj.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:O}),C=P.displayValidation.isInvalid,k=e.validationState||(C?"invalid":null);return{...P,value:s,defaultValue:e.defaultValue??o,setValue:l,dateRange:f,timeRange:m,granularity:u,hasTime:d,setDate(e,t){"start"===e?g({start:t,end:f?.end??null}):g({start:f?.start??null,end:t})},setTime(e,t){"start"===e?v({start:t,end:m?.end??null}):v({start:m?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:g,setTimeRange:v,...t,setOpen(r){!r&&!(s?.start&&s?.end)&&EQ(f)&&d&&b(f,{start:m?.start||xk(e.placeholderValue),end:m?.end||xk(e.placeholderValue)}),t.setOpen(r)},validationState:k,isInvalid:C,formatValue(t,r){let n;if(!s||!s.start||!s.end)return null;let o="timeZone"in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),a="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=xC(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"),p=new g7(t,u);if(o===a&&i===l&&0!==s.start.compare(s.end)){try{let e=p.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=p}else n=new g7(t,xC(r,{granularity:l,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:p.format(c),end:n.format(d)}},getDateFormatter:(e,t)=>new g7(e,xC({},{...x,...t}))}}({...e,validationBehavior:i}),s=(0,pj.useRef)(null),[l,u]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:p,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:y,descriptionProps:b,errorMessageProps:g,...v}=function(e,t,r){var n;let o=vh((n=xr)&&n.__esModule?n.default:n,"@react-aria/datepicker"),{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=xi({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),p=u["aria-labelledby"]||u.id,{locale:f}=g4(),h=t.formatValue(f,{month:"long"}),m=_I(h?o.format("selectedRangeDescription",{startDate:h.start,endDate:h.end}):""),y={"aria-label":o.format("startDate"),"aria-labelledby":p},b={"aria-label":o.format("endDate"),"aria-labelledby":p},g=yB(),v=yB(),w=xn(t,r),x=[m["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,E=(0,pj.useMemo)(()=>w8(r,{accept:e=>e.id!==g}),[r,g]),S={[xc]:E,[xu]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},D=be(e),O=(0,pj.useRef)(!1),{focusWithinProps:P}=gC({...e,isDisabled:t.isOpen,onBlurWithin:t=>{bl(document.getElementById(v),t.relatedTarget)||(O.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{O.current||(O.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,pj.useRef)(xm),k=(0,pj.useRef)(xm);return{groupProps:yW(D,w,u,m,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(r){!t.isOpen&&e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){!t.isOpen&&e.onKeyUp&&e.onKeyUp(r)}}),labelProps:{...l,onClick:()=>{E.focusFirst()}},buttonProps:{...m,id:g,"aria-haspopup":"dialog","aria-label":o.format("calendar"),"aria-labelledby":`${g} ${p}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${g} ${p}`},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,[xb]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(xx(e,k.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...b,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[xb]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){k.current=e,t.updateValidation(xx(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:s}}({...yY(e),label:u,validationBehavior:i},a,s),[w,x]=(0,pj.useState)(null),E=(0,pj.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);Ex({ref:s,onResize:E});let{focusProps:S,isFocused:D,isFocusVisible:O}=gk({within:!0}),P=yK({...e,values:{state:a,isFocusWithin:D,isFocusVisible:O,isDisabled:e.isDisabled||!1,isInvalid:a.isInvalid,isOpen:a.isOpen,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-DateRangePicker"}),C=be(e,{global:!0});return delete C.id,pT().createElement(yH,{values:[[E2,a],[wV,{...c,ref:s,isInvalid:a.isInvalid}],[g$,{...h,isPressed:a.isOpen}],[x8,{...d,ref:l,elementType:"span"}],[wj,y],[xX,a],[EZ,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w},clearContexts:E3}],[xJ,m],[xV,{slots:{start:p,end:f}}],[gV,{slots:{description:b,errorMessage:g}}],[x0,v]]},pT().createElement(yQ.div,{...yW(C,P,S),ref:t,slot:e.slot||void 0,"data-focus-within":D||void 0,"data-invalid":a.isInvalid||void 0,"data-focus-visible":O||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-open":a.isOpen||void 0}))});function E8(e){return pT().createElement(g1,e)}function E9(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 vK||e instanceof vq||e instanceof vZ)return t?v5(e,t):e;{let r=hu()(e).toDate(),n=new vK(r.getFullYear(),r.getMonth()+1,r.getDate());return t?v5(n,t):n}}function E7(e){if(e)return e.toDate(_u())}function Se(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function St(e){let t=e??"",r=Se(t);if(!r)return t;try{return new Intl.DisplayNames([r],{type:"language"}).of(r)??t}catch{return t}}function Sr(){let e=window.i18next.language,t=Se(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;ep=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ep=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Sn=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(ep||"en-US"),So=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},Si={};for(let e=0;e<100;e++)Si[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var Sa={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},Ss="[1234567890一二三四五六七八九〇\\d]",Sl={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},Su={},Sc={"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},Sd={zone:Sc,year:Si,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:{}},Sp={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(Sc).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,}"},Sf={...Sp,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}"},Sh={},Sm=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=Sn){return Sh[t.toLowerCase()]||(Sh[t.toLowerCase()]=new e(t)),Sh[t.toLowerCase()]}constructor(e=Sn){this.locale=e,this.lookups={...Sd},this.vars={...Sp};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=Sl: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(Su[e])return Su[e];if("fullwide"===e||"hanidec"===e)return{group:Ss,lookup:{...Sl}};let t=Sa[e];if(!t)return{group:"\\d",lookup:{...Sl}};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 Su[e]={group:`[${r}-${n}]`,lookup:o},Su[e]}(this.numberingSystem);for(let r in this.lookups.digit=t,Sf)Sf.hasOwnProperty(r)&&(this.vars[r]=Sf[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")}},Sy=["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"],Sb={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},Sg=()=>new Date;function Sv(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 S_=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)}},Sw=["year","month","day","hour","minute","second","millisecond","offset"],Sx={};function SE(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 SS=[[/([^\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"]],SD={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," "],...SS],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:SS,id:SS,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function SO(e,t=Sn){let r=function(e){if(!Sx[e]){var t,r;let n,o,i=Sm.factory(e);Sx[e]=new S_({doneChecker:SE,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:Sv(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:i.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Sv(["","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:Sv(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:i.compile(`^(${Ss}{2,4})\\s*\u5E74\\s*(${Ss}{1,2})\\s*\u6708\\s*(${Ss}{1,2})\\s*\u65E5$`),handler:Sv(["","year","month","day"])},{name:"korean",regex:i.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Sv(["","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:Sv(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=Sg(),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?Sb[r]:(r=r.replace(/s$/,"")).toLowerCase())&&(r="day",t*=7),("-"===e||n)&&(t*=-1);let o=Sg();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:Sv(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Sv(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:Sv(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:i.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","minute","second","meridiem"])},{name:"hms24",regex:i.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Sv(["","hour","minute","second","millisecond"])},{name:"hm12",regex:i.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","minute","meridiem"])},{name:"hm24",regex:i.compile("(_H24_):(_MIN_)"),handler:Sv(["","hour","minute"])},{name:"h12",regex:i.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Sv(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Sv(["","year","month","day"])},{name:"yearMonthnameDay",regex:i.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Sv(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:i.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Sv(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:i.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Sv(["","monthname","day","","year"])},{name:"dayMonthname",regex:i.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Sv(["","day","","monthname"])},{name:"monthnameDay",regex:i.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Sv(["","monthname","day"])},{name:"hmsNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Sv(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:i.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Sv(["","hour","minute"])},{name:"ymd",regex:i.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:Sv(["","year","","month","day"])},{name:"mdy",regex:i.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Sv(["","month","","day","year"])},{name:"dmy",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Sv(["","day","month","year"])},{name:"yearLoose",regex:i.compile("_YEAR4_"),handler:Sv(["year"])},{name:"dayMonthnameLoose",regex:i.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Sv(["","day","monthname"])},{name:"monthnameDayLoose",regex:i.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Sv(["","monthname","day"])},{name:"monthname",regex:i.compile("_MONTHNAME_"),handler:Sv(["monthname"])},{name:"year4",regex:i.compile("_YEAR4_"),handler:Sv(["year"])},{name:"md",regex:i.compile("(_MONTH_)[/-](_DAY_)"),handler:Sv(["","month","day"])},{name:"dm",regex:i.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Sv(["","day","month"])},{name:"day",regex:i.compile("_DAY_"),handler:Sv(["day"])},{name:"year2",regex:i.compile("_YEAR2_"),handler:Sv(["year"])},{name:"onlyZone",regex:i.compile("_ZONE_"),handler:Sv(["zone"])},{name:"onlyOffset",regex:i.compile("_OFFSET_"),handler:Sv(["offset"])}],o=i.baseName.slice(0,5),Sy.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(Sw.includes(n)){let e=r.toInt(o);"number"==typeof e&&(t[n]=e)}return t.year<100&&(t.year=Si[e.year]),t.year&&"buddhist"===r.dateOptions.calendar&&(t.year-=543),t})})}return Sx[e]}(t),n=function(e,t){let r=SD[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 SP(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new So(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 So(t.valueOf()-60*e.offset*1e3):t}function SC(e,t=Sn){let r=SO(e,t),n=r.invalid?new So(NaN):SP(r);return n.isValid()||(n.invalid=`Unable to parse date "${e}"`),n}function Sk(e,t=Sn){return e instanceof Date?new So(e.valueOf()):"number"==typeof e?new So(e):SC(e,t)}Date.fromString=So.fromString=SC,Date.fromAny=So.fromAny=Sk,"u">typeof window&&(window.anyDateParser={fromString:SC,fromAny:Sk,fromObject:SP,attempt:SO});var Sj=r(5238),ST=r(3826);let SR=function(e){return null==e};function SA(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}hl.extend(hc),hl.extend(ST),hl.extend(Sj);let SM="YYYY-MM-DDTHH:mm:ss.SSSZZ";function SN(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&hl(e,SM).isValid()}function SI(e){return hl(e).isToday()}function S$(e){return SN(e)?hl(e,SM).toDate():null}function SL(e,t=!1){let r=hl(e);return t&&(r=r.utc()),r.format(SM)}function SF(e){return hl(e).toDate()}var SB=new WeakMap;let SV=new class{register(e,t){SA(this,SB).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(SA(this,SB).has(t))return SA(this,SB).get(t)}if(e.language&&SA(this,SB).has(e.language))return SA(this,SB).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return SA(this,SB).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,SB,{writable:!0,value:new Map})}};function SU(e,t){SV.register(e,t)}function SW(e){let t=e??Sr();return SV.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let Sz={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function SH(e,t={}){let r=SO(e,Sr());if(r.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!SR(r.day)&&SR(r.month)&&(r=Object.assign({},n_(r,"day"),{month:r.day})),r.month&&(r.month-=1),r.day&&(r=Object.assign({},n_(r,"day"),{date:r.day}));let n=hl().set(r).toDate();return SR(r.year)&&(t.year=!1),SR(r.month)&&(t.month=!1),SR(r.date)&&(t.day=!1),SK(n,t)}function SK(e,t){let r,n=t?.locale??Sr(),o=new Intl.Locale(n),{calendar:i,mode:a,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:p}={...Sz,...{noToday:"am"===o.language},...t},f={calendar:i??SW(o),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:p},h=hl(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,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==a&&c&&l&&(t=t.map(SG("-"))),"wide"==a&&(t=t.map(SG(" — "))),"ethiopic"===f.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+=`, ${Sq(e)}`),r}let SG=e=>(t,r,n)=>"literal"!==t.type||" "!==t.value||r<n.length-1&&"era"===n[r+1].type?t:{type:"literal",value:e};function Sq(e){return e.toLocaleTimeString(Sr(),{hour:"2-digit",minute:"2-digit"})}function SZ(e,t){return SK(e,{...t,time:!0})}function SY(e,t){let r=SW("string"==typeof t?new Intl.Locale(t):t);return r?v5(e,wh(r)):e}function SJ(e,t){return new Intl.DurationFormat(Sr(),t).format(e)}function SX(e,t){if(null==e)return null;if("string"==typeof e){let r=SO(e,Sr());return r.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(r.day&&!r.month&&(r={...n_(r,"day"),...{month:r.day}}),r.month&&(r.month-=1),r.day&&(r={...n_(r,"day"),...{date:r.day}}),hl(t).set(r))}return hl(e)}let SQ=["years","months","days","hours","minutes","seconds"],S0={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},S1={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function S4(e,t=hl(),r){let n,o=hl(t),i=SX(e,o);if(null==i)return null;if("string"==typeof r){let e=S0[r]??r;return{[e]:o.diff(i,e)}}let{thresholds:a,largestUnit:s,smallestUnit:l}=r??{};if(void 0!==s||void 0!==l){let e,t=l?S0[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,r){let n=SQ.indexOf(r);for(let o=0;o<SQ.length;o++){let i=SQ[o];if(t.diff(e,i)>0)return o<=n?i:r}return r}(i,o,t??"seconds"):S0[s]??s,function(e,t,r,n){let o=SQ.indexOf(r),i=SQ.indexOf(n),a=SQ.slice(o,i+1),s={},l=e;for(let e of a){let r=t.diff(l,e);s[e]=r,l=l.add(r,e)}return s}(i,o,e,t??e)}let u=(n=function(e){let t={...S1};if(e)for(let[r,n]of Object.entries(e))void 0!==n&&(t[S0[r]??r]=n);return t}(a),o.diff(i,"seconds")<n.seconds?"seconds":o.diff(i,"minutes")<n.minutes?"minutes":o.diff(i,"hours")<n.hours?"hours":o.diff(i,"days")<n.days?"days":o.diff(i,"months")<n.months?"months":"years");return{[u]:o.diff(i,u)}}let S2={style:"short",localeMatcher:"lookup"};function S3(e,t=hl(),r){let n=S4(e,t,r);return null==n?null:SJ(n,"object"==typeof r&&r.formatOptions?{...S2,...r.formatOptions}:S2)}let S6=(0,pj.createContext)(null);function S5(){let e=fC({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,pj.useMemo)(()=>{let t=Sr();return e[t]&&(t=e[t]),t},[window.i18next.language]),r=(0,pj.useMemo)(()=>{let e=SW(t);return void 0!==e?wh(e):void 0},[t]),n=(0,pj.useMemo)(()=>new Intl.Locale(t,{calendar:r?.identifier}),[t,r]),o=(0,pj.useMemo)(()=>r?v5(_i(_u()),r):_i(_u()),[r]);return{calendar:r,intlLocale:n,today_:o}}let S8=new vK(1793,1,1);var S9={};function S7(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function De(e={}){let{locale:t}=g4();return(0,pj.useMemo)(()=>new(0,xI.K)(t,e),[t,e])}S9={"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 Dt={};Dt={"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 Dr=()=>{};function Dn(e){var t;let r=(0,pj.useRef)(void 0),{value:n,textValue:o,minValue:i,maxValue:a,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:p,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,y=vh((t=Dt)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),b=(0,pj.useRef)(!1),g=(0,pj.useCallback)(()=>{clearTimeout(r.current),b.current=!1},[]),v=gf(()=>{g()});(0,pj.useEffect)(()=>()=>v(),[]);let{keyboardProps:w}=gt({isDisabled:s||l,shortcuts:{PageUp:()=>d?void d():!!c&&void c(),ArrowUp:()=>!!c&&void c(),PageDown:()=>f?void f():!!p&&void p(),ArrowDown:()=>!!p&&void p(),Home:()=>!!h&&void h(),End:()=>!!m&&void m()},allowRepeats:!0}),x=(0,pj.useRef)(!1),E=()=>{x.current=!0},S=()=>{x.current=!1},D=""===o?y.format("Empty"):(o||`${n}`).replace("-","−");(0,pj.useEffect)(()=>{x.current&&(g2&&g2.clear("assertive"),g3(D,"assertive"))},[D]);let O=(0,pj.useCallback)(()=>{g()},[g]),P=gf(c??Dr),C=gf(p??Dr),k=gf(()=>{(void 0===a||isNaN(a)||void 0===n||isNaN(n)||n<a)&&(P(),j(60))}),j=gf(e=>{v(),b.current=!0,r.current=window.setTimeout(k,e)}),T=gf(()=>{(void 0===i||isNaN(i)||void 0===n||isNaN(n)||n>i)&&(C(),R(60))}),R=gf(e=>{v(),b.current=!0,r.current=window.setTimeout(T,e)}),A=e=>{e.preventDefault()},{addGlobalListener:M,removeAllGlobalListeners:N}=gh(),I=(0,pj.useRef)(!1),[$,L]=(0,pj.useState)(null);(0,pj.useEffect)(()=>{"touch"===$?j(600):$?j(400):$||v()},[$]);let[F,B]=(0,pj.useState)(null);return(0,pj.useEffect)(()=>{"touch"===F?R(600):F?R(400):F||v()},[F]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===n||isNaN(n)?void 0:n,"aria-valuetext":D,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,...w,onFocus:E,onBlur:S},incrementButtonProps:{onPressStart:e=>{g(),"touch"!==e.pointerType?(c?.(),L("mouse")):(M(window,"pointercancel",O,{capture:!0}),I.current=!1,L("touch")),M(window,"contextmenu",A)},onPressUp:e=>{g(),"touch"===e.pointerType&&(I.current=!0),N(),L(null)},onPressEnd:e=>{g(),"touch"===e.pointerType&&!b.current&&I.current&&c?.(),I.current=!1,L(null)},onFocus:E,onBlur:S},decrementButtonProps:{onPressStart:e=>{g(),"touch"!==e.pointerType?(p?.(),B("mouse")):(M(window,"pointercancel",O,{capture:!0}),I.current=!1,B("touch"))},onPressUp:e=>{g(),"touch"===e.pointerType&&(I.current=!0),N(),B(null)},onPressEnd:e=>{g(),"touch"===e.pointerType&&!b.current&&I.current&&p?.(),I.current=!1,B(null)},onFocus:E,onBlur:S}}}let Do=null;var Di=r(6284);function Da(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 Ds=(0,pj.createContext)(null),Dl=(0,pj.createContext)(null),Du=(0,pj.forwardRef)(function(e,t){var r,n;[e,t]=yq(e,t,Ds);let{validationBehavior:o}=yG(x2)||{},i=null!=(n=null!=(r=e.validationBehavior)?r:o)?n:"native",{locale:a}=g4(),s=function(e){let{minValue:t,maxValue:r,step:n,formatOptions:o,value:i,defaultValue:a=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===i&&(i=NaN);let p=(0,pj.useCallback)(e=>void 0===n||isNaN(n)?En(e,t,r):Ei(e,t,r,n),[n,t,r]);void 0===i||isNaN(i)||"snap"!==d||(i=p(i)),isNaN(a)||"snap"!==d||(a=p(a));let[f,h]=wE(i,isNaN(a)?NaN:a,s),[m]=(0,pj.useState)(f),[y,b]=(0,pj.useState)(()=>isNaN(f)?"":new(0,xI.K)(l,o).format(f)),g=(0,pj.useMemo)(()=>new(0,Di.d)(l,o),[l,o]),v=(0,pj.useMemo)(()=>g.getNumberingSystem(y),[g,y]),w=(0,pj.useMemo)(()=>new(0,xI.K)(l,{...o,numberingSystem:v}),[l,o,v]),x=(0,pj.useMemo)(()=>w.resolvedOptions(),[w]),E=(0,pj.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),S=xg({...e,value:f}),D=void 0===n||isNaN(n)?1:n;"percent"===x.style&&(void 0===n||isNaN(n))&&(D=.01);let[O,P]=(0,pj.useState)(f),[C,k]=(0,pj.useState)(l),[j,T]=(0,pj.useState)(o);Object.is(f,O)&&l===C&&function(e,t){if(e===t)return!0;if(!e||!t)return!1;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}(o,j)||(b(E(f)),P(f),k(l),T(o));let R=(0,pj.useMemo)(()=>g.parse(y),[g,y]),A=(e,n=0)=>{if(isNaN(R))return Ei(isNaN(n)?0:n,t,r,D);{let n=Ei(R,t,r,D);return"+"===e&&n>R||"-"===e&&n<R?n:Ei(Da(e,R,D),t,r,D)}},M=(0,pj.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===r||isNaN(r)||Ei(R,t,r,D)>R||Da("+",R,D)<=r),[u,c,t,r,D,R]),N=(0,pj.useMemo)(()=>!u&&!c&&(isNaN(R)||void 0===t||isNaN(t)||Ei(R,t,r,D)<R||Da("-",R,D)>=t),[u,c,t,r,D,R]);return{...S,validate:e=>g.isValidPartialNumber(e,t,r),increment:()=>{let e=A("+",t);e===f&&b(E(e)),h(e),S.commitValidation()},incrementToMax:()=>{null!=r&&(h(Ei(r,t,r,D)),S.commitValidation())},decrement:()=>{let e=A("-",r);e===f&&b(E(e)),h(e),S.commitValidation()},decrementToMin:()=>{null!=t&&(h(t),S.commitValidation())},canIncrement:M,canDecrement:N,minValue:t,maxValue:r,numberValue:R,defaultNumberValue:isNaN(a)?m:a,setNumberValue:h,setInputValue:b,inputValue:y,commit:e=>{let t=void 0===e?y:e,r=R;if(void 0!==e&&(r=g.parse(t)),!t.length){h(NaN),b(void 0===i?"":E(f));return}if(isNaN(r))return void b(E(f));let n="snap"===d?p(r):r,o=(n=g.parse(E(n)))!==f;h(n),b(E(void 0===i?n:f)),o&&S.commitValidation()}}}({...e,locale:a,validationBehavior:i}),l=(0,pj.useRef)(null),[u,c]=yZ(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:p,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:y,errorMessageProps:b,...g}=function(e,t,r){var n,o,i,a,s,l,u,c,d;let p,{id:f,decrementAriaLabel:h,incrementAriaLabel:m,isDisabled:y,isReadOnly:b,isRequired:g,minValue:v,maxValue:w,autoFocus:x,label:E,formatOptions:S,onBlur:D=()=>{},onFocus:O,onFocusChange:P,onKeyDown:C,onKeyUp:k,description:j,errorMessage:T,isWheelDisabled:R,...A}=e,{increment:M,incrementToMax:N,decrement:I,decrementToMin:$,numberValue:L,inputValue:F,commit:B,commitValidation:V}=t,U=vh((n=S9)&&n.__esModule?n.default:n,"@react-aria/numberfield"),W=(0,pj.useCallback)(()=>{let e=r.current?.value??"";(0,gm.flushSync)(()=>{B()}),r.current?.value!==e&&g3(r.current?.value??"","assertive")},[B,r]),z=yB(f),{focusProps:H}=b3({onBlur(){W()}}),K=De(S),G=(0,pj.useMemo)(()=>K.resolvedOptions(),[K]),q=De({...S,currencySign:void 0}),Z=(0,pj.useMemo)(()=>isNaN(L)?"":q.format(L),[q,L]),{spinButtonProps:Y,incrementButtonProps:J,decrementButtonProps:X}=Dn({isDisabled:y,isReadOnly:b,isRequired:g,maxValue:w,minValue:v,onIncrement:M,onIncrementToMax:N,onDecrement:I,onDecrementToMin:$,value:L,textValue:Z}),[Q,ee]=(0,pj.useState)(!1),{focusWithinProps:et}=gC({isDisabled:y,onFocusWithinChange:ee});!function(e,t){let{onScroll:r,isDisabled:n}=e,o=(0,pj.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),r&&r({deltaX:e.deltaX,deltaY:e.deltaY}))},[r]);_C(t,"wheel",n?void 0:o)}({onScroll:(0,pj.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?M():e.deltaY<0&&I())},[I,M]),isDisabled:R||y||b||!Q},r);let er=(G.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,eo="numeric";bC()?en?eo="text":er&&(eo="decimal"):bA()&&(en?eo="numeric":er&&(eo="decimal"));let ei=be(e),{keyboardProps:ea}=gt({isDisabled:y||b,shortcuts:{Enter:()=>((0,gm.flushSync)(()=>{B()}),V(),{shouldPreventDefault:!1})},onKeyDown:C,onKeyUp:k}),{isInvalid:es,validationErrors:el,validationDetails:eu}=t.displayValidation,{labelProps:ec,inputProps:ed,descriptionProps:ep,errorMessageProps:ef}=function(e,t,r){let n=gf(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,pj.useEffect)(()=>{if(!S7()||!r.current)return;let e=r.current;return e.addEventListener("beforeinput",n,!1),()=>{e.removeEventListener("beforeinput",n,!1)}},[r]);let o=S7()?null:e=>{let r=bu(e).value.slice(0,bu(e).selectionStart)+e.data+bu(e).value.slice(bu(e).selectionEnd);t.validate(r)||e.preventDefault()},{labelProps:i,inputProps:a,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:a="text",validationBehavior:s="aria"}=e,[l,u]=wE(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=go(e,t),d=xg({...e,value:l}),{isInvalid:p,validationErrors:f,validationDetails:h}=d.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:b,errorMessageProps:g}=xi({...e,isInvalid:p,errorMessage:e.errorMessage||f}),v=be(e,{labelable:!0}),w={type:a,pattern:e.pattern},[x]=(0,pj.useState)(l);return xa(t,e.defaultValue??x,u),xs(e,d,t),{labelProps:m,inputProps:yW(v,"input"===r?w:void 0,{disabled:n,readOnly:i,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(bu(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(pT().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:b,errorMessageProps:g,isInvalid:p,validationErrors:f,validationDetails:h}}(e,r),c=(0,pj.useRef)(null);return{inputProps:yW(a,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:n}=r.current;c.current={value:e,selectionStart:t,selectionEnd:n}},onCompositionEnd(){if(r.current&&!t.validate(r.current.value)){let{value:e,selectionStart:n,selectionEnd:o}=c.current;r.current.value=e,r.current.setSelectionRange(n,o),t.setInputValue(e)}}}),labelProps:i,descriptionProps:s,errorMessageProps:l,...u}}({...A,...ei,name:void 0,form:void 0,label:E,autoFocus:x,isDisabled:y,isReadOnly:b,isRequired:g,validate:void 0,[xb]:t,value:F,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:z,type:"text",inputMode:eo,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:D,onFocus:O,onFocusChange:P,onPaste:t=>{e.onPaste?.(t);let r=bu(t);r&&(r.selectionEnd??-1)-(r.selectionStart??0)===r.value.length&&(t.preventDefault(),B(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:j,errorMessage:T},t,r),eh=yW(ea,ed);xa(r,t.defaultNumberValue,t.setNumberValue),o=t,i=e.validationBehavior,a=e.commitBehavior,s=r,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,yP(()=>{let e=s.current;if("validate"!==a||o.realtimeValidation.isInvalid||!e||e.disabled||(!Do&&"u">typeof document&&((Do=document.createElement("input")).type="number"),!Do))return;Do.min=null==l||isNaN(l)?"":String(l),Do.max=null==u||isNaN(u)?"":String(u),Do.step=null==c||isNaN(c)?"":String(c),Do.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&Do.validity.valid,r=e.validationMessage||Do.validationMessage,n={isInvalid:!t,validationErrors:r?[r]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:Do.validity.rangeOverflow,rangeUnderflow:Do.validity.rangeUnderflow,stepMismatch:Do.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||Do.validity.valid||e.setCustomValidity(Do.validationMessage)});let em=yW(Y,H,eh,{role:null,"aria-roledescription":bj()?null:U.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(em["aria-required"]=void 0);let ey=e=>{((e=document)=>e.activeElement)()!==r.current&&("mouse"===e.pointerType?r.current?.focus():e.target.focus())},eb=e["aria-label"]||("string"==typeof e.label?e.label:"");eb||(p=null!=e.label?ec.id:e["aria-labelledby"]);let eg=yB(),ev=yB(),e_=yW(J,{"aria-label":m||U.format("increase",{fieldLabel:eb}).trim(),id:p&&!m?eg:null,"aria-labelledby":p&&!m?`${eg} ${p}`:null,"aria-controls":z,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ey}),ew=yW(X,{"aria-label":h||U.format("decrease",{fieldLabel:eb}).trim(),id:p&&!h?ev:null,"aria-labelledby":p&&!h?`${ev} ${p}`:null,"aria-controls":z,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ey});return{groupProps:{...et,role:"group","aria-disabled":y,"aria-invalid":es?"true":void 0},labelProps:ec,inputProps:em,incrementButtonProps:e_,decrementButtonProps:ew,errorMessageProps:ef,descriptionProps:ep,isInvalid:es,validationErrors:el,validationDetails:eu}}({...yY(e),label:c,validationBehavior:i},s,l),v=yK({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:g.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=be(e,{global:!0});return delete w.id,pT().createElement(yH,{values:[[Dl,s],[wV,p],[wW,{...f,ref:l}],[x8,{...d,ref:u}],[g$,{slots:{increment:h,decrement:m}}],[gV,{slots:{description:y,errorMessage:b}}],[x0,g]]},pT().createElement(yQ.div,{...w,...v,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":g.isInvalid||void 0}),e.name&&pT().createElement("input",{type:"hidden",name:e.name,form:e.form,value:isNaN(s.numberValue)?"":s.numberValue,disabled:e.isDisabled||void 0}))});function Dc(e,t){return Number.parseInt(SK(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let Dd=(0,pj.forwardRef)(function(e,t){let{className:r}=e,n=(0,pj.useContext)(wT),o=(0,pj.useContext)(wR),i=n??o,a=(0,pj.useContext)(S6),s=_u(),l=SK(i.visibleRange.start.toDate(s),{calendar:a.calendar,locale:a.baseName,day:!1,year:!1,noToday:!0}),u=Dc(i.visibleRange.start.toDate(s),a),c=i.maxValue?Dc(i.maxValue.toDate(s),a):void 0,d=i.minValue?Dc(i.minValue.toDate(s),a):void 0,p=(0,pj.useCallback)(e=>{i.setFocusedDate(i.focusedDate.cycle("year",e-i.focusedDate.year))},[]);return i&&(0,hk.jsxs)("span",{ref:t,className:r,children:[(0,hk.jsx)("span",{children:l}),(0,hk.jsxs)(Du,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:p,value:u,children:[(0,hk.jsx)(wz,{}),(0,hk.jsxs)(wU,{children:[(0,hk.jsx)(gL,{slot:"increment",children:(0,hk.jsx)(h9,{size:8})}),(0,hk.jsx)(gL,{slot:"decrement",children:(0,hk.jsx)(h6,{size:8})})]})]})]})}),Dp="-esm-report-builder__datepicker-module__inputGroup___8HE83",Df="-esm-report-builder__datepicker-module__inputSegment___bZPCL",Dh="-esm-report-builder__datepicker-module__dateInputWrapper___ZGn+P",Dm="-esm-report-builder__datepicker-module__invalidText___mb1DW",Dy="-esm-report-builder__datepicker-module__flatButton___DL7RZ",Db="-esm-report-builder__datepicker-module__flatButtonMd___JZlIZ",Dg="-esm-report-builder__datepicker-module__flatButtonSm___bOLZt",Dv="-esm-report-builder__datepicker-module__flatButtonLg___IQPkt";function D_({children:e}){let t=(0,pj.useContext)(E4),r=(0,pj.useContext)(E2),n=t??r,o=f8(()=>n?.close());return(0,hk.jsx)(xQ,{className:"-esm-report-builder__datepicker-module__dialog___vu+V8",ref:o,children:e})}let Dw=(0,pj.forwardRef)(function({variant:e,today_:t,minDate:r,maxDate:n},o){let i="range"===e;return(0,hk.jsx)(EJ,{ref:o,className:"-esm-report-builder__datepicker-module__popover___rJRGV",placement:"bottom start",offset:1,isNonModal:!0,children:(0,hk.jsx)(D_,{children:(0,hk.jsxs)(i?wM:wA,{...i?{minValue:r,maxValue:n,className:"cds--date-picker__calendar"}:{},children:[(0,hk.jsxs)("header",{className:"-esm-report-builder__datepicker-module__header___8V465",children:[(0,hk.jsx)(gL,{className:hT()(Dy,Db),slot:"previous",children:(0,hk.jsx)(mi,{size:16})}),(0,hk.jsx)(Dd,{className:"-esm-report-builder__datepicker-module__monthYear___kwBXn"}),(0,hk.jsx)(gL,{className:hT()(Dy,Db),slot:"next",children:(0,hk.jsx)(ma,{size:16})})]}),(0,hk.jsx)(wI,{className:"-esm-report-builder__datepicker-module__calendarGrid___Po5J8",children:e=>(0,hk.jsx)(wB,{className:hT()("cds--date-picker__day",{"-esm-report-builder__datepicker-module__today___EotRU":0===t.compare(e)}),date:e},e.toString())})]})})})}),Dx=(0,pj.forwardRef)(function(e,t){let r=(0,pj.useContext)(E4),[n,o]=yq({slot:e.slot},t,xV),{locale:i}=g4(),a=xB({...n,locale:i,createCalendar:wh}),s=(0,pj.useRef)(null),{fieldProps:l,inputProps:u}=xd({...n,inputRef:s},a,o),c=(0,pj.useCallback)(()=>{a.isDisabled||r.toggle()},[]);return(0,hk.jsxs)(yH,{values:[[xU,a],[wW,{...u,ref:s}],[wV,{...l,ref:o,isInvalid:a.isInvalid}]],children:[(0,hk.jsx)(wU,{...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,pj.cloneElement)(e.children(t),{key:r}))}),(0,hk.jsx)(wz,{})]})}),DE=(0,pj.forwardRef)(function(e,t){let r=(0,pj.useContext)(E4),n=(0,pj.useContext)(E2);return(r??n).isInvalid?(0,hk.jsx)(yf,{ref:t,size:16,...e}):(0,hk.jsx)(h3,{ref:t,size:16,...e})});class DS{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let DD=new Map,DO=(0,pj.forwardRef)(function({segment:e,...t},r){let n=(0,pj.useContext)(xU),o=yE(r),{segmentProps:i}=function(e,t,r){let n,o,i,a,s=(0,pj.useRef)(""),{locale:l,direction:u}=g4(),c=function(){var e;let{locale:t}=g4(),r=vf((e=xr)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,pj.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new DS(t,r)}},[t,r])}(),{ariaLabel:d,ariaLabelledBy:p,ariaDescribedBy:f,focusManager:h}=xl.get(t),m=e.isPlaceholder?"":e.text,y=(0,pj.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),b=vo({month:"long",timeZone:y.timeZone}),g=vo({hour:"numeric",hour12:y.hour12,timeZone:y.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=g.format(t.dateValue));else{let e=b.format(t.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=Dn({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,pj.useMemo)(()=>new(0,Di.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let r=e.text.slice(0,-1),n=w.parse(r);0===(r=0===n?"":r).length||0===n?t.clearSegment(e.type):t.setSegment(e.type,n),s.current=r}},{keyboardProps:E}=gt({shortcuts:{Backspace:()=>{x()},Delete:()=>{x()},"Mod+a":()=>{}},allowRepeats:!0}),{startsWith:S}=(n=function(e){let{locale:t}=g4(),r=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(DD.has(r))return DD.get(r);let n=new Intl.Collator(t,e);return DD.set(r,n),n}({usage:"search",sensitivity:"base"}),o=(0,pj.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,pj.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,pj.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,pj.useMemo)(()=>({startsWith:o,endsWith:i,contains:a}),[o,i,a])),D=vo({hour:"numeric",hour12:!0}),O=(0,pj.useMemo)(()=>{let e=new Date;return e.setHours(0),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),P=(0,pj.useMemo)(()=>{let e=new Date;return e.setHours(12),D.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[D]),C=vo({year:"numeric",era:"narrow",timeZone:"UTC"}),k=(0,pj.useMemo)(()=>{if("era"!==e.type)return[];let r=v5(new vK(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:C.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},[C,t.calendar,e.type]),j=r=>{if(t.isDisabled||t.isReadOnly)return;let n=s.current+r;switch(e.type){case"dayPeriod":if(S(O,r))t.setSegment("dayPeriod",0);else if(S(P,r))t.setSegment("dayPeriod",1);else break;h.focusNext();break;case"era":{let e=k.find(e=>S(e.formatted,r));e&&(t.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(n))return;let o=w.parse(n),i=o;if(void 0!==e.maxValue&&o>e.maxValue&&(i=w.parse(r)),isNaN(o))return;t.setSegment(e.type,i),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||n.length>=String(e.maxValue).length)?(s.current="",h.focusNext()):s.current=n}}};_C((0,pj.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&bl(r.current,e?.anchorNode)&&((e=document)=>e.activeElement)()===r.current&&e.collapse(r.current)});let T=(0,pj.useRef)("");_C(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&&j(n.data)}}),_C(r,"input",e=>{let{inputType:t,data:n}=e;"insertCompositionText"===t&&(r.current&&(r.current.textContent=T.current),null!=n&&(S(O,n)||S(P,n))&&j(n))}),yP(()=>{let e=r.current;return()=>{((e=document)=>e.activeElement)()===e&&(h.focusPrevious()||h.focusNext())}},[r,h]);let R=bj()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,pj.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(f=void 0);let A=yB(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,N="literal"===e.type?"":c.of(e.type),I=_x({"aria-label":`${N}${d?`, ${d}`:""}${p?", ":""}`,"aria-labelledby":p});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let $={caretColor:"transparent"};if("rtl"===u){$.unicodeBidi="embed";let t=y[e.type];("numeric"===t||"2-digit"===t)&&($.direction="ltr")}return{segmentProps:yW(v,I,{id:A,...R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCorrect:M?"off":void 0,[parseInt(pT().version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onFocus:()=>{s.current="",r.current&&_A(r.current,{containingElement:_j(r.current)});let e=window.getSelection();e?.collapse(r.current)},style:$,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,n,o),{focusProps:a,isFocused:s,isFocusVisible:l}=gk(),{hoverProps:u,isHovered:c}=gM({...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,pj.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:o}):t,l="function"==typeof r?r({...s,defaultStyle:a||{}}):r,u="function"==typeof n?n({...s,defaultChildren:i}):null==n?i:n,{className:e??o,style:l||a?{...a,...l}:void 0,children:u??i,"data-rac":""}},[t,r,n,o,i,a,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:n.isInvalid,isDisabled:n.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),p=(0,pj.useCallback)(e=>{e.stopPropagation()},[]);return(0,hk.jsx)("span",{...yW(be(t),i,a,u),...d,ref:o,style:i.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":n.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":n.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:p})}),DP={short:!1,size:"md"},DC=(0,pj.forwardRef)(function(e,t){let{className:r,defaultValue:n,isDisabled:o,invalid:i,invalidText:a,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:p,onChange:f,onChangeRaw:h,short:m,size:y,value:b,...g}={...DP,...e},{calendar:v,intlLocale:w,today_:x}=S5(),E=(0,pj.useId)(),S=!!(u??l),D=(0,pj.useMemo)(()=>E9(n,v),[n,v]),O=(0,pj.useMemo)(()=>E9(b,v,!0),[b,v]),P=(0,pj.useMemo)(()=>E9(d,v),[d,v]),C=(0,pj.useMemo)(()=>E9(p??S8,v),[p,v]),k=(0,pj.useMemo)(()=>i||s,[i,s]),j=(0,pj.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(E7(e)))),[h,f]);return(0,hk.jsx)(E8,{locale:w.toString(),children:(0,hk.jsx)("div",{className:hT()("cds--form-item",r),children:(0,hk.jsx)(yH,{values:[[S6,w]],children:(0,hk.jsxs)(E6,{className:hT()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":c}),defaultValue:D,isDisabled:o,isInvalid:k,maxValue:P,minValue:C,value:O,shouldForceLeadingZeros:"en"===w.language||void 0,...g,onChange:j,children:[(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[S&&(0,hk.jsx)(x9,{className:hT()("cds--label",{"cds--label--disabled":o}),htmlFor:E,children:u??l}),(0,hk.jsxs)(wU,{className:Dp,children:[(0,hk.jsx)(Dx,{id:S?E:void 0,ref:t,className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__inputWrapper___y+8gr",{"-esm-report-builder__datepicker-module__inputWrapperSm___tpcoF":"sm"===y,"-esm-report-builder__datepicker-module__inputWrapperMd___1hH89":"md"===y||!y||0===y.length,"-esm-report-builder__datepicker-module__inputWrapperLg___CRsQW":"lg"===y}),children:e=>"era"!==e.type?(0,hk.jsx)(DO,{className:Df,segment:e}):(0,hk.jsx)(pT().Fragment,{})}),(0,hk.jsx)(gL,{className:hT()(Dy,{[Dg]:"sm"===y,[Db]:"md"===y||!y||0===y.length,[Dv]:"lg"===y}),children:(0,hk.jsx)(DE,{})})]}),(0,hk.jsx)(x1,{className:Dm,children:a})]}),(0,hk.jsx)(Dw,{variant:"single",today_:x})]})})})})}),Dk=(0,pj.forwardRef)(function({className:e,defaultValue:t,invalid:r,invalidText:n,isDisabled:o,isInvalid:i,label:a,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:p,size:f="md",value:h,...m},y){let{calendar:b,intlLocale:g,today_:v}=S5(),w=(0,pj.useId)(),x=!!(s??a),E=(0,pj.useMemo)(()=>{if(h)return{start:E9(h[0],b,!1),end:E9(h[1],b,!1)}},[h,b]),S=(0,pj.useMemo)(()=>{if(t)return{start:E9(t[0],b,!1),end:E9(t[1],b,!1)}},[t,b]),D=(0,pj.useMemo)(()=>E9(c??S8,b,!0),[c,b]),O=(0,pj.useMemo)(()=>E9(u,b,!0),[u,b]),P=(0,pj.useMemo)(()=>r||i,[r,i]),C=(0,pj.useMemo)(()=>(p&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),p??(e=>d?.([E7(e.start),E7(e.end)]))),[p,d]);return(0,hk.jsx)(E8,{locale:g.toString(),children:(0,hk.jsx)("div",{className:hT()("cds--form-item",e),children:(0,hk.jsx)(yH,{values:[[S6,g]],children:(0,hk.jsx)(E5,{id:x?w:void 0,className:hT()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:P,shouldForceLeadingZeros:"en"===g.language||void 0,maxValue:O,minValue:D,value:E,defaultValue:S,ref:y,isDisabled:o,...m,onChange:C,children:(0,hk.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,hk.jsx)(x9,{className:hT()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:s??a}),(0,hk.jsxs)(wU,{className:Dp,children:[(0,hk.jsxs)("div",{className:hT()("-esm-report-builder__datepicker-module__inputsWrapper___soXTl",{"-esm-report-builder__datepicker-module__inputsWrapperSm___ES6Mr":"sm"===f,"-esm-report-builder__datepicker-module__inputsWrapperMd___4qQj-":"md"===f||!f||0===f.length,"-esm-report-builder__datepicker-module__inputsWrapperLg___apyRG":"lg"===f}),children:[(0,hk.jsx)(xz,{className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__startInput___Rc6pT",Dh),slot:"start",children:e=>(0,hk.jsx)(DO,{className:Df,segment:e})}),(0,hk.jsx)("div",{className:"-esm-report-builder__datepicker-module__separator___YpWmV",children:(0,hk.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,hk.jsx)(xz,{className:hT()("cds--date-picker-input__wrapper","-esm-report-builder__datepicker-module__endInput___euNmk",Dh),slot:"end",children:e=>(0,hk.jsx)(DO,{className:Df,segment:e})})]}),(0,hk.jsx)(gL,{className:hT()(Dy,{[Dg]:"sm"===f,[Db]:"md"===f||!f||0===f.length,[Dv]:"lg"===f}),children:(0,hk.jsx)(DE,{})})]}),(0,hk.jsx)(x1,{className:Dm,children:n}),(0,hk.jsx)(Dw,{variant:"range",today_:v,minDate:D,maxDate:O})]})})})})})}),Dj=({diagnoses:e})=>{let{diagnosisTags:t}=fC({externalModuleName:"@openmrs/esm-styleguide"});return(0,hk.jsx)("div",{className:"-esm-report-builder__diagnosis-tags-module__container___B0P1c",children:e.map(e=>{let{rank:r,uuid:n,display:o}=e,i=t[1===r?"primaryColor":"secondaryColor"];return(0,hk.jsx)(hI.vwO,{type:i,children:o},n)})})},DT={action:"-esm-report-builder__empty-card-module__action___sBzfy",content:"-esm-report-builder__empty-card-module__content___oLLP3",desktopHeading:"-esm-report-builder__empty-card-module__desktopHeading___61tqo",tabletHeading:"-esm-report-builder__empty-card-module__tabletHeading___8GoOd",tile:"-esm-report-builder__empty-card-module__tile___THTb6"},DR=({width:e="64",height:t="64"})=>(0,hk.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,hk.jsx)("use",{href:"#omrs-empty-data-illustration"})}),DA=e=>{let t="tablet"===f4(),r=e.launchForm;return(0,hk.jsx)(hI.Wdr,{className:DT.layer,children:(0,hk.jsxs)(hI.FAs,{className:DT.tile,children:[(0,hk.jsx)("div",{className:t?DT.tabletHeading:DT.desktopHeading,children:(0,hk.jsx)("h4",{children:e.headerTitle})}),(0,hk.jsx)(DR,{}),(0,hk.jsx)("p",{className:DT.content,children:ih("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,hk.jsx)("p",{className:DT.action,children:r&&(0,hk.jsx)(hI.$nd,{onClick:()=>r(),kind:"ghost",size:t?"lg":"sm",children:ih("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},DM=({error:e,headerTitle:t})=>{let r="tablet"===f4();return(0,hk.jsx)(hI.Wdr,{children:(0,hk.jsxs)(hI.FAs,{className:"-esm-report-builder__error-state-module__tile___cCC0p",children:[(0,hk.jsx)("div",{className:r?"-esm-report-builder__error-state-module__tabletHeading___bj95p":"-esm-report-builder__error-state-module__desktopHeading___cT4Z6",children:(0,hk.jsx)("h4",{children:t})}),(0,hk.jsxs)("p",{className:"-esm-report-builder__error-state-module__errorMessage___0VxgF",children:[ih("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,hk.jsx)("p",{className:"-esm-report-builder__error-state-module__errorCopy___eiDlp",children:ih("errorCopy")})]})})},DN=DM,DI=pT().forwardRef((e,t)=>{let{slotName:r,basePath:n,componentContext:o,state:i}=f6(),a=window.location??{pathname:""},s=pH(r??"");return e.isChildOfHeader&&r&&s.length>0?(0,hk.jsxs)(hI.f8J,{"aria-label":ih("leftNavigation","Left navigation"),className:"-esm-report-builder__left-nav-module__leftNav___+tHzD",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,hk.jsx)(pq,{name:"global-nav-menu-slot"}),r?(0,hk.jsx)(fg,{value:o,fallback:(0,hk.jsx)(pq,{name:r,state:{basePath:n,currentPath:a,...i}}),children:(0,hk.jsx)(pR.Provider,{value:o,children:(0,hk.jsx)(pq,{name:r,state:{basePath:n,currentPath:a,...i}})})}):null]}):null}),D$=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:r,locationsPerRequest:n=50,onChange:o})=>{let[i,a]=(0,pj.useState)(""),s=(0,pj.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:r,error:n,isLoading:o}=fA(t,oQ,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,pj.useMemo)(()=>({location:r?.data?.entry?r.data.entry[0]:null,error:t?n:null,isLoading:!!t&&o}),[r,o,n,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:p,error:f,setPage:h}=function(e,t=0,r=""){let n=fT(r),{data:o,isLoading:i,isValidating:a,setSize:s,error:l}=fq(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=`${oY}/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()},oQ);return(0,pj.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:i,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:a,error:l||null,setPage:s}),[i,o,a,s,l])}(r,n,i),m=(0,pj.useMemo)(()=>l&&!i&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,i]),y=(0,pj.useCallback)(e=>{o(),a(e.trim())},[o]),b=f9((0,pj.useCallback)(()=>{!p&&d&&h(e=>e+1)},[p,d,h])),g=d?Math.max(0,Math.floor(m.length-n/2)):-1;return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)(hI.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:ih("searchForLocation"),id:s,placeholder:ih("searchForLocation"),onChange:e=>y(e.target.value),size:"lg"}),f&&(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__errorNotification___sh9BG",id:`${s}-error`,children:(0,hk.jsx)(hI.jeF,{kind:"error",subtitle:ih("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:ih("error","Error")})}),(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__searchResults___gvBsQ",children:c?(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__loadingContainer___PR-AY",children:Array.from({length:5}).map((e,t)=>(0,hk.jsx)(hI.Psq,{className:"-esm-report-builder__location-picker-module__radioButtonSkeleton___Y913N",role:"progressbar"},t))}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__locationResultsContainer___eH1Nw",children:m.length>0?(0,hk.jsx)(hI.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,t)=>(0,hk.jsx)(hI.aaP,{className:"-esm-report-builder__location-picker-module__locationRadioButton___5tzhj",id:e.resource.id,labelText:(0,hk.jsx)("span",{ref:t===g?b:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__emptyState___+68uf",children:(0,hk.jsx)("p",{className:"-esm-report-builder__location-picker-module__locationNotFound___PBqCF",children:ih("noResultsToDisplay")})})}),p&&(0,hk.jsx)("div",{className:"-esm-report-builder__location-picker-module__loadingIcon___fSVp7",children:(0,hk.jsx)(hI.OuH,{description:ih("loading")})})]})})]})},DL=Z("modalState",{modalContainer:null,modalStack:[]}),DF=0;async function DB(e,t,r={}){let n=ps(t),o=null;if(e){if(!n)throw Error(`No modal named '${t}' has been registered.`);let{load:i}=n,a=await i(),s=DF++;o=await pO({...a,name:`${t}-${s}`},{...r,domElement:e})}else I(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return o}function DV(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function DU(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function DW(e){return e.find(e=>!DV(e))}function Dz(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let DH=window.getComputedStyle(document.body).overflow;function DK({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",Dq),document.body.style.overflow="hidden",t.style.visibility="unset");let r=DW(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",DB(r,e.modalName,e.props).then(n=>{DV(e)?DU(e.modalName,n):n?(e.parcel=n,t.prepend(r),Dz(e,DW(DL.getState().modalStack)===e),n.mountPromise.then(()=>{DV(e)||(e.state="MOUNTED")},t=>{I(t),e.parcel=null,DG(e)})):DG(e)},t=>{I(t),DG(e)});break}case"MOUNTING":case"MOUNTED":Dz(e,e===r);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),DU(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=DL.getState();DL.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=DH,removeEventListener("keydown",Dq)}function DG(e){if(DV(e))return;e.state="TO_BE_DELETED";let t=DL.getState();DL.setState({...t,modalStack:[...t.modalStack]})}function Dq(e){"Escape"===e.key&&function(){let[e]=DL.getState().modalStack;e&&DG(e)}()}function DZ(e){DL.subscribe(DK),DL.setState({...DL.getState(),modalContainer:e})}function DY(e,t={},r=()=>{}){let n=()=>{let e=DL.getState().modalStack.find(e=>e.onClose===r);e&&DG(e)};if(ps(e)){var o;let i,a;o={state:"NEW",onClose:r,modalName:e,props:{close:n,...t}},a=[o,...(i=DL.getState()).modalStack],DL.setState({...i,modalStack:a})}else I(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return n}let DJ=({notification:e})=>{let{description:t,action:r,kind:n,critical:o,title:i,onAction:a}=e;return(0,hk.jsx)(hI.kZS,{actionButtonLabel:r,kind:n||"info",lowContrast:o,subtitle:t,title:i||"",inline:!0,onActionButtonClick:a})},DX=({subject:e})=>{let[t,r]=(0,pj.useState)([]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DJ,{notification:e},e.id))})},DQ=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:r=()=>{},subtitle:n,kind:o,title:i,critical:a,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,pj.useState)(t);return(0,hk.jsx)(hI.kZS,{kind:o||"info",actionButtonLabel:c,ariaLabel:ih("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{r(),s&&d(s)},statusIconDescription:ih("actionableNotification","Actionable notification"),subtitle:n,title:i,lowContrast:a,inline:!0,...u})},D0=({subject:e})=>{let[t,r]=(0,pj.useState)([]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(DQ,{notification:e},e.id))})};var D1=Object.prototype.hasOwnProperty;let D4=function(e){if(null==e)return!0;if(tw(e)&&(tv(e)||"string"==typeof e||"function"==typeof e.splice||tD(e)||tA(e)||tg(e)))return!e.length;var t=rT(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(tp(e))return!rd(e).length;for(var r in e)if(D1.call(e,r))return!1;return!0},D2=new ef.Subject,D3=0,D6=new ef.Subject,D5=0;function D8(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(DX,{subject:D2}))}function D9(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!D4(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{D2.next({...e,id:D3++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function D7(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(D0,{subject:D6}))}function Oe(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!D4(t))?setTimeout(()=>{D6.next({...e,id:D5++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let Ot=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],Or=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],On={container:"-esm-report-builder__numeric-observation-module__container___YMIz1",card:"-esm-report-builder__numeric-observation-module__card___ZLBwz","abnormal-value":"-esm-report-builder__numeric-observation-module__abnormal-value___bzIYd","critical-value":"-esm-report-builder__numeric-observation-module__critical-value___S2-yh",cell:"-esm-report-builder__numeric-observation-module__cell___ZiLtj","critically-high":"-esm-report-builder__numeric-observation-module__critically-high___NaPDB","critically-low":"-esm-report-builder__numeric-observation-module__critically-low___S29+P",high:"-esm-report-builder__numeric-observation-module__high___qk85l",low:"-esm-report-builder__numeric-observation-module__low___Rh+hW","label-container":"-esm-report-builder__numeric-observation-module__label-container___OHVTn","value-container":"-esm-report-builder__numeric-observation-module__value-container___-5c7b",label:"-esm-report-builder__numeric-observation-module__label___MVUkz",value:"-esm-report-builder__numeric-observation-module__value___Ne+ED",units:"-esm-report-builder__numeric-observation-module__units___7BIK5","pad-right":"-esm-report-builder__numeric-observation-module__pad-right___8vJsT","off-scale-low":"-esm-report-builder__numeric-observation-module__off-scale-low___3TolK","off-scale-high":"-esm-report-builder__numeric-observation-module__off-scale-high___xMngl",arrow:"-esm-report-builder__numeric-observation-module__arrow___6Jyji"},Oo=({value:e,unit:t,label:r,interpretation:n,referenceRange:o,conceptUuid:i,variant:a="card",patientUuid:s})=>{let l=(0,pj.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let r=null;e&&(r=t?`${oZ}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${oZ}/conceptreferencerange/?concept=${e}&v=full`);let{data:n,error:o,isLoading:i}=fA(r,oQ),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??u,p=(0,pj.useMemo)(()=>{if(n)return n?"--"===n?"normal":Ot.includes(n)?n.toLowerCase():Or.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",f="critically_low"===p||"critically_high"===p||"off_scale_low"===p||"off_scale_high"===p,h="normal"!==p,m=r?`omrs-numeric-obs-label-${r.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,y=`omrs-numeric-obs-value-${l}`,b=`omrs-numeric-obs-unit-${l}`,g=null!=e&&""!==e,v=g?e:ih("notAvailable","Not available"),w=hT()({[On["critically-low"]]:"critically_low"===p||"off_scale_low"===p,[On["critically-high"]]:"critically_high"===p||"off_scale_high"===p,[On.low]:"low"===p,[On.high]:"high"===p,[On["off-scale-low"]]:"off_scale_low"===p,[On["off-scale-high"]]:"off_scale_high"===p}),x=hT()({[On.container]:!0,[On.card]:!0,[On["critical-value"]]:f,[On["abnormal-value"]]:h&&!f}),E=hT()({[On.cell]:!0,[w]:!0});return"cell"===a?(0,hk.jsxs)("div",{className:E,children:[v,g&&t?` ${t}`:""]}):(0,hk.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[r&&(0,hk.jsxs)("div",{className:On["label-container"],children:[(0,hk.jsx)("span",{id:m,className:On.label,children:r}),h&&(0,hk.jsx)("span",{className:On[p.replace("_","-")],title:ih("abnormalValue","Abnormal value")})]}),(0,hk.jsxs)("div",{className:On["value-container"],children:[(0,hk.jsx)("span",{id:y,"aria-labelledby":m&&b?`${m} ${b}`:m||b||void 0,className:On.value,children:v}),g&&t&&(0,hk.jsx)("span",{id:b,className:On.units,children:t})]})]})},Oi="-esm-report-builder__page-header-module__pageHeader___sRmJ1",Oa=e=>{if("children"in e){let{children:t,className:r,...n}=e;return(0,hk.jsx)("div",{className:hT()(Oi,r),...n,children:t})}{let{title:t,illustration:r,className:n,...o}=e;return(0,hk.jsx)("div",{className:hT()(Oi,n),...o,children:(0,hk.jsx)(Os,{title:t,illustration:r})})}},Os=({title:e,illustration:t,className:r})=>{let[n,o]=(0,pj.useState)(null);return(0,pj.useEffect)(()=>{oe("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,hk.jsxs)("div",{className:hT()("-esm-report-builder__page-header-module__pageHeaderContent___9CRks",r),children:[t,(0,hk.jsxs)("div",{className:"-esm-report-builder__page-header-module__pageLabels___mIsS6",children:[n?.implementationName&&(0,hk.jsx)("p",{children:ih(n.implementationName)}),(0,hk.jsx)("p",{className:"-esm-report-builder__page-header-module__pageName___kvdCd",children:e})]})]})},Ol=({totalItems:e,pageSize:t,onPageNumberChange:r,pageNumber:n,dashboardLinkUrl:o,currentItems:i,dashboardLinkLabel:a})=>{let{pageSizes:s,pageItemsCount:l}=ht(t,e,n,i),u="tablet"===f4(),c=ih("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,hk.jsx)(hk.Fragment,{children:e>0&&(0,hk.jsxs)("div",{className:hT()({"-esm-report-builder__pagination-module__tablet___-EohH":u,"-esm-report-builder__pagination-module__desktop___lJwLA":!u}),children:[(0,hk.jsxs)("div",{children:[c,o&&(0,hk.jsx)(pA,{to:o,className:"-esm-report-builder__pagination-module__configurableLink___f-IJ9",children:a??ih("seeAll","See all")})]}),(0,hk.jsx)(hI.dKS,{className:"-esm-report-builder__pagination-module__pagination___XBkRY",page:n,pageSize:t,pageSizes:s,totalItems:e,onChange:r,pageRangeText:(e,t)=>ih("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function Ou(e){return Od(Of(e,"usual","official"))}function Oc(e){return Ou(e)}function Od(e){var t;let r;return e?e.text??(r=(t=e).given??[],(t.family?r.concat(t.family):r).join(" ")):""}function Op(e){return Od(e)}function Of(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 Oh(e,t=hl()){let r=hl(t),n=SX(e,r);if(null==n)return null;let o=r.diff(n,"hours"),i=r.diff(n,"days"),a=r.diff(n,"weeks"),s=r.diff(n,"months"),l=r.diff(n,"years"),u={};if(o<2)u.minutes=r.diff(n,"minutes");else if(i<2)u.hours=o;else if(a<4)u.days=i;else if(l<1){let e=r.subtract(a,"weeks").diff(n,"days");u.weeks=a,u.days=e}else if(l<2){let e=r.subtract(s,"months").diff(n,"days");u.months=s,u.days=e}else if(l<18){let e=r.subtract(l,"year").diff(n,"months");u.years=l,u.months=e}else u.years=l;return u}function Om(e,t=hl()){let r=Oh(e,t);if(null==r)return null;let n={style:"short",localeMatcher:"lookup"};return"minutes"in r&&0===r.minutes&&(n.minutesDisplay="always"),SJ(r,n)}let Oy={container:"-esm-report-builder__patient-banner-patient-info-module__container___SbFly",activePatientContainer:"-esm-report-builder__patient-banner-patient-info-module__activePatientContainer___dPAI3",patientBanner:"-esm-report-builder__patient-banner-patient-info-module__patientBanner___RKK5o",patientName:"-esm-report-builder__patient-banner-patient-info-module__patientName___N4cBt",patientAvatar:"-esm-report-builder__patient-banner-patient-info-module__patientAvatar___S5B6e",patientAvatarButton:"-esm-report-builder__patient-banner-patient-info-module__patientAvatarButton___b4TpF",patientInfo:"-esm-report-builder__patient-banner-patient-info-module__patientInfo___k4TpF",demographics:"-esm-report-builder__patient-banner-patient-info-module__demographics___kUxEK",row:"-esm-report-builder__patient-banner-patient-info-module__row___aBH+R",flexRow:"-esm-report-builder__patient-banner-patient-info-module__flexRow___iE9YF",tagsSlot:"-esm-report-builder__patient-banner-patient-info-module__tagsSlot___qQx0X",identifiers:"-esm-report-builder__patient-banner-patient-info-module__identifiers___S+i2W",identifier:"-esm-report-builder__patient-banner-patient-info-module__identifier___V3fBY",primaryIdentifier:"-esm-report-builder__patient-banner-patient-info-module__primaryIdentifier___MGool",secondaryIdentifier:"-esm-report-builder__patient-banner-patient-info-module__secondaryIdentifier___ORbJn",value:"-esm-report-builder__patient-banner-patient-info-module__value___rZXrd",tag:"-esm-report-builder__patient-banner-patient-info-module__tag___l5yM7",gender:"-esm-report-builder__patient-banner-patient-info-module__gender___pBoq+",separator:"-esm-report-builder__patient-banner-patient-info-module__separator___kqhkj",tooltipPadding:"-esm-report-builder__patient-banner-patient-info-module__tooltipPadding___aca85",tooltipSmallText:"-esm-report-builder__patient-banner-patient-info-module__tooltipSmallText___KSHWn",actionsButtonText:"-esm-report-builder__patient-banner-patient-info-module__actionsButtonText___dfkx2"};function Ob({showIdentifierLabel:e,type:t,value:r}){return(0,hk.jsx)("span",{className:Oy.primaryIdentifier,children:(0,hk.jsxs)(hI.vwO,{className:Oy.tag,type:"gray",children:[e&&t?.text&&(0,hk.jsxs)("span",{className:Oy.label,children:[t.text,": "]}),(0,hk.jsx)("span",{className:Oy.value,children:r})]})})}function Og({showIdentifierLabel:e,type:t,value:r}){return(0,hk.jsxs)(hI.lRv,{className:Oy.secondaryIdentifier,id:`patient-banner-identifier-${r}`,children:[e&&(0,hk.jsxs)("span",{className:Oy.label,children:[t?.text,": "]}),(0,hk.jsx)("span",{className:Oy.value,children:r})]})}function Ov({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:r}=fC(),{primaryIdentifierCode:n}=ho(),o=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!r?.uuids.includes(t)})??[];return(0,hk.jsx)(hk.Fragment,{children:o?.length?o.map(({value:e,type:r},i)=>(0,hk.jsxs)(pT().Fragment,{children:[(0,hk.jsx)("span",{className:Oy.identifier,children:r?.coding?.[0]?.code===n?(0,hk.jsx)(Ob,{showIdentifierLabel:t,type:r,value:e}):(0,hk.jsx)(Og,{showIdentifierLabel:t,type:r,value:e})}),i<o.length-1&&(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"})]},e)):""})}let O_={Female:mg,Male:mv,Other:m_,Unknown:mw},Ow=({gender:e})=>{let t=O_[e];return t?(0,hk.jsx)(t,{fill:"#525252"}):null},Ox={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function OE({patient:e,renderedFrom:t}){var r;let n,o,i=Ou(e),a=e?.gender&&(o=Ox[n=(r=e.gender).toLowerCase()]??"Unknown",{displayText:ih(n,r),iconKey:o}),s=(0,pj.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,hk.jsxs)("div",{className:Oy.patientInfo,children:[(0,hk.jsx)("div",{className:hT()(Oy.row,Oy.patientNameRow),children:(0,hk.jsxs)("div",{className:Oy.flexRow,children:[(0,hk.jsx)("span",{className:Oy.patientName,children:i}),a&&(0,hk.jsxs)("div",{className:Oy.gender,children:[(0,hk.jsx)(Ow,{gender:a.iconKey}),(0,hk.jsx)("span",{children:a.displayText})]}),(0,hk.jsx)(pq,{className:Oy.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,hk.jsxs)("div",{className:Oy.demographics,children:[e.birthDate&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("span",{children:Om(e.birthDate)}),(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"}),(0,hk.jsx)("span",{children:SH(e.birthDate,{time:!1})}),(0,hk.jsx)("span",{className:Oy.separator,children:"\xb7"})]}),(0,hk.jsx)(Ov,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,hk.jsx)(pq,{className:Oy.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var OS=r(1673);function OD({patient:e,patientUuid:t,actionsSlotName:r,additionalActionsSlotState:n}){let[o,i]=(0,pj.useState)(!1),{extensions:a}=pK(r),s="tablet"===f4(),l=f8(()=>i(!1),o),u=(0,pj.useRef)(null),c=(0,pj.useRef)(null),d=(0,pj.useId)(),p=`patient-actions-menu-trigger-${d}`,f=`patient-actions-menu-${d}`,h=(0,pj.useCallback)(()=>i(e=>!e),[]),m=(0,pj.useCallback)(()=>{i(!1),u.current?.focus()},[]),y=(0,pj.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,pj.useEffect)(()=>{if(o&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let b=(0,pj.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:m,...n}),[t,e,m,n]);return 0===a.length?null:(0,hk.jsx)("div",{className:"-esm-report-builder__patient-banner-actions-menu-module__overflowMenuContainer___kcHLp",children:(0,hk.jsxs)("div",{"data-overflow-menu":!0,className:hT()("cds--overflow-menu",hF),ref:l,children:[(0,hk.jsxs)("button",{className:hT()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},hU),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:p,onClick:h,onKeyDown:y,ref:u,children:[(0,hk.jsx)("span",{className:"-esm-report-builder__patient-banner-actions-menu-module__actionsButtonText___w2rar",children:ih("actions","Actions")})," ",(0,hk.jsx)(OS.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,hk.jsxs)("div",{className:hT()("cds--overflow-menu-options","cds--overflow-menu--flip",hB,{[hV]:o}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:f,onKeyDown:y,ref:c,role:"menu",tabIndex:-1,children:[(0,hk.jsx)("ul",{className:hT()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,hk.jsx)(pq,{name:r,state:b},r)}),(0,hk.jsx)("span",{})]})]})})}var OO=r(6767),OP=r.n(OO);function OC(e){let{patientPhotoConceptUuid:t}=fC({externalModuleName:"@openmrs/esm-styleguide"}),r=t?`${oZ}/obs?patient=${e}&concept=${t}&v=full`:null,{data:n,error:o,isLoading:i}=(0,fe.u)(e?r:null,oQ),a=n?.data?.results[0];return{data:a?{dateTime:a?.obsDatetime,imageSrc:a?.value?.links?.uri}:null,error:o,isLoading:i}}let Ok=({width:e=56,height:t=56,"aria-label":r})=>{let{t:n}=(0,p7.useTranslation)();return(0,hk.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,hk.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,hk.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"})]})},Oj="-esm-report-builder__patient-photo-module__avatar___SjWI2";function OT({patientUuid:e,patientName:t,alt:r}){let{data:n,isLoading:o}=OC(e),[i,a]=(0,pj.useState)(null),[s,l]=(0,pj.useState)(!1),u=(0,pj.useMemo)(()=>OP().generate(e),[e]);(0,pj.useEffect)(()=>{if(n?.imageSrc){let e=new URL(n.imageSrc,window.location.origin).pathname;l(!0);let t=!1,r=new Image;return r.onload=()=>{t||(a(e),l(!1))},r.onerror=()=>{t||(a(null),l(!1))},r.src=e,()=>{t=!0}}a(null),l(!1)},[n?.imageSrc]);let c=(0,pj.useMemo)(()=>r||(i?ih("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):ih("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[r,i,t]);return o||s?(0,hk.jsx)(hI.ryE,{className:"-esm-report-builder__patient-photo-module__skeleton___YkxcQ","data-testid":"skeleton-icon"}):n?.imageSrc&&!i?(0,hk.jsx)(Ok,{"aria-label":ih("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):i?(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("img",{className:Oj,src:i,alt:c,title:t})}):(0,hk.jsx)("div",{"aria-label":c,children:(0,hk.jsx)("div",{className:Oj,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,hk.jsx)("span",{className:"-esm-report-builder__patient-photo-module__initials___GrIHj",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let OR=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],OA=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),OM=OA,ON=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),OI=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),O$=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),OL=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),OF=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),OB=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),OV=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),OU=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),OW=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Oz=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),OH=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),OK=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),OG=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Oq=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),OZ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),OY=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),OJ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),OX=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),OQ=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),O0=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),O1=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),O4=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),O2=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),O3=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),O6=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),O5=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),O8=(0,pj.memo)((0,pj.forwardRef)(function(e,t){return(0,hk.jsx)(Pt,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),O9=OW,O7=OX,Pe=(0,pj.memo)((0,pj.forwardRef)(function({pictogram:e,fallback:t,...r},n){let o=(0,pj.useRef)(document.getElementById(e));return(0,pj.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,hk.jsx)(fg,{value:o.current,fallback:t,children:(0,hk.jsx)(Pt,{ref:n,pictogram:e,pictogramProps:r})})})),Pt=(0,pj.memo)((0,pj.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,hk.jsx)("svg",{ref:r,className:hT()("-esm-report-builder__pictograms-module__pictogram___ej8c6",n),height:o,width:o,children:(0,hk.jsx)("use",{href:`#${e}`})})})),Pr=({children:e})=>"tablet"===f4()?(0,hk.jsx)(hI.Wdr,{children:e}):(0,hk.jsx)(hk.Fragment,{children:e}),Pn=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:r="",kind:n="success",onActionButtonClick:o=()=>{},isLowContrast:i="error"!==n,progressActionLabel:a,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==n,title:c,id:d,...p}=e,[f,h]=(0,pj.useState)(r),[m,y]=(0,pj.useState)(!0),[b,g]=(0,pj.useState)(!1),v=(0,pj.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,pj.useCallback)(()=>{g(!0),v()},[v]);return(0,pj.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,pj.useEffect)(()=>{y(!1),window.setTimeout(()=>{y(!0)},0)},[]),(0,hk.jsx)(hI.kZS,{actionButtonLabel:f,"aria-label":ih("closeSnackbar","Close snackbar"),className:hT()("-esm-report-builder__snackbar-module__slideIn___hMvlf",{"-esm-report-builder__snackbar-module__animated___c+ZXw":m,"-esm-report-builder__snackbar-module__slideOut___ymbgm":b}),kind:n,lowContrast:i,onActionButtonClick:()=>{o(),w(),a&&h(a)},onClose:v,statusIconDescription:ih("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...p})},Po=({subject:e})=>{let[t,r]=(0,pj.useState)([]),n=(0,pj.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(Pn,{snackbar:e,closeSnackbar:()=>n(e)},e.id))})},Pi=new ef.Subject,Pa=0;function Ps(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(Po,{subject:Pi}))}function Pl(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{Pi.next({...e,id:Pa++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Pu=({toast:e,closeToast:t})=>{let{description:r,kind:n,critical:o,title:i,actionButtonLabel:a,onActionButtonClick:s=()=>{}}=e,l=(0,pj.useCallback)(()=>{s(),t()},[t,s]);return(0,hk.jsx)("div",{children:(0,hk.jsx)(hI.kZS,{actionButtonLabel:a,kind:n||"info",lowContrast:o,subtitle:r,title:i||"",onActionButtonClick:l,onClose:t})})},Pc=({subject:e})=>{let[t,r]=(0,pj.useState)([]),n=(0,pj.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]);return(0,pj.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,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsx)(Pu,{toast:e,closeToast:()=>n(e)},e.id))})},Pd=new ef.Subject,Pp=0;function Pf(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(Pc,{subject:Pd}))}function Ph(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!D4(t))?setTimeout(()=>{Pd.next({...e,id:Pp++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Pm(e,t=!1){if(t)return!0;let r=P_[e];return!r||!r()}function Py(e,t){let r=PC.getState()?.workspaceGroup,n=r?.name;n&&e===n&&PR(()=>{let n=P$(e);n&&(n.setState({},!0),n.subscribe(()=>{})()),"function"==typeof r?.cleanup&&r.cleanup(),PC.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},n?e=>e.currentWorkspaceGroup===n:()=>!0)}function Pb(e,t){let{name:r,additionalProps:n}=t;pf(r);let o=()=>{PD(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Pg(r,n),closeWorkspaceGroup:!1})};Pm(e.name)?o():PM("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Pg(e,t){let r=pf(e),n=PC.getState().workspaceGroup;if(n&&!n.members?.includes(e))return void Py(n.name,()=>{Pg(e,t)});let o=PC.getState().workspaceGroup?.name,i={...r,title:PN(r,t),closeWorkspace:(t={})=>PD(e,t),closeWorkspaceWithSavedChanges:t=>PD(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var r,n;return r=e,n=t,void(P_[r]=n)},setTitle:(t,r)=>{i.title=t,i.titleNode=r,PC.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){PC.setState(r=>{let n=[e,...t??r.openWorkspaces],o=PT(e);return{...r,openWorkspaces:n,workspaceWindowState:o}})}o&&P$(o,t);let s=PC.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==i.type);if(0===s.length)a(i);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];a({...t,additionalProps:i.additionalProps,...t.title===PN(t,t.additionalProps)&&{title:PN(i,i.additionalProps)}},s.filter(t=>t.name!=e))}else u?(a(u,PC.getState().openWorkspaces.filter(e=>e.type!=i.type)),Pb(u,{name:e,additionalProps:t})):a(i);else Pb(s[0],{name:e,additionalProps:t})}function Pv({targetUrl:e,contextKey:t,workspaceName:r,additionalProps:n}){PO(t),Pg(r,n),oF({to:e})}let P_={};function Pw(e,t){P_[e]=t}function Px(e){return P_[e]}function PE(){let e=PC.getState();PC.setState({...e,prompt:null})}let PS={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function PD(e,t={}){t={...PS,...t};let r=()=>{let r=PC.getState();r.openWorkspaces.find(t=>t.name===e);let n=r.openWorkspaces.filter(t=>t.name!=e),o=PC.getState().workspaceGroup?.name;o&&t.closeWorkspaceGroup&&Py(o),P_[e]=()=>!1,PC.setState(e=>({...e,prompt:null,openWorkspaces:n,workspaceWindowState:PT(n?.[0])})),t?.onWorkspaceClose?.()};return Pm(e,t?.ignoreChanges)?(r(),!0):(PM("closing-workspace",r,pf(e).title??e),!1)}function PO(e){PC.getState().context!=e&&PC.setState({context:e,openWorkspaces:[],prompt:null})}let PP={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},PC=Z("workspace",PP);function Pk(){return PC}function Pj(e){let t=PC.getState();PC.setState({...t,workspaceWindowState:e})}function PT(e){return e?.preferredWindowSize??"normal"}function PR(e=()=>{},t=()=>!0){let r=PC.getState().openWorkspaces.filter(t).every(({name:e})=>Pm(e)),n=()=>{PI(),e?.()};r?n():PM("closing-all-workspaces",n)}function PA(){let{workspaceWindowState:e,openWorkspaces:t,prompt:r,workspaceGroup:n}=pL(PC);return(0,pj.useMemo)(()=>({active:t.length>0,prompt:r,workspaceWindowState:e,workspaces:t,workspaceGroup:n}),[t,e,r,n])}function PM(e,t=()=>{},r=""){let n;switch(e){case"closing-workspace":n={title:ih("unsavedChangesTitleText","Unsaved changes"),body:ih("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:ih("discard","Discard")};break;case"closing-all-workspaces":{let e=PC.getState().openWorkspaces.filter(({name:e})=>!Pm(e)).map(({title:e},t)=>`${t+1}. ${e}`);n={title:ih("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:ih("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:ih("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":n={title:ih("unsavedChangesTitleText","Unsaved changes"),body:ih("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:r}),onConfirm:()=>{PC.setState(e=>({...e,prompt:null})),t?.()},confirmText:ih("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}PC.setState(e=>({...e,prompt:n}))}function PN(e,t){return t?.workspaceTitle??e.title}function PI(){PC.setState(PP)}function P$(e,t={}){if(!e||"default"===e)return;let r=J(e,{});return t&&r.setState(e=>({...e,...t})),r}let PL="-esm-report-builder__action-menu-button-module__container___flRDv",PF="-esm-report-builder__action-menu-button-module__elementContainer___iAHLw",PB="-esm-report-builder__action-menu-button-module__active___IwBtr";function PV({getIcon:e,formOpenInTheBackground:t,tagContent:r}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button-module__interruptedTag___WtUuQ",children:"!"}):(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button-module__countTag___JHlDT",children:r})]})}let PU=({getIcon:e,label:t,iconDescription:r,handler:n,type:o,tagContent:i})=>{let a=f4(),{workspaces:s,workspaceWindowState:l}=PA(),u=s?.findIndex(({type:e})=>e===o)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===a||"phone"===a?(0,hk.jsxs)(hI.$nd,{className:hT()(PL,{[PB]:c}),iconDescription:r,kind:"ghost",onClick:n,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:PF,children:(0,hk.jsx)(PV,{formOpenInTheBackground:d,getIcon:e,tagContent:i})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hI.K0,{align:"left","aria-label":r,className:hT()(PL,{[PB]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:n,size:"md",children:(0,hk.jsx)("div",{className:PF,children:(0,hk.jsx)(PV,{formOpenInTheBackground:d,getIcon:e,tagContent:i})})})};var PW=r(810),Pz=r(771),PH=/[\\^$.*+?()[\]{}|]/g,PK=RegExp(PH.source);let PG=function(e){return(e=ns(e))&&PK.test(e)?e.replace(PH,"\\$&"):e};function Pq({contextKey:e}){let{prompt:t}=PA();return(0,pj.useEffect)(()=>{RegExp(`/${PG(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,pj.useEffect)(()=>(PO(e),()=>{PO(null)}),[e]),(0,pj.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:r,newUrl:n}}=t,o=RegExp(`/${PG(e)}(/|$)`),i=new URL(n),a=o.test(i.pathname),s=PC.getState().openWorkspaces.every(({name:e})=>Pm(e));a||(s?PI():(r?.(),PR(()=>{oF({to:n})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,hk.jsxs)(hI.KXP,{open:!0,onClose:PE,children:[(0,hk.jsx)(hI.rQ0,{title:t.title}),(0,hk.jsx)(hI.cwr,{children:(0,hk.jsx)("p",{className:"-esm-report-builder__workspace-notification-module__messageBody___LuOaq",children:t.body})}),(0,hk.jsxs)(hI.jlY,{children:[(0,hk.jsx)(hI.$nd,{kind:"secondary",onClick:PE,children:t.cancelText??ih("cancel")}),(0,hk.jsx)(hI.$nd,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??ih("confirm")})]})]}):null}function PZ(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 PY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?PZ(Object(r),!0).forEach(function(t){PX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function PJ(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 PX(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PQ(e){return(PQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P0(e,t){return(P0=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P1(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var P4=function(e){var t=pj.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&&P0(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=PQ(a);e=r?Reflect.construct(t,arguments,PQ(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 P1(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),PX(P1(t=i.call(this,e)),"handleRef",function(e){t.el=e}),PX(P1(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}))}),PX(P1(t),"getParcelProps",function(){var e=PY(PY({},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,PY({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 p1&&p1.Consumer?pj.createElement(p1.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=p1&&p1.Consumer?pj.createElement(p1.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return pj.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],PJ(a.prototype,n),o&&PJ(a,o),a}();PX(P4,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function P2({workspace:e,additionalPropsFromPage:t}){let[r,n]=(0,pj.useState)(),o=function(e){let[t,r]=(0,pj.useState)({}),[n,o]=(0,pj.useState)(e);return(0,pj.useEffect)(()=>{n!==e&&o(e)},[e]),(0,pj.useEffect)(()=>{let e,t=P$(n);return t&&(r(t.getState()),e=t.subscribe(r)),()=>{t&&e?.()}},[n]),t}(e.currentWorkspaceGroup);(0,pj.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&n(e)}),()=>{t=!1}},[e]);let i=(0,pj.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...o,...e.additionalProps},[e,t,o]);return r?(0,hk.jsx)(P4,{config:r,mountParcel:pC,...i},e.name):(0,hk.jsx)(hI.OuH,{className:"-esm-report-builder__workspace-module__loader___qwZ71",description:`${ih("loading","Loading")} ...`})}function P3({isWithinWorkspace:e,name:t,actionMenuProps:r={}}){let[n,o]=(0,pj.useState)(!1),i=(0,pj.useRef)(window.innerHeight),{featureName:a}=(0,pj.useContext)(pR),s=f4();(0,pj.useEffect)(()=>{let e=()=>{o(!f2(s)&&i.current>window.innerHeight),i.current!=window.innerHeight&&(i.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i]);let l=`action-menu-${t&&"default"!=t?t:a}-items-slot`;return(0,hk.jsx)("aside",{className:hT()("-esm-report-builder__action-menu-module__sideRail___e98is",{"-esm-report-builder__action-menu-module__withinWorkspace___M79JV":e,"-esm-report-builder__action-menu-module__sideRailHidden___YiJLl":n,"-esm-report-builder__action-menu-module__sideRailVisible___2FAOp":!n}),children:(0,hk.jsx)("div",{className:"-esm-report-builder__action-menu-module__container___OOD1K",children:(0,hk.jsx)(pq,{className:"-esm-report-builder__action-menu-module__chartExtensions___WxddU",name:l,state:r})})})}function P6({contextKey:e,overlay:t,showSiderailAndBottomNav:r,additionalWorkspaceProps:n,actionMenuProps:o}){let i=f4(),{workspaces:a,workspaceWindowState:s,workspaceGroup:l}=PA(),u=l?.name,c=a[0],d="hidden"===s||null==c,p=c?.width??(t?"wider":"narrow"),f=(0,pj.useMemo)(()=>r||u&&!d,[u,d,r]);return fD(!d&&!f2(i)),(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("div",{className:r?"-esm-report-builder__workspace-module__workspaceContainerWithActionMenu___ICW-m":"-esm-report-builder__workspace-module__workspaceContainerWithoutActionMenu___LfZGa",children:[(0,hk.jsx)("aside",{className:hT()(t?"-esm-report-builder__workspace-module__workspaceOverlayOuterContainer___9JiRR":"-esm-report-builder__workspace-module__workspaceWindowSpacer___wmOFv",{"-esm-report-builder__workspace-module__hiddenRelative___4RP3l":d,"-esm-report-builder__workspace-module__narrowWorkspace___hjAco":"narrow"===p,"-esm-report-builder__workspace-module__widerWorkspace___+e9xX":"wider"===p,"-esm-report-builder__workspace-module__extraWideWorkspace___y+68g":"extra-wide"===p}),children:(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceFixedContainer___gGK0B",{"-esm-report-builder__workspace-module__maximizedWindow___spirq":"maximized"===s,"-esm-report-builder__workspace-module__hiddenFixed___qzxpg":d}),children:a.map((e,t)=>(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceInnerContainer___1Z0Qp",{"-esm-report-builder__workspace-module__hiddenExtraWorkspace___+tmaj":0!==t}),children:(0,hk.jsx)(pj.Suspense,{fallback:null,children:(0,hk.jsx)(p7.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,hk.jsx)(P5,{workspaceInstance:e,additionalWorkspaceProps:n})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,hk.jsx)(Pq,{contextKey:e})]}),f&&(0,hk.jsx)(P3,{name:u,isWithinWorkspace:!r,actionMenuProps:o})]})}function P5({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:r}=(0,p7.useTranslation)(),n=f4(),{workspaceWindowState:o,workspaceGroup:i}=PA(),a=i?.name,s="maximized"===o;(0,pj.useEffect)(()=>{let t=r(e.title);t!==e.title&&e.setTitle(t)},[e.title,r,e.setTitle]);let{featureName:l}=(0,pj.useContext)(pR),u=(0,pj.useCallback)(()=>{Pj(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:p="",closeWorkspace:f}=(0,pj.useMemo)(()=>e??{},[e]),h=(0,pj.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)(hI.Y9Y,{"aria-label":ih("workspaceHeader","Workspace Header"),className:"-esm-report-builder__workspace-module__header___NhAJ5",children:[!f2(n)&&!c&&(0,hk.jsx)(hI.dJ2,{"aria-label":ih("close","Close"),renderMenuIcon:(0,hk.jsx)(hQ,{}),onClick:()=>f()}),(0,hk.jsx)(hI.bCw,{prefix:"",children:e.titleNode??r(e.title)}),(0,hk.jsx)("div",{className:"-esm-report-builder__workspace-module__overlayHeaderSpacer___gwXPJ"}),(0,hk.jsxs)(hI.wdv,{className:"-esm-report-builder__workspace-module__headerButtons___vkBTc",children:[(0,hk.jsx)(pq,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,hk.jsx)(pq,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,hk.jsx)(pq,{name:`workspace-header-${l}-slot`,state:h}),f2(n)&&(0,hk.jsxs)(hk.Fragment,{children:[(d||s)&&(0,hk.jsx)(hI.V8d,{"aria-label":s?ih("minimize","Minimize"):ih("maximize","Maximize"),onClick:u,children:s?(0,hk.jsx)(PW.Xj,{}):(0,hk.jsx)(PW.hz,{})}),c&&!a?(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide","Hide"),onClick:()=>Pj("hidden"),children:(0,hk.jsx)(h0,{})}):(0,hk.jsx)(hI.V8d,{"aria-label":ih("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(ml,{})})]}),"tablet"===n&&c&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("close","Close"),onClick:()=>f?.(),children:(0,hk.jsx)(Pz.d3,{})})]})]}),(0,hk.jsx)("div",{className:hT()("-esm-report-builder__workspace-module__workspaceContent___1IXNi",{"-esm-report-builder__workspace-module__marginWorkspaceContent___8QfwE":!!p}),children:(0,hk.jsx)(P2,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let P8="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),P9=new Uint8Array(16),P7=[];for(let e=0;e<256;++e)P7.push((e+256).toString(16).slice(1));let Ce=function(e,t,r){if(P8&&!t&&!e)return P8();let n=(e=e||{}).random??e.rng?.()??function(){if(!d){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");d=crypto.getRandomValues.bind(crypto)}return d(P9)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(P7[e[t+0]]+P7[e[t+1]]+P7[e[t+2]]+P7[e[t+3]]+"-"+P7[e[t+4]]+P7[e[t+5]]+"-"+P7[e[t+6]]+P7[e[t+7]]+"-"+P7[e[t+8]]+P7[e[t+9]]+"-"+P7[e[t+10]]+P7[e[t+11]]+P7[e[t+12]]+P7[e[t+13]]+P7[e[t+14]]+P7[e[t+15]]).toLowerCase()}(n)};async function Ct(e,t){let{openedGroup:r}=pm.getState();if(r){if(r.groupName===e&&Co(r.props,t))return!0;else if(!await Ci({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return pm.setState(r=>({...r,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function Cr(e){let{openedGroup:t,openedWindows:r}=pm.getState();if(t){if(r.length>0&&!(e||await Ci({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;pm.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function Cn(e,t=null,r=null,n=null){let o=pm.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let i=py(e);if(!i)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:a}=o,{name:s}=i,l=pb(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${i.name} is not registered to a workspace group`);let u=pg(e);if(a&&(a.groupName!==l.name||!Co(a.props,n)))return!!await Ci({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:n},openedWindows:[{windowName:s,openedWorkspaces:[Cc(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let n=o.openedWindows[u],i=o.openedGroup?.props??{},a=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=n;if(Co(n.props,r)){let d=c.find(t=>t.workspaceName===e);return d&&Co(d.props,t)?((a||u!==o.openedWindows.length-1)&&pm.setState(Ca.restoreWindow(o,s)),!0):!!await Ci({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??i},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Cc(e,t)],props:n?.props??r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Ci({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:i??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Cc(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(pm.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Cc(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Ci({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:i.name})&&(pm.setState({...o,openedGroup:{groupName:l.name,props:n??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Cc(e,t)],props:r,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Co(e,t){return null==e||null==t||F(e,t)}function Ci(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}=pm.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=DY("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:o.map(e=>n[e.workspaceName])})})}let Ca={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=pg(t);if(r<0)return e;let n={...e.openedWindows[r]},o=n.openedWorkspaces.findIndex(e=>e.workspaceName===t),i=[...e.openedWindows];n.openedWorkspaces=n.openedWorkspaces.slice(0,o);let a=e.isMostRecentlyOpenedWindowHidden;if(0===n.openedWorkspaces.length){let t=r===e.openedWindows.length-1;i.splice(r,1),t&&i.length>0&&(a=!1)}else i[r]=n;return{...e,openedWindows:i,isMostRecentlyOpenedWindowHidden:a}},openChildWorkspace(e,t,r,n){let o=e.registeredWorkspacesByName[r];if(!o)throw Error(`No workspace named "${r}" registered`);let i=e.registeredWorkspacesByName[t];if(!i)throw Error(`No workspace named "${t}" registered`);if(i.window!==o.window)throw Error(`Child workspace ${r} does not belong to the same workspace window as parent workspace ${t}`);let a=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==a)throw Error(`Cannot open child workspace ${r} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[a],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${r} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==a?{...e,openedWorkspaces:[...u,Cc(r,n)]}:e)}},setHasUnsavedChanges(e,t,r){let n=pg(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 Cs(){return pF(pm,Ca)}let Cl=()=>(0,pj.useContext)(p1),Cu=()=>Object.keys(pm.getState().registeredWorkspacesByName);function Cc(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Ce()}}let Cd={workspaceOuterContainer:"-esm-report-builder__workspace2-module__workspaceOuterContainer___W9iJN",narrowWorkspace:"-esm-report-builder__workspace2-module__narrowWorkspace___6pFGF",widerWorkspace:"-esm-report-builder__workspace2-module__widerWorkspace___aQBxL",extraWideWorkspace:"-esm-report-builder__workspace2-module__extraWideWorkspace___Hcpmd",workspaceMiddleContainer:"-esm-report-builder__workspace2-module__workspaceMiddleContainer___DlVKb",maximized:"-esm-report-builder__workspace2-module__maximized___GqZm5",hidden:"-esm-report-builder__workspace2-module__hidden___KSjDv",workspaceInnerContainer:"-esm-report-builder__workspace2-module__workspaceInnerContainer___qQKWW",workspaceSpacer:"-esm-report-builder__workspace2-module__workspaceSpacer___tx3mR",loader:"-esm-report-builder__workspace2-module__loader___f9ttF",hiddenExtraWorkspace:"-esm-report-builder__workspace2-module__hiddenExtraWorkspace___o2RHo",header:"-esm-report-builder__workspace2-module__header___4cJjV",headerButtons:"-esm-report-builder__workspace2-module__headerButtons___5vIhN",workspaceContent:"-esm-report-builder__workspace2-module__workspaceContent___ROBU9",overlayHeaderSpacer:"-esm-report-builder__workspace2-module__overlayHeaderSpacer___CFci9",isActionMenuOpened:"-esm-report-builder__workspace2-module__isActionMenuOpened___TlyIU",showActionMenu:"-esm-report-builder__workspace2-module__showActionMenu___5qVqE",marginWorkspaceContent:"-esm-report-builder__workspace2-module__marginWorkspaceContent___jB4mY",workspaceContainerWithActionMenu:"-esm-report-builder__workspace2-module__workspaceContainerWithActionMenu___+EHP1",workspaceFixedContainer:"-esm-report-builder__workspace2-module__workspaceFixedContainer___PV5s-",workspaceContainerWithoutActionMenu:"-esm-report-builder__workspace2-module__workspaceContainerWithoutActionMenu___pJYA1"},Cp=({title:e,children:t,hasUnsavedChanges:r=!1})=>{let n=f4(),{setWindowMaximized:o,hideWindow:i,setHasUnsavedChanges:a,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:p,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=Cs(),{workspaceName:m,isRootWorkspace:y,closeWorkspace:b,showActionMenu:g}=Cl(),v=pg(m),w=s[v],x=w?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,pj.useEffect)(()=>{x?.hasUnsavedChanges!=r&&a(m,r??!1)},[x?.hasUnsavedChanges,r,m,a]),(0,pj.useEffect)(()=>{p[m]!==e&&f(m,e)},[p,m,e,f]),v<0||null==l||null==x)return null;let E=u[l.groupName];if(!E)throw Error(`Cannot find registered workspace group ${l.groupName}`);let S=d[m].window,D=c[S];if(!D)throw Error(`Cannot find registered workspace window ${S}`);let{icon:O,canMaximize:P}=D,C="closable"===E.persistence,k=!!O&&!C,{maximized:j}=w,T=D?.width??"narrow",R=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),A=v<s.length-1||h;return(0,hk.jsxs)("div",{className:hT()(Cd.workspaceOuterContainer,{[Cd.narrowWorkspace]:"narrow"===T,[Cd.widerWorkspace]:"wider"===T,[Cd.extraWideWorkspace]:"extra-wide"===T,[Cd.isActionMenuOpened]:R}),children:[(0,hk.jsx)("div",{className:hT()(Cd.workspaceSpacer,{[Cd.hidden]:A})}),(0,hk.jsx)("div",{className:hT()(Cd.workspaceMiddleContainer,{[Cd.maximized]:j,[Cd.hidden]:A,[Cd.isRootWorkspace]:y,[Cd.showActionMenu]:g}),children:(0,hk.jsxs)("div",{className:hT()(Cd.workspaceInnerContainer,{[Cd.maximized]:j,[Cd.hidden]:A,[Cd.isRootWorkspace]:y}),children:[(0,hk.jsxs)(hI.Y9Y,{"aria-label":ih("workspaceHeader"),className:Cd.header,children:[(0,hk.jsx)(hI.bCw,{prefix:"",children:e}),(0,hk.jsx)("div",{className:Cd.overlayHeaderSpacer}),(0,hk.jsx)(hI.wdv,{className:Cd.headerButtons,children:f2(n)?(0,hk.jsxs)(hk.Fragment,{children:[(P||j)&&(0,hk.jsx)(hI.V8d,{"aria-label":j?ih("minimize"):ih("maximize"),onClick:()=>o(S,!j),children:j?(0,hk.jsx)(PW.Xj,{}):(0,hk.jsx)(PW.hz,{})}),k&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide"),onClick:()=>i(),children:(0,hk.jsx)(h0,{})}),!C&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("close"),onClick:()=>b({closeWindow:!0}),children:(0,hk.jsx)(ml,{})})]}):(0,hk.jsxs)(hk.Fragment,{children:[k&&(0,hk.jsx)(hI.V8d,{"aria-label":ih("hide"),onClick:()=>i(),children:(0,hk.jsx)(Pz.d3,{})}),(0,hk.jsx)(hI.V8d,{"aria-label":ih("close"),onClick:()=>{C?Cr():b({closeWindow:!0})},children:(0,hk.jsx)(ml,{})})]})})]}),(0,hk.jsx)("div",{className:hT()(Cd.workspaceContent),children:t})]})})]})},Cf="-esm-report-builder__action-menu-button2-module__container___qxTbB",Ch="-esm-report-builder__action-menu-button2-module__elementContainer___MzyUg",Cm="-esm-report-builder__action-menu-button2-module__active___nMKHE",Cy="-esm-report-builder__action-menu-button2-module__focused___ncbDv";function Cb({getIcon:e,hasUnsavedChanges:t,tagContent:r}){return(0,hk.jsxs)(hk.Fragment,{children:[e({size:16}),t?(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button2-module__interruptedTag___HSn-T",children:"!"}):(0,hk.jsx)("span",{className:"-esm-report-builder__action-menu-button2-module__countTag___bUcY2",children:r})]})}let Cg=({icon:e,label:t,tagContent:r,workspaceToLaunch:n,onBeforeWorkspaceLaunch:o})=>{let i=f4(),{openedWindows:a,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=Cs(),{extension:c}=(0,pj.useContext)(pR),d=a.findIndex(e=>e.windowName===c?.extensionId),p=a[d],f=null!=p,h=f&&(d<a.length-1||u),m=f&&!h,y=p?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,b=async()=>{if(f)h?s(p.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:r}=n;Cn(e,t,r)}};return"tablet"===i||"phone"===i?(0,hk.jsxs)(hI.$nd,{className:hT()(Cf,{[Cm]:f&&!m,[Cy]:m}),iconDescription:t,kind:"ghost",onClick:b,role:"button",tabIndex:0,size:"md",children:[(0,hk.jsx)("span",{className:Ch,children:(0,hk.jsx)(Cb,{hasUnsavedChanges:y,getIcon:e,tagContent:r})}),(0,hk.jsx)("span",{children:t})]}):(0,hk.jsx)(hI.K0,{align:"left","aria-label":t,className:hT()(Cf,{[Cm]:f&&!m,[Cy]:m}),enterDelayMs:300,kind:"ghost",label:t,onClick:b,size:"md",children:(0,hk.jsx)("div",{className:Ch,children:(0,hk.jsx)(Cb,{hasUnsavedChanges:y,getIcon:e,tagContent:r})})})};function Cv({showContactDetails:e,toggleContactDetails:t,className:r}){return(0,hk.jsx)(hI.$nd,{className:r,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?ms:mo,children:e?ih("showLess","Show less"):ih("showMore","Show more")})}let C_={contactDetails:"-esm-report-builder__patient-banner-contact-details-module__contactDetails___+ytje",deceased:"-esm-report-builder__patient-banner-contact-details-module__deceased___mxjtl",heading:"-esm-report-builder__patient-banner-contact-details-module__heading___wxIC0",row:"-esm-report-builder__patient-banner-contact-details-module__row___dafkX",col:"-esm-report-builder__patient-banner-contact-details-module__col___vGkbd",relationship:"-esm-report-builder__patient-banner-contact-details-module__relationship___ZOV9O"},Cw=({patientUuid:e})=>{let{cohorts:t=[],isLoading:r}=function(e){let t=e?`${oZ}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:r,isLoading:n}=(0,fe.u)(t,oQ),o=r?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,pj.useMemo)(()=>({cohorts:o,isLoading:n}),[n,o])}(e);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsxs)("p",{className:C_.heading,children:[ih("patientLists","Patient Lists")," (",t?.length??0,")"]}),r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>SF(e?.startDate).getTime()-SF(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,hk.jsx)("li",{children:(0,hk.jsx)(pA,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,hk.jsx)("li",{children:"--"})})(),t.length>3&&(0,hk.jsx)("li",{className:C_.link,children:(0,hk.jsx)(pA,{to:`${window.spaBase}/home/patient-lists`,children:ih("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},Cx=({patientId:e})=>{let{patient:t,isLoading:r}=hn(e),n=t?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:C_.heading,children:ih("address","Address")}),(0,hk.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,hk.jsxs)("li",{children:[ih(o(t.url),o(t.url)),": ",t.valueString]},`address-${e}-${r}`)):(0,hk.jsxs)("li",{children:[ih(e,e),": ",t]},`address-${e}`)):(0,hk.jsx)("li",{children:"--"})})]})},CE=({patientUuid:e})=>{let{isLoading:t,contactAttributes:r}=(e=>{let{contactAttributeTypes:t=[]}=fC({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:r,error:n,isLoading:o}=(e=>{let{data:t,error:r,isLoading:n}=fA(`${oZ}/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)))`,oQ);return{isLoading:n,attributes:t?.data.person.attributes??[],error:r}})(e);return{contactAttributes:(0,pj.useMemo)(()=>r.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[r,t]),isLoading:o,error:n}})(e),n=(0,pj.useMemo)(()=>r?[...r?.map(e=>[e.attributeType.display?ih(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[r]);return(0,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:C_.heading,children:ih("contactDetails","Contact Details")}),t?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:n.length?n.map(([e,t],r)=>(0,hk.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${r}`)):(0,hk.jsx)("li",{children:"--"})})]})},CS=({patientId:e})=>{let{data:t,isLoading:r}=function(e){let t=`${oZ}/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}=(0,fe.u)(e?t:null,oQ),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,hk.jsxs)(hk.Fragment,{children:[(0,hk.jsx)("p",{className:C_.heading,children:ih("relationships","Relationships")}),r?(0,hk.jsx)(hI.OuH,{description:`${ih("loading","Loading")} ...`,role:"progressbar"}):(0,hk.jsx)("ul",{children:t&&t.length>0?(0,hk.jsx)(hk.Fragment,{children:t.map(e=>(0,hk.jsxs)("li",{className:C_.relationship,children:[(0,hk.jsx)("div",{children:(0,hk.jsx)(pA,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,hk.jsx)("div",{children:e.relationshipType}),(0,hk.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?ih("yearAbbreviation","yr"):ih("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,hk.jsx)("li",{children:"--"})})]})};function CD({patientId:e,deceased:t}){return(0,hk.jsxs)("div",{className:hT()(C_.contactDetails,{[C_.deceased]:t}),children:[(0,hk.jsxs)("div",{className:C_.row,children:[(0,hk.jsx)("div",{className:C_.col,children:(0,hk.jsx)(Cx,{patientId:e})}),(0,hk.jsx)("div",{className:C_.col,children:(0,hk.jsx)(CE,{patientUuid:e})})]}),(0,hk.jsxs)("div",{className:C_.row,children:[(0,hk.jsx)("div",{className:C_.col,children:(0,hk.jsx)(CS,{patientId:e})}),(0,hk.jsx)("div",{className:C_.col,children:(0,hk.jsx)(Cw,{patientUuid:e})})]})]})}function CO(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 CP="-esm-report-builder__action-menu2-module__container___usAej";function CC({workspaceGroup:e,groupProps:t}){let r=f4(),{persistence:n}=e;return(0,hk.jsx)("aside",{className:"-esm-report-builder__action-menu2-module__sideRail___dTm93",children:(0,hk.jsxs)("div",{className:CP,children:["closable"==n&&f2(r)&&(0,hk.jsx)(hI.K0,{align:"left",onClick:()=>Cr(),label:ih("close"),kind:"ghost",children:(0,hk.jsx)(ml,{})}),(0,hk.jsx)(pR.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,hk.jsx)(pq,{className:CP,name:e.name,state:{groupProps:t}})})]})})}function Ck(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 Cj=({lifeCycle:e,openedWorkspace:t,openedWindow:r,isRootWorkspace:n,isLeafWorkspace:o,showActionMenu:i})=>{let{openedGroup:a,closeWorkspace:s,openChildWorkspace:l}=Cs(),u=(0,pj.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:n=!1,discardUnsavedChanges:o=!1}=e;return n?!!(o||await Ci({reason:"CLOSE_WINDOW",explicit:!0,windowName:r.windowName}))&&(s(r.openedWorkspaces[0].workspaceName),!0):!!(o||await Ci({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 Ci({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:r.windowName,workspaceName:i[a+1].workspaceName})||l(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}=pm.getState(),r=e[t.workspaceName],o=r&&r.window?r.window:void 0,{registeredWindowsByName:s}=pm.getState(),l=o?s[o]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===a?.groupName&&void 0!==e.icon);return(0,hk.jsxs)("div",{className:hT()(Cd.workspaceOuterContainer,{[Cd.narrowWorkspace]:"narrow"===u,[Cd.widerWorkspace]:"wider"===u,[Cd.extraWideWorkspace]:"extra-wide"===u,[Cd.isActionMenuOpened]:c}),children:[(0,hk.jsx)("div",{className:Cd.workspaceSpacer}),(0,hk.jsx)("div",{className:hT()(Cd.workspaceMiddleContainer,{[Cd.isRootWorkspace]:n,[Cd.showActionMenu]:i}),children:(0,hk.jsx)("div",{className:hT()(Cd.workspaceInnerContainer,{[Cd.isRootWorkspace]:n}),children:(0,hk.jsx)(hI.OuH,{className:Cd.loader,description:`${ih("loading")} ...`})})})]})}return(0,hk.jsx)(P4,{config:e,mountParcel:pC,...u},t.workspaceName)},CT=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:r}=e,[n,o]=(0,pj.useState)({}),{registeredWorkspacesByName:i}=pm.getState();return(0,pj.useEffect)(()=>{let e=!1;return Promise.all(r.map(async e=>{let{moduleName:t,component:r}=i[e.workspaceName];return[e.uuid,await hg(t,r)]})).then(t=>{e||o(Object.fromEntries(t))}),()=>{e=!0}},[r]),(0,hk.jsx)(hk.Fragment,{children:r.map((o,i)=>(0,hk.jsx)(Cj,{openedWorkspace:o,openedWindow:e,lifeCycle:n[o.uuid],isRootWorkspace:0===i,isLeafWorkspace:i===r.length-1,showActionMenu:t},o.uuid))})};function CR(e){e&&(0,pZ.createRoot)(e).render((0,hk.jsx)(CA,{}))}function CA(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:r,registeredWindowsByName:n}=Cs();if((0,pj.useEffect)(()=>cE("before-page-changed",t=>{let{newPage:n,cancelNavigation:o,oldUrl:i,newUrl:a}=t;if(!e)return;if(n)return void o(Cr().then(e=>!e));let s=r[e.groupName],l=s?.scopePattern;l&&function(e,t,r){try{let n=new RegExp(e),o=Ck(t),i=Ck(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}}(l,i,a)&&o(Cr().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,hk.jsxs)("div",{className:hT()("-esm-report-builder__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___CSZs-",{"-esm-report-builder__workspace-windows-and-menu-module__overlay___0kl8U":o.overlay,"-esm-report-builder__workspace-windows-and-menu-module__hasMaximizedWindow___+DcH9":i}),children:[(0,hk.jsx)("div",{className:"-esm-report-builder__workspace-windows-and-menu-module__workspaceWindowsContainer___s8ddv",children:t.map(e=>(0,hk.jsx)(CT,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,hk.jsx)(CC,{workspaceGroup:o,groupProps:e.props})]})}function CM(e,t,r){if(null==e)return r;let n=Se(e);if(!n)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),r;let o=[];for(let e of t){let t=Se(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 CN(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function CI(e){return!!e&&e.constructor===Object}var C$=r(9589);function CL(e){let[t,r,n]=e.split(".");return`${t}.${r}.${n}`}function CF(e,t){let r=function(e){let t=e.indexOf("-");if(t>=0){let r=CL(e.slice(0,t)),n=e.slice(t+1);return`${r}-${n}`}return CL(e)}(t);return C$.satisfies(r,e,{includePrerelease:!0})}async function CB(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 CV(o(a)),await e()}catch(e){i?.(e,a),r=e}while(n(a++));throw r}async function CV(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}}}]);