@kong-ui-public/analytics-chart 0.8.21 → 0.8.23

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.
@@ -1,29 +1,29 @@
1
- var I_=Object.defineProperty;var N_=(lt,p,ge)=>p in lt?I_(lt,p,{enumerable:!0,configurable:!0,writable:!0,value:ge}):lt[p]=ge;var C=(lt,p,ge)=>(N_(lt,typeof p!="symbol"?p+"":p,ge),ge);(function(lt,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],p):(lt=typeof globalThis<"u"?globalThis:lt||self,p(lt["kong-ui-publicvitals-chart"]={},lt.Vue,lt["kong-ui-public-i18n"]))})(this,function(lt,p,ge){var Le,nd;"use strict";const id={noDataAvailableTitle:"No data in the current time frame",noDataAvailableDescription:"Once there is traffic, it will display here",limitedResultsShown:"Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.",entityNoName:"no-name",total:"Total",chartUnits:{ms:"ms",bytes:"Bytes",count:"requests","count/minute":"rpm",requests:"requests"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{Service:"Service",ServiceVersion:"Service Version",Route:"Route",Application:"Application",RuntimeGroup:"Runtime Group",GatewayService:"Gateway Service",StatusCode:"Status Code",CodeClass:"Status Code (grouped)",Time:"Time",API_PRODUCT:"API Product",API_PRODUCT_VERSION:"API Product Version",RUNTIME_GROUP:"Runtime Group",GATEWAY_SERVICE:"Gateway Service",ROUTE:"Route",APPLICATION:"Application",STATUS_CODE:"Status Code",STATUS_CODE_GROUPED:"Status Code (grouped)",TIME:"Time",ORGANIZATION:"Organization",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99)",LatencyP95:"Response Latency (p95)",LatencyP50:"Response Latency (p50)",LatencyAverage:"Response Latency (avg)",UpstreamLatencyP99:"Upstream Latency (p99)",UpstreamLatencyP95:"Upstream Latency (p95)",UpstreamLatencyP50:"Upstream Latency (p50)",UpstreamLatencyAverage:"Upstream Latency (avg)",KongLatencyP99:"Kong Latency (p99)",KongLatencyP95:"Kong Latency (p95)",KongLatencyP50:"Kong Latency (p50)",KongLatencyAverage:"Kong Latency (avg)",ResponseSizeP99:"Response Size (p99)",ResponseSizeP95:"Response Size (p95)",ResponseSizeP50:"Response Size (p50)",RequestSizeP99:"Request Size (p99)",RequestSizeP95:"Request Size (p95)",RequestSizeP50:"Request Size (p50)",SuccessfulRequests:"Successful requests",SUCCESS:"Successful requests",FailedRequests:"Failed requests",FAILURE:"Failed requests","5XX":"5xx","4XX":"4xx",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency",RESPONSE_LATENCY_P95:"Response Latency",RESPONSE_LATENCY_P50:"Response Latency",RESPONSE_SIZE_P99:"Response Size (p99)",RESPONSE_SIZE_P95:"Response Size (p95)",RESPONSE_SIZE_P50:"Response Size (p50)",REQUEST_SIZE_P99:"Request Size (p99)",REQUEST_SIZE_P95:"Request Size (p95)",REQUEST_SIZE_P50:"Request Size (p50)"},metricAxisTitles:{REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency (p99) in {unit}",RESPONSE_LATENCY_P95:"Response Latency (p95) in {unit}",RESPONSE_LATENCY_P50:"Response Latency (p50) in {unit}",RESPONSE_SIZE_P99:"Response Size (p99) in {unit}",RESPONSE_SIZE_P95:"Response Size (p95) in {unit}",RESPONSE_SIZE_P50:"Response Size (p50) in {unit}",REQUEST_SIZE_P99:"Request Size (p99) in {unit}",REQUEST_SIZE_P95:"Request Size (p95) in {unit}",REQUEST_SIZE_P50:"Request Size (p50) in {unit}",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99) in {unit}",LatencyP95:"Response Latency (p95) in {unit}",LatencyP50:"Response Latency (p50) in {unit}",LatencyAverage:"Response Latency (avg) in {unit}",UpstreamLatencyP99:"Upstream Latency (p99) in {unit}",UpstreamLatencyP95:"Upstream Latency (p95) in {unit}",UpstreamLatencyP50:"Upstream Latency (p50) in {unit}",UpstreamLatencyAverage:"Upstream Latency (avg) in {unit}",KongLatencyP99:"Kong Latency (p99) in {unit}",KongLatencyP95:"Kong Latency (p95) in {unit}",KongLatencyP50:"Kong Latency (p50) in {unit}",KongLatencyAverage:"Kong Latency (avg) in {unit}",ResponseSizeP99:"Response Size (p99) in {unit}",ResponseSizeP95:"Response Size (p95) in {unit}",ResponseSizeP50:"Response Size (p50) in {unit}",RequestSizeP99:"Request Size (p99) in {unit}",RequestSizeP95:"Request Size (p95) in {unit}",RequestSizeP50:"Request Size (p50) in {unit}"},granularityAxisTitles:{Minutely:"@timestamp per minute",Hourly:"@timestamp per hour",Daily:"@timestamp per day",Weekly:"@timestamp per week"}};function rd(){const n=ge.createI18n("en-us",id);return{i18n:n,i18nT:ge.i18nTComponent(n)}}/*!
1
+ var I_=Object.defineProperty;var N_=(lt,p,ge)=>p in lt?I_(lt,p,{enumerable:!0,configurable:!0,writable:!0,value:ge}):lt[p]=ge;var C=(lt,p,ge)=>(N_(lt,typeof p!="symbol"?p+"":p,ge),ge);(function(lt,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],p):(lt=typeof globalThis<"u"?globalThis:lt||self,p(lt["kong-ui-publicvitals-chart"]={},lt.Vue,lt["kong-ui-public-i18n"]))})(this,function(lt,p,ge){var Le,id;"use strict";const rd={noDataAvailableTitle:"No data in the current time frame",noDataAvailableDescription:"Once there is traffic, it will display here",limitedResultsShown:"Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.",entityNoName:"no-name",total:"Total",chartUnits:{ms:"ms",bytes:"Bytes",count:"requests","count/minute":"rpm",requests:"requests"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{Service:"Service",ServiceVersion:"Service Version",Route:"Route",Application:"Application",RuntimeGroup:"Runtime Group",GatewayService:"Gateway Service",StatusCode:"Status Code",CodeClass:"Status Code (grouped)",Time:"Time",API_PRODUCT:"API Product",API_PRODUCT_VERSION:"API Product Version",RUNTIME_GROUP:"Runtime Group",GATEWAY_SERVICE:"Gateway Service",ROUTE:"Route",APPLICATION:"Application",STATUS_CODE:"Status Code",STATUS_CODE_GROUPED:"Status Code (grouped)",TIME:"Time",ORGANIZATION:"Organization",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99)",LatencyP95:"Response Latency (p95)",LatencyP50:"Response Latency (p50)",LatencyAverage:"Response Latency (avg)",UpstreamLatencyP99:"Upstream Latency (p99)",UpstreamLatencyP95:"Upstream Latency (p95)",UpstreamLatencyP50:"Upstream Latency (p50)",UpstreamLatencyAverage:"Upstream Latency (avg)",KongLatencyP99:"Kong Latency (p99)",KongLatencyP95:"Kong Latency (p95)",KongLatencyP50:"Kong Latency (p50)",KongLatencyAverage:"Kong Latency (avg)",ResponseSizeP99:"Response Size (p99)",ResponseSizeP95:"Response Size (p95)",ResponseSizeP50:"Response Size (p50)",RequestSizeP99:"Request Size (p99)",RequestSizeP95:"Request Size (p95)",RequestSizeP50:"Request Size (p50)",SuccessfulRequests:"Successful requests",SUCCESS:"Successful requests",FailedRequests:"Failed requests",FAILURE:"Failed requests","5XX":"5xx","4XX":"4xx",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency",RESPONSE_LATENCY_P95:"Response Latency",RESPONSE_LATENCY_P50:"Response Latency",RESPONSE_SIZE_P99:"Response Size (p99)",RESPONSE_SIZE_P95:"Response Size (p95)",RESPONSE_SIZE_P50:"Response Size (p50)",REQUEST_SIZE_P99:"Request Size (p99)",REQUEST_SIZE_P95:"Request Size (p95)",REQUEST_SIZE_P50:"Request Size (p50)"},metricAxisTitles:{REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency (p99) in {unit}",RESPONSE_LATENCY_P95:"Response Latency (p95) in {unit}",RESPONSE_LATENCY_P50:"Response Latency (p50) in {unit}",RESPONSE_SIZE_P99:"Response Size (p99) in {unit}",RESPONSE_SIZE_P95:"Response Size (p95) in {unit}",RESPONSE_SIZE_P50:"Response Size (p50) in {unit}",REQUEST_SIZE_P99:"Request Size (p99) in {unit}",REQUEST_SIZE_P95:"Request Size (p95) in {unit}",REQUEST_SIZE_P50:"Request Size (p50) in {unit}",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99) in {unit}",LatencyP95:"Response Latency (p95) in {unit}",LatencyP50:"Response Latency (p50) in {unit}",LatencyAverage:"Response Latency (avg) in {unit}",UpstreamLatencyP99:"Upstream Latency (p99) in {unit}",UpstreamLatencyP95:"Upstream Latency (p95) in {unit}",UpstreamLatencyP50:"Upstream Latency (p50) in {unit}",UpstreamLatencyAverage:"Upstream Latency (avg) in {unit}",KongLatencyP99:"Kong Latency (p99) in {unit}",KongLatencyP95:"Kong Latency (p95) in {unit}",KongLatencyP50:"Kong Latency (p50) in {unit}",KongLatencyAverage:"Kong Latency (avg) in {unit}",ResponseSizeP99:"Response Size (p99) in {unit}",ResponseSizeP95:"Response Size (p95) in {unit}",ResponseSizeP50:"Response Size (p50) in {unit}",RequestSizeP99:"Request Size (p99) in {unit}",RequestSizeP95:"Request Size (p95) in {unit}",RequestSizeP50:"Request Size (p50) in {unit}"},granularityAxisTitles:{Minutely:"@timestamp per minute",Hourly:"@timestamp per hour",Daily:"@timestamp per day",Weekly:"@timestamp per week"}};function ad(){const n=ge.createI18n("en-us",rd);return{i18n:n,i18nT:ge.i18nTComponent(n)}}/*!
2
2
  * @kurkle/color v0.3.2
3
3
  * https://github.com/kurkle/color#readme
4
4
  * (c) 2023 Jukka Kurkela
5
5
  * Released under the MIT License
6
- */function mn(n){return n+.5|0}const pe=(n,t,e)=>Math.max(Math.min(n,e),t);function bn(n){return pe(mn(n*2.55),0,255)}function me(n){return pe(mn(n*255),0,255)}function se(n){return pe(mn(n/2.55)/100,0,1)}function Ws(n){return pe(mn(n*100),0,100)}const jt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mr=[..."0123456789ABCDEF"],ad=n=>mr[n&15],sd=n=>mr[(n&240)>>4]+mr[n&15],di=n=>(n&240)>>4===(n&15),od=n=>di(n.r)&&di(n.g)&&di(n.b)&&di(n.a);function ld(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&jt[n[1]]*17,g:255&jt[n[2]]*17,b:255&jt[n[3]]*17,a:t===5?jt[n[4]]*17:255}:(t===7||t===9)&&(e={r:jt[n[1]]<<4|jt[n[2]],g:jt[n[3]]<<4|jt[n[4]],b:jt[n[5]]<<4|jt[n[6]],a:t===9?jt[n[7]]<<4|jt[n[8]]:255})),e}const cd=(n,t)=>n<255?t(n):"";function ud(n){var t=od(n)?ad:sd;return n?"#"+t(n.r)+t(n.g)+t(n.b)+cd(n.a,t):void 0}const dd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ys(n,t,e){const i=t*Math.min(e,1-e),r=(a,s=(a+n/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function hd(n,t,e){const i=(r,a=(r+n/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function fd(n,t,e){const i=Ys(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function gd(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function br(n){const e=n.r/255,i=n.g/255,r=n.b/255,a=Math.max(e,i,r),s=Math.min(e,i,r),o=(a+s)/2;let l,c,u;return a!==s&&(u=a-s,c=o>.5?u/(2-a-s):u/(a+s),l=gd(e,i,r,u,a),l=l*60+.5),[l|0,c||0,o]}function vr(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(me)}function yr(n,t,e){return vr(Ys,n,t,e)}function pd(n,t,e){return vr(fd,n,t,e)}function md(n,t,e){return vr(hd,n,t,e)}function Us(n){return(n%360+360)%360}function bd(n){const t=dd.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?bn(+t[5]):me(+t[5]));const r=Us(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=pd(r,a,s):t[1]==="hsv"?i=md(r,a,s):i=yr(r,a,s),{r:i[0],g:i[1],b:i[2],a:e}}function vd(n,t){var e=br(n);e[0]=Us(e[0]+t),e=yr(e),n.r=e[0],n.g=e[1],n.b=e[2]}function yd(n){if(!n)return;const t=br(n),e=t[0],i=Ws(t[1]),r=Ws(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${se(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const Bs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zs={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function xd(){const n={},t=Object.keys(zs),e=Object.keys(Bs);let i,r,a,s,o;for(i=0;i<t.length;i++){for(s=o=t[i],r=0;r<e.length;r++)a=e[r],o=o.replace(a,Bs[a]);a=parseInt(zs[s],16),n[o]=[a>>16&255,a>>8&255,a&255]}return n}let hi;function wd(n){hi||(hi=xd(),hi.transparent=[0,0,0,0]);const t=hi[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const _d=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Md(n){const t=_d.exec(n);let e=255,i,r,a;if(t){if(t[7]!==i){const s=+t[7];e=t[8]?bn(s):pe(s*255,0,255)}return i=+t[1],r=+t[3],a=+t[5],i=255&(t[2]?bn(i):pe(i,0,255)),r=255&(t[4]?bn(r):pe(r,0,255)),a=255&(t[6]?bn(a):pe(a,0,255)),{r:i,g:r,b:a,a:e}}}function Td(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${se(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const xr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Qe=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Sd(n,t,e){const i=Qe(se(n.r)),r=Qe(se(n.g)),a=Qe(se(n.b));return{r:me(xr(i+e*(Qe(se(t.r))-i))),g:me(xr(r+e*(Qe(se(t.g))-r))),b:me(xr(a+e*(Qe(se(t.b))-a))),a:n.a+e*(t.a-n.a)}}function fi(n,t,e){if(n){let i=br(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=yr(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Hs(n,t){return n&&Object.assign(t||{},n)}function $s(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=me(n[3]))):(t=Hs(n,{r:0,g:0,b:0,a:1}),t.a=me(t.a)),t}function Dd(n){return n.charAt(0)==="r"?Md(n):bd(n)}class vn{constructor(t){if(t instanceof vn)return t;const e=typeof t;let i;e==="object"?i=$s(t):e==="string"&&(i=ld(t)||wd(t)||Dd(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Hs(this._rgb);return t&&(t.a=se(t.a)),t}set rgb(t){this._rgb=$s(t)}rgbString(){return this._valid?Td(this._rgb):void 0}hexString(){return this._valid?ud(this._rgb):void 0}hslString(){return this._valid?yd(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let a;const s=e===a?.5:e,o=2*s-1,l=i.a-r.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-c,i.r=255&c*i.r+a*r.r+.5,i.g=255&c*i.g+a*r.g+.5,i.b=255&c*i.b+a*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Sd(this._rgb,t._rgb,e)),this}clone(){return new vn(this.rgb)}alpha(t){return this._rgb.a=me(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=mn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fi(this._rgb,2,t),this}darken(t){return fi(this._rgb,2,-t),this}saturate(t){return fi(this._rgb,1,t),this}desaturate(t){return fi(this._rgb,1,-t),this}rotate(t){return vd(this._rgb,t),this}}/*!
6
+ */function mn(n){return n+.5|0}const pe=(n,t,e)=>Math.max(Math.min(n,e),t);function bn(n){return pe(mn(n*2.55),0,255)}function me(n){return pe(mn(n*255),0,255)}function se(n){return pe(mn(n/2.55)/100,0,1)}function Ws(n){return pe(mn(n*100),0,100)}const jt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mr=[..."0123456789ABCDEF"],sd=n=>mr[n&15],od=n=>mr[(n&240)>>4]+mr[n&15],di=n=>(n&240)>>4===(n&15),ld=n=>di(n.r)&&di(n.g)&&di(n.b)&&di(n.a);function cd(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&jt[n[1]]*17,g:255&jt[n[2]]*17,b:255&jt[n[3]]*17,a:t===5?jt[n[4]]*17:255}:(t===7||t===9)&&(e={r:jt[n[1]]<<4|jt[n[2]],g:jt[n[3]]<<4|jt[n[4]],b:jt[n[5]]<<4|jt[n[6]],a:t===9?jt[n[7]]<<4|jt[n[8]]:255})),e}const ud=(n,t)=>n<255?t(n):"";function dd(n){var t=ld(n)?sd:od;return n?"#"+t(n.r)+t(n.g)+t(n.b)+ud(n.a,t):void 0}const hd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ys(n,t,e){const i=t*Math.min(e,1-e),r=(a,s=(a+n/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function fd(n,t,e){const i=(r,a=(r+n/60)%6)=>e-e*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function gd(n,t,e){const i=Ys(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function pd(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function br(n){const e=n.r/255,i=n.g/255,r=n.b/255,a=Math.max(e,i,r),s=Math.min(e,i,r),o=(a+s)/2;let l,c,u;return a!==s&&(u=a-s,c=o>.5?u/(2-a-s):u/(a+s),l=pd(e,i,r,u,a),l=l*60+.5),[l|0,c||0,o]}function vr(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(me)}function yr(n,t,e){return vr(Ys,n,t,e)}function md(n,t,e){return vr(gd,n,t,e)}function bd(n,t,e){return vr(fd,n,t,e)}function Us(n){return(n%360+360)%360}function vd(n){const t=hd.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?bn(+t[5]):me(+t[5]));const r=Us(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=md(r,a,s):t[1]==="hsv"?i=bd(r,a,s):i=yr(r,a,s),{r:i[0],g:i[1],b:i[2],a:e}}function yd(n,t){var e=br(n);e[0]=Us(e[0]+t),e=yr(e),n.r=e[0],n.g=e[1],n.b=e[2]}function xd(n){if(!n)return;const t=br(n),e=t[0],i=Ws(t[1]),r=Ws(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${se(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const Bs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zs={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function wd(){const n={},t=Object.keys(zs),e=Object.keys(Bs);let i,r,a,s,o;for(i=0;i<t.length;i++){for(s=o=t[i],r=0;r<e.length;r++)a=e[r],o=o.replace(a,Bs[a]);a=parseInt(zs[s],16),n[o]=[a>>16&255,a>>8&255,a&255]}return n}let hi;function _d(n){hi||(hi=wd(),hi.transparent=[0,0,0,0]);const t=hi[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Md=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Td(n){const t=Md.exec(n);let e=255,i,r,a;if(t){if(t[7]!==i){const s=+t[7];e=t[8]?bn(s):pe(s*255,0,255)}return i=+t[1],r=+t[3],a=+t[5],i=255&(t[2]?bn(i):pe(i,0,255)),r=255&(t[4]?bn(r):pe(r,0,255)),a=255&(t[6]?bn(a):pe(a,0,255)),{r:i,g:r,b:a,a:e}}}function Sd(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${se(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const xr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Qe=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Dd(n,t,e){const i=Qe(se(n.r)),r=Qe(se(n.g)),a=Qe(se(n.b));return{r:me(xr(i+e*(Qe(se(t.r))-i))),g:me(xr(r+e*(Qe(se(t.g))-r))),b:me(xr(a+e*(Qe(se(t.b))-a))),a:n.a+e*(t.a-n.a)}}function fi(n,t,e){if(n){let i=br(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=yr(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Hs(n,t){return n&&Object.assign(t||{},n)}function $s(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=me(n[3]))):(t=Hs(n,{r:0,g:0,b:0,a:1}),t.a=me(t.a)),t}function kd(n){return n.charAt(0)==="r"?Td(n):vd(n)}class vn{constructor(t){if(t instanceof vn)return t;const e=typeof t;let i;e==="object"?i=$s(t):e==="string"&&(i=cd(t)||_d(t)||kd(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Hs(this._rgb);return t&&(t.a=se(t.a)),t}set rgb(t){this._rgb=$s(t)}rgbString(){return this._valid?Sd(this._rgb):void 0}hexString(){return this._valid?dd(this._rgb):void 0}hslString(){return this._valid?xd(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let a;const s=e===a?.5:e,o=2*s-1,l=i.a-r.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-c,i.r=255&c*i.r+a*r.r+.5,i.g=255&c*i.g+a*r.g+.5,i.b=255&c*i.b+a*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Dd(this._rgb,t._rgb,e)),this}clone(){return new vn(this.rgb)}alpha(t){return this._rgb.a=me(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=mn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fi(this._rgb,2,t),this}darken(t){return fi(this._rgb,2,-t),this}saturate(t){return fi(this._rgb,1,t),this}desaturate(t){return fi(this._rgb,1,-t),this}rotate(t){return yd(this._rgb,t),this}}/*!
7
7
  * Chart.js v4.3.2
8
8
  * https://www.chartjs.org
9
9
  * (c) 2023 Chart.js Contributors
10
10
  * Released under the MIT License
11
- */function oe(){}const kd=(()=>{let n=0;return()=>n++})();function B(n){return n===null||typeof n>"u"}function it(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function q(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function gt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Ht(n,t){return gt(n)?n:t}function U(n,t){return typeof n>"u"?t:n}const Cd=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,Vs=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function at(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function st(n,t,e,i){let r,a,s;if(it(n))if(a=n.length,i)for(r=a-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<a;r++)t.call(e,n[r],r);else if(q(n))for(s=Object.keys(n),a=s.length,r=0;r<a;r++)t.call(e,n[s[r]],s[r])}function gi(n,t){let e,i,r,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],a=t[e],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function pi(n){if(it(n))return n.map(pi);if(q(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=pi(n[e[r]]);return t}return n}function js(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Pd(n,t,e,i){if(!js(n))return;const r=t[n],a=e[n];q(r)&&q(a)?yn(r,a,i):t[n]=pi(a)}function yn(n,t,e){const i=it(t)?t:[t],r=i.length;if(!q(n))return n;e=e||{};const a=e.merger||Pd;let s;for(let o=0;o<r;++o){if(s=i[o],!q(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function xn(n,t){return yn(n,t,{merger:Od})}function Od(n,t,e){if(!js(n))return;const i=t[n],r=e[n];q(i)&&q(r)?xn(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=pi(r))}const qs={"":n=>n,x:n=>n.x,y:n=>n.y};function Ed(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Rd(n){const t=Ed(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function be(n,t){return(qs[t]||(qs[t]=Rd(t)))(n)}function wr(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Ft=n=>typeof n<"u",Wt=n=>typeof n=="function",Xs=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Ad(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Q=Math.PI,ct=2*Q,Ld=ct+Q,mi=Number.POSITIVE_INFINITY,_r=Q/180,ut=Q/2,qt=Q/4,bi=Q*2/3,ve=Math.log10,Zt=Math.sign;function wn(n,t,e){return Math.abs(n-t)<e}function Gs(n){const t=Math.round(n);n=wn(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(ve(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Id(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,a)=>r-a).pop(),t}function ye(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Nd(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Ks(n,t,e){let i,r,a;for(i=0,r=n.length;i<r;i++)a=n[i][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Tt(n){return n*(Q/180)}function vi(n){return n*(180/Q)}function Qs(n){if(!gt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Zs(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let a=Math.atan2(i,e);return a<-.5*Q&&(a+=ct),{angle:a,distance:r}}function Ze(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Fd(n,t){return(n-t+Ld)%ct-Q}function $t(n){return(n%ct+ct)%ct}function _n(n,t,e,i){const r=$t(n),a=$t(t),s=$t(e),o=$t(a-r),l=$t(s-r),c=$t(r-a),u=$t(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Pt(n,t,e){return Math.max(t,Math.min(e,n))}function Wd(n){return Pt(n,-32768,32767)}function le(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Mr(n,t,e){e=e||(s=>n[s]<t);let i=n.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,e(a)?r=a:i=a;return{lo:r,hi:i}}const ce=(n,t,e,i)=>Mr(n,e,i?r=>{const a=n[r][t];return a<e||a===e&&n[r+1][t]===e}:r=>n[r][t]<e),Yd=(n,t,e)=>Mr(n,e,i=>n[i][t]>=e);function Ud(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const Js=["push","pop","shift","splice","unshift"];function Bd(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Js.forEach(e=>{const i="_onData"+wr(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function to(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(Js.forEach(a=>{delete n[a]}),delete n._chartjs)}function eo(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const no=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function io(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,no.call(window,()=>{i=!1,n.apply(t,e)}))}}function zd(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const Tr=n=>n==="start"?"left":n==="end"?"right":"center",At=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Hd=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ro(n,t,e){const i=t.length;let r=0,a=i;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=Pt(Math.min(ce(o,l,c).lo,e?i:ce(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=Pt(Math.max(ce(o,s.axis,u,!0).hi+1,e?0:ce(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function ao(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),a}const yi=n=>n===0||n===1,so=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*ct/e)),oo=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*ct/e)+1,Mn={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*ut)+1,easeOutSine:n=>Math.sin(n*ut),easeInOutSine:n=>-.5*(Math.cos(Q*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>yi(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>yi(n)?n:so(n,.075,.3),easeOutElastic:n=>yi(n)?n:oo(n,.075,.3),easeInOutElastic(n){return yi(n)?n:n<.5?.5*so(n*2,.1125,.45):.5+.5*oo(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Mn.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Mn.easeInBounce(n*2)*.5:Mn.easeOutBounce(n*2-1)*.5+.5};function Sr(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function lo(n){return Sr(n)?n:new vn(n)}function Dr(n){return Sr(n)?n:new vn(n).saturate(.5).darken(.1).hexString()}const $d=["x","y","borderWidth","radius","tension"],Vd=["color","borderColor","backgroundColor"];function jd(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:Vd},numbers:{type:"number",properties:$d}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function qd(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const co=new Map;function Xd(n,t){t=t||{};const e=n+JSON.stringify(t);let i=co.get(e);return i||(i=new Intl.NumberFormat(n,t),co.set(e,i)),i}function Tn(n,t,e){return Xd(t,e).format(n)}const uo={values(n){return it(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,a=n;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=Gd(n,e)}const s=ve(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),Tn(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(ve(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?uo.numeric.call(this,n,t,e):""}};function Gd(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var xi={formatters:uo};function Kd(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ne=Object.create(null),kr=Object.create(null);function Sn(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const a=e[i];n=n[a]||(n[a]=Object.create(null))}return n}function Cr(n,t,e){return typeof t=="string"?yn(Sn(n,t),e):yn(Sn(n,""),t)}class Qd{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Dr(r.backgroundColor),this.hoverBorderColor=(i,r)=>Dr(r.borderColor),this.hoverColor=(i,r)=>Dr(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Cr(this,t,e)}get(t){return Sn(this,t)}describe(t,e){return Cr(kr,t,e)}override(t,e){return Cr(Ne,t,e)}route(t,e,i,r){const a=Sn(this,t),s=Sn(this,i),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[r];return q(l)?Object.assign({},c,l):U(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var pt=new Qd({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[jd,qd,Kd]);function Zd(n){return!n||B(n.size)||B(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function wi(n,t,e,i,r){let a=t[r];return a||(a=t[r]=n.measureText(r).width,e.push(r)),a>i&&(i=a),i}function Jd(n,t,e,i){i=i||{};let r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},a=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=e[l],d!=null&&!it(d))s=wi(n,r,a,s,d);else if(it(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!it(h)&&(s=wi(n,r,a,s,h));n.restore();const f=a.length/2;if(f>e.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function Fe(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function ho(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Pr(n,t,e,i){fo(n,t,e,i,null)}function fo(n,t,e,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,g=t.rotation,v=t.radius;let b=(g||0)*_r;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(b),n.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),n.restore();return}if(!(isNaN(v)||v<=0)){switch(n.beginPath(),f){default:r?n.ellipse(e,i,r/2,v,0,0,ct):n.arc(e,i,v,0,ct),n.closePath();break;case"triangle":u=r?r/2:v,n.moveTo(e+Math.sin(b)*u,i-Math.cos(b)*v),b+=bi,n.lineTo(e+Math.sin(b)*u,i-Math.cos(b)*v),b+=bi,n.lineTo(e+Math.sin(b)*u,i-Math.cos(b)*v),n.closePath();break;case"rectRounded":c=v*.516,l=v-c,s=Math.cos(b+qt)*l,d=Math.cos(b+qt)*(r?r/2-c:l),o=Math.sin(b+qt)*l,h=Math.sin(b+qt)*(r?r/2-c:l),n.arc(e-d,i-o,c,b-Q,b-ut),n.arc(e+h,i-s,c,b-ut,b),n.arc(e+d,i+o,c,b,b+ut),n.arc(e-h,i+s,c,b+ut,b+Q),n.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*v,u=r?r/2:l,n.rect(e-u,i-l,2*u,2*l);break}b+=qt;case"rectRot":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+h,i-s),n.lineTo(e+d,i+o),n.lineTo(e-h,i+s),n.closePath();break;case"crossRot":b+=qt;case"cross":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s);break;case"star":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s),b+=qt,d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s);break;case"line":s=r?r/2:Math.cos(b)*v,o=Math.sin(b)*v,n.moveTo(e-s,i-o),n.lineTo(e+s,i+o);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(b)*(r?r/2:v),i+Math.sin(b)*v);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function ue(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Dn(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function kn(n){n.restore()}function th(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function eh(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function nh(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),B(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function ih(n,t,e,i,r){if(r.strikethrough||r.underline){const a=n.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function rh(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function We(n,t,e,i,r,a={}){const s=it(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=r.string,nh(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&rh(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),B(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,i,a.maxWidth)),n.fillText(c,e,i,a.maxWidth),ih(n,e,i,c,a),i+=Number(r.lineHeight);n.restore()}function Je(n,t){const{x:e,y:i,w:r,h:a,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,-ut,Q,!0),n.lineTo(e,i+a-s.bottomLeft),n.arc(e+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,Q,ut,!0),n.lineTo(e+r-s.bottomRight,i+a),n.arc(e+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,ut,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-ut,!0),n.lineTo(e+s.topLeft,i)}const ah=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,sh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function oh(n,t){const e=(""+n).match(ah);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const lh=n=>+n||0;function Or(n,t){const e={},i=q(t),r=i?Object.keys(t):t,a=q(n)?i?s=>U(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=lh(a(s));return e}function go(n){return Or(n,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(n){return Or(n,["topLeft","topRight","bottomLeft","bottomRight"])}function St(n){const t=go(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function dt(n,t){n=n||{},t=t||pt.font;let e=U(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=U(n.style,t.style);i&&!(""+i).match(sh)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:U(n.family,t.family),lineHeight:oh(U(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:U(n.weight,t.weight),string:""};return r.string=Zd(r),r}function Cn(n,t,e,i){let r=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),e!==void 0&&it(o)&&(o=o[e%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function ch(n,t,e){const{min:i,max:r}=n,a=Vs(t,(r-i)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function we(n,t){return Object.assign(Object.create(n),t)}function Er(n,t=[""],e,i,r=()=>n[0]){const a=e||n;typeof i>"u"&&(i=yo("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>Er([o,...n],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return mo(o,l,()=>bh(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return xo(o).includes(l)},ownKeys(o){return xo(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function tn(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:po(n,i),setContext:a=>tn(n,a,e,i),override:a=>tn(n.override(a),t,e,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return mo(a,s,()=>dh(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function po(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:Wt(e)?e:()=>e,isIndexable:Wt(i)?i:()=>i}}const uh=(n,t)=>n?n+wr(t):t,Rr=(n,t)=>q(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mo(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function dh(n,t,e){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;let o=i[t];return Wt(o)&&s.isScriptable(t)&&(o=hh(t,o,n,e)),it(o)&&o.length&&(o=fh(t,o,n,s.isIndexable)),Rr(t,o)&&(o=tn(o,r,a&&a[t],s)),o}function hh(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||i);return o.delete(n),Rr(n,l)&&(l=Ar(r._scopes,r,n,l)),l}function fh(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&i(n))return t[a.index%t.length];if(q(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ar(c,r,n,u);t.push(tn(d,a,s&&s[n],o))}}return t}function bo(n,t,e){return Wt(n)?n(t,e):n}const gh=(n,t)=>n===!0?t:typeof n=="string"?be(t,n):void 0;function ph(n,t,e,i,r){for(const a of t){const s=gh(e,a);if(s){n.add(s);const o=bo(s._fallback,e,r);if(typeof o<"u"&&o!==e&&o!==i)return o}else if(s===!1&&typeof i<"u"&&e!==i)return null}return!1}function Ar(n,t,e,i){const r=t._rootScopes,a=bo(t._fallback,e,i),s=[...n,...r],o=new Set;o.add(i);let l=vo(o,s,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=vo(o,s,a,l,i),l===null)?!1:Er(Array.from(o),[""],r,a,()=>mh(t,e,i))}function vo(n,t,e,i,r){for(;e;)e=ph(n,t,e,i,r);return e}function mh(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return it(r)&&q(e)?e:r||{}}function bh(n,t,e,i){let r;for(const a of t)if(r=yo(uh(a,n),e),typeof r<"u")return Rr(n,r)?Ar(e,i,n,r):r}function yo(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function xo(n){let t=n._keys;return t||(t=n._keys=vh(n._scopes)),t}function vh(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function wo(n,t,e,i){const{iScale:r}=n,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+e,u=t[c],s[o]={r:r.parse(be(u,a),c)};return s}const yh=Number.EPSILON||1e-14,en=(n,t)=>t<n.length&&!n[t].skip&&n[t],_o=n=>n==="x"?"y":"x";function xh(n,t,e,i){const r=n.skip?t:n,a=t,s=e.skip?t:e,o=Ze(a,r),l=Ze(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function wh(n,t,e){const i=n.length;let r,a,s,o,l,c=en(n,0);for(let u=0;u<i-1;++u)if(l=c,c=en(n,u+1),!(!l||!c)){if(wn(t[u],0,yh)){e[u]=e[u+1]=0;continue}r=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=r*s*t[u],e[u+1]=a*s*t[u])}}function _h(n,t,e="x"){const i=_o(e),r=n.length;let a,s,o,l=en(n,0);for(let c=0;c<r;++c){if(s=o,o=l,l=en(n,c+1),!o)continue;const u=o[e],d=o[i];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function Mh(n,t="x"){const e=_o(t),i=n.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=en(n,0);for(s=0;s<i;++s)if(o=l,l=c,c=en(n,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Zt(r[s-1])!==Zt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}wh(n,r,a),_h(n,a,t)}function _i(n,t,e){return Math.max(Math.min(n,e),t)}function Th(n,t){let e,i,r,a,s,o=ue(n[0],t);for(e=0,i=n.length;e<i;++e)s=a,a=o,o=e<i-1&&ue(n[e+1],t),a&&(r=n[e],s&&(r.cp1x=_i(r.cp1x,t.left,t.right),r.cp1y=_i(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=_i(r.cp2x,t.left,t.right),r.cp2y=_i(r.cp2y,t.top,t.bottom)))}function Sh(n,t,e,i,r){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Mh(n,r);else{let c=i?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=xh(c,o,n[Math.min(a+1,s-(i?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&Th(n,e)}function Mo(){return typeof window<"u"&&typeof document<"u"}function Lr(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const Ti=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Dh(n,t){return Ti(n).getPropertyValue(t)}const kh=["top","right","bottom","left"];function Ye(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const a=kh[r];i[a]=parseFloat(n[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Ch=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function Ph(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(Ch(r,a,n.target))o=r,l=a;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function _e(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=Ti(e),a=r.boxSizing==="border-box",s=Ye(r,"padding"),o=Ye(r,"border","width"),{x:l,y:c,box:u}=Ph(n,e),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:g}=t;return a&&(f-=s.width+o.width,g-=s.height+o.height),{x:Math.round((l-d)/f*e.width/i),y:Math.round((c-h)/g*e.height/i)}}function Oh(n,t,e){let i,r;if(t===void 0||e===void 0){const a=Lr(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Ti(a),l=Ye(o,"border","width"),c=Ye(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,i=Mi(o.maxWidth,a,"clientWidth"),r=Mi(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||mi,maxHeight:r||mi}}const Si=n=>Math.round(n*10)/10;function Eh(n,t,e,i){const r=Ti(n),a=Ye(r,"margin"),s=Mi(r.maxWidth,n,"clientWidth")||mi,o=Mi(r.maxHeight,n,"clientHeight")||mi,l=Oh(n,t,e);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=Ye(r,"border","width"),f=Ye(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Si(Math.min(c,s,l.maxWidth)),u=Si(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Si(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Si(Math.floor(u*i))),{width:c,height:u}}function To(n,t,e){const i=t||1,r=Math.floor(n.height*i),a=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(n.currentDevicePixelRatio=i,s.height=r,s.width=a,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Rh=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function So(n,t){const e=Dh(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ue(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Ah(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Lh(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=Ue(n,r,e),o=Ue(r,a,e),l=Ue(a,t,e),c=Ue(s,o,e),u=Ue(o,l,e);return Ue(c,u,e)}const Ih=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Nh=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function nn(n,t,e){return n?Ih(t,e):Nh()}function Do(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function ko(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Co(n){return n==="angle"?{between:_n,compare:Fd,normalize:$t}:{between:le,compare:(t,e)=>t-e,normalize:t=>t}}function Po({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function Fh(n,t,e){const{property:i,start:r,end:a}=e,{between:s,normalize:o}=Co(i),l=t.length;let{start:c,end:u,loop:d}=n,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Oo(n,t,e){if(!e)return[n];const{property:i,start:r,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Co(i),{start:u,end:d,loop:h,style:f}=Fh(n,t,e),g=[];let v=!1,b=null,m,y,w;const x=()=>l(r,w,m)&&o(r,w)!==0,_=()=>o(a,m)===0||l(a,w,m),M=()=>v||x(),T=()=>!v||_();for(let S=u,k=u;S<=d;++S)y=t[S%s],!y.skip&&(m=c(y[i]),m!==w&&(v=l(m,r,a),b===null&&M()&&(b=o(m,r)===0?S:k),b!==null&&T()&&(g.push(Po({start:b,end:S,loop:h,count:s,style:f})),b=null),k=S,w=m));return b!==null&&g.push(Po({start:b,end:d,loop:h,count:s,style:f})),g}function Eo(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const a=Oo(i[r],n.points,t);a.length&&e.push(...a)}return e}function Wh(n,t,e,i){let r=0,a=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(a+=r);a>r&&n[a%t].skip;)a--;return a%=t,{start:r,end:a}}function Yh(n,t,e,i){const r=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%r];c.skip||c.stop?o.skip||(i=!1,a.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%r,end:s%r,loop:i}),a}function Uh(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const a=!!n._loop,{start:s,end:o}=Wh(e,r,a,i);if(i===!0)return Ro(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+r:o,c=!!n._fullLoop&&s===0&&o===r-1;return Ro(n,Yh(e,s,l,c),e,t)}function Ro(n,t,e,i){return!i||!i.setContext||!e?t:Bh(n,t,e,i)}function Bh(n,t,e,i){const r=n._chart.getContext(),a=Ao(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,h=d;function f(g,v,b,m){const y=o?-1:1;if(g!==v){for(g+=l;e[g%l].skip;)g-=y;for(;e[v%l].skip;)v+=y;g%l!==v%l&&(c.push({start:g%l,end:v%l,loop:b,style:m}),u=m,d=v%l)}}for(const g of t){d=o?d:g.start;let v=e[d%l],b;for(h=d+1;h<=g.end;h++){const m=e[h%l];b=Ao(i.setContext(we(r,{type:"segment",p0:v,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),zh(b,u)&&f(d,h-1,g.loop,u),v=m,u=b}d<h-1&&f(d,h-1,g.loop,u)}return c}function Ao(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function zh(n,t){if(!t)return!1;const e=[],i=function(r,a){return Sr(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
11
+ */function oe(){}const Cd=(()=>{let n=0;return()=>n++})();function B(n){return n===null||typeof n>"u"}function it(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function q(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function gt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Ht(n,t){return gt(n)?n:t}function U(n,t){return typeof n>"u"?t:n}const Pd=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,Vs=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function at(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function st(n,t,e,i){let r,a,s;if(it(n))if(a=n.length,i)for(r=a-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<a;r++)t.call(e,n[r],r);else if(q(n))for(s=Object.keys(n),a=s.length,r=0;r<a;r++)t.call(e,n[s[r]],s[r])}function gi(n,t){let e,i,r,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],a=t[e],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function pi(n){if(it(n))return n.map(pi);if(q(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=pi(n[e[r]]);return t}return n}function js(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Od(n,t,e,i){if(!js(n))return;const r=t[n],a=e[n];q(r)&&q(a)?yn(r,a,i):t[n]=pi(a)}function yn(n,t,e){const i=it(t)?t:[t],r=i.length;if(!q(n))return n;e=e||{};const a=e.merger||Od;let s;for(let o=0;o<r;++o){if(s=i[o],!q(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function xn(n,t){return yn(n,t,{merger:Ed})}function Ed(n,t,e){if(!js(n))return;const i=t[n],r=e[n];q(i)&&q(r)?xn(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=pi(r))}const qs={"":n=>n,x:n=>n.x,y:n=>n.y};function Rd(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Ad(n){const t=Rd(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function be(n,t){return(qs[t]||(qs[t]=Ad(t)))(n)}function wr(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Ft=n=>typeof n<"u",Wt=n=>typeof n=="function",Xs=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Ld(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Q=Math.PI,ct=2*Q,Id=ct+Q,mi=Number.POSITIVE_INFINITY,_r=Q/180,ut=Q/2,qt=Q/4,bi=Q*2/3,ve=Math.log10,Zt=Math.sign;function wn(n,t,e){return Math.abs(n-t)<e}function Gs(n){const t=Math.round(n);n=wn(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(ve(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Nd(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,a)=>r-a).pop(),t}function ye(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Fd(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Ks(n,t,e){let i,r,a;for(i=0,r=n.length;i<r;i++)a=n[i][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Tt(n){return n*(Q/180)}function vi(n){return n*(180/Q)}function Qs(n){if(!gt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Zs(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let a=Math.atan2(i,e);return a<-.5*Q&&(a+=ct),{angle:a,distance:r}}function Ze(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Wd(n,t){return(n-t+Id)%ct-Q}function $t(n){return(n%ct+ct)%ct}function _n(n,t,e,i){const r=$t(n),a=$t(t),s=$t(e),o=$t(a-r),l=$t(s-r),c=$t(r-a),u=$t(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Pt(n,t,e){return Math.max(t,Math.min(e,n))}function Yd(n){return Pt(n,-32768,32767)}function le(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Mr(n,t,e){e=e||(s=>n[s]<t);let i=n.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,e(a)?r=a:i=a;return{lo:r,hi:i}}const ce=(n,t,e,i)=>Mr(n,e,i?r=>{const a=n[r][t];return a<e||a===e&&n[r+1][t]===e}:r=>n[r][t]<e),Ud=(n,t,e)=>Mr(n,e,i=>n[i][t]>=e);function Bd(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const Js=["push","pop","shift","splice","unshift"];function zd(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Js.forEach(e=>{const i="_onData"+wr(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function to(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(Js.forEach(a=>{delete n[a]}),delete n._chartjs)}function eo(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const no=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function io(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,no.call(window,()=>{i=!1,n.apply(t,e)}))}}function Hd(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const Tr=n=>n==="start"?"left":n==="end"?"right":"center",At=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,$d=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ro(n,t,e){const i=t.length;let r=0,a=i;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=Pt(Math.min(ce(o,l,c).lo,e?i:ce(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=Pt(Math.max(ce(o,s.axis,u,!0).hi+1,e?0:ce(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function ao(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),a}const yi=n=>n===0||n===1,so=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*ct/e)),oo=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*ct/e)+1,Mn={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*ut)+1,easeOutSine:n=>Math.sin(n*ut),easeInOutSine:n=>-.5*(Math.cos(Q*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>yi(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>yi(n)?n:so(n,.075,.3),easeOutElastic:n=>yi(n)?n:oo(n,.075,.3),easeInOutElastic(n){return yi(n)?n:n<.5?.5*so(n*2,.1125,.45):.5+.5*oo(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-Mn.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Mn.easeInBounce(n*2)*.5:Mn.easeOutBounce(n*2-1)*.5+.5};function Sr(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function lo(n){return Sr(n)?n:new vn(n)}function Dr(n){return Sr(n)?n:new vn(n).saturate(.5).darken(.1).hexString()}const Vd=["x","y","borderWidth","radius","tension"],jd=["color","borderColor","backgroundColor"];function qd(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:jd},numbers:{type:"number",properties:Vd}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Xd(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const co=new Map;function Gd(n,t){t=t||{};const e=n+JSON.stringify(t);let i=co.get(e);return i||(i=new Intl.NumberFormat(n,t),co.set(e,i)),i}function Tn(n,t,e){return Gd(t,e).format(n)}const uo={values(n){return it(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,a=n;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=Kd(n,e)}const s=ve(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),Tn(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(ve(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?uo.numeric.call(this,n,t,e):""}};function Kd(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var xi={formatters:uo};function Qd(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ne=Object.create(null),kr=Object.create(null);function Sn(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const a=e[i];n=n[a]||(n[a]=Object.create(null))}return n}function Cr(n,t,e){return typeof t=="string"?yn(Sn(n,t),e):yn(Sn(n,""),t)}class Zd{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Dr(r.backgroundColor),this.hoverBorderColor=(i,r)=>Dr(r.borderColor),this.hoverColor=(i,r)=>Dr(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Cr(this,t,e)}get(t){return Sn(this,t)}describe(t,e){return Cr(kr,t,e)}override(t,e){return Cr(Ne,t,e)}route(t,e,i,r){const a=Sn(this,t),s=Sn(this,i),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[r];return q(l)?Object.assign({},c,l):U(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var pt=new Zd({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[qd,Xd,Qd]);function Jd(n){return!n||B(n.size)||B(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function wi(n,t,e,i,r){let a=t[r];return a||(a=t[r]=n.measureText(r).width,e.push(r)),a>i&&(i=a),i}function th(n,t,e,i){i=i||{};let r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},a=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=e[l],d!=null&&!it(d))s=wi(n,r,a,s,d);else if(it(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!it(h)&&(s=wi(n,r,a,s,h));n.restore();const f=a.length/2;if(f>e.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function Fe(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function ho(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Pr(n,t,e,i){fo(n,t,e,i,null)}function fo(n,t,e,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,g=t.rotation,v=t.radius;let b=(g||0)*_r;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(b),n.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),n.restore();return}if(!(isNaN(v)||v<=0)){switch(n.beginPath(),f){default:r?n.ellipse(e,i,r/2,v,0,0,ct):n.arc(e,i,v,0,ct),n.closePath();break;case"triangle":u=r?r/2:v,n.moveTo(e+Math.sin(b)*u,i-Math.cos(b)*v),b+=bi,n.lineTo(e+Math.sin(b)*u,i-Math.cos(b)*v),b+=bi,n.lineTo(e+Math.sin(b)*u,i-Math.cos(b)*v),n.closePath();break;case"rectRounded":c=v*.516,l=v-c,s=Math.cos(b+qt)*l,d=Math.cos(b+qt)*(r?r/2-c:l),o=Math.sin(b+qt)*l,h=Math.sin(b+qt)*(r?r/2-c:l),n.arc(e-d,i-o,c,b-Q,b-ut),n.arc(e+h,i-s,c,b-ut,b),n.arc(e+d,i+o,c,b,b+ut),n.arc(e-h,i+s,c,b+ut,b+Q),n.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*v,u=r?r/2:l,n.rect(e-u,i-l,2*u,2*l);break}b+=qt;case"rectRot":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+h,i-s),n.lineTo(e+d,i+o),n.lineTo(e-h,i+s),n.closePath();break;case"crossRot":b+=qt;case"cross":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s);break;case"star":d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s),b+=qt,d=Math.cos(b)*(r?r/2:v),s=Math.cos(b)*v,o=Math.sin(b)*v,h=Math.sin(b)*(r?r/2:v),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+h,i-s),n.lineTo(e-h,i+s);break;case"line":s=r?r/2:Math.cos(b)*v,o=Math.sin(b)*v,n.moveTo(e-s,i-o),n.lineTo(e+s,i+o);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(b)*(r?r/2:v),i+Math.sin(b)*v);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function ue(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Dn(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function kn(n){n.restore()}function eh(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function nh(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function ih(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),B(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function rh(n,t,e,i,r){if(r.strikethrough||r.underline){const a=n.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function ah(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function We(n,t,e,i,r,a={}){const s=it(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=r.string,ih(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&ah(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),B(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,i,a.maxWidth)),n.fillText(c,e,i,a.maxWidth),rh(n,e,i,c,a),i+=Number(r.lineHeight);n.restore()}function Je(n,t){const{x:e,y:i,w:r,h:a,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,-ut,Q,!0),n.lineTo(e,i+a-s.bottomLeft),n.arc(e+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,Q,ut,!0),n.lineTo(e+r-s.bottomRight,i+a),n.arc(e+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,ut,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-ut,!0),n.lineTo(e+s.topLeft,i)}const sh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,oh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function lh(n,t){const e=(""+n).match(sh);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const ch=n=>+n||0;function Or(n,t){const e={},i=q(t),r=i?Object.keys(t):t,a=q(n)?i?s=>U(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=ch(a(s));return e}function go(n){return Or(n,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(n){return Or(n,["topLeft","topRight","bottomLeft","bottomRight"])}function St(n){const t=go(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function dt(n,t){n=n||{},t=t||pt.font;let e=U(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=U(n.style,t.style);i&&!(""+i).match(oh)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:U(n.family,t.family),lineHeight:lh(U(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:U(n.weight,t.weight),string:""};return r.string=Jd(r),r}function Cn(n,t,e,i){let r=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),e!==void 0&&it(o)&&(o=o[e%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function uh(n,t,e){const{min:i,max:r}=n,a=Vs(t,(r-i)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function we(n,t){return Object.assign(Object.create(n),t)}function Er(n,t=[""],e,i,r=()=>n[0]){const a=e||n;typeof i>"u"&&(i=yo("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>Er([o,...n],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return mo(o,l,()=>vh(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return xo(o).includes(l)},ownKeys(o){return xo(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function tn(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:po(n,i),setContext:a=>tn(n,a,e,i),override:a=>tn(n.override(a),t,e,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return mo(a,s,()=>hh(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function po(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:Wt(e)?e:()=>e,isIndexable:Wt(i)?i:()=>i}}const dh=(n,t)=>n?n+wr(t):t,Rr=(n,t)=>q(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mo(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function hh(n,t,e){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;let o=i[t];return Wt(o)&&s.isScriptable(t)&&(o=fh(t,o,n,e)),it(o)&&o.length&&(o=gh(t,o,n,s.isIndexable)),Rr(t,o)&&(o=tn(o,r,a&&a[t],s)),o}function fh(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||i);return o.delete(n),Rr(n,l)&&(l=Ar(r._scopes,r,n,l)),l}function gh(n,t,e,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&i(n))return t[a.index%t.length];if(q(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ar(c,r,n,u);t.push(tn(d,a,s&&s[n],o))}}return t}function bo(n,t,e){return Wt(n)?n(t,e):n}const ph=(n,t)=>n===!0?t:typeof n=="string"?be(t,n):void 0;function mh(n,t,e,i,r){for(const a of t){const s=ph(e,a);if(s){n.add(s);const o=bo(s._fallback,e,r);if(typeof o<"u"&&o!==e&&o!==i)return o}else if(s===!1&&typeof i<"u"&&e!==i)return null}return!1}function Ar(n,t,e,i){const r=t._rootScopes,a=bo(t._fallback,e,i),s=[...n,...r],o=new Set;o.add(i);let l=vo(o,s,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=vo(o,s,a,l,i),l===null)?!1:Er(Array.from(o),[""],r,a,()=>bh(t,e,i))}function vo(n,t,e,i,r){for(;e;)e=mh(n,t,e,i,r);return e}function bh(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return it(r)&&q(e)?e:r||{}}function vh(n,t,e,i){let r;for(const a of t)if(r=yo(dh(a,n),e),typeof r<"u")return Rr(n,r)?Ar(e,i,n,r):r}function yo(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function xo(n){let t=n._keys;return t||(t=n._keys=yh(n._scopes)),t}function yh(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function wo(n,t,e,i){const{iScale:r}=n,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+e,u=t[c],s[o]={r:r.parse(be(u,a),c)};return s}const xh=Number.EPSILON||1e-14,en=(n,t)=>t<n.length&&!n[t].skip&&n[t],_o=n=>n==="x"?"y":"x";function wh(n,t,e,i){const r=n.skip?t:n,a=t,s=e.skip?t:e,o=Ze(a,r),l=Ze(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function _h(n,t,e){const i=n.length;let r,a,s,o,l,c=en(n,0);for(let u=0;u<i-1;++u)if(l=c,c=en(n,u+1),!(!l||!c)){if(wn(t[u],0,xh)){e[u]=e[u+1]=0;continue}r=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=r*s*t[u],e[u+1]=a*s*t[u])}}function Mh(n,t,e="x"){const i=_o(e),r=n.length;let a,s,o,l=en(n,0);for(let c=0;c<r;++c){if(s=o,o=l,l=en(n,c+1),!o)continue;const u=o[e],d=o[i];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function Th(n,t="x"){const e=_o(t),i=n.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=en(n,0);for(s=0;s<i;++s)if(o=l,l=c,c=en(n,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Zt(r[s-1])!==Zt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}_h(n,r,a),Mh(n,a,t)}function _i(n,t,e){return Math.max(Math.min(n,e),t)}function Sh(n,t){let e,i,r,a,s,o=ue(n[0],t);for(e=0,i=n.length;e<i;++e)s=a,a=o,o=e<i-1&&ue(n[e+1],t),a&&(r=n[e],s&&(r.cp1x=_i(r.cp1x,t.left,t.right),r.cp1y=_i(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=_i(r.cp2x,t.left,t.right),r.cp2y=_i(r.cp2y,t.top,t.bottom)))}function Dh(n,t,e,i,r){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Th(n,r);else{let c=i?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=wh(c,o,n[Math.min(a+1,s-(i?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&Sh(n,e)}function Mo(){return typeof window<"u"&&typeof document<"u"}function Lr(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const Ti=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function kh(n,t){return Ti(n).getPropertyValue(t)}const Ch=["top","right","bottom","left"];function Ye(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const a=Ch[r];i[a]=parseFloat(n[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Ph=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function Oh(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(Ph(r,a,n.target))o=r,l=a;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function _e(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=Ti(e),a=r.boxSizing==="border-box",s=Ye(r,"padding"),o=Ye(r,"border","width"),{x:l,y:c,box:u}=Oh(n,e),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:g}=t;return a&&(f-=s.width+o.width,g-=s.height+o.height),{x:Math.round((l-d)/f*e.width/i),y:Math.round((c-h)/g*e.height/i)}}function Eh(n,t,e){let i,r;if(t===void 0||e===void 0){const a=Lr(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Ti(a),l=Ye(o,"border","width"),c=Ye(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,i=Mi(o.maxWidth,a,"clientWidth"),r=Mi(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||mi,maxHeight:r||mi}}const Si=n=>Math.round(n*10)/10;function Rh(n,t,e,i){const r=Ti(n),a=Ye(r,"margin"),s=Mi(r.maxWidth,n,"clientWidth")||mi,o=Mi(r.maxHeight,n,"clientHeight")||mi,l=Eh(n,t,e);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=Ye(r,"border","width"),f=Ye(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Si(Math.min(c,s,l.maxWidth)),u=Si(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Si(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Si(Math.floor(u*i))),{width:c,height:u}}function To(n,t,e){const i=t||1,r=Math.floor(n.height*i),a=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(n.currentDevicePixelRatio=i,s.height=r,s.width=a,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Ah=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function So(n,t){const e=kh(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ue(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Lh(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Ih(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=Ue(n,r,e),o=Ue(r,a,e),l=Ue(a,t,e),c=Ue(s,o,e),u=Ue(o,l,e);return Ue(c,u,e)}const Nh=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Fh=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function nn(n,t,e){return n?Nh(t,e):Fh()}function Do(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function ko(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Co(n){return n==="angle"?{between:_n,compare:Wd,normalize:$t}:{between:le,compare:(t,e)=>t-e,normalize:t=>t}}function Po({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function Wh(n,t,e){const{property:i,start:r,end:a}=e,{between:s,normalize:o}=Co(i),l=t.length;let{start:c,end:u,loop:d}=n,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Oo(n,t,e){if(!e)return[n];const{property:i,start:r,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Co(i),{start:u,end:d,loop:h,style:f}=Wh(n,t,e),g=[];let v=!1,b=null,m,y,w;const x=()=>l(r,w,m)&&o(r,w)!==0,_=()=>o(a,m)===0||l(a,w,m),M=()=>v||x(),T=()=>!v||_();for(let S=u,k=u;S<=d;++S)y=t[S%s],!y.skip&&(m=c(y[i]),m!==w&&(v=l(m,r,a),b===null&&M()&&(b=o(m,r)===0?S:k),b!==null&&T()&&(g.push(Po({start:b,end:S,loop:h,count:s,style:f})),b=null),k=S,w=m));return b!==null&&g.push(Po({start:b,end:d,loop:h,count:s,style:f})),g}function Eo(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const a=Oo(i[r],n.points,t);a.length&&e.push(...a)}return e}function Yh(n,t,e,i){let r=0,a=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(a+=r);a>r&&n[a%t].skip;)a--;return a%=t,{start:r,end:a}}function Uh(n,t,e,i){const r=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%r];c.skip||c.stop?o.skip||(i=!1,a.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%r,end:s%r,loop:i}),a}function Bh(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const a=!!n._loop,{start:s,end:o}=Yh(e,r,a,i);if(i===!0)return Ro(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+r:o,c=!!n._fullLoop&&s===0&&o===r-1;return Ro(n,Uh(e,s,l,c),e,t)}function Ro(n,t,e,i){return!i||!i.setContext||!e?t:zh(n,t,e,i)}function zh(n,t,e,i){const r=n._chart.getContext(),a=Ao(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,h=d;function f(g,v,b,m){const y=o?-1:1;if(g!==v){for(g+=l;e[g%l].skip;)g-=y;for(;e[v%l].skip;)v+=y;g%l!==v%l&&(c.push({start:g%l,end:v%l,loop:b,style:m}),u=m,d=v%l)}}for(const g of t){d=o?d:g.start;let v=e[d%l],b;for(h=d+1;h<=g.end;h++){const m=e[h%l];b=Ao(i.setContext(we(r,{type:"segment",p0:v,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),Hh(b,u)&&f(d,h-1,g.loop,u),v=m,u=b}d<h-1&&f(d,h-1,g.loop,u)}return c}function Ao(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function Hh(n,t){if(!t)return!1;const e=[],i=function(r,a){return Sr(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
12
12
  * Chart.js v4.3.2
13
13
  * https://www.chartjs.org
14
14
  * (c) 2023 Chart.js Contributors
15
15
  * Released under the MIT License
16
- */class Hh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const a=e.listeners[r],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=no.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(r.draw(),this._notify(r,i,t,"progress")),a.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var de=new Hh;const Lo="transparent",$h={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=lo(n||Lo),r=i.valid&&lo(t||Lo);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class Vh{constructor(t,e,i,r){const a=e[i];r=Cn([t.to,r,a,t.from]);const s=Cn([t.from,a,r]);this._active=!0,this._fn=t.fn||$h[t.type||typeof s],this._easing=Mn[t.easing]||Mn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Cn([t.to,e,r,t.from]),this._from=Cn([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<i),!this._active){this._target[r]=o,this._notify(!0);return}if(e<0){this._target[r]=a;return}l=e/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class Ir{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!q(t))return;const e=Object.keys(pt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!q(a))return;const s={};for(const o of e)s[o]=a[o];(it(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,e){const i=e.options,r=qh(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&jh(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new Vh(h,t,c,u),r.push(d)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return de.add(this._chart,i),!0}}function jh(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=n[i[r]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function qh(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Io(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Xh(n,t,e){if(e===!1)return!1;const i=Io(n,e),r=Io(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Gh(n){let t,e,i,r;return q(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function No(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)e.push(i[r].index);return e}function Fo(n,t,e,i={}){const r=n.keys,a=i.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===e){if(i.all)continue;break}c=n.values[l],gt(c)&&(a||t===0||Zt(t)===Zt(c))&&(t+=c)}return t}}function Kh(n){const t=Object.keys(n),e=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],e[i]={x:a,y:n[a]};return e}function Wo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Qh(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Zh(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function Jh(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Yo(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=n[r.index];if(e&&a>0||!e&&a<0)return r.index}return null}function Uo(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=Qh(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const g=t[f],{[l]:v,[c]:b}=g,m=g._stacks||(g._stacks={});h=m[c]=Jh(r,u,v),h[o]=b,h._top=Yo(h,s,!0,i.type),h._bottom=Yo(h,s,!1,i.type);const y=h._visualValues||(h._visualValues={});y[o]=b}}function Nr(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function tf(n,t){return we(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ef(n,t,e){return we(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Pn(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][e]===void 0)return;delete a[i][e],a[i]._visualValues!==void 0&&a[i]._visualValues[e]!==void 0&&delete a[i]._visualValues[e]}}}const Fr=n=>n==="reset"||n==="none",Bo=(n,t)=>t?n:Object.assign({},n),nf=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:No(e,!0),values:null};class Xt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Wo(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Pn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,a=e.xAxisID=U(i.xAxisID,Nr(t,"x")),s=e.yAxisID=U(i.yAxisID,Nr(t,"y")),o=e.rAxisID=U(i.rAxisID,Nr(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,a,s,o),u=e.vAxisID=r(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&to(this._data,this),t._stacked&&Pn(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(q(e))this._data=Kh(e);else if(i!==e){if(i){to(i,this);const r=this._cachedMeta;Pn(r),r._parsed=[]}e&&Object.isExtensible(e)&&Bd(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=e._stacked;e._stacked=Wo(e.vScale,e),e.stack!==i.stack&&(r=!0,Pn(e),e.stack=i.stack),this._resyncElements(t),(r||a!==e._stacked)&&Uo(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&e===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{it(r[t])?h=this.parseArrayData(i,r,t,e):q(r[t])?h=this.parseObjectData(i,r,t,e):h=this.parsePrimitiveData(i,r,t,e);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&Uo(this,h)}parsePrimitiveData(t,e,i,r){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(r);let h,f,g;for(h=0,f=r;h<f;++h)g=h+i,d[h]={[o]:u||a.parse(c[g],g),[l]:s.parse(e[g],g)};return d}parseArrayData(t,e,i,r){const{xScale:a,yScale:s}=t,o=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=e[h],c[u]={x:a.parse(be(f,o),h),y:s.parse(be(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:No(r,!0),values:e._stacks[t.axis]._visualValues};return Fo(o,s,a.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const a=i[e.axis];let s=a===null?NaN:a;const o=r&&i._stacks[e.axis];r&&o&&(r.values=o,s=Fo(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=nf(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Zh(o);let h,f;function g(){f=r[h];const v=f[o.axis];return!gt(f[t.axis])||u>v||d<v}for(h=0;h<s&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=e.length;r<a;++r)s=e[r][t.axis],gt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Gh(U(this.options.clip,Xh(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=ef(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=tf(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&Ft(i);if(o)return Bo(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(pt.elements[t]),g=()=>this.getContext(i,r,e),v=c.resolveNamedOptions(h,f,g,d);return v.$shared&&(v.$shared=l,a[s]=Object.freeze(Bo(v,l))),v}_resolveAnimations(t,e,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,e))}const c=new Ir(r,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Fr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(e,a)||a!==r;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:s}}updateElement(t,e,i,r){Fr(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!Fr(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const a=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const r=i.length,a=e.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,e,i=!0){const r=this._cachedMeta,a=r.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&Pn(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}C(Xt,"defaults",{}),C(Xt,"datasetElementType",null),C(Xt,"dataElementType",null);function rf(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=e.length;r<a;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=eo(i.sort((r,a)=>r-a))}return n._cache.$bar}function af(n){const t=n.iScale,e=rf(t,n.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(Ft(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=e.length;r<a;++r)s=t.getPixelForValue(e[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function sf(n,t,e,i){const r=e.barThickness;let a,s;return B(r)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[n]-a/2}}function of(n,t,e,i){const r=t.pixels,a=r[n];let s=n>0?r[n-1]:null,o=n<r.length-1?r[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/i,ratio:e.barPercentage,start:c}}function lf(n,t,e,i){const r=e.parse(n[0],i),a=e.parse(n[1],i),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function zo(n,t,e,i){return it(n)?lf(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Ho(n,t,e,i){const r=n.iScale,a=n.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=e,u=e+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(zo(h,d,a,c));return l}function Wr(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function cf(n,t,e){return n!==0?Zt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function uf(n){let t,e,i,r,a;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:e,end:i,reverse:t,top:r,bottom:a}}function df(n,t,e,i){let r=t.borderSkipped;const a={};if(!r){n.borderSkipped=a;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=uf(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=c:(e._bottom||0)===i?r=u:(a[$o(u,s,o,l)]=!0,r=c)),a[$o(r,s,o,l)]=!0,n.borderSkipped=a}function $o(n,t,e,i){return i?(n=hf(n,t,e),n=Vo(n,e,t)):n=Vo(n,t,e),n}function hf(n,t,e){return n===t?e:n===e?t:n}function Vo(n,t,e){return n==="start"?t:n==="end"?e:n}function ff(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class On extends Xt{parsePrimitiveData(t,e,i,r){return Ho(t,e,i,r)}parseArrayData(t,e,i,r){return Ho(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let h,f,g,v;for(h=i,f=i+r;h<f;++h)v=e[h],g={},g[a.axis]=a.parse(be(v,c),h),d.push(zo(be(v,u),g,s,h));return d}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,a=this.getParsed(t),s=a._custom,o=Wr(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,r);for(let f=e;f<e+i;f++){const g=this.getParsed(f),v=a||B(g[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),m=(g._stacks||{})[o.axis],y={horizontal:c,base:v.base,enableBorderRadius:!m||Wr(g._custom)||s===m._top||s===m._bottom,x:c?v.head:b.center,y:c?b.center:v.head,height:c?b.size:Math.abs(v.size),width:c?Math.abs(v.size):b.size};h&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const w=y.options||t[f].options;df(y,w,m,s),ff(y,w,u.ratio),this.updateElement(t[f],f,y,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=i.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(B(u)||isNaN(u))return!0};for(const l of r)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),a=e!==void 0?r.indexOf(e):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let a,s;for(a=0,s=e.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||af(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=Wr(c);let d=l[e.axis],h=0,f=i?this.applyStack(e,l,i):d,g,v;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&Zt(d)!==Zt(c.barEnd)&&(h=0),h+=d);const b=!B(a)&&!u?a:h;let m=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(h+f):g=m,v=g-m,Math.abs(v)<s){v=cf(v,e,o)*s,d===o&&(m-=v/2);const y=e.getPixelForDecimal(0),w=e.getPixelForDecimal(1),x=Math.min(y,w),_=Math.max(y,w);m=Math.max(Math.min(m,_),x),g=m+v,i&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(g)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const y=Zt(v)*e.getLineWidthForValue(o)/2;m+=y,v-=y}return{size:v,base:m,head:g,center:g+v/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,a=r.skipNull,s=U(r.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?of(t,e,r,c):sf(t,e,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[e.axis]!==null&&i[a].draw(this._ctx)}}C(On,"id","bar"),C(On,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),C(On,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Di extends Xt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const a=super.parsePrimitiveData(t,e,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,e,i,r){const a=super.parseArrayData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=U(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,e,i,r){const a=super.parseObjectData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=U(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,r),u=s.axis,d=o.axis;for(let h=e;h<e+i;h++){const f=t[h],g=!a&&this.getParsed(h),v={},b=v[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),m=v[d]=a?o.getBasePixel():o.getPixelForValue(g[d]);v.skip=isNaN(b)||isNaN(m),c&&(v.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(v.options.radius=0)),this.updateElement(f,h,v,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return e!=="active"&&(r.radius=0),r.radius+=U(i&&i._custom,a),r}}C(Di,"id","bubble"),C(Di,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),C(Di,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function gf(n,t,e){let i=1,r=1,a=0,s=0;if(t<ct){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(w,x,_)=>_n(w,o,l,!0)?1:Math.max(x,x*e,_,_*e),g=(w,x,_)=>_n(w,o,l,!0)?-1:Math.min(x,x*e,_,_*e),v=f(0,c,d),b=f(ut,u,h),m=g(Q,c,d),y=g(Q+ut,u,h);i=(v-m)/2,r=(b-y)/2,a=-(v+m)/2,s=-(b+y)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Me extends Xt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(q(i[t])){const{key:l="value"}=this._parsing;a=c=>+be(i[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Tt(this.options.rotation-90)}_getCircumference(){return Tt(this.options.circumference)}_getRotationExtents(){let t=ct,e=-ct;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(Cd(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:v}=gf(d,u,l),b=(i.width-s)/h,m=(i.height-s)/f,y=Math.max(Math.min(b,m)/2,0),w=Vs(this.options.radius,y),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*w,this.offsetY=v*w,r.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/ct)}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=a&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:v,includeOptions:b}=this._getSharedOptions(e,r);let m=this._getRotation(),y;for(y=0;y<e;++y)m+=this._circumference(y,a);for(y=e;y<e+i;++y){const w=this._circumference(y,a),x=t[y],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+w,circumference:w,outerRadius:g,innerRadius:f};b&&(_.options=v||this.resolveDataElementOptions(y,x.active?"active":r)),m+=w,this.updateElement(x,y,_,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?ct*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Tn(e._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,a,s,o,l;if(!t){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,o=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)l=o.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(U(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}C(Me,"id","doughnut"),C(Me,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),C(Me,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),C(Me,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class En extends Xt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=ro(e,r,s);this._drawStart=o,this._drawCount=l,ao(e)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r.slice(Math.max(this._drawStart-1,0),this._drawStart+this._drawCount);const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,o,l,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,r),h=s.axis,f=o.axis,{spanGaps:g,segment:v}=this.options,b=ye(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",y=e+i,w=t.length;let x=e>0&&this.getParsed(e-1);for(let _=0;_<w;++_){const M=t[_],T=m?M:{};if(_<e||_>=y){T.skip=!0;continue}const S=this.getParsed(_),k=B(S[f]),D=T[h]=s.getPixelForValue(S[h],_),R=T[f]=a||k?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[f],_);T.skip=isNaN(D)||isNaN(R)||k,T.stop=_>0&&Math.abs(S[h]-x[h])>b,v&&(T.parsed=S,T.raw=c.data[_]),d&&(T.options=u||this.resolveDataElementOptions(_,M.active?"active":r)),m||this.updateElement(M,_,T,r),x=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}C(En,"id","line"),C(En,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),C(En,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Rn extends Xt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Tn(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,e,i,r){return wo.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Q;let f=h,g;const v=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,r,v);for(g=e;g<e+i;g++){const b=t[g];let m=f,y=f+this._computeAngle(g,r,v),w=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,a&&(l.animateScale&&(w=0),l.animateRotate&&(m=y=h));const x={x:u,y:d,innerRadius:0,outerRadius:w,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(g,b.active?"active":r)};this.updateElement(b,g,x,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Tt(this.resolveDataElementOptions(t,e).angle||i):0}}C(Rn,"id","polarArea"),C(Rn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),C(Rn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Yr extends Me{}C(Yr,"id","pie"),C(Yr,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ki extends Xt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return wo.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],a=e.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(i,void 0,o,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=e;o<e+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":r),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}C(ki,"id","radar"),C(ki,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),C(ki,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ci extends Xt{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:a,count:s}=ro(e,i,r);if(this._drawStart=a,this._drawCount=s,ao(e)&&(a=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,g=o.axis,{spanGaps:v,segment:b}=this.options,m=ye(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none";let w=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const _=t[x],M=this.getParsed(x),T=y?_:{},S=B(M[g]),k=T[f]=s.getPixelForValue(M[f],x),D=T[g]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[g],x);T.skip=isNaN(k)||isNaN(D)||S,T.stop=x>0&&Math.abs(M[f]-w[f])>m,b&&(T.parsed=M,T.raw=c.data[x]),h&&(T.options=d||this.resolveDataElementOptions(x,_.active?"active":r)),y||this.updateElement(_,x,T,r),w=M}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,a,s)/2}}C(Ci,"id","scatter"),C(Ci,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),C(Ci,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var pf=Object.freeze({__proto__:null,BarController:On,BubbleController:Di,DoughnutController:Me,LineController:En,PieController:Yr,PolarAreaController:Rn,RadarController:ki,ScatterController:Ci});function Be(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ur{constructor(t){C(this,"options");this.options=t||{}}static override(t){Object.assign(Ur.prototype,t)}init(){}formats(){return Be()}parse(){return Be()}format(){return Be()}add(){return Be()}diff(){return Be()}startOf(){return Be()}endOf(){return Be()}}var jo={_date:Ur};function mf(n,t,e,i){const{controller:r,data:a,_sorted:s}=n,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?Yd:ce;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),h=l(a,t,e+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function An(n,t,e,i,r){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=mf(a[o],t,s,r);for(let f=d;f<=h;++f){const g=u[f];g.skip||i(g,c,f)}}}function bf(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function Br(n,t,e,i,r){const a=[];return!r&&!n.isPointInArea(t)||An(n,e,t,function(o,l,c){!r&&!ue(o,n.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function vf(n,t,e,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=Zs(s,{x:t.x,y:t.y});_n(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return An(n,e,t,a),r}function yf(n,t,e,i,r,a){let s=[];const o=bf(e);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const g=u.getCenterPoint(r);if(!(!!a||n.isPointInArea(g))&&!f)return;const b=o(t,g);b<l?(s=[{element:u,datasetIndex:d,index:h}],l=b):b===l&&s.push({element:u,datasetIndex:d,index:h})}return An(n,e,t,c),s}function zr(n,t,e,i,r,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!i?vf(n,t,e,r):yf(n,t,e,i,r,a)}function qo(n,t,e,i,r){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return An(n,e,t,(l,c,u)=>{l[s](t[e],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var Hr={evaluateInteractionItems:An,modes:{index(n,t,e,i){const r=_e(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?Br(n,r,a,i,s):zr(n,r,a,!1,i,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?Br(n,r,a,i,s):zr(n,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return Br(n,r,a,i,s)},nearest(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return zr(n,r,a,e.intersect,i,s)},x(n,t,e,i){const r=_e(t,n);return qo(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=_e(t,n);return qo(n,r,"y",e.intersect,i)}}};const Xo=["left","top","right","bottom"];function Ln(n,t){return n.filter(e=>e.pos===t)}function Go(n,t){return n.filter(e=>Xo.indexOf(e.pos)===-1&&e.box.axis===t)}function In(n,t){return n.sort((e,i)=>{const r=t?i:e,a=t?e:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function xf(n){const t=[];let e,i,r,a,s,o;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:e,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function wf(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:a}=e;if(!i||!Xo.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function _f(n,t){const e=wf(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*i:l&&t.availableWidth,o.height=r):(o.width=i,o.height=u?u*r:l&&t.availableHeight)}return e}function Mf(n){const t=xf(n),e=In(t.filter(c=>c.box.fullSize),!0),i=In(Ln(t,"left"),!0),r=In(Ln(t,"right")),a=In(Ln(t,"top"),!0),s=In(Ln(t,"bottom")),o=Go(t,"x"),l=Go(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Ln(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function Ko(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Qo(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Tf(n,t,e,i){const{pos:r,box:a}=e,s=n.maxPadding;if(!q(r)){e.size&&(n[r]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[r]+=e.size}a.getPadding&&Qo(s,a.getPadding());const o=Math.max(0,t.outerWidth-Ko(s,n,"left","right")),l=Math.max(0,t.outerHeight-Ko(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function Sf(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Df(n,t){const e=t.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return i(n?["left","right"]:["top","bottom"])}function Nn(n,t,e,i){const r=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,Df(o.horizontal,t));const{same:d,other:h}=Tf(t,e,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&Nn(r,t,e,i)||u}function Pi(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function Zo(n,t,e,i){const r=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,h=c.size||l.height;Ft(c.start)&&(s=c.start),l.fullSize?Pi(l,r.left,s,e.outerWidth-r.right-r.left,h):Pi(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;Ft(c.start)&&(a=c.start),l.fullSize?Pi(l,a,r.top,h,e.outerHeight-r.bottom-r.top):Pi(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var Lt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=St(n.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(e-r.height,0),o=Mf(n.boxes),l=o.vertical,c=o.horizontal;st(n.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,b)=>b.box.options&&b.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);Qo(h,St(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),g=_f(l.concat(c),d);Nn(o.fullSize,f,d,g),Nn(l,f,d,g),Nn(c,f,d,g)&&Nn(l,f,d,g),Sf(f),Zo(o.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Zo(o.rightAndBottom,f,d,g),n.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},st(o.chartArea,v=>{const b=v.box;Object.assign(b,n.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Jo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class kf extends Jo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Oi="$chartjs",Cf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tl=n=>n===null||n==="";function Pf(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Oi]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",tl(r)){const a=So(n,"width");a!==void 0&&(n.width=a)}if(tl(i))if(n.style.height==="")n.height=n.width/(t||2);else{const a=So(n,"height");a!==void 0&&(n.height=a)}return n}const el=Rh?{passive:!0}:!1;function Of(n,t,e){n.addEventListener(t,e,el)}function Ef(n,t,e){n.canvas.removeEventListener(t,e,el)}function Rf(n,t){const e=Cf[n.type]||n.type,{x:i,y:r}=_e(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ei(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Af(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ei(o.addedNodes,i),s=s&&!Ei(o.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Lf(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ei(o.removedNodes,i),s=s&&!Ei(o.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const Fn=new Map;let nl=0;function il(){const n=window.devicePixelRatio;n!==nl&&(nl=n,Fn.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function If(n,t){Fn.size||window.addEventListener("resize",il),Fn.set(n,t)}function Nf(n){Fn.delete(n),Fn.size||window.removeEventListener("resize",il)}function Ff(n,t,e){const i=n.canvas,r=i&&Lr(i);if(!r)return;const a=io((o,l)=>{const c=r.clientWidth;e(o,l),c<r.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(r),If(n,a),s}function $r(n,t,e){e&&e.disconnect(),t==="resize"&&Nf(n)}function Wf(n,t,e){const i=n.canvas,r=io(a=>{n.ctx!==null&&e(Rf(a,n))},n);return Of(i,t,r),r}class Yf extends Jo{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Pf(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Oi])return!1;const i=e[Oi].initial;["height","width"].forEach(a=>{const s=i[a];B(s)?e.removeAttribute(a):e.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{e.style[a]=r[a]}),e.width=e.width,delete e[Oi],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Af,detach:Lf,resize:Ff}[e]||Wf;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:$r,detach:$r,resize:$r}[e]||Ef)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Eh(t,e,i,r)}isAttached(t){const e=Lr(t);return!!(e&&e.isConnected)}}function Uf(n){return!Mo()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?kf:Yf}class Ot{constructor(){C(this,"x");C(this,"y");C(this,"active",!1);C(this,"options");C(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ye(this.x)&&ye(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}C(Ot,"defaults",{}),C(Ot,"defaultRoutes");function Bf(n,t){const e=n.options.ticks,i=zf(n),r=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?$f(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return Vf(t,c,a,s/r),c;const u=Hf(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(Ri(t,c,u,B(f)?0:o-f,o),d=0,h=s-1;d<h;d++)Ri(t,c,u,a[d],a[d+1]);return Ri(t,c,u,l,B(f)?t.length:l+f),c}return Ri(t,c,u),c}function zf(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function Hf(n,t,e){const i=jf(n),r=t.length/e;if(!i)return Math.max(r,1);const a=Id(i);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>r)return l}return Math.max(r,1)}function $f(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Vf(n,t,e,i){let r=0,a=e[0],s;for(i=Math.ceil(i),s=0;s<n.length;s++)s===a&&(t.push(n[s]),r++,a=e[r*i])}function Ri(n,t,e,i,r){const a=U(i,0),s=Math.min(U(r,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),r&&(l=r-i,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function jf(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const qf=n=>n==="left"?"right":n==="right"?"left":n,rl=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,al=(n,t)=>Math.min(t||n,n);function sl(n,t){const e=[],i=n.length/t,r=n.length;let a=0;for(;a<r;a+=i)e.push(n[Math.floor(a)]);return e}function Xf(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(r),c;if(!(e&&(i===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function Gf(n,t){st(n,e=>{const i=e.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete e.data[i[a]];i.splice(0,r)}})}function Wn(n){return n.drawTicks?n.tickLength:0}function ol(n,t){if(!n.display)return 0;const e=dt(n.font,t),i=St(n.padding);return(it(n.text)?n.text.length:1)*e.lineHeight+i.height}function Kf(n,t){return we(n,{scale:t,type:"scale"})}function Qf(n,t,e){return we(n,{tick:e,index:t,type:"tick"})}function Zf(n,t,e){let i=Tr(n);return(e&&t!=="right"||!e&&t==="right")&&(i=qf(i)),i}function Jf(n,t,e,i){const{top:r,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,h,f,g;const v=s-r,b=o-a;if(n.isHorizontal()){if(f=At(i,a,o),q(e)){const m=Object.keys(e)[0],y=e[m];g=u[m].getPixelForValue(y)+v-t}else e==="center"?g=(c.bottom+c.top)/2+v-t:g=rl(n,e,t);h=o-a}else{if(q(e)){const m=Object.keys(e)[0],y=e[m];f=u[m].getPixelForValue(y)-b+t}else e==="center"?f=(c.left+c.right)/2-b+t:f=rl(n,e,t);g=At(i,s,r),d=e==="left"?-ut:ut}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}class ze extends Ot{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=Ht(t,Number.POSITIVE_INFINITY),e=Ht(e,Number.NEGATIVE_INFINITY),i=Ht(i,Number.POSITIVE_INFINITY),r=Ht(r,Number.NEGATIVE_INFINITY),{min:Ht(t,i),max:Ht(e,r),minDefined:gt(t),maxDefined:gt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:e,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(e=Math.min(e,s.min)),a||(i=Math.max(i,s.max));return e=a&&e>i?i:e,i=r&&e>i?e:i,{min:Ht(e,Ht(i,e)),max:Ht(i,Ht(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){at(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ch(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?sl(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=Bf(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){at(this.options.afterUpdate,[this])}beforeSetDimensions(){at(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){at(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),at(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){at(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=at(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){at(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){at(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=al(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,a=e.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!e.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Pt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-Wn(t.grid)-e.padding-ol(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=vi(Math.min(Math.asin(Pt((u.highest.height+6)/o,-1,1)),Math.asin(Pt(l/c,-1,1))-Math.asin(Pt(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=ol(r,e.options.font);if(o?(t.width=this.maxWidth,t.height=Wn(a)+l):(t.height=this.maxHeight,t.width=Wn(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,g=Tt(this.labelRotation),v=Math.cos(g),b=Math.sin(g);if(o){const m=i.mirror?0:b*d.width+v*h.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{const m=i.mirror?0:v*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(c,u,b,v)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=r*t.width,f=i*e.height):(h=i*t.height,f=r*e.width):a==="start"?f=e.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=e.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){at(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)B(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=sl(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/al(e,i));let c=0,u=0,d,h,f,g,v,b,m,y,w,x,_;for(d=0;d<e;d+=l){if(g=t[d].label,v=this._resolveTickFontOptions(d),r.font=b=v.string,m=a[b]=a[b]||{data:{},gc:[]},y=v.lineHeight,w=x=0,!B(g)&&!it(g))w=wi(r,m.data,m.gc,w,g),x=y;else if(it(g))for(h=0,f=g.length;h<f;++h)_=g[h],!B(_)&&!it(_)&&(w=wi(r,m.data,m.gc,w,_),x+=y);s.push(w),o.push(x),c=Math.max(w,c),u=Math.max(x,u)}Gf(a,e);const M=s.indexOf(c),T=o.indexOf(u),S=k=>({width:s[k]||0,height:o[k]||0});return{first:S(0),last:S(e-1),widest:S(M),highest:S(T),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Wd(this._alignToPixels?Fe(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=Qf(this.getContext(),t,i))}return this.$context||(this.$context=Kf(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Tt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*i>o*r?o/i:l/r:l*r<o*i?l/i:o/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:a,position:s,border:o}=r,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Wn(a),f=[],g=o.setContext(this.getContext()),v=g.display?g.width:0,b=v/2,m=function(z){return Fe(i,z,v)};let y,w,x,_,M,T,S,k,D,R,I,V;if(s==="top")y=m(this.bottom),T=this.bottom-h,k=y-b,R=m(t.top)+b,V=t.bottom;else if(s==="bottom")y=m(this.top),R=t.top,V=m(t.bottom)-b,T=y+b,k=this.top+h;else if(s==="left")y=m(this.right),M=this.right-h,S=y-b,D=m(t.left)+b,I=t.right;else if(s==="right")y=m(this.left),D=t.left,I=m(t.right)-b,M=y+b,S=this.left+h;else if(e==="x"){if(s==="center")y=m((t.top+t.bottom)/2+.5);else if(q(s)){const z=Object.keys(s)[0],j=s[z];y=m(this.chart.scales[z].getPixelForValue(j))}R=t.top,V=t.bottom,T=y+b,k=T+h}else if(e==="y"){if(s==="center")y=m((t.left+t.right)/2);else if(q(s)){const z=Object.keys(s)[0],j=s[z];y=m(this.chart.scales[z].getPixelForValue(j))}M=y-b,S=M-h,D=t.left,I=t.right}const H=U(r.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/H));for(w=0;w<d;w+=F){const z=this.getContext(w),j=a.setContext(z),kt=o.setContext(z),ft=j.lineWidth,zt=j.color,O=kt.dash||[],A=kt.dashOffset,N=j.tickWidth,X=j.tickColor,G=j.tickBorderDash||[],nt=j.tickBorderDashOffset;x=Xf(this,w,l),x!==void 0&&(_=Fe(i,x,ft),c?M=S=D=I=_:T=k=R=V=_,f.push({tx1:M,ty1:T,tx2:S,ty2:k,x1:D,y1:R,x2:I,y2:V,width:ft,color:zt,borderDash:O,borderDashOffset:A,tickWidth:N,tickColor:X,tickBorderDash:G,tickBorderDashOffset:nt}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:a}=i,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,h=Wn(i.grid),f=h+u,g=d?-u:f,v=-Tt(this.labelRotation),b=[];let m,y,w,x,_,M,T,S,k,D,R,I,V="middle";if(r==="top")M=this.bottom-g,T=this._getXAxisLabelAlignment();else if(r==="bottom")M=this.top+g,T=this._getXAxisLabelAlignment();else if(r==="left"){const F=this._getYAxisLabelAlignment(h);T=F.textAlign,_=F.x}else if(r==="right"){const F=this._getYAxisLabelAlignment(h);T=F.textAlign,_=F.x}else if(e==="x"){if(r==="center")M=(t.top+t.bottom)/2+f;else if(q(r)){const F=Object.keys(r)[0],z=r[F];M=this.chart.scales[F].getPixelForValue(z)+f}T=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")_=(t.left+t.right)/2-f;else if(q(r)){const F=Object.keys(r)[0],z=r[F];_=this.chart.scales[F].getPixelForValue(z)}T=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const H=this._getLabelSizes();for(m=0,y=o.length;m<y;++m){w=o[m],x=w.label;const F=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,k=this._resolveTickFontOptions(m),D=k.lineHeight,R=it(x)?x.length:1;const z=R/2,j=F.color,kt=F.textStrokeColor,ft=F.textStrokeWidth;let zt=T;s?(_=S,T==="inner"&&(m===y-1?zt=this.options.reverse?"left":"right":m===0?zt=this.options.reverse?"right":"left":zt="center"),r==="top"?c==="near"||v!==0?I=-R*D+D/2:c==="center"?I=-H.highest.height/2-z*D+D:I=-H.highest.height+D/2:c==="near"||v!==0?I=D/2:c==="center"?I=H.highest.height/2-z*D:I=H.highest.height-R*D,d&&(I*=-1),v!==0&&!F.showLabelBackdrop&&(_+=D/2*Math.sin(v))):(M=S,I=(1-R)*D/2);let O;if(F.showLabelBackdrop){const A=St(F.backdropPadding),N=H.heights[m],X=H.widths[m];let G=I-A.top,nt=0-A.left;switch(V){case"middle":G-=N/2;break;case"bottom":G-=N;break}switch(T){case"center":nt-=X/2;break;case"right":nt-=X;break}O={left:nt,top:G,width:X+A.width,height:N+A.height,color:F.backdropColor}}b.push({label:x,font:k,textOffset:I,options:{rotation:v,color:j,strokeColor:kt,strokeWidth:ft,textAlign:zt,textBaseline:V,translation:[_,M],backdrop:O}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Tt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?r?(u=this.right+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?r?(u=this.left+a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=r.length;a<s;++a){const l=r[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:r}}=this,a=i.setContext(this.getContext()),s=i.display?a.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=Fe(t,this.left,s)-s/2,u=Fe(t,this.right,o)+o/2,d=h=l):(d=Fe(t,this.top,s)-s/2,h=Fe(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Dn(i,r);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;We(i,c,0,u,l,o)}r&&kn(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const a=dt(i.font),s=St(i.padding),o=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||q(e)?(l+=s.bottom,it(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=Jf(this,l,e,o);We(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Zf(o,e,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=U(t.grid&&t.grid.z,-1),r=U(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ze.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return dt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ai{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;ng(e)&&(i=this.register(e));const r=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,tg(t,s,i),this.override&&pt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in pt[r]&&(delete pt[r][i],this.override&&delete Ne[i])}}function tg(n,t,e){const i=yn(Object.create(null),[e?pt.get(e):{},pt.get(t),n.defaults]);pt.set(t,i),n.defaultRoutes&&eg(t,n.defaultRoutes),n.descriptors&&pt.describe(t,n.descriptors)}function eg(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),a=[n].concat(i).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");pt.route(a,r,l,o)})}function ng(n){return"id"in n&&"defaults"in n}class ig{constructor(){this.controllers=new Ai(Xt,"datasets",!0),this.elements=new Ai(Ot,"elements"),this.plugins=new Ai(Object,"plugins"),this.scales=new Ai(ze,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):st(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,i){const r=wr(t);at(i["before"+r],[],i),e[t](i),at(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var Jt=new ig;class rg{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(a,t,e,i);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[e,r,a.options];if(at(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){B(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=U(i.options&&i.options.plugins,{}),a=ag(i);return r===!1&&!e?[]:og(t,a,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function ag(n){const t={},e=[],i=Object.keys(Jt.plugins.items);for(let a=0;a<i.length;a++)e.push(Jt.getPlugin(i[a]));const r=n.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function sg(n,t){return!t&&n===!1?null:n===!0?{}:n}function og(n,{plugins:t,localIds:e},i,r){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=sg(i[l],r);c!==null&&a.push({plugin:o,options:lg(n.config,{plugin:o,local:e[l]},c,s)})}return a}function lg(n,{plugin:t,local:e},i,r){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(i,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Vr(n,t){const e=pt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function cg(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function ug(n,t){return n===t?"_index_":"_value_"}function ll(n){if(n==="x"||n==="y"||n==="r")return n}function dg(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function jr(n,...t){if(ll(n))return n;for(const e of t){const i=e.axis||dg(e.position)||n.length>1&&ll(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function cl(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function hg(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return cl(n,"x",e[0])||cl(n,"y",e[0])}return{}}function fg(n,t){const e=Ne[n.type]||{scales:{}},i=t.scales||{},r=Vr(n.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!q(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=jr(s,o,hg(s,n),pt.scales[o.type]),c=ug(l,r),u=e.scales||{};a[s]=xn(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||Vr(o,t),u=(Ne[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=cg(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),xn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];xn(o,[pt.scales[o.type],pt.scale])}),a}function ul(n){const t=n.options||(n.options={});t.plugins=U(t.plugins,{}),t.scales=fg(n,t)}function dl(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function gg(n){return n=n||{},n.data=dl(n.data),ul(n),n}const hl=new Map,fl=new Set;function Li(n,t){let e=hl.get(n);return e||(e=t(),hl.set(n,e),fl.add(e)),e}const Yn=(n,t,e)=>{const i=be(t,e);i!==void 0&&n.add(i)};class pg{constructor(t){this._config=gg(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=dl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ul(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Li(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Li(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Li(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Li(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Yn(l,t,d))),u.forEach(d=>Yn(l,r,d)),u.forEach(d=>Yn(l,Ne[a]||{},d)),u.forEach(d=>Yn(l,pt,d)),u.forEach(d=>Yn(l,kr,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),fl.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ne[e]||{},pt.datasets[e]||{},{type:e},pt,kr]}resolveNamedOptions(t,e,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=gl(this._resolverCache,t,r);let l=s;if(bg(s,e)){a.$shared=!1,i=Wt(i)?i():i;const c=this.createResolver(t,i,o);l=tn(s,i,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,i=[""],r){const{resolver:a}=gl(this._resolverCache,t,i);return q(e)?tn(a,e,void 0,r):a}}function gl(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let a=i.get(r);return a||(a={resolver:Er(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const mg=n=>q(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||Wt(n[e]),!1);function bg(n,t){const{isScriptable:e,isIndexable:i}=po(n);for(const r of t){const a=e(r),s=i(r),o=(s||a)&&n[r];if(a&&(Wt(o)||mg(o))||s&&it(o))return!0}return!1}var vg="4.3.2";const yg=["top","bottom","left","right","chartArea"];function pl(n,t){return n==="top"||n==="bottom"||yg.indexOf(n)===-1&&t==="x"}function ml(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function bl(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),at(e&&e.onComplete,[n],t)}function xg(n){const t=n.chart,e=t.options.animation;at(e&&e.onProgress,[n],t)}function vl(n){return Mo()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Ii={},yl=n=>{const t=vl(n);return Object.values(Ii).filter(e=>e.canvas===t).pop()};function wg(n,t,e){const i=Object.keys(n);for(const r of i){const a=+r;if(a>=t){const s=n[r];delete n[r],(e>0||a>t)&&(n[a+e]=s)}}}function _g(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Mg(n){const{xScale:t,yScale:e}=n;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}let Yt=(Le=class{static register(...t){Jt.add(...t),xl()}static unregister(...t){Jt.remove(...t),xl()}constructor(t,e){const i=this.config=new pg(e),r=vl(t),a=yl(r);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Uf(r)),this.platform.updateConfig(i);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=kd(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new rg,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zd(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Ii[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}de.listen(this,"complete",bl),de.listen(this,"progress",xg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:a}=this;return B(t)?e&&a?a:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Jt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():To(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ho(this.canvas,this.ctx),this}stop(){return de.stop(this),this}resize(t,e){de.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,To(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),at(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};st(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=jr(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),st(a,s=>{const o=s.options,l=o.id,c=jr(l,o),u=U(o.type,s.dtype);(o.position===void 0||pl(o.position,c)!==pl(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=Jt.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),st(r,(s,o)=>{s||delete i[o]}),st(i,s=>{Lt.configure(this,s,s.options),Lt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ml("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const a=e[i];let s=this.getDatasetMeta(i);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=a.indexAxis||Vr(o,this.options),s.order=a.order||0,s.index=i,s.label=""+a.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=Jt.getController(o),{datasetElementType:c,dataElementType:u}=pt.datasets[o];Object.assign(l,{dataElementType:Jt.getElement(u),datasetElementType:c&&Jt.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){st(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||st(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ml("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){st(this.scales,t=>{Lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Xs(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of e){const s=i==="_removeElements"?-a:a;wg(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),r=i(0);for(let a=1;a<e;a++)if(!Xs(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Lt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],st(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Wt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(de.has(this)?this.attached&&!de.running(this)&&de.start(this):(this.draw(),bl({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,a;for(r=0,a=e.length;r<a;++r){const s=e[r];(!t||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,a=Mg(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Dn(e,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),r&&kn(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return ue(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const a=Hr.modes[e];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=we(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);Ft(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),de.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ho(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ii[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};st(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){st(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},st(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!gi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=i?t:a(t,e);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:a}=this,s=e,o=this._getActiveElements(t,r,i,s),l=Ad(t),c=_g(t,this._lastEvent,i,l);i&&(this._lastEvent=null,at(a.onHover,[t,o,this],this),l&&at(a.onClick,[t,o,this],this));const u=!gi(o,r);return(u||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},C(Le,"defaults",pt),C(Le,"instances",Ii),C(Le,"overrides",Ne),C(Le,"registry",Jt),C(Le,"version",vg),C(Le,"getChart",yl),Le);function xl(){return st(Yt.instances,n=>n._plugins.invalidate())}function Tg(n,t,e){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;n.beginPath(),n.arc(a,s,o,i-c,e+c),l>r?(c=r/l,n.arc(a,s,l,e+c,i-c,!0)):n.arc(a,s,r,e+ut,i-ut),n.closePath(),n.clip()}function Sg(n){return Or(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Dg(n,t,e,i){const r=Sg(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(e-Math.min(a,l))*i/2;return Pt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Pt(r.innerStart,0,s),innerEnd:Pt(r.innerEnd,0,s)}}function rn(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Ni(n,t,e,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+e-c,0),h=u>0?u+i+e+c:0;let f=0;const g=r-l;if(i){const F=u>0?u-i:0,z=d>0?d-i:0,j=(F+z)/2,kt=j!==0?g*j/(j+i):g;f=(g-kt)/2}const v=Math.max(.001,g*d-e/Q)/d,b=(g-v)/2,m=l+b+f,y=r-b-f,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:M}=Dg(t,h,d,y-m),T=d-w,S=d-x,k=m+w/T,D=y-x/S,R=h+_,I=h+M,V=m+_/R,H=y-M/I;if(n.beginPath(),a){const F=(k+D)/2;if(n.arc(s,o,d,k,F),n.arc(s,o,d,F,D),x>0){const ft=rn(S,D,s,o);n.arc(ft.x,ft.y,x,D,y+ut)}const z=rn(I,y,s,o);if(n.lineTo(z.x,z.y),M>0){const ft=rn(I,H,s,o);n.arc(ft.x,ft.y,M,y+ut,H+Math.PI)}const j=(y-M/h+(m+_/h))/2;if(n.arc(s,o,h,y-M/h,j,!0),n.arc(s,o,h,j,m+_/h,!0),_>0){const ft=rn(R,V,s,o);n.arc(ft.x,ft.y,_,V+Math.PI,m-ut)}const kt=rn(T,m,s,o);if(n.lineTo(kt.x,kt.y),w>0){const ft=rn(T,k,s,o);n.arc(ft.x,ft.y,w,m-ut,k)}}else{n.moveTo(s,o);const F=Math.cos(k)*d+s,z=Math.sin(k)*d+o;n.lineTo(F,z);const j=Math.cos(D)*d+s,kt=Math.sin(D)*d+o;n.lineTo(j,kt)}n.closePath()}function kg(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Ni(n,t,e,i,l,r);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%ct||ct))}return Ni(n,t,e,i,l,r),n.fill(),l}function Cg(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=h,f?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let g=t.endAngle;if(a){Ni(n,t,e,i,g,r);for(let v=0;v<a;++v)n.stroke();isNaN(o)||(g=s+(o%ct||ct))}f&&Tg(n,t,g),a||(Ni(n,t,e,i,g,r),n.stroke())}class Un extends Ot{constructor(e){super();C(this,"circumference");C(this,"endAngle");C(this,"fullCircles");C(this,"innerRadius");C(this,"outerRadius");C(this,"pixelMargin");C(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=Zs(a,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,v=U(h,c-l)>=ct||_n(s,l,c),b=le(o,u+f,d+f);return v&&b}getCenterPoint(e){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,a=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>ct?Math.floor(r/ct):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(Q,r||0)),u=a*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,kg(e,this,u,s,o),Cg(e,this,u,s,o),e.restore()}}C(Un,"id","arc"),C(Un,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),C(Un,"defaultRoutes",{backgroundColor:"backgroundColor"}),C(Un,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function wl(n,t,e=t){n.lineCap=U(e.borderCapStyle,t.borderCapStyle),n.setLineDash(U(e.borderDash,t.borderDash)),n.lineDashOffset=U(e.borderDashOffset,t.borderDashOffset),n.lineJoin=U(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=U(e.borderWidth,t.borderWidth),n.strokeStyle=U(e.borderColor,t.borderColor)}function Pg(n,t,e){n.lineTo(e.x,e.y)}function Og(n){return n.stepped?th:n.tension||n.cubicInterpolationMode==="monotone"?eh:Pg}function _l(n,t,e={}){const i=n.length,{start:r=0,end:a=i-1}=e,{start:s,end:o}=t,l=Math.max(r,s),c=Math.min(a,o),u=r<s&&a<s||r>o&&a>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function Eg(n,t,e,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=_l(r,e,i),u=Og(a);let{move:d=!0,reverse:h}=i||{},f,g,v;for(f=0;f<=c;++f)g=r[(o+(h?c-f:f))%s],!g.skip&&(d?(n.moveTo(g.x,g.y),d=!1):u(n,v,g,h,a.stepped),v=g);return l&&(g=r[(o+(h?c:0))%s],u(n,v,g,h,a.stepped)),!!l}function Rg(n,t,e,i){const r=t.points,{count:a,start:s,ilen:o}=_l(r,e,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,g,v,b,m;const y=x=>(s+(c?o-x:x))%a,w=()=>{v!==b&&(n.lineTo(u,b),n.lineTo(u,v),n.lineTo(u,m))};for(l&&(f=r[y(0)],n.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[y(h)],f.skip)continue;const x=f.x,_=f.y,M=x|0;M===g?(_<v?v=_:_>b&&(b=_),u=(d*u+x)/++d):(w(),n.lineTo(x,_),g=M,d=0,v=b=_),m=_}w()}function qr(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Rg:Eg}function Ag(n){return n.stepped?Ah:n.tension||n.cubicInterpolationMode==="monotone"?Lh:Ue}function Lg(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),wl(n,t.options),n.stroke(r)}function Ig(n,t,e,i){const{segments:r,options:a}=t,s=qr(t);for(const o of r)wl(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const Ng=typeof Path2D=="function";function Fg(n,t,e,i){Ng&&!t.options.segment?Lg(n,t,e,i):Ig(n,t,e,i)}class Te extends Ot{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Sh(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Uh(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],a=this.points,s=Eo(this,{property:e,start:r,end:r});if(!s.length)return;const o=[],l=Ag(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],g=a[h];if(f===g){o.push(f);continue}const v=Math.abs((r-f[e])/(g[e]-f[e])),b=l(f,g,v,i.stepped);b[e]=t[e],o.push(b)}return o.length===1?o[0]:o}pathSegment(t,e,i){return qr(this)(t,this,e,i)}path(t,e,i){const r=this.segments,a=qr(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const o of r)s&=a(t,this,o,{start:e,end:e+i-1});return!!s}draw(t,e,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Fg(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}C(Te,"id","line"),C(Te,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),C(Te,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),C(Te,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ml(n,t,e,i){const r=n.options,{[e]:a}=n.getProps([e],i);return Math.abs(t-a)<r.radius+r.hitRadius}class Fi extends Ot{constructor(e){super();C(this,"parsed");C(this,"skip");C(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(e-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,i){return Ml(this,e,"x",i)}inYRange(e,i){return Ml(this,e,"y",i)}getCenterPoint(e){const{x:i,y:r}=this.getProps(["x","y"],e);return{x:i,y:r}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const r=i&&e.borderWidth||0;return(i+r)*2}draw(e,i){const r=this.options;this.skip||r.radius<.1||!ue(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,Pr(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}C(Fi,"id","point"),C(Fi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),C(Fi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Tl(n,t){const{x:e,y:i,base:r,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,r),l=Math.max(e,r),c=i-d,u=i+d):(d=a/2,o=e-d,l=e+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function Se(n,t,e,i){return n?0:Pt(t,e,i)}function Wg(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,a=go(i);return{t:Se(r.top,a.top,0,e),r:Se(r.right,a.right,0,t),b:Se(r.bottom,a.bottom,0,e),l:Se(r.left,a.left,0,t)}}function Yg(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,a=xe(r),s=Math.min(t,e),o=n.borderSkipped,l=i||q(r);return{topLeft:Se(!l||o.top||o.left,a.topLeft,0,s),topRight:Se(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Se(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Se(!l||o.bottom||o.right,a.bottomRight,0,s)}}function Ug(n){const t=Tl(n),e=t.right-t.left,i=t.bottom-t.top,r=Wg(n,e/2,i/2),a=Yg(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function Xr(n,t,e,i){const r=t===null,a=e===null,o=n&&!(r&&a)&&Tl(n,i);return o&&(r||le(t,o.left,o.right))&&(a||le(e,o.top,o.bottom))}function Bg(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function zg(n,t){n.rect(t.x,t.y,t.w,t.h)}function Gr(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-i,s=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+a,h:n.h+s,radius:n.radius}}class Wi extends Ot{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=Ug(this),o=Bg(s.radius)?Je:zg;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Gr(s,e,a)),t.clip(),o(t,Gr(a,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Gr(a,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+r)/2:e,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}C(Wi,"id","bar"),C(Wi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),C(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Hg=Object.freeze({__proto__:null,ArcElement:Un,BarElement:Wi,LineElement:Te,PointElement:Fi});const Kr=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Sl=Kr.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Dl(n){return Kr[n%Kr.length]}function kl(n){return Sl[n%Sl.length]}function $g(n,t){return n.borderColor=Dl(t),n.backgroundColor=kl(t),++t}function Vg(n,t){return n.backgroundColor=n.data.map(()=>Dl(t++)),t}function jg(n,t){return n.backgroundColor=n.data.map(()=>kl(t++)),t}function qg(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof Me?t=Vg(e,t):r instanceof Rn?t=jg(e,t):r&&(t=$g(e,t))}}function Cl(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function Xg(n){return n&&(n.borderColor||n.backgroundColor)}var Gg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:a}=r;if(!e.forceOverride&&(Cl(i)||Xg(r)||a&&Cl(a)))return;const s=qg(n);i.forEach(s)}};function Kg(n,t,e,i,r){const a=r.samples||i;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,h,f,g,v;for(s[l++]=n[u],d=0;d<a-2;d++){let b=0,m=0,y;const w=Math.floor((d+1)*o)+1+t,x=Math.min(Math.floor((d+2)*o)+1,e)+t,_=x-w;for(y=w;y<x;y++)b+=n[y].x,m+=n[y].y;b/=_,m/=_;const M=Math.floor(d*o)+1+t,T=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:k}=n[u];for(f=g=-1,y=M;y<T;y++)g=.5*Math.abs((S-b)*(n[y].y-k)-(S-n[y].x)*(m-k)),g>f&&(f=g,h=n[y],v=y);s[l++]=h,u=v}return s[l++]=n[c],s}function Qg(n,t,e,i){let r=0,a=0,s,o,l,c,u,d,h,f,g,v;const b=[],m=t+e-1,y=n[t].x,x=n[m].x-y;for(s=t;s<t+e;++s){o=n[s],l=(o.x-y)/x*i,c=o.y;const _=l|0;if(_===u)c<g?(g=c,d=s):c>v&&(v=c,h=s),r=(a*r+o.x)/++a;else{const M=s-1;if(!B(d)&&!B(h)){const T=Math.min(d,h),S=Math.max(d,h);T!==f&&T!==M&&b.push({...n[T],x:r}),S!==f&&S!==M&&b.push({...n[S],x:r})}s>0&&M!==f&&b.push(n[M]),b.push(o),u=_,a=0,g=v=c,d=h=f=s}}return b}function Pl(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ol(n){n.data.datasets.forEach(t=>{Pl(t)})}function Zg(n,t){const e=t.length;let i=0,r;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Pt(ce(t,a.axis,s).lo,0,e-1)),c?r=Pt(ce(t,a.axis,o).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var Jg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Ol(n);return}const i=n.width;n.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=n.getDatasetMeta(a),c=s||r.data;if(Cn([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:h}=Zg(l,c);const f=e.threshold||4*i;if(h<=f){Pl(r);return}B(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(e.algorithm){case"lttb":g=Kg(c,d,h,i,e);break;case"min-max":g=Qg(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=g})},destroy(n){Ol(n)}};function tp(n,t,e){const i=n.segments,r=n.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Zr(l,c,r);const u=Qr(e,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Eo(t,u);for(const h of d){const f=Qr(e,a[h.start],a[h.end],h.loop),g=Oo(o,r,f);for(const v of g)s.push({source:v,target:h,start:{[e]:El(u,f,"start",Math.max)},end:{[e]:El(u,f,"end",Math.min)}})}}return s}function Qr(n,t,e,i){if(i)return;let r=t[n],a=e[n];return n==="angle"&&(r=$t(r),a=$t(a)),{property:n,start:r,end:a}}function ep(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Zr(s,o,r);const l=r[s],c=r[o];i!==null?(a.push({x:l.x,y:i}),a.push({x:c.x,y:i})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function Zr(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function El(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Rl(n,t){let e=[],i=!1;return it(n)?(i=!0,e=n):e=ep(n,t),e.length?new Te({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Al(n){return n&&n.fill!==!1}function np(n,t,e){let r=n[t].fill;const a=[t];let s;if(!e)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!gt(r))return r;if(s=n[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function ip(n,t,e){const i=op(n);if(q(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return gt(r)&&Math.floor(r)===r?rp(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function rp(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function ap(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:q(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function sp(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:q(n)?i=n.value:i=t.getBaseValue(),i}function op(n){const t=n.options,e=t.fill;let i=U(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function lp(n){const{scale:t,index:e,line:i}=n,r=[],a=i.segments,s=i.points,o=cp(t,e);o.push(Rl({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)up(r,s[u],o)}return new Te({points:r,options:{}})}function cp(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function up(n,t,e){const i=[];for(let r=0;r<e.length;r++){const a=e[r],{first:s,last:o,point:l}=dp(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(n.push(l),!o)break}}n.push(...i)}function dp(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],h=s[u.end][e];if(le(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class Ll{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:a,radius:s}=this;return e=e||{start:0,end:ct},t.arc(r,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,a=t.angle;return{x:e+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function hp(n){const{chart:t,fill:e,line:i}=n;if(gt(e))return fp(t,e);if(e==="stack")return lp(n);if(e==="shape")return!0;const r=gp(n);return r instanceof Ll?r:Rl(r,i)}function fp(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function gp(n){return(n.scale||{}).getPointPositionForValue?mp(n):pp(n)}function pp(n){const{scale:t={},fill:e}=n,i=ap(e,t);if(gt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function mp(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=sp(e,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Ll({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)o.push(t.getPointPositionForValue(l,s));return o}function Jr(n,t,e){const i=hp(t),{line:r,scale:a,axis:s}=t,o=r.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};i&&r.points.length&&(Dn(n,e),bp(n,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:s}),kn(n))}function bp(n,t){const{line:e,target:i,above:r,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==r&&(Il(n,i,s.top),Nl(n,{line:e,target:i,color:r,scale:o,property:l}),n.restore(),n.save(),Il(n,i,s.bottom)),Nl(n,{line:e,target:i,color:a,scale:o,property:l}),n.restore()}function Il(n,t,e){const{segments:i,points:r}=t;let a=!0,s=!1;n.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Zr(l,c,r)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Nl(n,t){const{line:e,target:i,property:r,color:a,scale:s}=t,o=tp(e,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;n.save(),n.fillStyle=h,vp(n,s,f&&Qr(r,u,d)),n.beginPath();const g=!!e.pathSegment(n,l);let v;if(f){g?n.closePath():Fl(n,i,d,r);const b=!!i.pathSegment(n,c,{move:g,reverse:!0});v=g&&b,v||Fl(n,i,u,r)}n.closePath(),n.fill(v?"evenodd":"nonzero"),n.restore()}}function vp(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,i,o-s,r-i),n.clip())}function Fl(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var yp={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof Te&&(l={visible:n.isDatasetVisible(s),index:s,fill:ip(o,s,i),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=np(r,s,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),i&&o.fill&&Jr(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;Al(a)&&Jr(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Al(i)||e.drawTime!=="beforeDatasetDraw"||Jr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wl=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},xp=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Yl extends Ot{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=at(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=dt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Wl(i,a);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+o;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,v)=>{const b=i+e/2+a.measureText(g.text).width;(v===0||c[c.length-1]+b+2*o>s)&&(d+=u,c[c.length-(v>0?0:1)]=0,f+=u,h++),l[v]={left:0,top:f,row:h,width:b,height:r},c[c.length-1]+=b+o}),d}_fitCols(t,e,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,g=0,v=0;return this.legendItems.forEach((b,m)=>{const{itemWidth:y,itemHeight:w}=wp(i,e,a,b,r);m>0&&f+w+2*o>u&&(d+=h+o,c.push({width:h,height:f}),g+=h+o,v++,h=f=0),l[m]={left:g,top:f,col:v,width:y,height:w},h=Math.max(h,y),f+=w+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:a}}=this,s=nn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=At(i,this.left+r,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=At(i,this.left+r,this.right-this.lineWidths[o])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let o=0,l=At(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=At(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Dn(t,this),this._draw(),kn(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=pt.color,l=nn(t.rtl,this.left,this.width),c=dt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:b}=Wl(s,d),m=function(M,T,S){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;r.save();const k=U(S.lineWidth,1);if(r.fillStyle=U(S.fillStyle,o),r.lineCap=U(S.lineCap,"butt"),r.lineDashOffset=U(S.lineDashOffset,0),r.lineJoin=U(S.lineJoin,"miter"),r.lineWidth=k,r.strokeStyle=U(S.strokeStyle,o),r.setLineDash(U(S.lineDash,[])),s.usePointStyle){const D={radius:v*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:k},R=l.xPlus(M,g/2),I=T+h;fo(r,D,R,I,s.pointStyleWidth&&g)}else{const D=T+Math.max((d-v)/2,0),R=l.leftForLtr(M,g),I=xe(S.borderRadius);r.beginPath(),Object.values(I).some(V=>V!==0)?Je(r,{x:R,y:D,w:g,h:v,radius:I}):r.rect(R,D,g,v),r.fill(),k!==0&&r.stroke()}r.restore()},y=function(M,T,S){We(r,S.text,M,T+b/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?f={x:At(a,this.left+u,this.right-i[0]),y:this.top+u+x,line:0}:f={x:this.left+u,y:At(a,this.top+x+u,this.bottom-e[0].height),line:0},Do(this.ctx,t.textDirection);const _=b+u;this.legendItems.forEach((M,T)=>{r.strokeStyle=M.fontColor,r.fillStyle=M.fontColor;const S=r.measureText(M.text).width,k=l.textAlign(M.textAlign||(M.textAlign=s.textAlign)),D=g+h+S;let R=f.x,I=f.y;l.setWidth(this.width),w?T>0&&R+D+u>this.right&&(I=f.y+=_,f.line++,R=f.x=At(a,this.left+u,this.right-i[f.line])):T>0&&I+_>this.bottom&&(R=f.x=R+e[f.line].width+u,f.line++,I=f.y=At(a,this.top+x+u,this.bottom-e[f.line].height));const V=l.x(R);if(m(V,I,M),R=Hd(k,R+g+h,w?R+D:this.right,t.rtl),y(l.x(R),I,M),w)f.x+=D+u;else if(typeof M.text!="string"){const H=c.lineHeight;f.y+=Ul(M,H)+u}else f.y+=_}),ko(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=dt(e.font),r=St(e.padding);if(!e.display)return;const a=nn(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=At(t.align,d,this.right-h);else{const g=this.columnSizes.reduce((v,b)=>Math.max(v,b.height),0);u=c+At(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=At(o,d,d+h);s.textAlign=a.textAlign(Tr(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,We(s,e.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,e=dt(t.font),i=St(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,a;if(le(t,this.left,this.right)&&le(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],le(t,r.left,r.left+r.width)&&le(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Tp(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=xp(r,i);r&&!a&&at(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&at(e.onHover,[t,i,this],this)}else i&&at(e.onClick,[t,i,this],this)}}function wp(n,t,e,i,r){const a=_p(i,n,t,e),s=Mp(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function _p(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+i.measureText(r).width}function Mp(n,t,e){let i=n;return typeof t.text!="string"&&(i=Ul(t,e)),i}function Ul(n,t){const e=n.text?n.text.length:0;return t*e}function Tp(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Sp={id:"legend",_element:Yl,start(n,t,e){const i=n.legend=new Yl({ctx:n.ctx,options:e,chart:n});Lt.configure(n,i,e),Lt.addBox(n,i)},stop(n){Lt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;Lt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=St(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class ta extends Ot{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=it(i.text)?i.text.length:1;this._padding=St(i.padding);const a=r*dt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=At(o,i,a),d=e+t,c=a-i):(s.position==="left"?(u=i+t,d=At(o,r,e),l=Q*-.5):(u=a-t,d=At(o,e,r),l=Q*.5),c=r-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=dt(e.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);We(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:Tr(e.align),textBaseline:"middle",translation:[s,o]})}}function Dp(n,t){const e=new ta({ctx:n.ctx,options:t,chart:n});Lt.configure(n,e,t),Lt.addBox(n,e),n.titleBlock=e}var kp={id:"title",_element:ta,start(n,t,e){Dp(n,e)},stop(n){const t=n.titleBlock;Lt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;Lt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yi=new WeakMap;var Cp={id:"subtitle",start(n,t,e){const i=new ta({ctx:n.ctx,options:e,chart:n});Lt.configure(n,i,e),Lt.addBox(n,i),Yi.set(n,i)},stop(n){Lt.removeBox(n,Yi.get(n)),Yi.delete(n)},beforeUpdate(n,t,e){const i=Yi.get(n);Lt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Bn={average(n){if(!n.length)return!1;let t,e,i=0,r=0,a=0;for(t=0,e=n.length;t<e;++t){const s=n[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ze(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function te(n,t){return t&&(it(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function he(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
16
+ */class $h{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const a=e.listeners[r],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=no.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(r.draw(),this._notify(r,i,t,"progress")),a.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var de=new $h;const Lo="transparent",Vh={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=lo(n||Lo),r=i.valid&&lo(t||Lo);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class jh{constructor(t,e,i,r){const a=e[i];r=Cn([t.to,r,a,t.from]);const s=Cn([t.from,a,r]);this._active=!0,this._fn=t.fn||Vh[t.type||typeof s],this._easing=Mn[t.easing]||Mn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Cn([t.to,e,r,t.from]),this._from=Cn([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<i),!this._active){this._target[r]=o,this._notify(!0);return}if(e<0){this._target[r]=a;return}l=e/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class Ir{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!q(t))return;const e=Object.keys(pt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!q(a))return;const s={};for(const o of e)s[o]=a[o];(it(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,e){const i=e.options,r=Xh(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&qh(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,e){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new jh(h,t,c,u),r.push(d)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return de.add(this._chart,i),!0}}function qh(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=n[i[r]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function Xh(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Io(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Gh(n,t,e){if(e===!1)return!1;const i=Io(n,e),r=Io(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Kh(n){let t,e,i,r;return q(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function No(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)e.push(i[r].index);return e}function Fo(n,t,e,i={}){const r=n.keys,a=i.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===e){if(i.all)continue;break}c=n.values[l],gt(c)&&(a||t===0||Zt(t)===Zt(c))&&(t+=c)}return t}}function Qh(n){const t=Object.keys(n),e=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],e[i]={x:a,y:n[a]};return e}function Wo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Zh(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Jh(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function tf(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Yo(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=n[r.index];if(e&&a>0||!e&&a<0)return r.index}return null}function Uo(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=Zh(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const g=t[f],{[l]:v,[c]:b}=g,m=g._stacks||(g._stacks={});h=m[c]=tf(r,u,v),h[o]=b,h._top=Yo(h,s,!0,i.type),h._bottom=Yo(h,s,!1,i.type);const y=h._visualValues||(h._visualValues={});y[o]=b}}function Nr(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function ef(n,t){return we(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function nf(n,t,e){return we(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Pn(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][e]===void 0)return;delete a[i][e],a[i]._visualValues!==void 0&&a[i]._visualValues[e]!==void 0&&delete a[i]._visualValues[e]}}}const Fr=n=>n==="reset"||n==="none",Bo=(n,t)=>t?n:Object.assign({},n),rf=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:No(e,!0),values:null};class Xt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Wo(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Pn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,a=e.xAxisID=U(i.xAxisID,Nr(t,"x")),s=e.yAxisID=U(i.yAxisID,Nr(t,"y")),o=e.rAxisID=U(i.rAxisID,Nr(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,a,s,o),u=e.vAxisID=r(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&to(this._data,this),t._stacked&&Pn(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(q(e))this._data=Qh(e);else if(i!==e){if(i){to(i,this);const r=this._cachedMeta;Pn(r),r._parsed=[]}e&&Object.isExtensible(e)&&zd(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=e._stacked;e._stacked=Wo(e.vScale,e),e.stack!==i.stack&&(r=!0,Pn(e),e.stack=i.stack),this._resyncElements(t),(r||a!==e._stacked)&&Uo(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&e===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{it(r[t])?h=this.parseArrayData(i,r,t,e):q(r[t])?h=this.parseObjectData(i,r,t,e):h=this.parsePrimitiveData(i,r,t,e);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&Uo(this,h)}parsePrimitiveData(t,e,i,r){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(r);let h,f,g;for(h=0,f=r;h<f;++h)g=h+i,d[h]={[o]:u||a.parse(c[g],g),[l]:s.parse(e[g],g)};return d}parseArrayData(t,e,i,r){const{xScale:a,yScale:s}=t,o=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=e[h],c[u]={x:a.parse(be(f,o),h),y:s.parse(be(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:No(r,!0),values:e._stacks[t.axis]._visualValues};return Fo(o,s,a.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const a=i[e.axis];let s=a===null?NaN:a;const o=r&&i._stacks[e.axis];r&&o&&(r.values=o,s=Fo(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=rf(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Jh(o);let h,f;function g(){f=r[h];const v=f[o.axis];return!gt(f[t.axis])||u>v||d<v}for(h=0;h<s&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=e.length;r<a;++r)s=e[r][t.axis],gt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Kh(U(this.options.clip,Gh(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=nf(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=ef(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&Ft(i);if(o)return Bo(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(pt.elements[t]),g=()=>this.getContext(i,r,e),v=c.resolveNamedOptions(h,f,g,d);return v.$shared&&(v.$shared=l,a[s]=Object.freeze(Bo(v,l))),v}_resolveAnimations(t,e,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,e))}const c=new Ir(r,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Fr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(e,a)||a!==r;return this.updateSharedOptions(a,e,i),{sharedOptions:a,includeOptions:s}}updateElement(t,e,i,r){Fr(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!Fr(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const a=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const r=i.length,a=e.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,e,i=!0){const r=this._cachedMeta,a=r.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,e),i&&this.updateElements(a,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&Pn(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}C(Xt,"defaults",{}),C(Xt,"datasetElementType",null),C(Xt,"dataElementType",null);function af(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=e.length;r<a;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=eo(i.sort((r,a)=>r-a))}return n._cache.$bar}function sf(n){const t=n.iScale,e=af(t,n.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(Ft(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=e.length;r<a;++r)s=t.getPixelForValue(e[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function of(n,t,e,i){const r=e.barThickness;let a,s;return B(r)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[n]-a/2}}function lf(n,t,e,i){const r=t.pixels,a=r[n];let s=n>0?r[n-1]:null,o=n<r.length-1?r[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/i,ratio:e.barPercentage,start:c}}function cf(n,t,e,i){const r=e.parse(n[0],i),a=e.parse(n[1],i),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function zo(n,t,e,i){return it(n)?cf(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Ho(n,t,e,i){const r=n.iScale,a=n.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=e,u=e+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(zo(h,d,a,c));return l}function Wr(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function uf(n,t,e){return n!==0?Zt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function df(n){let t,e,i,r,a;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:e,end:i,reverse:t,top:r,bottom:a}}function hf(n,t,e,i){let r=t.borderSkipped;const a={};if(!r){n.borderSkipped=a;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=df(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=c:(e._bottom||0)===i?r=u:(a[$o(u,s,o,l)]=!0,r=c)),a[$o(r,s,o,l)]=!0,n.borderSkipped=a}function $o(n,t,e,i){return i?(n=ff(n,t,e),n=Vo(n,e,t)):n=Vo(n,t,e),n}function ff(n,t,e){return n===t?e:n===e?t:n}function Vo(n,t,e){return n==="start"?t:n==="end"?e:n}function gf(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class On extends Xt{parsePrimitiveData(t,e,i,r){return Ho(t,e,i,r)}parseArrayData(t,e,i,r){return Ho(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let h,f,g,v;for(h=i,f=i+r;h<f;++h)v=e[h],g={},g[a.axis]=a.parse(be(v,c),h),d.push(zo(be(v,u),g,s,h));return d}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const a=i._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,a=this.getParsed(t),s=a._custom,o=Wr(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,r);for(let f=e;f<e+i;f++){const g=this.getParsed(f),v=a||B(g[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),m=(g._stacks||{})[o.axis],y={horizontal:c,base:v.base,enableBorderRadius:!m||Wr(g._custom)||s===m._top||s===m._bottom,x:c?v.head:b.center,y:c?b.center:v.head,height:c?b.size:Math.abs(v.size),width:c?Math.abs(v.size):b.size};h&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const w=y.options||t[f].options;hf(y,w,m,s),gf(y,w,u.ratio),this.updateElement(t[f],f,y,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=i.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(B(u)||isNaN(u))return!0};for(const l of r)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),a=e!==void 0?r.indexOf(e):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let a,s;for(a=0,s=e.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||sf(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=Wr(c);let d=l[e.axis],h=0,f=i?this.applyStack(e,l,i):d,g,v;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&Zt(d)!==Zt(c.barEnd)&&(h=0),h+=d);const b=!B(a)&&!u?a:h;let m=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(h+f):g=m,v=g-m,Math.abs(v)<s){v=uf(v,e,o)*s,d===o&&(m-=v/2);const y=e.getPixelForDecimal(0),w=e.getPixelForDecimal(1),x=Math.min(y,w),_=Math.max(y,w);m=Math.max(Math.min(m,_),x),g=m+v,i&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(g)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const y=Zt(v)*e.getLineWidthForValue(o)/2;m+=y,v-=y}return{size:v,base:m,head:g,center:g+v/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,a=r.skipNull,s=U(r.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?lf(t,e,r,c):of(t,e,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[e.axis]!==null&&i[a].draw(this._ctx)}}C(On,"id","bar"),C(On,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),C(On,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Di extends Xt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const a=super.parsePrimitiveData(t,e,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,e,i,r){const a=super.parseArrayData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=U(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,e,i,r){const a=super.parseObjectData(t,e,i,r);for(let s=0;s<a.length;s++){const o=e[i+s];a[s]._custom=U(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,r),u=s.axis,d=o.axis;for(let h=e;h<e+i;h++){const f=t[h],g=!a&&this.getParsed(h),v={},b=v[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),m=v[d]=a?o.getBasePixel():o.getPixelForValue(g[d]);v.skip=isNaN(b)||isNaN(m),c&&(v.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(v.options.radius=0)),this.updateElement(f,h,v,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return e!=="active"&&(r.radius=0),r.radius+=U(i&&i._custom,a),r}}C(Di,"id","bubble"),C(Di,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),C(Di,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function pf(n,t,e){let i=1,r=1,a=0,s=0;if(t<ct){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(w,x,_)=>_n(w,o,l,!0)?1:Math.max(x,x*e,_,_*e),g=(w,x,_)=>_n(w,o,l,!0)?-1:Math.min(x,x*e,_,_*e),v=f(0,c,d),b=f(ut,u,h),m=g(Q,c,d),y=g(Q+ut,u,h);i=(v-m)/2,r=(b-y)/2,a=-(v+m)/2,s=-(b+y)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Me extends Xt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(q(i[t])){const{key:l="value"}=this._parsing;a=c=>+be(i[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Tt(this.options.rotation-90)}_getCircumference(){return Tt(this.options.circumference)}_getRotationExtents(){let t=ct,e=-ct;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(Pd(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:v}=pf(d,u,l),b=(i.width-s)/h,m=(i.height-s)/f,y=Math.max(Math.min(b,m)/2,0),w=Vs(this.options.radius,y),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*w,this.offsetY=v*w,r.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/ct)}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=a&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:v,includeOptions:b}=this._getSharedOptions(e,r);let m=this._getRotation(),y;for(y=0;y<e;++y)m+=this._circumference(y,a);for(y=e;y<e+i;++y){const w=this._circumference(y,a),x=t[y],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+w,circumference:w,outerRadius:g,innerRadius:f};b&&(_.options=v||this.resolveDataElementOptions(y,x.active?"active":r)),m+=w,this.updateElement(x,y,_,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?ct*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Tn(e._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,a,s,o,l;if(!t){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,o=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)l=o.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(U(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}C(Me,"id","doughnut"),C(Me,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),C(Me,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),C(Me,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class En extends Xt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=ro(e,r,s);this._drawStart=o,this._drawCount=l,ao(e)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r.slice(Math.max(this._drawStart-1,0),this._drawStart+this._drawCount);const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,o,l,t)}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,r),h=s.axis,f=o.axis,{spanGaps:g,segment:v}=this.options,b=ye(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",y=e+i,w=t.length;let x=e>0&&this.getParsed(e-1);for(let _=0;_<w;++_){const M=t[_],T=m?M:{};if(_<e||_>=y){T.skip=!0;continue}const S=this.getParsed(_),k=B(S[f]),D=T[h]=s.getPixelForValue(S[h],_),R=T[f]=a||k?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[f],_);T.skip=isNaN(D)||isNaN(R)||k,T.stop=_>0&&Math.abs(S[h]-x[h])>b,v&&(T.parsed=S,T.raw=c.data[_]),d&&(T.options=u||this.resolveDataElementOptions(_,M.active?"active":r)),m||this.updateElement(M,_,T,r),x=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}C(En,"id","line"),C(En,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),C(En,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Rn extends Xt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Tn(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,e,i,r){return wo.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Q;let f=h,g;const v=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,r,v);for(g=e;g<e+i;g++){const b=t[g];let m=f,y=f+this._computeAngle(g,r,v),w=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,a&&(l.animateScale&&(w=0),l.animateRotate&&(m=y=h));const x={x:u,y:d,innerRadius:0,outerRadius:w,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(g,b.active?"active":r)};this.updateElement(b,g,x,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Tt(this.resolveDataElementOptions(t,e).angle||i):0}}C(Rn,"id","polarArea"),C(Rn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),C(Rn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Yr extends Me{}C(Yr,"id","pie"),C(Yr,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ki extends Xt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return wo.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],a=e.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(i,void 0,o,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=e;o<e+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":r),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}C(ki,"id","radar"),C(ki,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),C(ki,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ci extends Xt{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=e,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:a,count:s}=ro(e,i,r);if(this._drawStart=a,this._drawCount=s,ao(e)&&(a=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,g=o.axis,{spanGaps:v,segment:b}=this.options,m=ye(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none";let w=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const _=t[x],M=this.getParsed(x),T=y?_:{},S=B(M[g]),k=T[f]=s.getPixelForValue(M[f],x),D=T[g]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[g],x);T.skip=isNaN(k)||isNaN(D)||S,T.stop=x>0&&Math.abs(M[f]-w[f])>m,b&&(T.parsed=M,T.raw=c.data[x]),h&&(T.options=d||this.resolveDataElementOptions(x,_.active?"active":r)),y||this.updateElement(_,x,T,r),w=M}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,a,s)/2}}C(Ci,"id","scatter"),C(Ci,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),C(Ci,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var mf=Object.freeze({__proto__:null,BarController:On,BubbleController:Di,DoughnutController:Me,LineController:En,PieController:Yr,PolarAreaController:Rn,RadarController:ki,ScatterController:Ci});function Be(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ur{constructor(t){C(this,"options");this.options=t||{}}static override(t){Object.assign(Ur.prototype,t)}init(){}formats(){return Be()}parse(){return Be()}format(){return Be()}add(){return Be()}diff(){return Be()}startOf(){return Be()}endOf(){return Be()}}var jo={_date:Ur};function bf(n,t,e,i){const{controller:r,data:a,_sorted:s}=n,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?Ud:ce;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),h=l(a,t,e+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function An(n,t,e,i,r){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=bf(a[o],t,s,r);for(let f=d;f<=h;++f){const g=u[f];g.skip||i(g,c,f)}}}function vf(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function Br(n,t,e,i,r){const a=[];return!r&&!n.isPointInArea(t)||An(n,e,t,function(o,l,c){!r&&!ue(o,n.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function yf(n,t,e,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=Zs(s,{x:t.x,y:t.y});_n(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return An(n,e,t,a),r}function xf(n,t,e,i,r,a){let s=[];const o=vf(e);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const g=u.getCenterPoint(r);if(!(!!a||n.isPointInArea(g))&&!f)return;const b=o(t,g);b<l?(s=[{element:u,datasetIndex:d,index:h}],l=b):b===l&&s.push({element:u,datasetIndex:d,index:h})}return An(n,e,t,c),s}function zr(n,t,e,i,r,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!i?yf(n,t,e,r):xf(n,t,e,i,r,a)}function qo(n,t,e,i,r){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return An(n,e,t,(l,c,u)=>{l[s](t[e],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var Hr={evaluateInteractionItems:An,modes:{index(n,t,e,i){const r=_e(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?Br(n,r,a,i,s):zr(n,r,a,!1,i,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?Br(n,r,a,i,s):zr(n,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return Br(n,r,a,i,s)},nearest(n,t,e,i){const r=_e(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return zr(n,r,a,e.intersect,i,s)},x(n,t,e,i){const r=_e(t,n);return qo(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=_e(t,n);return qo(n,r,"y",e.intersect,i)}}};const Xo=["left","top","right","bottom"];function Ln(n,t){return n.filter(e=>e.pos===t)}function Go(n,t){return n.filter(e=>Xo.indexOf(e.pos)===-1&&e.box.axis===t)}function In(n,t){return n.sort((e,i)=>{const r=t?i:e,a=t?e:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function wf(n){const t=[];let e,i,r,a,s,o;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:e,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function _f(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:a}=e;if(!i||!Xo.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function Mf(n,t){const e=_f(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*i:l&&t.availableWidth,o.height=r):(o.width=i,o.height=u?u*r:l&&t.availableHeight)}return e}function Tf(n){const t=wf(n),e=In(t.filter(c=>c.box.fullSize),!0),i=In(Ln(t,"left"),!0),r=In(Ln(t,"right")),a=In(Ln(t,"top"),!0),s=In(Ln(t,"bottom")),o=Go(t,"x"),l=Go(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Ln(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function Ko(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Qo(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Sf(n,t,e,i){const{pos:r,box:a}=e,s=n.maxPadding;if(!q(r)){e.size&&(n[r]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[r]+=e.size}a.getPadding&&Qo(s,a.getPadding());const o=Math.max(0,t.outerWidth-Ko(s,n,"left","right")),l=Math.max(0,t.outerHeight-Ko(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function Df(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function kf(n,t){const e=t.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return i(n?["left","right"]:["top","bottom"])}function Nn(n,t,e,i){const r=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,kf(o.horizontal,t));const{same:d,other:h}=Sf(t,e,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&Nn(r,t,e,i)||u}function Pi(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function Zo(n,t,e,i){const r=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,h=c.size||l.height;Ft(c.start)&&(s=c.start),l.fullSize?Pi(l,r.left,s,e.outerWidth-r.right-r.left,h):Pi(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;Ft(c.start)&&(a=c.start),l.fullSize?Pi(l,a,r.top,h,e.outerHeight-r.bottom-r.top):Pi(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var Lt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=St(n.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(e-r.height,0),o=Tf(n.boxes),l=o.vertical,c=o.horizontal;st(n.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,b)=>b.box.options&&b.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);Qo(h,St(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),g=Mf(l.concat(c),d);Nn(o.fullSize,f,d,g),Nn(l,f,d,g),Nn(c,f,d,g)&&Nn(l,f,d,g),Df(f),Zo(o.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Zo(o.rightAndBottom,f,d,g),n.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},st(o.chartArea,v=>{const b=v.box;Object.assign(b,n.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Jo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class Cf extends Jo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Oi="$chartjs",Pf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tl=n=>n===null||n==="";function Of(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Oi]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",tl(r)){const a=So(n,"width");a!==void 0&&(n.width=a)}if(tl(i))if(n.style.height==="")n.height=n.width/(t||2);else{const a=So(n,"height");a!==void 0&&(n.height=a)}return n}const el=Ah?{passive:!0}:!1;function Ef(n,t,e){n.addEventListener(t,e,el)}function Rf(n,t,e){n.canvas.removeEventListener(t,e,el)}function Af(n,t){const e=Pf[n.type]||n.type,{x:i,y:r}=_e(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ei(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Lf(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ei(o.addedNodes,i),s=s&&!Ei(o.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function If(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ei(o.removedNodes,i),s=s&&!Ei(o.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const Fn=new Map;let nl=0;function il(){const n=window.devicePixelRatio;n!==nl&&(nl=n,Fn.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Nf(n,t){Fn.size||window.addEventListener("resize",il),Fn.set(n,t)}function Ff(n){Fn.delete(n),Fn.size||window.removeEventListener("resize",il)}function Wf(n,t,e){const i=n.canvas,r=i&&Lr(i);if(!r)return;const a=io((o,l)=>{const c=r.clientWidth;e(o,l),c<r.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(r),Nf(n,a),s}function $r(n,t,e){e&&e.disconnect(),t==="resize"&&Ff(n)}function Yf(n,t,e){const i=n.canvas,r=io(a=>{n.ctx!==null&&e(Af(a,n))},n);return Ef(i,t,r),r}class Uf extends Jo{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Of(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Oi])return!1;const i=e[Oi].initial;["height","width"].forEach(a=>{const s=i[a];B(s)?e.removeAttribute(a):e.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{e.style[a]=r[a]}),e.width=e.width,delete e[Oi],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Lf,detach:If,resize:Wf}[e]||Yf;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:$r,detach:$r,resize:$r}[e]||Rf)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Rh(t,e,i,r)}isAttached(t){const e=Lr(t);return!!(e&&e.isConnected)}}function Bf(n){return!Mo()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Cf:Uf}class Ot{constructor(){C(this,"x");C(this,"y");C(this,"active",!1);C(this,"options");C(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ye(this.x)&&ye(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}C(Ot,"defaults",{}),C(Ot,"defaultRoutes");function zf(n,t){const e=n.options.ticks,i=Hf(n),r=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?Vf(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return jf(t,c,a,s/r),c;const u=$f(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(Ri(t,c,u,B(f)?0:o-f,o),d=0,h=s-1;d<h;d++)Ri(t,c,u,a[d],a[d+1]);return Ri(t,c,u,l,B(f)?t.length:l+f),c}return Ri(t,c,u),c}function Hf(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function $f(n,t,e){const i=qf(n),r=t.length/e;if(!i)return Math.max(r,1);const a=Nd(i);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>r)return l}return Math.max(r,1)}function Vf(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function jf(n,t,e,i){let r=0,a=e[0],s;for(i=Math.ceil(i),s=0;s<n.length;s++)s===a&&(t.push(n[s]),r++,a=e[r*i])}function Ri(n,t,e,i,r){const a=U(i,0),s=Math.min(U(r,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),r&&(l=r-i,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function qf(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const Xf=n=>n==="left"?"right":n==="right"?"left":n,rl=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,al=(n,t)=>Math.min(t||n,n);function sl(n,t){const e=[],i=n.length/t,r=n.length;let a=0;for(;a<r;a+=i)e.push(n[Math.floor(a)]);return e}function Gf(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(r),c;if(!(e&&(i===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function Kf(n,t){st(n,e=>{const i=e.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete e.data[i[a]];i.splice(0,r)}})}function Wn(n){return n.drawTicks?n.tickLength:0}function ol(n,t){if(!n.display)return 0;const e=dt(n.font,t),i=St(n.padding);return(it(n.text)?n.text.length:1)*e.lineHeight+i.height}function Qf(n,t){return we(n,{scale:t,type:"scale"})}function Zf(n,t,e){return we(n,{tick:e,index:t,type:"tick"})}function Jf(n,t,e){let i=Tr(n);return(e&&t!=="right"||!e&&t==="right")&&(i=Xf(i)),i}function tg(n,t,e,i){const{top:r,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,h,f,g;const v=s-r,b=o-a;if(n.isHorizontal()){if(f=At(i,a,o),q(e)){const m=Object.keys(e)[0],y=e[m];g=u[m].getPixelForValue(y)+v-t}else e==="center"?g=(c.bottom+c.top)/2+v-t:g=rl(n,e,t);h=o-a}else{if(q(e)){const m=Object.keys(e)[0],y=e[m];f=u[m].getPixelForValue(y)-b+t}else e==="center"?f=(c.left+c.right)/2-b+t:f=rl(n,e,t);g=At(i,s,r),d=e==="left"?-ut:ut}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}class ze extends Ot{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=Ht(t,Number.POSITIVE_INFINITY),e=Ht(e,Number.NEGATIVE_INFINITY),i=Ht(i,Number.POSITIVE_INFINITY),r=Ht(r,Number.NEGATIVE_INFINITY),{min:Ht(t,i),max:Ht(e,r),minDefined:gt(t),maxDefined:gt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:e,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(e=Math.min(e,s.min)),a||(i=Math.max(i,s.max));return e=a&&e>i?i:e,i=r&&e>i?e:i,{min:Ht(e,Ht(i,e)),max:Ht(i,Ht(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){at(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=uh(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?sl(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=zf(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){at(this.options.afterUpdate,[this])}beforeSetDimensions(){at(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){at(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),at(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){at(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=at(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){at(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){at(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=al(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,a=e.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!e.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Pt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-Wn(t.grid)-e.padding-ol(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=vi(Math.min(Math.asin(Pt((u.highest.height+6)/o,-1,1)),Math.asin(Pt(l/c,-1,1))-Math.asin(Pt(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=ol(r,e.options.font);if(o?(t.width=this.maxWidth,t.height=Wn(a)+l):(t.height=this.maxHeight,t.width=Wn(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,g=Tt(this.labelRotation),v=Math.cos(g),b=Math.sin(g);if(o){const m=i.mirror?0:b*d.width+v*h.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{const m=i.mirror?0:v*d.width+b*h.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(c,u,b,v)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=r*t.width,f=i*e.height):(h=i*t.height,f=r*e.width):a==="start"?f=e.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=e.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){at(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)B(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=sl(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/al(e,i));let c=0,u=0,d,h,f,g,v,b,m,y,w,x,_;for(d=0;d<e;d+=l){if(g=t[d].label,v=this._resolveTickFontOptions(d),r.font=b=v.string,m=a[b]=a[b]||{data:{},gc:[]},y=v.lineHeight,w=x=0,!B(g)&&!it(g))w=wi(r,m.data,m.gc,w,g),x=y;else if(it(g))for(h=0,f=g.length;h<f;++h)_=g[h],!B(_)&&!it(_)&&(w=wi(r,m.data,m.gc,w,_),x+=y);s.push(w),o.push(x),c=Math.max(w,c),u=Math.max(x,u)}Kf(a,e);const M=s.indexOf(c),T=o.indexOf(u),S=k=>({width:s[k]||0,height:o[k]||0});return{first:S(0),last:S(e-1),widest:S(M),highest:S(T),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Yd(this._alignToPixels?Fe(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=Zf(this.getContext(),t,i))}return this.$context||(this.$context=Qf(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Tt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*i>o*r?o/i:l/r:l*r<o*i?l/i:o/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:a,position:s,border:o}=r,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Wn(a),f=[],g=o.setContext(this.getContext()),v=g.display?g.width:0,b=v/2,m=function(z){return Fe(i,z,v)};let y,w,x,_,M,T,S,k,D,R,I,V;if(s==="top")y=m(this.bottom),T=this.bottom-h,k=y-b,R=m(t.top)+b,V=t.bottom;else if(s==="bottom")y=m(this.top),R=t.top,V=m(t.bottom)-b,T=y+b,k=this.top+h;else if(s==="left")y=m(this.right),M=this.right-h,S=y-b,D=m(t.left)+b,I=t.right;else if(s==="right")y=m(this.left),D=t.left,I=m(t.right)-b,M=y+b,S=this.left+h;else if(e==="x"){if(s==="center")y=m((t.top+t.bottom)/2+.5);else if(q(s)){const z=Object.keys(s)[0],j=s[z];y=m(this.chart.scales[z].getPixelForValue(j))}R=t.top,V=t.bottom,T=y+b,k=T+h}else if(e==="y"){if(s==="center")y=m((t.left+t.right)/2);else if(q(s)){const z=Object.keys(s)[0],j=s[z];y=m(this.chart.scales[z].getPixelForValue(j))}M=y-b,S=M-h,D=t.left,I=t.right}const H=U(r.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/H));for(w=0;w<d;w+=F){const z=this.getContext(w),j=a.setContext(z),kt=o.setContext(z),ft=j.lineWidth,zt=j.color,O=kt.dash||[],A=kt.dashOffset,N=j.tickWidth,X=j.tickColor,G=j.tickBorderDash||[],nt=j.tickBorderDashOffset;x=Gf(this,w,l),x!==void 0&&(_=Fe(i,x,ft),c?M=S=D=I=_:T=k=R=V=_,f.push({tx1:M,ty1:T,tx2:S,ty2:k,x1:D,y1:R,x2:I,y2:V,width:ft,color:zt,borderDash:O,borderDashOffset:A,tickWidth:N,tickColor:X,tickBorderDash:G,tickBorderDashOffset:nt}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:a}=i,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,h=Wn(i.grid),f=h+u,g=d?-u:f,v=-Tt(this.labelRotation),b=[];let m,y,w,x,_,M,T,S,k,D,R,I,V="middle";if(r==="top")M=this.bottom-g,T=this._getXAxisLabelAlignment();else if(r==="bottom")M=this.top+g,T=this._getXAxisLabelAlignment();else if(r==="left"){const F=this._getYAxisLabelAlignment(h);T=F.textAlign,_=F.x}else if(r==="right"){const F=this._getYAxisLabelAlignment(h);T=F.textAlign,_=F.x}else if(e==="x"){if(r==="center")M=(t.top+t.bottom)/2+f;else if(q(r)){const F=Object.keys(r)[0],z=r[F];M=this.chart.scales[F].getPixelForValue(z)+f}T=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")_=(t.left+t.right)/2-f;else if(q(r)){const F=Object.keys(r)[0],z=r[F];_=this.chart.scales[F].getPixelForValue(z)}T=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const H=this._getLabelSizes();for(m=0,y=o.length;m<y;++m){w=o[m],x=w.label;const F=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,k=this._resolveTickFontOptions(m),D=k.lineHeight,R=it(x)?x.length:1;const z=R/2,j=F.color,kt=F.textStrokeColor,ft=F.textStrokeWidth;let zt=T;s?(_=S,T==="inner"&&(m===y-1?zt=this.options.reverse?"left":"right":m===0?zt=this.options.reverse?"right":"left":zt="center"),r==="top"?c==="near"||v!==0?I=-R*D+D/2:c==="center"?I=-H.highest.height/2-z*D+D:I=-H.highest.height+D/2:c==="near"||v!==0?I=D/2:c==="center"?I=H.highest.height/2-z*D:I=H.highest.height-R*D,d&&(I*=-1),v!==0&&!F.showLabelBackdrop&&(_+=D/2*Math.sin(v))):(M=S,I=(1-R)*D/2);let O;if(F.showLabelBackdrop){const A=St(F.backdropPadding),N=H.heights[m],X=H.widths[m];let G=I-A.top,nt=0-A.left;switch(V){case"middle":G-=N/2;break;case"bottom":G-=N;break}switch(T){case"center":nt-=X/2;break;case"right":nt-=X;break}O={left:nt,top:G,width:X+A.width,height:N+A.height,color:F.backdropColor}}b.push({label:x,font:k,textOffset:I,options:{rotation:v,color:j,strokeColor:kt,strokeWidth:ft,textAlign:zt,textBaseline:V,translation:[_,M],backdrop:O}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Tt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?r?(u=this.right+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?r?(u=this.left+a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(a=0,s=r.length;a<s;++a){const l=r[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:r}}=this,a=i.setContext(this.getContext()),s=i.display?a.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=Fe(t,this.left,s)-s/2,u=Fe(t,this.right,o)+o/2,d=h=l):(d=Fe(t,this.top,s)-s/2,h=Fe(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Dn(i,r);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;We(i,c,0,u,l,o)}r&&kn(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const a=dt(i.font),s=St(i.padding),o=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||q(e)?(l+=s.bottom,it(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=tg(this,l,e,o);We(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Jf(o,e,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=U(t.grid&&t.grid.z,-1),r=U(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ze.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return dt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ai{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;ig(e)&&(i=this.register(e));const r=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,eg(t,s,i),this.override&&pt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in pt[r]&&(delete pt[r][i],this.override&&delete Ne[i])}}function eg(n,t,e){const i=yn(Object.create(null),[e?pt.get(e):{},pt.get(t),n.defaults]);pt.set(t,i),n.defaultRoutes&&ng(t,n.defaultRoutes),n.descriptors&&pt.describe(t,n.descriptors)}function ng(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),a=[n].concat(i).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");pt.route(a,r,l,o)})}function ig(n){return"id"in n&&"defaults"in n}class rg{constructor(){this.controllers=new Ai(Xt,"datasets",!0),this.elements=new Ai(Ot,"elements"),this.plugins=new Ai(Object,"plugins"),this.scales=new Ai(ze,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):st(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,i){const r=wr(t);at(i["before"+r],[],i),e[t](i),at(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var Jt=new rg;class ag{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(a,t,e,i);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[e,r,a.options];if(at(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){B(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=U(i.options&&i.options.plugins,{}),a=sg(i);return r===!1&&!e?[]:lg(t,a,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function sg(n){const t={},e=[],i=Object.keys(Jt.plugins.items);for(let a=0;a<i.length;a++)e.push(Jt.getPlugin(i[a]));const r=n.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function og(n,t){return!t&&n===!1?null:n===!0?{}:n}function lg(n,{plugins:t,localIds:e},i,r){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=og(i[l],r);c!==null&&a.push({plugin:o,options:cg(n.config,{plugin:o,local:e[l]},c,s)})}return a}function cg(n,{plugin:t,local:e},i,r){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(i,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Vr(n,t){const e=pt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function ug(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function dg(n,t){return n===t?"_index_":"_value_"}function ll(n){if(n==="x"||n==="y"||n==="r")return n}function hg(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function jr(n,...t){if(ll(n))return n;for(const e of t){const i=e.axis||hg(e.position)||n.length>1&&ll(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function cl(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function fg(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return cl(n,"x",e[0])||cl(n,"y",e[0])}return{}}function gg(n,t){const e=Ne[n.type]||{scales:{}},i=t.scales||{},r=Vr(n.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!q(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=jr(s,o,fg(s,n),pt.scales[o.type]),c=dg(l,r),u=e.scales||{};a[s]=xn(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||Vr(o,t),u=(Ne[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=ug(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),xn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];xn(o,[pt.scales[o.type],pt.scale])}),a}function ul(n){const t=n.options||(n.options={});t.plugins=U(t.plugins,{}),t.scales=gg(n,t)}function dl(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function pg(n){return n=n||{},n.data=dl(n.data),ul(n),n}const hl=new Map,fl=new Set;function Li(n,t){let e=hl.get(n);return e||(e=t(),hl.set(n,e),fl.add(e)),e}const Yn=(n,t,e)=>{const i=be(t,e);i!==void 0&&n.add(i)};class mg{constructor(t){this._config=pg(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=dl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ul(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Li(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Li(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Li(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Li(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Yn(l,t,d))),u.forEach(d=>Yn(l,r,d)),u.forEach(d=>Yn(l,Ne[a]||{},d)),u.forEach(d=>Yn(l,pt,d)),u.forEach(d=>Yn(l,kr,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),fl.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ne[e]||{},pt.datasets[e]||{},{type:e},pt,kr]}resolveNamedOptions(t,e,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=gl(this._resolverCache,t,r);let l=s;if(vg(s,e)){a.$shared=!1,i=Wt(i)?i():i;const c=this.createResolver(t,i,o);l=tn(s,i,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,i=[""],r){const{resolver:a}=gl(this._resolverCache,t,i);return q(e)?tn(a,e,void 0,r):a}}function gl(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let a=i.get(r);return a||(a={resolver:Er(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const bg=n=>q(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||Wt(n[e]),!1);function vg(n,t){const{isScriptable:e,isIndexable:i}=po(n);for(const r of t){const a=e(r),s=i(r),o=(s||a)&&n[r];if(a&&(Wt(o)||bg(o))||s&&it(o))return!0}return!1}var yg="4.3.2";const xg=["top","bottom","left","right","chartArea"];function pl(n,t){return n==="top"||n==="bottom"||xg.indexOf(n)===-1&&t==="x"}function ml(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function bl(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),at(e&&e.onComplete,[n],t)}function wg(n){const t=n.chart,e=t.options.animation;at(e&&e.onProgress,[n],t)}function vl(n){return Mo()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Ii={},yl=n=>{const t=vl(n);return Object.values(Ii).filter(e=>e.canvas===t).pop()};function _g(n,t,e){const i=Object.keys(n);for(const r of i){const a=+r;if(a>=t){const s=n[r];delete n[r],(e>0||a>t)&&(n[a+e]=s)}}}function Mg(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Tg(n){const{xScale:t,yScale:e}=n;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}let Yt=(Le=class{static register(...t){Jt.add(...t),xl()}static unregister(...t){Jt.remove(...t),xl()}constructor(t,e){const i=this.config=new mg(e),r=vl(t),a=yl(r);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Bf(r)),this.platform.updateConfig(i);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Cd(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ag,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Hd(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Ii[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}de.listen(this,"complete",bl),de.listen(this,"progress",wg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:a}=this;return B(t)?e&&a?a:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Jt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():To(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ho(this.canvas,this.ctx),this}stop(){return de.stop(this),this}resize(t,e){de.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,To(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),at(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};st(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=jr(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),st(a,s=>{const o=s.options,l=o.id,c=jr(l,o),u=U(o.type,s.dtype);(o.position===void 0||pl(o.position,c)!==pl(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=Jt.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),st(r,(s,o)=>{s||delete i[o]}),st(i,s=>{Lt.configure(this,s,s.options),Lt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ml("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const a=e[i];let s=this.getDatasetMeta(i);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=a.indexAxis||Vr(o,this.options),s.order=a.order||0,s.index=i,s.label=""+a.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=Jt.getController(o),{datasetElementType:c,dataElementType:u}=pt.datasets[o];Object.assign(l,{dataElementType:Jt.getElement(u),datasetElementType:c&&Jt.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){st(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||st(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ml("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){st(this.scales,t=>{Lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Xs(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of e){const s=i==="_removeElements"?-a:a;_g(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),r=i(0);for(let a=1;a<e;a++)if(!Xs(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Lt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],st(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Wt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(de.has(this)?this.attached&&!de.running(this)&&de.start(this):(this.draw(),bl({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,a;for(r=0,a=e.length;r<a;++r){const s=e[r];(!t||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,a=Tg(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Dn(e,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),r&&kn(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return ue(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const a=Hr.modes[e];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=we(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);Ft(e)?(a.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),de.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ho(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ii[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};st(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){st(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},st(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!gi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=i?t:a(t,e);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:a}=this,s=e,o=this._getActiveElements(t,r,i,s),l=Ld(t),c=Mg(t,this._lastEvent,i,l);i&&(this._lastEvent=null,at(a.onHover,[t,o,this],this),l&&at(a.onClick,[t,o,this],this));const u=!gi(o,r);return(u||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},C(Le,"defaults",pt),C(Le,"instances",Ii),C(Le,"overrides",Ne),C(Le,"registry",Jt),C(Le,"version",yg),C(Le,"getChart",yl),Le);function xl(){return st(Yt.instances,n=>n._plugins.invalidate())}function Sg(n,t,e){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;n.beginPath(),n.arc(a,s,o,i-c,e+c),l>r?(c=r/l,n.arc(a,s,l,e+c,i-c,!0)):n.arc(a,s,r,e+ut,i-ut),n.closePath(),n.clip()}function Dg(n){return Or(n,["outerStart","outerEnd","innerStart","innerEnd"])}function kg(n,t,e,i){const r=Dg(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(e-Math.min(a,l))*i/2;return Pt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Pt(r.innerStart,0,s),innerEnd:Pt(r.innerEnd,0,s)}}function rn(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Ni(n,t,e,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+e-c,0),h=u>0?u+i+e+c:0;let f=0;const g=r-l;if(i){const F=u>0?u-i:0,z=d>0?d-i:0,j=(F+z)/2,kt=j!==0?g*j/(j+i):g;f=(g-kt)/2}const v=Math.max(.001,g*d-e/Q)/d,b=(g-v)/2,m=l+b+f,y=r-b-f,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:M}=kg(t,h,d,y-m),T=d-w,S=d-x,k=m+w/T,D=y-x/S,R=h+_,I=h+M,V=m+_/R,H=y-M/I;if(n.beginPath(),a){const F=(k+D)/2;if(n.arc(s,o,d,k,F),n.arc(s,o,d,F,D),x>0){const ft=rn(S,D,s,o);n.arc(ft.x,ft.y,x,D,y+ut)}const z=rn(I,y,s,o);if(n.lineTo(z.x,z.y),M>0){const ft=rn(I,H,s,o);n.arc(ft.x,ft.y,M,y+ut,H+Math.PI)}const j=(y-M/h+(m+_/h))/2;if(n.arc(s,o,h,y-M/h,j,!0),n.arc(s,o,h,j,m+_/h,!0),_>0){const ft=rn(R,V,s,o);n.arc(ft.x,ft.y,_,V+Math.PI,m-ut)}const kt=rn(T,m,s,o);if(n.lineTo(kt.x,kt.y),w>0){const ft=rn(T,k,s,o);n.arc(ft.x,ft.y,w,m-ut,k)}}else{n.moveTo(s,o);const F=Math.cos(k)*d+s,z=Math.sin(k)*d+o;n.lineTo(F,z);const j=Math.cos(D)*d+s,kt=Math.sin(D)*d+o;n.lineTo(j,kt)}n.closePath()}function Cg(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Ni(n,t,e,i,l,r);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%ct||ct))}return Ni(n,t,e,i,l,r),n.fill(),l}function Pg(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=h,f?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let g=t.endAngle;if(a){Ni(n,t,e,i,g,r);for(let v=0;v<a;++v)n.stroke();isNaN(o)||(g=s+(o%ct||ct))}f&&Sg(n,t,g),a||(Ni(n,t,e,i,g,r),n.stroke())}class Un extends Ot{constructor(e){super();C(this,"circumference");C(this,"endAngle");C(this,"fullCircles");C(this,"innerRadius");C(this,"outerRadius");C(this,"pixelMargin");C(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=Zs(a,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,v=U(h,c-l)>=ct||_n(s,l,c),b=le(o,u+f,d+f);return v&&b}getCenterPoint(e){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,a=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>ct?Math.floor(r/ct):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(Q,r||0)),u=a*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,Cg(e,this,u,s,o),Pg(e,this,u,s,o),e.restore()}}C(Un,"id","arc"),C(Un,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),C(Un,"defaultRoutes",{backgroundColor:"backgroundColor"}),C(Un,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function wl(n,t,e=t){n.lineCap=U(e.borderCapStyle,t.borderCapStyle),n.setLineDash(U(e.borderDash,t.borderDash)),n.lineDashOffset=U(e.borderDashOffset,t.borderDashOffset),n.lineJoin=U(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=U(e.borderWidth,t.borderWidth),n.strokeStyle=U(e.borderColor,t.borderColor)}function Og(n,t,e){n.lineTo(e.x,e.y)}function Eg(n){return n.stepped?eh:n.tension||n.cubicInterpolationMode==="monotone"?nh:Og}function _l(n,t,e={}){const i=n.length,{start:r=0,end:a=i-1}=e,{start:s,end:o}=t,l=Math.max(r,s),c=Math.min(a,o),u=r<s&&a<s||r>o&&a>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function Rg(n,t,e,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=_l(r,e,i),u=Eg(a);let{move:d=!0,reverse:h}=i||{},f,g,v;for(f=0;f<=c;++f)g=r[(o+(h?c-f:f))%s],!g.skip&&(d?(n.moveTo(g.x,g.y),d=!1):u(n,v,g,h,a.stepped),v=g);return l&&(g=r[(o+(h?c:0))%s],u(n,v,g,h,a.stepped)),!!l}function Ag(n,t,e,i){const r=t.points,{count:a,start:s,ilen:o}=_l(r,e,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,g,v,b,m;const y=x=>(s+(c?o-x:x))%a,w=()=>{v!==b&&(n.lineTo(u,b),n.lineTo(u,v),n.lineTo(u,m))};for(l&&(f=r[y(0)],n.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[y(h)],f.skip)continue;const x=f.x,_=f.y,M=x|0;M===g?(_<v?v=_:_>b&&(b=_),u=(d*u+x)/++d):(w(),n.lineTo(x,_),g=M,d=0,v=b=_),m=_}w()}function qr(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Ag:Rg}function Lg(n){return n.stepped?Lh:n.tension||n.cubicInterpolationMode==="monotone"?Ih:Ue}function Ig(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),wl(n,t.options),n.stroke(r)}function Ng(n,t,e,i){const{segments:r,options:a}=t,s=qr(t);for(const o of r)wl(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const Fg=typeof Path2D=="function";function Wg(n,t,e,i){Fg&&!t.options.segment?Ig(n,t,e,i):Ng(n,t,e,i)}class Te extends Ot{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Dh(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Bh(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],a=this.points,s=Eo(this,{property:e,start:r,end:r});if(!s.length)return;const o=[],l=Lg(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],g=a[h];if(f===g){o.push(f);continue}const v=Math.abs((r-f[e])/(g[e]-f[e])),b=l(f,g,v,i.stepped);b[e]=t[e],o.push(b)}return o.length===1?o[0]:o}pathSegment(t,e,i){return qr(this)(t,this,e,i)}path(t,e,i){const r=this.segments,a=qr(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const o of r)s&=a(t,this,o,{start:e,end:e+i-1});return!!s}draw(t,e,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Wg(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}C(Te,"id","line"),C(Te,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),C(Te,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),C(Te,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Ml(n,t,e,i){const r=n.options,{[e]:a}=n.getProps([e],i);return Math.abs(t-a)<r.radius+r.hitRadius}class Fi extends Ot{constructor(e){super();C(this,"parsed");C(this,"skip");C(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(e-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,i){return Ml(this,e,"x",i)}inYRange(e,i){return Ml(this,e,"y",i)}getCenterPoint(e){const{x:i,y:r}=this.getProps(["x","y"],e);return{x:i,y:r}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const r=i&&e.borderWidth||0;return(i+r)*2}draw(e,i){const r=this.options;this.skip||r.radius<.1||!ue(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,Pr(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}C(Fi,"id","point"),C(Fi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),C(Fi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Tl(n,t){const{x:e,y:i,base:r,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,r),l=Math.max(e,r),c=i-d,u=i+d):(d=a/2,o=e-d,l=e+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function Se(n,t,e,i){return n?0:Pt(t,e,i)}function Yg(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,a=go(i);return{t:Se(r.top,a.top,0,e),r:Se(r.right,a.right,0,t),b:Se(r.bottom,a.bottom,0,e),l:Se(r.left,a.left,0,t)}}function Ug(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,a=xe(r),s=Math.min(t,e),o=n.borderSkipped,l=i||q(r);return{topLeft:Se(!l||o.top||o.left,a.topLeft,0,s),topRight:Se(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Se(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Se(!l||o.bottom||o.right,a.bottomRight,0,s)}}function Bg(n){const t=Tl(n),e=t.right-t.left,i=t.bottom-t.top,r=Yg(n,e/2,i/2),a=Ug(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function Xr(n,t,e,i){const r=t===null,a=e===null,o=n&&!(r&&a)&&Tl(n,i);return o&&(r||le(t,o.left,o.right))&&(a||le(e,o.top,o.bottom))}function zg(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function Hg(n,t){n.rect(t.x,t.y,t.w,t.h)}function Gr(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-i,s=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+a,h:n.h+s,radius:n.radius}}class Wi extends Ot{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=Bg(this),o=zg(s.radius)?Je:Hg;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Gr(s,e,a)),t.clip(),o(t,Gr(a,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Gr(a,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+r)/2:e,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}C(Wi,"id","bar"),C(Wi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),C(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var $g=Object.freeze({__proto__:null,ArcElement:Un,BarElement:Wi,LineElement:Te,PointElement:Fi});const Kr=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Sl=Kr.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Dl(n){return Kr[n%Kr.length]}function kl(n){return Sl[n%Sl.length]}function Vg(n,t){return n.borderColor=Dl(t),n.backgroundColor=kl(t),++t}function jg(n,t){return n.backgroundColor=n.data.map(()=>Dl(t++)),t}function qg(n,t){return n.backgroundColor=n.data.map(()=>kl(t++)),t}function Xg(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof Me?t=jg(e,t):r instanceof Rn?t=qg(e,t):r&&(t=Vg(e,t))}}function Cl(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function Gg(n){return n&&(n.borderColor||n.backgroundColor)}var Kg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:a}=r;if(!e.forceOverride&&(Cl(i)||Gg(r)||a&&Cl(a)))return;const s=Xg(n);i.forEach(s)}};function Qg(n,t,e,i,r){const a=r.samples||i;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,h,f,g,v;for(s[l++]=n[u],d=0;d<a-2;d++){let b=0,m=0,y;const w=Math.floor((d+1)*o)+1+t,x=Math.min(Math.floor((d+2)*o)+1,e)+t,_=x-w;for(y=w;y<x;y++)b+=n[y].x,m+=n[y].y;b/=_,m/=_;const M=Math.floor(d*o)+1+t,T=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:k}=n[u];for(f=g=-1,y=M;y<T;y++)g=.5*Math.abs((S-b)*(n[y].y-k)-(S-n[y].x)*(m-k)),g>f&&(f=g,h=n[y],v=y);s[l++]=h,u=v}return s[l++]=n[c],s}function Zg(n,t,e,i){let r=0,a=0,s,o,l,c,u,d,h,f,g,v;const b=[],m=t+e-1,y=n[t].x,x=n[m].x-y;for(s=t;s<t+e;++s){o=n[s],l=(o.x-y)/x*i,c=o.y;const _=l|0;if(_===u)c<g?(g=c,d=s):c>v&&(v=c,h=s),r=(a*r+o.x)/++a;else{const M=s-1;if(!B(d)&&!B(h)){const T=Math.min(d,h),S=Math.max(d,h);T!==f&&T!==M&&b.push({...n[T],x:r}),S!==f&&S!==M&&b.push({...n[S],x:r})}s>0&&M!==f&&b.push(n[M]),b.push(o),u=_,a=0,g=v=c,d=h=f=s}}return b}function Pl(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ol(n){n.data.datasets.forEach(t=>{Pl(t)})}function Jg(n,t){const e=t.length;let i=0,r;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Pt(ce(t,a.axis,s).lo,0,e-1)),c?r=Pt(ce(t,a.axis,o).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var tp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Ol(n);return}const i=n.width;n.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=n.getDatasetMeta(a),c=s||r.data;if(Cn([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:h}=Jg(l,c);const f=e.threshold||4*i;if(h<=f){Pl(r);return}B(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(e.algorithm){case"lttb":g=Qg(c,d,h,i,e);break;case"min-max":g=Zg(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=g})},destroy(n){Ol(n)}};function ep(n,t,e){const i=n.segments,r=n.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Zr(l,c,r);const u=Qr(e,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Eo(t,u);for(const h of d){const f=Qr(e,a[h.start],a[h.end],h.loop),g=Oo(o,r,f);for(const v of g)s.push({source:v,target:h,start:{[e]:El(u,f,"start",Math.max)},end:{[e]:El(u,f,"end",Math.min)}})}}return s}function Qr(n,t,e,i){if(i)return;let r=t[n],a=e[n];return n==="angle"&&(r=$t(r),a=$t(a)),{property:n,start:r,end:a}}function np(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Zr(s,o,r);const l=r[s],c=r[o];i!==null?(a.push({x:l.x,y:i}),a.push({x:c.x,y:i})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function Zr(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function El(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Rl(n,t){let e=[],i=!1;return it(n)?(i=!0,e=n):e=np(n,t),e.length?new Te({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Al(n){return n&&n.fill!==!1}function ip(n,t,e){let r=n[t].fill;const a=[t];let s;if(!e)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!gt(r))return r;if(s=n[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function rp(n,t,e){const i=lp(n);if(q(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return gt(r)&&Math.floor(r)===r?ap(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ap(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function sp(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:q(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function op(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:q(n)?i=n.value:i=t.getBaseValue(),i}function lp(n){const t=n.options,e=t.fill;let i=U(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function cp(n){const{scale:t,index:e,line:i}=n,r=[],a=i.segments,s=i.points,o=up(t,e);o.push(Rl({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)dp(r,s[u],o)}return new Te({points:r,options:{}})}function up(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function dp(n,t,e){const i=[];for(let r=0;r<e.length;r++){const a=e[r],{first:s,last:o,point:l}=hp(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(n.push(l),!o)break}}n.push(...i)}function hp(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],h=s[u.end][e];if(le(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class Ll{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:a,radius:s}=this;return e=e||{start:0,end:ct},t.arc(r,a,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,a=t.angle;return{x:e+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function fp(n){const{chart:t,fill:e,line:i}=n;if(gt(e))return gp(t,e);if(e==="stack")return cp(n);if(e==="shape")return!0;const r=pp(n);return r instanceof Ll?r:Rl(r,i)}function gp(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function pp(n){return(n.scale||{}).getPointPositionForValue?bp(n):mp(n)}function mp(n){const{scale:t={},fill:e}=n,i=sp(e,t);if(gt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function bp(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=op(e,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Ll({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)o.push(t.getPointPositionForValue(l,s));return o}function Jr(n,t,e){const i=fp(t),{line:r,scale:a,axis:s}=t,o=r.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};i&&r.points.length&&(Dn(n,e),vp(n,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:s}),kn(n))}function vp(n,t){const{line:e,target:i,above:r,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==r&&(Il(n,i,s.top),Nl(n,{line:e,target:i,color:r,scale:o,property:l}),n.restore(),n.save(),Il(n,i,s.bottom)),Nl(n,{line:e,target:i,color:a,scale:o,property:l}),n.restore()}function Il(n,t,e){const{segments:i,points:r}=t;let a=!0,s=!1;n.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Zr(l,c,r)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Nl(n,t){const{line:e,target:i,property:r,color:a,scale:s}=t,o=ep(e,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;n.save(),n.fillStyle=h,yp(n,s,f&&Qr(r,u,d)),n.beginPath();const g=!!e.pathSegment(n,l);let v;if(f){g?n.closePath():Fl(n,i,d,r);const b=!!i.pathSegment(n,c,{move:g,reverse:!0});v=g&&b,v||Fl(n,i,u,r)}n.closePath(),n.fill(v?"evenodd":"nonzero"),n.restore()}}function yp(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,i,o-s,r-i),n.clip())}function Fl(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var xp={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof Te&&(l={visible:n.isDatasetVisible(s),index:s,fill:rp(o,s,i),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=ip(r,s,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),i&&o.fill&&Jr(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;Al(a)&&Jr(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Al(i)||e.drawTime!=="beforeDatasetDraw"||Jr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wl=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},wp=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Yl extends Ot{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=at(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=dt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Wl(i,a);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+o;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,v)=>{const b=i+e/2+a.measureText(g.text).width;(v===0||c[c.length-1]+b+2*o>s)&&(d+=u,c[c.length-(v>0?0:1)]=0,f+=u,h++),l[v]={left:0,top:f,row:h,width:b,height:r},c[c.length-1]+=b+o}),d}_fitCols(t,e,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,g=0,v=0;return this.legendItems.forEach((b,m)=>{const{itemWidth:y,itemHeight:w}=_p(i,e,a,b,r);m>0&&f+w+2*o>u&&(d+=h+o,c.push({width:h,height:f}),g+=h+o,v++,h=f=0),l[m]={left:g,top:f,col:v,width:y,height:w},h=Math.max(h,y),f+=w+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:a}}=this,s=nn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=At(i,this.left+r,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=At(i,this.left+r,this.right-this.lineWidths[o])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let o=0,l=At(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=At(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Dn(t,this),this._draw(),kn(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=pt.color,l=nn(t.rtl,this.left,this.width),c=dt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:b}=Wl(s,d),m=function(M,T,S){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;r.save();const k=U(S.lineWidth,1);if(r.fillStyle=U(S.fillStyle,o),r.lineCap=U(S.lineCap,"butt"),r.lineDashOffset=U(S.lineDashOffset,0),r.lineJoin=U(S.lineJoin,"miter"),r.lineWidth=k,r.strokeStyle=U(S.strokeStyle,o),r.setLineDash(U(S.lineDash,[])),s.usePointStyle){const D={radius:v*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:k},R=l.xPlus(M,g/2),I=T+h;fo(r,D,R,I,s.pointStyleWidth&&g)}else{const D=T+Math.max((d-v)/2,0),R=l.leftForLtr(M,g),I=xe(S.borderRadius);r.beginPath(),Object.values(I).some(V=>V!==0)?Je(r,{x:R,y:D,w:g,h:v,radius:I}):r.rect(R,D,g,v),r.fill(),k!==0&&r.stroke()}r.restore()},y=function(M,T,S){We(r,S.text,M,T+b/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?f={x:At(a,this.left+u,this.right-i[0]),y:this.top+u+x,line:0}:f={x:this.left+u,y:At(a,this.top+x+u,this.bottom-e[0].height),line:0},Do(this.ctx,t.textDirection);const _=b+u;this.legendItems.forEach((M,T)=>{r.strokeStyle=M.fontColor,r.fillStyle=M.fontColor;const S=r.measureText(M.text).width,k=l.textAlign(M.textAlign||(M.textAlign=s.textAlign)),D=g+h+S;let R=f.x,I=f.y;l.setWidth(this.width),w?T>0&&R+D+u>this.right&&(I=f.y+=_,f.line++,R=f.x=At(a,this.left+u,this.right-i[f.line])):T>0&&I+_>this.bottom&&(R=f.x=R+e[f.line].width+u,f.line++,I=f.y=At(a,this.top+x+u,this.bottom-e[f.line].height));const V=l.x(R);if(m(V,I,M),R=$d(k,R+g+h,w?R+D:this.right,t.rtl),y(l.x(R),I,M),w)f.x+=D+u;else if(typeof M.text!="string"){const H=c.lineHeight;f.y+=Ul(M,H)+u}else f.y+=_}),ko(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=dt(e.font),r=St(e.padding);if(!e.display)return;const a=nn(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=At(t.align,d,this.right-h);else{const g=this.columnSizes.reduce((v,b)=>Math.max(v,b.height),0);u=c+At(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=At(o,d,d+h);s.textAlign=a.textAlign(Tr(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,We(s,e.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,e=dt(t.font),i=St(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,a;if(le(t,this.left,this.right)&&le(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],le(t,r.left,r.left+r.width)&&le(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Sp(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=wp(r,i);r&&!a&&at(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&at(e.onHover,[t,i,this],this)}else i&&at(e.onClick,[t,i,this],this)}}function _p(n,t,e,i,r){const a=Mp(i,n,t,e),s=Tp(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function Mp(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+i.measureText(r).width}function Tp(n,t,e){let i=n;return typeof t.text!="string"&&(i=Ul(t,e)),i}function Ul(n,t){const e=n.text?n.text.length:0;return t*e}function Sp(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Dp={id:"legend",_element:Yl,start(n,t,e){const i=n.legend=new Yl({ctx:n.ctx,options:e,chart:n});Lt.configure(n,i,e),Lt.addBox(n,i)},stop(n){Lt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;Lt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=St(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class ta extends Ot{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=it(i.text)?i.text.length:1;this._padding=St(i.padding);const a=r*dt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=At(o,i,a),d=e+t,c=a-i):(s.position==="left"?(u=i+t,d=At(o,r,e),l=Q*-.5):(u=a-t,d=At(o,e,r),l=Q*.5),c=r-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=dt(e.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);We(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:Tr(e.align),textBaseline:"middle",translation:[s,o]})}}function kp(n,t){const e=new ta({ctx:n.ctx,options:t,chart:n});Lt.configure(n,e,t),Lt.addBox(n,e),n.titleBlock=e}var Cp={id:"title",_element:ta,start(n,t,e){kp(n,e)},stop(n){const t=n.titleBlock;Lt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;Lt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yi=new WeakMap;var Pp={id:"subtitle",start(n,t,e){const i=new ta({ctx:n.ctx,options:e,chart:n});Lt.configure(n,i,e),Lt.addBox(n,i),Yi.set(n,i)},stop(n){Lt.removeBox(n,Yi.get(n)),Yi.delete(n)},beforeUpdate(n,t,e){const i=Yi.get(n);Lt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Bn={average(n){if(!n.length)return!1;let t,e,i=0,r=0,a=0;for(t=0,e=n.length;t<e;++t){const s=n[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ze(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function te(n,t){return t&&(it(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function he(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
17
17
  `)>-1?n.split(`
18
- `):n}function Pp(n,t){const{element:e,datasetIndex:i,index:r}=t,a=n.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:n,label:s,parsed:a.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Bl(n,t){const e=n.chart.ctx,{body:i,footer:r,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=dt(t.bodyFont),c=dt(t.titleFont),u=dt(t.footerFont),d=a.length,h=r.length,f=i.length,g=St(t.padding);let v=g.height,b=0,m=i.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(v+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;v+=f*x+(m-f)*l.lineHeight+(m-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const w=function(x){b=Math.max(b,e.measureText(x).width+y)};return e.save(),e.font=c.string,st(n.title,w),e.font=l.string,st(n.beforeBody.concat(n.afterBody),w),y=t.displayColors?s+2+t.boxPadding:0,st(i,x=>{st(x.before,w),st(x.lines,w),st(x.after,w)}),y=0,e.font=u.string,st(n.footer,w),e.restore(),b+=g.width,{width:b,height:v}}function Op(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Ep(n,t,e,i){const{x:r,width:a}=i,s=e.caretSize+e.caretPadding;if(n==="left"&&r+a+s>t.width||n==="right"&&r-a-s<0)return!0}function Rp(n,t,e,i){const{x:r,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),Ep(c,n,t,e)&&(c="center"),c}function zl(n,t,e){const i=e.yAlign||t.yAlign||Op(n,e);return{xAlign:e.xAlign||t.xAlign||Rp(n,t,e,i),yAlign:i}}function Ap(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Lp(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Hl(n,t,e,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=xe(s);let g=Ap(t,o);const v=Lp(t,l,c);return l==="center"?o==="left"?g+=c:o==="right"&&(g-=c):o==="left"?g-=Math.max(u,h)+r:o==="right"&&(g+=Math.max(d,f)+r),{x:Pt(g,0,i.width-t.width),y:Pt(v,0,i.height-t.height)}}function Ui(n,t,e){const i=St(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function $l(n){return te([],he(n))}function Ip(n,t,e){return we(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Vl(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const jl={beforeTitle:oe,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:oe,beforeBody:oe,beforeLabel:oe,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return B(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:oe,afterBody:oe,beforeFooter:oe,footer:oe,afterFooter:oe};function Ut(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?jl[t].call(e,i):r}class ea extends Ot{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,a=new Ir(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Ip(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=Ut(i,"beforeTitle",this,t),a=Ut(i,"title",this,t),s=Ut(i,"afterTitle",this,t);let o=[];return o=te(o,he(r)),o=te(o,he(a)),o=te(o,he(s)),o}getBeforeBody(t,e){return $l(Ut(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return st(t,a=>{const s={before:[],lines:[],after:[]},o=Vl(i,a);te(s.before,he(Ut(o,"beforeLabel",this,a))),te(s.lines,Ut(o,"label",this,a)),te(s.after,he(Ut(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,e){return $l(Ut(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=Ut(i,"beforeFooter",this,t),a=Ut(i,"footer",this,t),s=Ut(i,"afterFooter",this,t);let o=[];return o=te(o,he(r)),o=te(o,he(a)),o=te(o,he(s)),o}_createItems(t){const e=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Pp(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),st(o,u=>{const d=Vl(t.callbacks,u);r.push(Ut(d,"labelColor",this,u)),a.push(Ut(d,"labelPointStyle",this,u)),s.push(Ut(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const o=Bn[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=Bl(this,i),c=Object.assign({},o,l),u=zl(this.chart,i,c),d=Hl(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const a=this.getCaretPosition(t,i,r);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=xe(o),{x:h,y:f}=t,{width:g,height:v}=e;let b,m,y,w,x,_;return a==="center"?(x=f+v/2,r==="left"?(b=h,m=b-s,w=x+s,_=x-s):(b=h+g,m=b+s,w=x-s,_=x+s),y=b):(r==="left"?m=h+Math.max(l,u)+s:r==="right"?m=h+g-Math.max(c,d)-s:m=this.caretX,a==="top"?(w=f,x=w-s,b=m-s,y=m+s):(w=f+v,x=w+s,b=m+s,y=m-s),_=w),{x1:b,x2:m,x3:y,y1:w,y2:x,y3:_}}drawTitle(t,e,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=nn(i.rtl,this.x,this.width);for(t.x=Ui(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",s=dt(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=dt(a.bodyFont),d=Ui(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=e.y+f;if(a.usePointStyle){const v={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=r.leftForLtr(h,c)+c/2,m=g+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Pr(t,v,b,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Pr(t,v,b,m)}else{t.lineWidth=q(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const v=r.leftForLtr(h,c),b=r.leftForLtr(r.xPlus(h,1),c-2),m=xe(s.borderRadius);Object.values(m).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Je(t,{x:v,y:g,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Je(t,{x:b,y:g+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(v,g,c,l),t.strokeRect(v,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(b,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=dt(i.bodyFont);let h=d.lineHeight,f=0;const g=nn(i.rtl,this.x,this.width),v=function(S){e.fillText(S,g.x(t.x+f),t.y+h/2),t.y+=h+a},b=g.textAlign(s);let m,y,w,x,_,M,T;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Ui(this,b,i),e.fillStyle=i.bodyColor,st(this.beforeBody,v),f=o&&b!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,M=r.length;x<M;++x){for(m=r[x],y=this.labelTextColors[x],e.fillStyle=y,st(m.before,v),w=m.lines,o&&w.length&&(this._drawColorBox(e,t,x,g,i),h=Math.max(d.lineHeight,l)),_=0,T=w.length;_<T;++_)v(w[_]),h=d.lineHeight;st(m.after,v)}f=0,h=d.lineHeight,st(this.afterBody,v),t.y-=a}drawFooter(t,e,i){const r=this.footer,a=r.length;let s,o;if(a){const l=nn(i.rtl,this.x,this.width);for(t.x=Ui(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=dt(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=xe(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,i,r),e.lineTo(o+c-h,l),e.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,e,i,r),e.lineTo(o+c,l+u-g),e.quadraticCurveTo(o+c,l+u,o+c-g,l+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(o+f,l+u),e.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,e,i,r),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=Bn[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Bl(this,t),l=Object.assign({},s,this._size),c=zl(e,t,l),u=Hl(t,l,c,e);(r._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=St(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,e),Do(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),ko(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!gi(i,r),s=this._positionChanged(r,e);(a||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),o=this._positionChanged(s,t),l=e||!gi(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return e;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:r,options:a}=this,s=Bn[a.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}C(ea,"positioners",Bn);var Bi={id:"tooltip",_element:ea,positioners:Bn,afterInit(n,t,e){e&&(n.tooltip=new ea({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Np=Object.freeze({__proto__:null,Colors:Gg,Decimation:Jg,Filler:yp,Legend:Sp,SubTitle:Cp,Title:kp,Tooltip:Bi});const Fp=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Wp(n,t,e,i){const r=n.indexOf(t);if(r===-1)return Fp(n,t,e,i);const a=n.lastIndexOf(t);return r!==a?e:r}const Yp=(n,t)=>n===null?null:Pt(Math.round(n),0,t);function ql(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class na extends ze{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:a}of e)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(B(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Wp(i,t,U(e,t),this._addedLabels),Yp(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=e;s++)r.push({value:s});return r}getLabelForValue(t){return ql.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}C(na,"id","category"),C(na,"defaults",{ticks:{callback:ql}});function Up(n,t){const e=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=n,f=a||1,g=u-1,{min:v,max:b}=t,m=!B(s),y=!B(o),w=!B(c),x=(b-v)/(d+1);let _=Gs((b-v)/g/f)*f,M,T,S,k;if(_<1e-14&&!m&&!y)return[{value:v},{value:b}];k=Math.ceil(b/_)-Math.floor(v/_),k>g&&(_=Gs(k*_/g/f)*f),B(l)||(M=Math.pow(10,l),_=Math.ceil(_*M)/M),r==="ticks"?(T=Math.floor(v/_)*_,S=Math.ceil(b/_)*_):(T=v,S=b),m&&y&&a&&Nd((o-s)/a,_/1e3)?(k=Math.round(Math.min((o-s)/_,u)),_=(o-s)/k,T=s,S=o):w?(T=m?s:T,S=y?o:S,k=c-1,_=(S-T)/k):(k=(S-T)/_,wn(k,Math.round(k),_/1e3)?k=Math.round(k):k=Math.ceil(k));const D=Math.max(Qs(_),Qs(T));M=Math.pow(10,B(l)?D:l),T=Math.round(T*M)/M,S=Math.round(S*M)/M;let R=0;for(m&&(h&&T!==s?(e.push({value:s}),T<s&&R++,wn(Math.round((T+R*_)*M)/M,s,Xl(s,x,n))&&R++):T<s&&R++);R<k;++R){const I=Math.round((T+R*_)*M)/M;if(y&&I>o)break;e.push({value:I})}return y&&h&&S!==o?e.length&&wn(e[e.length-1].value,o,Xl(o,x,n))?e[e.length-1].value=o:e.push({value:o}):(!y||S===o)&&e.push({value:S}),e}function Xl(n,t,{horizontal:e,minRotation:i}){const r=Tt(i),a=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class zi extends ze{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return B(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=e?r:l,o=l=>a=i?a:l;if(t){const l=Zt(r),c=Zt(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(r-l)}this.min=r,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,s=Up(r,a);return t.bounds==="ticks"&&Ks(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Tn(t,this.chart.options.locale,this.options.ticks.format)}}class ia extends zi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?t:0,this.max=gt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Tt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}C(ia,"id","linear"),C(ia,"defaults",{ticks:{callback:xi.formatters.numeric}});const zn=n=>Math.floor(ve(n)),He=(n,t)=>Math.pow(10,zn(n)+t);function Gl(n){return n/Math.pow(10,zn(n))===1}function Kl(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function Bp(n,t){const e=t-n;let i=zn(e);for(;Kl(n,t,i)>10;)i++;for(;Kl(n,t,i)<10;)i--;return Math.min(i,zn(n))}function zp(n,{min:t,max:e}){t=Ht(n.min,t);const i=[],r=zn(t);let a=Bp(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),h=Ht(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<e;)i.push({value:h,major:Gl(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=Ht(n.max,h);return i.push({value:f,major:Gl(f),significand:d}),i}class ra extends ze{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=zi.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return gt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?Math.max(0,t):null,this.max=gt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!gt(this._userMin)&&(this.min=t===He(this.min,0)?He(this.min,-1):He(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=e?r:o;i===r&&(i<=0?(a(1),s(10)):(a(He(i,-1)),s(He(r,1)))),i<=0&&a(He(r,-1)),r<=0&&s(He(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=zp(e,this);return t.bounds==="ticks"&&Ks(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Tn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ve(t),this._valueRange=ve(this.max)-ve(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ve(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}C(ra,"id","logarithmic"),C(ra,"defaults",{ticks:{callback:xi.formatters.logarithmic,major:{enabled:!0}}});function aa(n){const t=n.ticks;if(t.display&&n.display){const e=St(t.backdropPadding);return U(t.font&&t.font.size,pt.font.size)+e.height}return 0}function Hp(n,t,e){return e=it(e)?e:[e],{w:Jd(n,t.string,e),h:e.length*t.lineHeight}}function Ql(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function $p(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?Q/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));r[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+r[l],o),d=dt(c.font),h=Hp(n.ctx,d,n._pointLabels[l]);i[l]=h;const f=$t(n.getIndexAngle(l)+o),g=Math.round(vi(f)),v=Ql(g,u.x,h.w,0,180),b=Ql(g,u.y,h.h,90,270);Vp(e,t,f,v,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Xp(n,i,r)}function Vp(n,t,e,i,r){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,n.l=Math.min(n.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,n.t=Math.min(n.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function jp(n,t,e){const i=n.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,i+r+s,a),c=Math.round(vi($t(l.angle+ut))),u=Qp(l.y,o.h,c),d=Gp(c),h=Kp(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function qp(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:a}=n;return!(ue({x:e,y:i},t)||ue({x:e,y:a},t)||ue({x:r,y:i},t)||ue({x:r,y:a},t))}function Xp(n,t,e){const i=[],r=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:aa(a)/2,additionalAngle:s?Q/r:0};let c;for(let u=0;u<r;u++){l.padding=e[u],l.size=t[u];const d=jp(n,u,l);i.push(d),o==="auto"&&(d.visible=qp(d,c),d.visible&&(c=d))}return i}function Gp(n){return n===0||n===180?"center":n<180?"left":"right"}function Kp(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Qp(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Zp(n,t,e){const{left:i,top:r,right:a,bottom:s}=e,{backdropColor:o}=t;if(!B(o)){const l=xe(t.borderRadius),c=St(t.backdropPadding);n.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(g=>g!==0)?(n.beginPath(),Je(n,{x:u,y:d,w:h,h:f,radius:l}),n.fill()):n.fillRect(u,d,h,f)}}function Jp(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const a=n._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(n.getPointLabelContext(r));Zp(e,s,a);const o=dt(s.font),{x:l,y:c,textAlign:u}=a;We(e,n._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function Zl(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,ct);else{let a=n.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=n.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function tm(n,t,e,i,r){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),Zl(n,e,s,i),a.closePath(),a.stroke(),a.restore())}function em(n,t,e){return we(n,{label:e,index:t,type:"pointLabel"})}class Hn extends zi{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=St(aa(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=gt(t)&&!isNaN(t)?t:0,this.max=gt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/aa(this.options))}generateTickLabels(t){zi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=at(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?$p(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=ct/(this._pointLabels.length||1),i=this.options.startAngle||0;return $t(t*e+Tt(i))}getDistanceFromCenterForValue(t){if(B(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(B(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return em(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-ut+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Zl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&Jp(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),g=a.setContext(h);tm(this,f,l,s,g)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!e.reverse)return;const c=i.setContext(this.getContext(l)),u=dt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=St(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}We(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}C(Hn,"id","radialLinear"),C(Hn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),C(Hn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),C(Hn,"descriptors",{angleLines:{_fallback:"grid"}});const Hi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Bt=Object.keys(Hi);function Jl(n,t){return n-t}function tc(n,t){if(B(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:a}=n._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),gt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(ye(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,r)),+s)}function ec(n,t,e,i){const r=Bt.length;for(let a=Bt.indexOf(n);a<r-1;++a){const s=Hi[Bt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=i)return Bt[a]}return Bt[r-1]}function nm(n,t,e,i,r){for(let a=Bt.length-1;a>=Bt.indexOf(e);a--){const s=Bt[a];if(Hi[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return Bt[e?Bt.indexOf(e):0]}function im(n){for(let t=Bt.indexOf(n)+1,e=Bt.length;t<e;++t)if(Hi[Bt[t]].common)return Bt[t]}function nc(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Mr(e,t),a=e[i]>=t?e[i]:e[r];n[a]=!0}}function rm(n,t,e,i){const r=n._adapter,a=+r.startOf(t[0].value,i),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,i))l=e[o],l>=0&&(t[l].major=!0);return t}function ic(n,t,e){const i=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,i.push({value:o,major:!1});return a===0||!e?i:rm(n,i,r,e)}class $n extends ze{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),r=this._adapter=new jo._date(t.adapters.date);r.init(e),xn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:tc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=gt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),a=gt(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const a=this.min,s=this.max,o=Ud(r,a,s);return this._unit=e.unit||(i.autoSkip?ec(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):nm(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:im(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),ic(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Pt(e,0,s),i=Pt(i,0,s),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||ec(a.minUnit,e,i,this._getLabelCapacity(e)),o=U(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=ye(l)||l===!0,u={};let d=e,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,e,s)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+s);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)nc(u,h,g);return(h===i||r.bounds==="ticks"||f===1)&&nc(u,h,g),Object.keys(u).sort(Jl).map(v=>+v)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,a=this._unit,s=e||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,r){const a=this.options,s=a.ticks.callback;if(s)return at(s,[t,e,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[e],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=Tt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:i*a+o*s,h:i*s+o*a}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,ic(this,[t],this._majorUnit),r),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(tc(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return eo(t.sort(Jl))}}C($n,"id","time"),C($n,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function $i(n,t,e){let i=0,r=n.length-1,a,s,o,l;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=ce(n,"pos",t)),{pos:a,time:o}=n[i],{pos:s,time:l}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=ce(n,"time",t)),{time:a,pos:o}=n[i],{time:s,pos:l}=n[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class sa extends $n{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=$i(e,this.min),this._tableRange=$i(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=i&&r.push(c);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,o=r.length;s<o;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((r,a)=>r-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return($i(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return $i(this._table,i*this._tableRange+this._minPos,!0)}}C(sa,"id","timeseries"),C(sa,"defaults",$n.defaults);var am=Object.freeze({__proto__:null,CategoryScale:na,LinearScale:ia,LogarithmicScale:ra,RadialLinearScale:Hn,TimeScale:$n,TimeSeriesScale:sa});const sm=[pf,Hg,Np,am],om=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],lm=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],cm=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],um=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],rc=(n,t,e)=>{let i=n;return typeof t=="string"||Array.isArray(t)?i=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(i=n.toLocaleString(void 0,e)),i};function oa(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?um:cm:t.binary?lm:om,i=t.space?" ":"";if(t.signed&&n===0)return` 0${i}${e[0]}`;const r=n<0,a=r?"-":t.signed?"+":"";r&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=rc(n,t.locale,s);return a+u+i+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=rc(Number(n),t.locale,s),c=e[o];return a+l+i+c}function fe(n){"@babel/helpers - typeof";return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(n)}function ht(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function L(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function W(n){L(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||fe(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ac(n,t){L(2,arguments);var e=W(n),i=ht(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function la(n,t){L(2,arguments);var e=W(n),i=ht(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}function Vn(n,t){L(2,arguments);var e=W(n).getTime(),i=ht(t);return new Date(e+i)}var dm=36e5;function hm(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*dm)}var fm={};function De(){return fm}function sc(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Vi(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function ca(n){L(1,arguments);var t=W(n);return t.setHours(0,0,0,0),t}var gm=864e5;function pm(n,t){L(2,arguments);var e=ca(n),i=ca(t),r=e.getTime()-Vi(e),a=i.getTime()-Vi(i);return Math.round((r-a)/gm)}var mm=6e4;function bm(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*mm)}function vm(n,t){L(2,arguments);var e=ht(t),i=e*3;return la(n,i)}function ym(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*1e3)}function xm(n,t){L(2,arguments);var e=ht(t),i=e*7;return ac(n,i)}function wm(n,t){L(2,arguments);var e=ht(t);return la(n,e*12)}function jn(n,t){L(2,arguments);var e=W(n),i=W(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}var ji=6e4,qn=36e5,_m=1e3,Mm=3600;function Tm(n){return L(1,arguments),n instanceof Date||fe(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ua(n){if(L(1,arguments),!Tm(n)&&typeof n!="number")return!1;var t=W(n);return!isNaN(Number(t))}function Sm(n,t){L(2,arguments);var e=W(n),i=W(t),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function Dm(n,t){L(2,arguments);var e=W(n),i=W(t);return e.getFullYear()-i.getFullYear()}function oc(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function lc(n,t){L(2,arguments);var e=W(n),i=W(t),r=oc(e,i),a=Math.abs(pm(e,i));e.setDate(e.getDate()-r*a);var s=+(oc(e,i)===-r),o=r*(a-s);return o===0?0:o}function qi(n,t){return L(2,arguments),W(n).getTime()-W(t).getTime()}var cc={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},km="trunc";function Xn(n){return n?cc[n]:cc[km]}function Cm(n,t,e){L(2,arguments);var i=qi(n,t)/qn;return Xn(e==null?void 0:e.roundingMethod)(i)}function Pm(n,t,e){L(2,arguments);var i=qi(n,t)/ji;return Xn(e==null?void 0:e.roundingMethod)(i)}function uc(n){L(1,arguments);var t=W(n);return t.setHours(23,59,59,999),t}function dc(n){L(1,arguments);var t=W(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Om(n){L(1,arguments);var t=W(n);return uc(t).getTime()===dc(t).getTime()}function hc(n,t){L(2,arguments);var e=W(n),i=W(t),r=jn(e,i),a=Math.abs(Sm(e,i)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*a);var o=jn(e,i)===-r;Om(W(n))&&a===1&&jn(n,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function Em(n,t,e){L(2,arguments);var i=hc(n,t)/3;return Xn(e==null?void 0:e.roundingMethod)(i)}function Rm(n,t,e){L(2,arguments);var i=qi(n,t)/1e3;return Xn(e==null?void 0:e.roundingMethod)(i)}function Am(n,t,e){L(2,arguments);var i=lc(n,t)/7;return Xn(e==null?void 0:e.roundingMethod)(i)}function Lm(n,t){L(2,arguments);var e=W(n),i=W(t),r=jn(e,i),a=Math.abs(Dm(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=jn(e,i)===-r,o=r*(a-Number(s));return o===0?0:o}function Im(n){L(1,arguments);var t=W(n);return t.setSeconds(0,0),t}function Nm(n){L(1,arguments);var t=W(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Fm(n){L(1,arguments);var t=W(n);return t.setDate(1),t.setHours(0,0,0,0),t}function Wm(n){L(1,arguments);var t=W(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function Ym(n){L(1,arguments);var t=W(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Um(n){L(1,arguments);var t=W(n);return t.setMinutes(59,59,999),t}function Bm(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getDay(),g=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+g),h.setHours(23,59,59,999),h}function zm(n){L(1,arguments);var t=W(n);return t.setSeconds(59,999),t}function Hm(n){L(1,arguments);var t=W(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function $m(n){L(1,arguments);var t=W(n);return t.setMilliseconds(999),t}function fc(n,t){L(2,arguments);var e=ht(t);return Vn(n,-e)}var Vm=864e5;function jm(n){L(1,arguments);var t=W(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=e-i;return Math.floor(r/Vm)+1}function an(n){L(1,arguments);var t=1,e=W(n),i=e.getUTCDay(),r=(i<t?7:0)+i-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function gc(n){L(1,arguments);var t=W(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=an(i),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=an(a);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function qm(n){L(1,arguments);var t=gc(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=an(e);return i}var Xm=6048e5;function pc(n){L(1,arguments);var t=W(n),e=an(t).getTime()-qm(t).getTime();return Math.round(e/Xm)+1}function $e(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getUTCDay(),g=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function da(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=W(n),d=u.getUTCFullYear(),h=De(),f=ht((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(d+1,0,f),g.setUTCHours(0,0,0,0);var v=$e(g,t),b=new Date(0);b.setUTCFullYear(d,0,f),b.setUTCHours(0,0,0,0);var m=$e(b,t);return u.getTime()>=v.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function Gm(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),h=da(n,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var g=$e(f,t);return g}var Km=6048e5;function mc(n,t){L(1,arguments);var e=W(n),i=$e(e,t).getTime()-Gm(e,t).getTime();return Math.round(i/Km)+1}function ot(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}var Qm={y:function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return ot(e==="yy"?r%100:r,e.length)},M:function(t,e){var i=t.getUTCMonth();return e==="M"?String(i+1):ot(i+1,2)},d:function(t,e){return ot(t.getUTCDate(),e.length)},a:function(t,e){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(t,e){return ot(t.getUTCHours()%12||12,e.length)},H:function(t,e){return ot(t.getUTCHours(),e.length)},m:function(t,e){return ot(t.getUTCMinutes(),e.length)},s:function(t,e){return ot(t.getUTCSeconds(),e.length)},S:function(t,e){var i=e.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return ot(a,e.length)}};const ke=Qm;var sn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zm={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if(e==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return ke.y(t,e)},Y:function(t,e,i,r){var a=da(t,r),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return ot(o,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):ot(s,e.length)},R:function(t,e){var i=gc(t);return ot(i,e.length)},u:function(t,e){var i=t.getUTCFullYear();return ot(i,e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return ot(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return ot(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return ke.M(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return ot(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var a=mc(t,r);return e==="wo"?i.ordinalNumber(a,{unit:"week"}):ot(a,e.length)},I:function(t,e,i){var r=pc(t);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):ot(r,e.length)},d:function(t,e,i){return e==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):ke.d(t,e)},D:function(t,e,i){var r=jm(t);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):ot(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ot(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ot(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return ot(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r=t.getUTCHours(),a;switch(r===12?a=sn.noon:r===0?a=sn.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r=t.getUTCHours(),a;switch(r>=17?a=sn.evening:r>=12?a=sn.afternoon:r>=4?a=sn.morning:a=sn.night,e){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,i){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return ke.h(t,e)},H:function(t,e,i){return e==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ke.H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):ot(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):ot(r,e.length)},m:function(t,e,i){return e==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ke.m(t,e)},s:function(t,e,i){return e==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ke.s(t,e)},S:function(t,e){return ke.S(t,e)},X:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return vc(s);case"XXXX":case"XX":return Ve(s);case"XXXXX":case"XXX":default:return Ve(s,":")}},x:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return vc(s);case"xxxx":case"xx":return Ve(s);case"xxxxx":case"xxx":default:return Ve(s,":")}},O:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bc(s,":");case"OOOO":default:return"GMT"+Ve(s,":")}},z:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bc(s,":");case"zzzz":default:return"GMT"+Ve(s,":")}},t:function(t,e,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return ot(s,e.length)},T:function(t,e,i,r){var a=r._originalDate||t,s=a.getTime();return ot(s,e.length)}};function bc(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+ot(a,2)}function vc(n,t){if(n%60===0){var e=n>0?"-":"+";return e+ot(Math.abs(n)/60,2)}return Ve(n,t)}function Ve(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=ot(Math.floor(r/60),2),s=ot(r%60,2);return i+a+e+s}const Jm=Zm;var yc=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},xc=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},t0=function(t,e){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return yc(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",yc(r,e)).replace("{{time}}",xc(a,e))},e0={p:xc,P:t0};const ha=e0;var n0=["D","DD"],i0=["YY","YYYY"];function wc(n){return n0.indexOf(n)!==-1}function _c(n){return i0.indexOf(n)!==-1}function Xi(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var r0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a0=function(t,e,i){var r,a=r0[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const s0=a0;function fa(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,i=n.formats[e]||n.formats[n.defaultWidth];return i}}var o0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},c0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u0={date:fa({formats:o0,defaultWidth:"full"}),time:fa({formats:l0,defaultWidth:"full"}),dateTime:fa({formats:c0,defaultWidth:"full"})};const d0=u0;var h0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},f0=function(t,e,i,r){return h0[t]};const g0=f0;function Gn(n){return function(t,e){var i=e!=null&&e.context?String(e.context):"standalone",r;if(i==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;r=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;r=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return r[c]}}var p0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},m0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},b0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},v0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},y0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},x0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},w0=function(t,e){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},_0={ordinalNumber:w0,era:Gn({values:p0,defaultWidth:"wide"}),quarter:Gn({values:m0,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Gn({values:b0,defaultWidth:"wide"}),day:Gn({values:v0,defaultWidth:"wide"}),dayPeriod:Gn({values:y0,defaultWidth:"wide",formattingValues:x0,defaultFormattingWidth:"wide"})};const M0=_0;function Kn(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.width,r=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?S0(o,function(d){return d.test(s)}):T0(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function T0(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function S0(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function D0(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(n.matchPattern);if(!i)return null;var r=i[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var k0=/^(\d+)(th|st|nd|rd)?/i,C0=/\d+/i,P0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},O0={any:[/^b/i,/^(a|c)/i]},E0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},R0={any:[/1/i,/2/i,/3/i,/4/i]},A0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},L0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},I0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},N0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},F0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},W0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Y0={ordinalNumber:D0({matchPattern:k0,parsePattern:C0,valueCallback:function(t){return parseInt(t,10)}}),era:Kn({matchPatterns:P0,defaultMatchWidth:"wide",parsePatterns:O0,defaultParseWidth:"any"}),quarter:Kn({matchPatterns:E0,defaultMatchWidth:"wide",parsePatterns:R0,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Kn({matchPatterns:A0,defaultMatchWidth:"wide",parsePatterns:L0,defaultParseWidth:"any"}),day:Kn({matchPatterns:I0,defaultMatchWidth:"wide",parsePatterns:N0,defaultParseWidth:"any"}),dayPeriod:Kn({matchPatterns:F0,defaultMatchWidth:"any",parsePatterns:W0,defaultParseWidth:"any"})},U0={code:"en-US",formatDistance:s0,formatLong:d0,formatRelative:g0,localize:M0,match:Y0,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Mc=U0;var B0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,z0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H0=/^'([^]*?)'?$/,$0=/''/g,V0=/[a-zA-Z]/;function j0(n,t,e){var i,r,a,s,o,l,c,u,d,h,f,g,v,b,m,y,w,x;L(2,arguments);var _=String(t),M=De(),T=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:M.locale)!==null&&i!==void 0?i:Mc,S=ht((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:M.firstWeekContainsDate)!==null&&s!==void 0?s:(d=M.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=ht((f=(g=(v=(b=e==null?void 0:e.weekStartsOn)!==null&&b!==void 0?b:e==null||(m=e.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&v!==void 0?v:M.weekStartsOn)!==null&&g!==void 0?g:(w=M.locale)===null||w===void 0||(x=w.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var D=W(n);if(!ua(D))throw new RangeError("Invalid time value");var R=Vi(D),I=fc(D,R),V={firstWeekContainsDate:S,weekStartsOn:k,locale:T,_originalDate:D},H=_.match(z0).map(function(F){var z=F[0];if(z==="p"||z==="P"){var j=ha[z];return j(F,T.formatLong)}return F}).join("").match(B0).map(function(F){if(F==="''")return"'";var z=F[0];if(z==="'")return q0(F);var j=Jm[z];if(j)return!(e!=null&&e.useAdditionalWeekYearTokens)&&_c(F)&&Xi(F,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&wc(F)&&Xi(F,t,String(n)),j(I,F,T.localize,V);if(z.match(V0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");return F}).join("");return H}function q0(n){var t=n.match(H0);return t?t[1].replace($0,"'"):n}function X0(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Tc(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function G0(n,t){if(n){if(typeof n=="string")return Tc(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Tc(n,t)}}function Sc(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=G0(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function E(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ga(n,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},ga(n,t)}function tt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&ga(n,t)}function Gi(n){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gi(n)}function K0(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Q0(n,t){if(t&&(fe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E(n)}function et(n){var t=K0();return function(){var i=Gi(n),r;if(t){var a=Gi(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Q0(this,r)}}function Z(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(n,t){if(fe(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(fe(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Dc(n){var t=Z0(n,"string");return fe(t)==="symbol"?t:String(t)}function kc(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,Dc(i.key),i)}}function J(n,t,e){return t&&kc(n.prototype,t),e&&kc(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function P(n,t,e){return t=Dc(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var J0=10,Cc=function(){function n(){Z(this,n),P(this,"priority",void 0),P(this,"subPriority",0)}return J(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),tb=function(n){tt(e,n);var t=et(e);function e(i,r,a,s,o){var l;return Z(this,e),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return J(e,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,s){return this.setValue(r,a,this.value,s)}}]),e}(Cc),eb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",J0),P(E(i),"subPriority",-1),i}return J(e,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}}]),e}(Cc),rt=function(){function n(){Z(this,n),P(this,"incompatibleTokens",void 0),P(this,"priority",void 0),P(this,"subPriority",void 0)}return J(n,[{key:"run",value:function(e,i,r,a){var s=this.parse(e,i,r,a);return s?{setter:new tb(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}(),nb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",140),P(E(i),"incompatibleTokens",["R","u","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,s){return a.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ee={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _t(n,t){return n&&{value:t(n.value),rest:n.rest}}function mt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function ne(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var i=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(r*qn+a*ji+s*_m),rest:t.slice(e[0].length)}}function Pc(n){return mt(wt.anyDigitsSigned,n)}function yt(n,t){switch(n){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+n+"}"),t)}}function Ki(n,t){switch(n){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function pa(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Oc(n,t){var e=t>0,i=e?t:1-t,r;if(i<=50)r=n||100;else{var a=i+50,s=Math.floor(a/100)*100,o=n>=a%100;r=n+s-(o?100:0)}return e?r:1-r}function Ec(n){return n%400===0||n%4===0&&n%100!==0}var ib=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return _t(yt(4,r),o);case"yo":return _t(s.ordinalNumber(r,{unit:"year"}),o);default:return _t(yt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s){var o=r.getUTCFullYear();if(s.isTwoDigitYear){var l=Oc(s.year,o);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),rb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return _t(yt(4,r),o);case"Yo":return _t(s.ordinalNumber(r,{unit:"year"}),o);default:return _t(yt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s,o){var l=da(r,o);if(s.isTwoDigitYear){var c=Oc(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),$e(r,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),$e(r,o)}}]),e}(rt),ab=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a){return Ki(a==="R"?4:a.length,r)}},{key:"set",value:function(r,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),an(o)}}]),e}(rt),sb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a){return Ki(a==="u"?4:a.length,r)}},{key:"set",value:function(r,a,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),ob=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",120),P(E(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return yt(a.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),lb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",120),P(E(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return yt(a.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),cb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),P(E(i),"priority",110),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return _t(mt(wt.month,r),o);case"MM":return _t(yt(2,r),o);case"Mo":return _t(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),ub=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",110),P(E(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return _t(mt(wt.month,r),o);case"LL":return _t(yt(2,r),o);case"Lo":return _t(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function db(n,t,e){L(2,arguments);var i=W(n),r=ht(t),a=mc(i,e)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var hb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",100),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"w":return mt(wt.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return $e(db(r,s,o),o)}}]),e}(rt);function fb(n,t){L(2,arguments);var e=W(n),i=ht(t),r=pc(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}var gb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",100),P(E(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"I":return mt(wt.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return an(fb(r,s))}}]),e}(rt),pb=[31,28,31,30,31,30,31,31,30,31,30,31],mb=[31,29,31,30,31,30,31,31,30,31,30,31],bb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"subPriority",1),P(E(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"d":return mt(wt.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Ec(s),l=r.getUTCMonth();return o?a>=1&&a<=mb[l]:a>=1&&a<=pb[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(rt),vb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"subpriority",1),P(E(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return mt(wt.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Ec(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function ma(n,t,e){var i,r,a,s,o,l,c,u;L(2,arguments);var d=De(),h=ht((i=(r=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=W(n),g=ht(t),v=f.getUTCDay(),b=g%7,m=(b+7)%7,y=(m<h?7:0)+g-v;return f.setUTCDate(f.getUTCDate()+y),f}var yb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt),xb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return _t(yt(a.length,r),l);case"eo":return _t(s.ordinalNumber(r,{unit:"day"}),l);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt),wb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return _t(yt(a.length,r),l);case"co":return _t(s.ordinalNumber(r,{unit:"day"}),l);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function _b(n,t){L(2,arguments);var e=ht(t);e%7===0&&(e=e-7);var i=1,r=W(n),a=r.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<i?7:0)+e-a;return r.setUTCDate(r.getUTCDate()+l),r}var Mb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return yt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return _t(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return _t(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return _t(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return _t(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,s){return r=_b(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(rt),Tb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),Sb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),Db=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["a","b","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),kb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["H","K","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"h":return mt(wt.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):!o&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(rt),Cb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"H":return mt(wt.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,s){return r.setUTCHours(s,0,0,0),r}}]),e}(rt),Pb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["h","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"K":return mt(wt.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(rt),Ob=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"k":return mt(wt.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,s){var o=s<=24?s%24:s;return r.setUTCHours(o,0,0,0),r}}]),e}(rt),Eb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",60),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"m":return mt(wt.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCMinutes(s,0,0),r}}]),e}(rt),Rb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",50),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"s":return mt(wt.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCSeconds(s,0),r}}]),e}(rt),Ab=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",30),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return _t(yt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),e}(rt),Lb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",10),P(E(i),"incompatibleTokens",["t","T","x"]),i}return J(e,[{key:"parse",value:function(r,a){switch(a){case"X":return ne(ee.basicOptionalMinutes,r);case"XX":return ne(ee.basic,r);case"XXXX":return ne(ee.basicOptionalSeconds,r);case"XXXXX":return ne(ee.extendedOptionalSeconds,r);case"XXX":default:return ne(ee.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(rt),Ib=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",10),P(E(i),"incompatibleTokens",["t","T","X"]),i}return J(e,[{key:"parse",value:function(r,a){switch(a){case"x":return ne(ee.basicOptionalMinutes,r);case"xx":return ne(ee.basic,r);case"xxxx":return ne(ee.basicOptionalSeconds,r);case"xxxxx":return ne(ee.extendedOptionalSeconds,r);case"xxx":default:return ne(ee.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(rt),Nb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",40),P(E(i),"incompatibleTokens","*"),i}return J(e,[{key:"parse",value:function(r){return Pc(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(rt),Fb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",20),P(E(i),"incompatibleTokens","*"),i}return J(e,[{key:"parse",value:function(r){return Pc(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(rt),Wb={G:new nb,y:new ib,Y:new rb,R:new ab,u:new sb,Q:new ob,q:new lb,M:new cb,L:new ub,w:new hb,I:new gb,d:new bb,D:new vb,E:new yb,e:new xb,c:new wb,i:new Mb,a:new Tb,b:new Sb,B:new Db,h:new kb,H:new Cb,K:new Pb,k:new Ob,m:new Eb,s:new Rb,S:new Ab,X:new Lb,x:new Ib,t:new Nb,T:new Fb},Yb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ub=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bb=/^'([^]*?)'?$/,zb=/''/g,Hb=/\S/,$b=/[a-zA-Z]/;function Vb(n,t,e,i){var r,a,s,o,l,c,u,d,h,f,g,v,b,m,y,w,x,_;L(3,arguments);var M=String(n),T=String(t),S=De(),k=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Mc;if(!k.match)throw new RangeError("locale must contain match property");var D=ht((s=(o=(l=(c=i==null?void 0:i.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(u=i.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=ht((g=(v=(b=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(y=i.locale)===null||y===void 0||(w=y.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&b!==void 0?b:S.weekStartsOn)!==null&&v!==void 0?v:(x=S.locale)===null||x===void 0||(_=x.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&g!==void 0?g:0);if(!(R>=0&&R<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return M===""?W(e):new Date(NaN);var I={firstWeekContainsDate:D,weekStartsOn:R,locale:k},V=[new eb],H=T.match(Ub).map(function(K){var Y=K[0];if(Y in ha){var Ct=ha[Y];return Ct(K,k.formatLong)}return K}).join("").match(Yb),F=[],z=Sc(H),j;try{var kt=function(){var Y=j.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&_c(Y)&&Xi(Y,T,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&wc(Y)&&Xi(Y,T,n);var Ct=Y[0],Qt=Wb[Ct];if(Qt){var hr=Qt.incompatibleTokens;if(Array.isArray(hr)){var fr=F.find(function(gr){return hr.includes(gr.token)||gr.token===Ct});if(fr)throw new RangeError("The format string mustn't contain `".concat(fr.fullToken,"` and `").concat(Y,"` at the same time"))}else if(Qt.incompatibleTokens==="*"&&F.length>0)throw new RangeError("The format string mustn't contain `".concat(Y,"` and any other token at the same time"));F.push({token:Ct,fullToken:Y});var ui=Qt.run(M,Y,k.match,I);if(!ui)return{v:new Date(NaN)};V.push(ui.setter),M=ui.rest}else{if(Ct.match($b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ct+"`");if(Y==="''"?Y="'":Ct==="'"&&(Y=jb(Y)),M.indexOf(Y)===0)M=M.slice(Y.length);else return{v:new Date(NaN)}}};for(z.s();!(j=z.n()).done;){var ft=kt();if(fe(ft)==="object")return ft.v}}catch(K){z.e(K)}finally{z.f()}if(M.length>0&&Hb.test(M))return new Date(NaN);var zt=V.map(function(K){return K.priority}).sort(function(K,Y){return Y-K}).filter(function(K,Y,Ct){return Ct.indexOf(K)===Y}).map(function(K){return V.filter(function(Y){return Y.priority===K}).sort(function(Y,Ct){return Ct.subPriority-Y.subPriority})}).map(function(K){return K[0]}),O=W(e);if(isNaN(O.getTime()))return new Date(NaN);var A=fc(O,Vi(O)),N={},X=Sc(zt),G;try{for(X.s();!(G=X.n()).done;){var nt=G.value;if(!nt.validate(A,I))return new Date(NaN);var xt=nt.set(A,N,I);Array.isArray(xt)?(A=xt[0],X0(N,xt[1])):A=xt}}catch(K){X.e(K)}finally{X.f()}return A}function jb(n){return n.match(Bb)[1].replace(zb,"'")}function qb(n){L(1,arguments);var t=W(n);return t.setMinutes(0,0,0),t}function Xb(n){L(1,arguments);var t=W(n);return t.setMilliseconds(0),t}function Gb(n){L(1,arguments);var t=n/qn;return Math.floor(t)}function Rc(n,t){var e;L(1,arguments);var i=ht((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=Jb(n),a;if(r.date){var s=tv(r.date,i);a=ev(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=nv(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=iv(r.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var Qi={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Kb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Qb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Zb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Jb(n){var t={},e=n.split(Qi.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],Qi.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Qi.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){var r=Qi.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function tv(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=n.match(e);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:a===null?r:a*100,restDateString:n.slice((i[1]||i[2]).length)}}function ev(n,t){if(t===null)return new Date(NaN);var e=n.match(Kb);if(!e)return new Date(NaN);var i=!!e[4],r=Qn(e[1]),a=Qn(e[2])-1,s=Qn(e[3]),o=Qn(e[4]),l=Qn(e[5])-1;if(i)return lv(t,o,l)?rv(t,o,l):new Date(NaN);var c=new Date(0);return!sv(t,a,s)||!ov(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function Qn(n){return n?parseInt(n):1}function nv(n){var t=n.match(Qb);if(!t)return NaN;var e=ba(t[1]),i=ba(t[2]),r=ba(t[3]);return cv(e,i,r)?e*qn+i*ji+r*1e3:NaN}function ba(n){return n&&parseFloat(n.replace(",","."))||0}function iv(n){if(n==="Z")return 0;var t=n.match(Zb);if(!t)return 0;var e=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return uv(i,r)?e*(i*qn+r*ji):NaN}function rv(n,t,e){var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var av=[31,null,31,30,31,30,31,31,30,31,30,31];function Ac(n){return n%400===0||n%4===0&&n%100!==0}function sv(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(av[t]||(Ac(n)?29:28))}function ov(n,t){return t>=1&&t<=(Ac(n)?366:365)}function lv(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function cv(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function uv(n,t){return t>=0&&t<=59}function dv(n){L(1,arguments);var t=n/Mm;return Math.floor(t)}var Et=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(Et||{}),Zi=(n=>(n.GAUGE="Gauge",n))(Zi||{}),Dt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Dt||{}),on=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(on||{});const va=(n,t)=>{var i,r;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}if(e.body&&!n.locked){const a=e.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Et.HORIZONTAL_BAR,Et.VERTICAL_BAR].includes(n.chartType),l=[Zi.GAUGE,Et.DOUGHNUT].includes(n.chartType);n.tooltipContext=e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;n.units==="bytes"?h=isNaN(d)?d:oa(d):h=`${d%1===0?us.format(d):us.format(Number(d.toFixed(Py)))} ${n.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},hv=n=>n&&n.datasets&&n.datasets.length,fv=n=>hv(n)&&n.datasets.some(t=>t.data.length),gv=n=>fv(n)&&n.datasets.some(t=>t.data.length>1),pv=n=>gv(n)&&n.datasets.some(t=>t.data[0]&&ua(t.data[0].x)),mv=n=>pv(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),ya=(n,t,e)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return n.x<e?n.x+t*a*(1-r):n.x-t*s*(1-r)},bv=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xa={exports:{}},Lc={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Lc);var bt=Lc.exports,wa={exports:{}},_a={exports:{}},Ic={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ic);var Nc=Ic.exports,Ma={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}n.exports=t.default})(Ma,Ma.exports);var It=Ma.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Nc),r=e(It);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(_a,_a.exports);var vv=_a.exports,Ta={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Nc),r=e(It);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ta,Ta.exports);var ie=Ta.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(vv),r=e(ie),a=e(It);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}n.exports=t.default})(wa,wa.exports);var yv=wa.exports,Sa={exports:{}},Da={exports:{}},ka={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}n.exports=t.default})(ka,ka.exports);var je=ka.exports;const xv=Zn(je);(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(je),r=e(ie),a=e(It);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}n.exports=t.default})(Da,Da.exports);var wv=Da.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(wv),r=e(It),a=e(je);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}n.exports=t.default})(Sa,Sa.exports);var _v=Sa.exports,Ca={exports:{}},Pa={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(ie),r=e(It),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(Pa,Pa.exports);var Mv=Pa.exports,Oa={exports:{}},Ea={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ie),r=e(It);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Ea,Ea.exports);var Ra=Ea.exports,Aa={exports:{}},La={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(ie),r=e(It),a=e(Ra);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}n.exports=t.default})(La,La.exports);var Fc=La.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Fc),r=e(Ra),a=e(It);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}n.exports=t.default})(Aa,Aa.exports);var Tv=Aa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(Ra),a=e(Tv),s=e(It),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Oa,Oa.exports);var Sv=Oa.exports,Ia={exports:{}},Na={exports:{}},qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.getDefaultOptions=Dv,qe.setDefaultOptions=kv;var Wc={};function Dv(){return Wc}function kv(n){Wc=n}(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(ie),r=e(It),a=e(je),s=qe;function o(l,c){var u,d,h,f,g,v,b,m;(0,r.default)(1,arguments);var y=(0,s.getDefaultOptions)(),w=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(g=c.locale)===null||g===void 0||(v=g.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:y.weekStartsOn)!==null&&d!==void 0?d:(b=y.locale)===null||b===void 0||(m=b.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=(0,i.default)(l),_=x.getUTCDay(),M=(_<w?7:0)+_-w;return x.setUTCDate(x.getUTCDate()-M),x.setUTCHours(0,0,0,0),x}n.exports=t.default})(Na,Na.exports);var Fa=Na.exports,Wa={exports:{}},Ya={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(It),a=e(Fa),s=e(je),o=qe;function l(c,u){var d,h,f,g,v,b,m,y;(0,r.default)(1,arguments);var w=(0,i.default)(c),x=w.getUTCFullYear(),_=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(m=_.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=new Date(0);T.setUTCFullYear(x+1,0,M),T.setUTCHours(0,0,0,0);var S=(0,a.default)(T,u),k=new Date(0);k.setUTCFullYear(x,0,M),k.setUTCHours(0,0,0,0);var D=(0,a.default)(k,u);return w.getTime()>=S.getTime()?x+1:w.getTime()>=D.getTime()?x:x-1}n.exports=t.default})(Ya,Ya.exports);var Yc=Ya.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Yc),r=e(It),a=e(Fa),s=e(je),o=qe;function l(c,u){var d,h,f,g,v,b,m,y;(0,r.default)(1,arguments);var w=(0,o.getDefaultOptions)(),x=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:w.firstWeekContainsDate)!==null&&h!==void 0?h:(m=w.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1),_=(0,i.default)(c,u),M=new Date(0);M.setUTCFullYear(_,0,x),M.setUTCHours(0,0,0,0);var T=(0,a.default)(M,u);return T}n.exports=t.default})(Wa,Wa.exports);var Cv=Wa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(Fa),a=e(Cv),s=e(It),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}n.exports=t.default})(Ia,Ia.exports);var Pv=Ia.exports,Ua={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}n.exports=t.default})(Ua,Ua.exports);var Uc=Ua.exports,Ba={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uc),r={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,i.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,i.default)(c+1,2)},d:function(o,l){return(0,i.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,i.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,i.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,i.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,i.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,i.default)(d,l.length)}},a=r;t.default=a,n.exports=t.default})(Ba,Ba.exports);var Ov=Ba.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Mv),r=e(Sv),a=e(Fc),s=e(Pv),o=e(Yc),l=e(Uc),c=e(Ov),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,y,w){var x=m.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return w.era(x,{width:"abbreviated"});case"GGGGG":return w.era(x,{width:"narrow"});case"GGGG":default:return w.era(x,{width:"wide"})}},y:function(m,y,w){if(y==="yo"){var x=m.getUTCFullYear(),_=x>0?x:1-x;return w.ordinalNumber(_,{unit:"year"})}return c.default.y(m,y)},Y:function(m,y,w,x){var _=(0,o.default)(m,x),M=_>0?_:1-_;if(y==="YY"){var T=M%100;return(0,l.default)(T,2)}return y==="Yo"?w.ordinalNumber(M,{unit:"year"}):(0,l.default)(M,y.length)},R:function(m,y){var w=(0,a.default)(m);return(0,l.default)(w,y.length)},u:function(m,y){var w=m.getUTCFullYear();return(0,l.default)(w,y.length)},Q:function(m,y,w){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"Q":return String(x);case"QQ":return(0,l.default)(x,2);case"Qo":return w.ordinalNumber(x,{unit:"quarter"});case"QQQ":return w.quarter(x,{width:"abbreviated",context:"formatting"});case"QQQQQ":return w.quarter(x,{width:"narrow",context:"formatting"});case"QQQQ":default:return w.quarter(x,{width:"wide",context:"formatting"})}},q:function(m,y,w){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"q":return String(x);case"qq":return(0,l.default)(x,2);case"qo":return w.ordinalNumber(x,{unit:"quarter"});case"qqq":return w.quarter(x,{width:"abbreviated",context:"standalone"});case"qqqqq":return w.quarter(x,{width:"narrow",context:"standalone"});case"qqqq":default:return w.quarter(x,{width:"wide",context:"standalone"})}},M:function(m,y,w){var x=m.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(m,y);case"Mo":return w.ordinalNumber(x+1,{unit:"month"});case"MMM":return w.month(x,{width:"abbreviated",context:"formatting"});case"MMMMM":return w.month(x,{width:"narrow",context:"formatting"});case"MMMM":default:return w.month(x,{width:"wide",context:"formatting"})}},L:function(m,y,w){var x=m.getUTCMonth();switch(y){case"L":return String(x+1);case"LL":return(0,l.default)(x+1,2);case"Lo":return w.ordinalNumber(x+1,{unit:"month"});case"LLL":return w.month(x,{width:"abbreviated",context:"standalone"});case"LLLLL":return w.month(x,{width:"narrow",context:"standalone"});case"LLLL":default:return w.month(x,{width:"wide",context:"standalone"})}},w:function(m,y,w,x){var _=(0,s.default)(m,x);return y==="wo"?w.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,y.length)},I:function(m,y,w){var x=(0,r.default)(m);return y==="Io"?w.ordinalNumber(x,{unit:"week"}):(0,l.default)(x,y.length)},d:function(m,y,w){return y==="do"?w.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,y)},D:function(m,y,w){var x=(0,i.default)(m);return y==="Do"?w.ordinalNumber(x,{unit:"dayOfYear"}):(0,l.default)(x,y.length)},E:function(m,y,w){var x=m.getUTCDay();switch(y){case"E":case"EE":case"EEE":return w.day(x,{width:"abbreviated",context:"formatting"});case"EEEEE":return w.day(x,{width:"narrow",context:"formatting"});case"EEEEEE":return w.day(x,{width:"short",context:"formatting"});case"EEEE":default:return w.day(x,{width:"wide",context:"formatting"})}},e:function(m,y,w,x){var _=m.getUTCDay(),M=(_-x.weekStartsOn+8)%7||7;switch(y){case"e":return String(M);case"ee":return(0,l.default)(M,2);case"eo":return w.ordinalNumber(M,{unit:"day"});case"eee":return w.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return w.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return w.day(_,{width:"short",context:"formatting"});case"eeee":default:return w.day(_,{width:"wide",context:"formatting"})}},c:function(m,y,w,x){var _=m.getUTCDay(),M=(_-x.weekStartsOn+8)%7||7;switch(y){case"c":return String(M);case"cc":return(0,l.default)(M,y.length);case"co":return w.ordinalNumber(M,{unit:"day"});case"ccc":return w.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return w.day(_,{width:"narrow",context:"standalone"});case"cccccc":return w.day(_,{width:"short",context:"standalone"});case"cccc":default:return w.day(_,{width:"wide",context:"standalone"})}},i:function(m,y,w){var x=m.getUTCDay(),_=x===0?7:x;switch(y){case"i":return String(_);case"ii":return(0,l.default)(_,y.length);case"io":return w.ordinalNumber(_,{unit:"day"});case"iii":return w.day(x,{width:"abbreviated",context:"formatting"});case"iiiii":return w.day(x,{width:"narrow",context:"formatting"});case"iiiiii":return w.day(x,{width:"short",context:"formatting"});case"iiii":default:return w.day(x,{width:"wide",context:"formatting"})}},a:function(m,y,w){var x=m.getUTCHours(),_=x/12>=1?"pm":"am";switch(y){case"a":case"aa":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(m,y,w){var x=m.getUTCHours(),_;switch(x===12?_=u.noon:x===0?_=u.midnight:_=x/12>=1?"pm":"am",y){case"b":case"bb":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(m,y,w){var x=m.getUTCHours(),_;switch(x>=17?_=u.evening:x>=12?_=u.afternoon:x>=4?_=u.morning:_=u.night,y){case"B":case"BB":case"BBB":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(m,y,w){if(y==="ho"){var x=m.getUTCHours()%12;return x===0&&(x=12),w.ordinalNumber(x,{unit:"hour"})}return c.default.h(m,y)},H:function(m,y,w){return y==="Ho"?w.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,y)},K:function(m,y,w){var x=m.getUTCHours()%12;return y==="Ko"?w.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},k:function(m,y,w){var x=m.getUTCHours();return x===0&&(x=24),y==="ko"?w.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},m:function(m,y,w){return y==="mo"?w.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,y)},s:function(m,y,w){return y==="so"?w.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,y)},S:function(m,y){return c.default.S(m,y)},X:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();if(M===0)return"Z";switch(y){case"X":return f(M);case"XXXX":case"XX":return g(M);case"XXXXX":case"XXX":default:return g(M,":")}},x:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"x":return f(M);case"xxxx":case"xx":return g(M);case"xxxxx":case"xxx":default:return g(M,":")}},O:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+h(M,":");case"OOOO":default:return"GMT"+g(M,":")}},z:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+h(M,":");case"zzzz":default:return"GMT"+g(M,":")}},t:function(m,y,w,x){var _=x._originalDate||m,M=Math.floor(_.getTime()/1e3);return(0,l.default)(M,y.length)},T:function(m,y,w,x){var _=x._originalDate||m,M=_.getTime();return(0,l.default)(M,y.length)}};function h(b,m){var y=b>0?"-":"+",w=Math.abs(b),x=Math.floor(w/60),_=w%60;if(_===0)return y+String(x);var M=m||"";return y+String(x)+M+(0,l.default)(_,2)}function f(b,m){if(b%60===0){var y=b>0?"-":"+";return y+(0,l.default)(Math.abs(b)/60,2)}return g(b,m)}function g(b,m){var y=m||"",w=b>0?"-":"+",x=Math.abs(b),_=(0,l.default)(Math.floor(x/60),2),M=(0,l.default)(x%60,2);return w+_+y+M}var v=d;t.default=v,n.exports=t.default})(Ca,Ca.exports);var Ev=Ca.exports,za={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},i=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},r=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],h=u[2];if(!h)return e(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",e(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(za,za.exports);var Rv=za.exports,Ha={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}n.exports=t.default})(Ha,Ha.exports);var Bc=Ha.exports;const zc=Zn(Bc);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.isProtectedDayOfYearToken=Iv,Jn.isProtectedWeekYearToken=Nv,Jn.throwProtectedError=Fv;var Av=["D","DD"],Lv=["YY","YYYY"];function Iv(n){return Av.indexOf(n)!==-1}function Nv(n){return Lv.indexOf(n)!==-1}function Fv(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var $a={exports:{}},Va={exports:{}},ja={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},r=i;t.default=r,n.exports=t.default})(ja,ja.exports);var Wv=ja.exports,qa={exports:{}},Xa={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}n.exports=t.default})(Xa,Xa.exports);var Yv=Xa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Yv),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(qa,qa.exports);var Uv=qa.exports,Ga={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(s,o,l,c){return e[s]},r=i;t.default=r,n.exports=t.default})(Ga,Ga.exports);var Bv=Ga.exports,Ka={exports:{}},Qa={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}n.exports=t.default})(Qa,Qa.exports);var zv=Qa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(zv),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(g,v){var b=Number(g),m=b%100;if(m>20||m<10)switch(m%10){case 1:return b+"st";case 2:return b+"nd";case 3:return b+"rd"}return b+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(g){return g-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},h=d;t.default=h,n.exports=t.default})(Ka,Ka.exports);var Hv=Ka.exports,Za={exports:{}},Ja={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(b){return b.test(d)}):i(h,function(b){return b.test(d)}),g;g=a.valueCallback?a.valueCallback(f):f,g=o.valueCallback?o.valueCallback(g):g;var v=s.slice(d.length);return{value:g,rest:v}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Ja,Ja.exports);var $v=Ja.exports,ts={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(ts,ts.exports);var Vv=ts.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e($v),r=e(Vv),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},h={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},g={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(x){return parseInt(x,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(x){return x+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:g,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:b,defaultParseWidth:"any"})},y=m;t.default=y,n.exports=t.default})(Za,Za.exports);var jv=Za.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Wv),r=e(Uv),a=e(Bv),s=e(Hv),o=e(jv),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Va,Va.exports);var qv=Va.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(qv),r=i.default;t.default=r,n.exports=t.default})($a,$a.exports);var Xv=$a.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;var i=e(yv),r=e(_v),a=e(ie),s=e(Ev),o=e(Rv),l=e(Bc),c=Jn,u=e(je),d=e(It),h=qe,f=e(Xv),g=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b=/^'([^]*?)'?$/,m=/''/g,y=/[a-zA-Z]/;function w(_,M,T){var S,k,D,R,I,V,H,F,z,j,kt,ft,zt,O,A,N,X,G;(0,d.default)(2,arguments);var nt=String(M),xt=(0,h.getDefaultOptions)(),K=(S=(k=T==null?void 0:T.locale)!==null&&k!==void 0?k:xt.locale)!==null&&S!==void 0?S:f.default,Y=(0,u.default)((D=(R=(I=(V=T==null?void 0:T.firstWeekContainsDate)!==null&&V!==void 0?V:T==null||(H=T.locale)===null||H===void 0||(F=H.options)===null||F===void 0?void 0:F.firstWeekContainsDate)!==null&&I!==void 0?I:xt.firstWeekContainsDate)!==null&&R!==void 0?R:(z=xt.locale)===null||z===void 0||(j=z.options)===null||j===void 0?void 0:j.firstWeekContainsDate)!==null&&D!==void 0?D:1);if(!(Y>=1&&Y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Ct=(0,u.default)((kt=(ft=(zt=(O=T==null?void 0:T.weekStartsOn)!==null&&O!==void 0?O:T==null||(A=T.locale)===null||A===void 0||(N=A.options)===null||N===void 0?void 0:N.weekStartsOn)!==null&&zt!==void 0?zt:xt.weekStartsOn)!==null&&ft!==void 0?ft:(X=xt.locale)===null||X===void 0||(G=X.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&kt!==void 0?kt:0);if(!(Ct>=0&&Ct<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!K.localize)throw new RangeError("locale must contain localize property");if(!K.formatLong)throw new RangeError("locale must contain formatLong property");var Qt=(0,a.default)(_);if(!(0,i.default)(Qt))throw new RangeError("Invalid time value");var hr=(0,l.default)(Qt),fr=(0,r.default)(Qt,hr),ui={firstWeekContainsDate:Y,weekStartsOn:Ct,locale:K,_originalDate:Qt},gr=nt.match(v).map(function(Vt){var Ie=Vt[0];if(Ie==="p"||Ie==="P"){var pr=o.default[Ie];return pr(Vt,K.formatLong)}return Vt}).join("").match(g).map(function(Vt){if(Vt==="''")return"'";var Ie=Vt[0];if(Ie==="'")return x(Vt);var pr=s.default[Ie];if(pr)return!(T!=null&&T.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(Vt)&&(0,c.throwProtectedError)(Vt,M,String(_)),!(T!=null&&T.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(Vt)&&(0,c.throwProtectedError)(Vt,M,String(_)),pr(fr,Vt,K.localize,ui);if(Ie.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ie+"`");return Vt}).join("");return gr}function x(_){var M=_.match(b);return M?M[1].replace(m,"'"):_}n.exports=t.default})(xa,xa.exports);var Gv=xa.exports;const Kv=Zn(Gv);function Hc(n,t,e){var i=Jv(n,e.timeZone,e.locale);return i.formatToParts?Qv(i,t):Zv(i,t)}function Qv(n,t){for(var e=n.formatToParts(t),i=e.length-1;i>=0;--i)if(e[i].type==="timeZoneName")return e[i].value}function Zv(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(e);return i?i[0].substr(1):""}function Jv(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function ty(n,t){var e=ry(t);return e.formatToParts?ny(e,n):iy(e,n)}var ey={year:0,month:1,day:2,hour:3,minute:4,second:5};function ny(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=ey[e[r].type];a>=0&&(i[a]=parseInt(e[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function iy(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var es={};function ry(n){if(!es[n]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";es[n]=e?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return es[n]}function $c(n,t,e,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(i,r,a,s),o}var Vc=36e5,ay=6e4,ns={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function is(n,t,e){var i,r;if(!n||(i=ns.timezoneZ.exec(n),i))return 0;var a;if(i=ns.timezoneHH.exec(n),i)return a=parseInt(i[1],10),jc(a)?-(a*Vc):NaN;if(i=ns.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return jc(a,s)?(r=Math.abs(a)*Vc+s*ay,a>0?-r:r):NaN}if(ly(n)){t=new Date(t||Date.now());var o=e?t:sy(t),l=rs(o,n),c=e?l:oy(t,l,n);return-c}return NaN}function sy(n){return $c(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function rs(n,t){var e=ty(n,t),i=$c(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),r=n.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function oy(n,t,e){var i=n.getTime(),r=i-t,a=rs(new Date(r),e);if(t===a)return t;r-=a-t;var s=rs(new Date(r),e);return a===s?a:Math.max(a,s)}function jc(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var qc={};function ly(n){if(qc[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),qc[n]=!0,!0}catch{return!1}}var cy=60*1e3,uy={X:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);if(r===0)return"Z";switch(t){case"X":return Xc(r);case"XXXX":case"XX":return ln(r);case"XXXXX":case"XXX":default:return ln(r,":")}},x:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);switch(t){case"x":return Xc(r);case"xxxx":case"xx":return ln(r);case"xxxxx":case"xxx":default:return ln(r,":")}},O:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);switch(t){case"O":case"OO":case"OOO":return"GMT"+dy(r,":");case"OOOO":default:return"GMT"+ln(r,":")}},z:function(n,t,e,i){var r=i._originalDate||n;switch(t){case"z":case"zz":case"zzz":return Hc("short",r,i);case"zzzz":default:return Hc("long",r,i)}}};function as(n,t){var e=n?is(n,t,!0)/cy:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Ji(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}function ln(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=Ji(Math.floor(r/60),2),s=Ji(Math.floor(r%60),2);return i+a+e+s}function Xc(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Ji(Math.abs(n)/60,2)}return ln(n,t)}function dy(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+Ji(a,2)}const hy=uy;var fy=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ss=36e5,Gc=6e4,gy=2,Nt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:fy};function Kc(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},i=e.additionalDigits==null?gy:xv(e.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=py(n),a=my(r.date,i),s=a.year,o=a.restDateString,l=by(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=vy(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=is(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=zc(new Date(c+u)),d=zc(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function py(n){var t={},e=Nt.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=Nt.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=Nt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function my(n,t){var e=Nt.YYY[t],i=Nt.YYYYY[t],r;if(r=Nt.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=Nt.YY.exec(n)||e.exec(n),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function by(n,t){if(t===null)return null;var e,i,r,a;if(n.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(e=Nt.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,Jc(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=Nt.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return wy(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=Nt.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Jc(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=Nt.Www.exec(n),e)return a=parseInt(e[1],10)-1,tu(t,a)?Qc(t,a):new Date(NaN);if(e=Nt.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return tu(t,a,l)?Qc(t,a,l):new Date(NaN)}return null}function vy(n){var t,e,i;if(t=Nt.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),os(e)?e%24*ss:NaN;if(t=Nt.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),os(e,i)?e%24*ss+i*Gc:NaN;if(t=Nt.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return os(e,i,r)?e%24*ss+i*Gc+r*1e3:NaN}return null}function Qc(n,t,e){t=t||0,e=e||0;var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=t*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var yy=[31,28,31,30,31,30,31,31,30,31,30,31],xy=[31,29,31,30,31,30,31,31,30,31,30,31];function Zc(n){return n%400===0||n%4===0&&n%100!==0}function Jc(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=Zc(n);if(i&&e>xy[t]||!i&&e>yy[t])return!1}return!0}function wy(n,t){if(t<1)return!1;var e=Zc(n);return!(e&&t>366||!e&&t>365)}function tu(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function os(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var _y=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function My(n,t,e){var i=String(t),r=e||{},a=i.match(_y);if(a){var s=Kc(n,r);i=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+hy[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return Kv(n,i,r)}var ls={exports:{}},cs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}n.exports=t.default})(cs,cs.exports);var Ty=cs.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(Ty);function r(a){return(0,i.default)({},a)}n.exports=t.default})(ls,ls.exports);var Sy=ls.exports;const Dy=Zn(Sy);function ky(n,t,e){var i=Kc(n,e),r=is(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Cy(n,t,e,i){var r=Dy(i);return r.timeZone=t,My(ky(n,t),e,r)}const Py=2,us=new Intl.NumberFormat(((nd=document==null?void 0:document.documentElement)==null?void 0:nd.lang)||"en-US");function Oy(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let i="MMM dd, YYY hh:mm a";t.short&&(i="MMM dd, YYY"),t.includeTZ&&(i+=" (z)");const r=new Date(n);return Cy(r,e,i)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const ds=10,Gt=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],ti=(n,t)=>(t||Gt)[n%Gt.length],ei=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),r=parseInt(n.substring(4,6),16);e=e-t,i=i-t,r=r-t,e>255?e=255:e<0&&(e=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length===1?"0"+r.toString(16):r.toString(16);return`#${a}${s}${o}`},eu="#6f7787",Ey={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},hs=new Map,fs=(n,t)=>t==="bytes"?oa(n):t==="count/minute"?n.toFixed(2):us.format(n),nu=n=>{const e=document.createElement("canvas").getContext("2d"),i=dt({});return e.font=i.string,e.measureText(n).width},Ry=()=>{const n="label_height";if(!hs.has(n)){const t=dt({});hs.set(n,t.lineHeight)}return hs.get(n)},Ay=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),iu=(n,t)=>t.datasets.reduce((e,i,r)=>n.isDatasetVisible(r)?e+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),ru=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`;function Ly(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Bi.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=ya(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offset,y:c,xAlign:u}},Hr.modes.customInteractionMode=function(i,r){const a=_e(r,i),s=[];return Hr.evaluateInteractionItems(i,i.options.indexAxis||"x",a,(o,l,c)=>{i.options.indexAxis==="y"&&o.inYRange(a.y,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c}),i.options.indexAxis==="x"&&o.inXRange(a.x,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c})}),s},p.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:n.indexAxis,scales:{x:{border:{display:!1},stacked:n.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const g=10;return d&&d.length>g?d.slice(0,g)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:n.indexAxis==="y"?!B((i=n.metricAxesTitle)==null?void 0:i.value):!B((r=n.dimensionAxesTitle)==null?void 0:r.value),text:n.indexAxis==="y"?(a=n.metricAxesTitle)==null?void 0:a.value:(s=n.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>ds?d.slice(0,ds)+"...":d):f.getLabelForValue(Number(d))}},title:{display:n.indexAxis==="x"?!B((o=n.metricAxesTitle)==null?void 0:o.value):!B((l=n.dimensionAxesTitle)==null?void 0:l.value),text:n.indexAxis==="x"?(c=n.metricAxesTitle)==null?void 0:c.value:(u=n.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:d=>{va(n.tooltipState,d)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Yt.register(...sm);const Iy=(n,t)=>{const e=t.datasets.map(r=>r.label),i=n.datasets.map(r=>r.label);return n.datasets.length===t.datasets.length&&e.every((r,a)=>r===i[a])};function Ny(n,t,e,i,r){const a=p.shallowRef(null),s=(o,l)=>{if(t.value)return new Yt(t.value,{type:n,data:o,plugins:i,options:l})};return p.onMounted(()=>{a.value=s(e.value,r.value)}),p.onUnmounted(()=>{B(a.value)||a.value.destroy()}),p.watch(e,(o,l)=>{if(Iy(l,o)&&!B(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else B(a.value)||a.value.destroy(),a.value=s(o,r.value)}),p.watch(t,()=>{B(a.value)||a.value.destroy(),a.value=s(e.value,r.value)}),p.watch(r,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(B(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var au={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(g,v){v&&v%3===0&&h.push(d),h.push(g)}),h.reverse().join("")}function e(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var i=1e3,r=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,i,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(au);var Fy=au.exports;const ni=Zn(Fy);function Wy(n,t,e){const{i18n:i}=Mt.useI18n();return{legendValues:p.computed(()=>n.value.datasets.reduce((a,s)=>{const o=s.total?s.total:s.data.reduce((c,u)=>c+(typeof u=="number"?Number(u)||0:Number(u.y)||0),0);let l;if(e.value==="bytes")l=isNaN(o)?"0":oa(o);else{l=`${ni(o,{capital:!0})} ${e.value}`;const c=e.value&&i&&i.te(`chartUnits.${e.value}`)&&i.t(`chartUnits.${e.value}`)||e.value;l=i&&i.t("legend.datapointValueDisplay",{value:ni(o,{capital:!0}),unit:c})||`${ni(o,{capital:!0})} ${e.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Yy(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Bi.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=ya(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offset,y:c,xAlign:u}},{options:p.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:i=>{va(n.tooltipState,i)}}}}))}}var Uy=Object.defineProperty,By=(n,t,e)=>t in n?Uy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,re=(n,t,e)=>(By(n,typeof t!="symbol"?t+"":t,e),e),$=(n=>(n.MINUTELY="Minutely",n.HOURLY="Hourly",n.DAILY="Daily",n.WEEKLY="Weekly",n))($||{}),vt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(vt||{});const zy={[$.MINUTELY]:60*1e3,[$.HOURLY]:60*60*1e3,[$.DAILY]:60*60*24*1e3,[$.WEEKLY]:60*60*24*7*1e3};function ii(n){return n&&Object.values($).find(t=>n<=zy[t])||null}function gs(n){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(n)}function tr(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ae(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function cn(n){ae(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||gs(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function su(n,t){ae(2,arguments);var e=cn(n),i=tr(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function Hy(n,t){ae(2,arguments);var e=cn(n),i=tr(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}var $y={};function Vy(){return $y}function er(n,t){var e,i,r,a,s,o,l,c;ae(1,arguments);var u=Vy(),d=tr((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=cn(n),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function ou(n){ae(1,arguments);var t=cn(n);return t.setHours(0,0,0,0),t}var jy=60,qy=3600;function un(n){ae(1,arguments);var t=cn(n);return t.setDate(1),t.setHours(0,0,0,0),t}function Xy(n){ae(1,arguments);var t=cn(n),e=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(e,i+1,0),r.setHours(0,0,0,0),r.getDate()}function Gy(n){return ae(1,arguments),Math.floor(n*qy)}function Ky(n){ae(1,arguments);var t=n/jy;return Math.floor(t)}function Qy(n,t){ae(2,arguments);var e=tr(t);return Hy(n,-e)}class Kt{constructor(t){re(this,"timeframeText"),re(this,"key"),re(this,"display"),re(this,"timeframeLength"),re(this,"allowedTiers"),re(this,"defaultResponseGranularity"),re(this,"dataGranularity"),re(this,"isRelative"),re(this,"_startCustom"),re(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add($.MINUTELY),e>=2&&e<=7*24&&t.add($.HOURLY),e>=2*24&&t.add($.DAILY),e>=2*24*14&&t.add($.WEEKLY),t}}class Zy extends Kt{rawStart(){return er(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class Jy extends Kt{rawStart(){return un(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class tx extends Kt{rawEnd(){return er(new Date,{weekStartsOn:1})}rawStart(){return er(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class ex extends Kt{rawEnd(){return un(new Date)}rawStart(){return un(new Date().setMonth(new Date().getMonth()-1))}}vt.FIFTEEN_MIN,new Kt({key:vt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:$.MINUTELY,dataGranularity:$.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.ONE_HOUR,new Kt({key:vt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:$.MINUTELY,dataGranularity:$.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.SIX_HOUR,new Kt({key:vt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.TWELVE_HOUR,new Kt({key:vt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.ONE_DAY,new Kt({key:vt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.SEVEN_DAY,new Kt({key:vt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),vt.THIRTY_DAY,new Kt({key:vt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),vt.CURRENT_WEEK,new Zy({key:vt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=er(new Date,{weekStartsOn:1});return(ou(su(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.CURRENT_MONTH,new Jy({key:vt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=un(new Date);return(ou(su(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.PREVIOUS_WEEK,new tx({key:vt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.PREVIOUS_MONTH,new ex({key:vt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=un(new Date),e=un(Qy(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=nx(t,e)),60*60*24*Xy(new Date().setMonth(new Date().getMonth()-1))+Gy(n)},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function nx(n,t){return Ky(n.getTimezoneOffset()-t.getTimezoneOffset())}function ix(n){const t=p.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!B((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),e=p.computed(()=>{var l,c;return{title:{display:!B((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};Bi.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,h=n.tooltipState.height||this.height,f=u.width/2,g=u.height/2,v=ya(c,d,f);let b=bv(c,h,g);const m=c.y<g?"top":"bottom",y=c.x<f?"left":"center";return h>u.height&&(b=0),{x:v,y:b,xAlign:y,yAlign:m}};const r=p.computed(()=>{switch(n.granularity.value){case $.MINUTELY:return"minute";case $.HOURLY:return"hour";case $.DAILY:return"day";default:return"day"}}),a=p.computed(()=>n.timeRangeMs?Gb(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm":dv(Number(n.timeRangeSec.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=p.computed(()=>[$.DAILY,$.WEEKLY].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:p.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:r.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{va(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function rx(n,t){const{i18n:e}=Mt.useI18n();return p.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(m=>{const y=l?`${m.event[u]},${m.event[d]}`:`${u},${d}`,w=m.event[h];return[y,w]})),g=l&&a[u]||s,v=l&&a[d]||s;return!g||!v?{labels:[],datasets:[]}:{labels:l?a[u].map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m):s.map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m),datasets:v&&Array.from(v).flatMap((m,y)=>{if(!m)return[];let{colorPalette:w}=n;B(w)&&(w=Gt);const x={},_=Array.isArray(w)?ti(y,w):w[m]||ti(y);return x[m]=_,{label:e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m,backgroundColor:_,data:g.map(M=>f[`${M},${m}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const ax=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((i,r)=>i+r*e),sx=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Rc(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},ox=(n,t,e,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-i)/e)*e+i,l=Math.floor((s-i)/e)*e+i+e;return ax(o,l,e)};function lx(n,t){const{i18n:e}=Mt.useI18n();return p.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const g=sx(o),v=ox(o,l,f,g,r),b=new Set,m=r!=null&&r.length?r.reduce((_,M)=>{const T=new Date(M.timestamp).valueOf(),S=M.event;return b.add(u),T in _||(_[T]={}),u in _[T]||(_[T][u]={}),h.forEach(k=>{S[d]===k||d===k?_[T][u][k]=Math.round(Number(S[u])*1e3)/1e3:c.length||(_[T][u][k]=Math.round(Number(S[k])*1e3)/1e3)}),_},{}):{},y=[...b].reduce((_,M)=>(h.forEach(T=>_.push([M,T])),_),[]),w={},x=[...y].map(([_,M],T)=>{const S=v.map(V=>V in m&&_ in m[V]?{x:V,y:m[V][_][M]||0}:{x:V,y:0});let{colorPalette:k,fill:D}=n;B(k)&&(k=Gt);const R=Array.isArray(k)?ti(T,k):k[M]||ti(T),I=ei(R,50);return w[M]=R,{rawDimension:M,rawMetric:_,label:e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M,borderColor:I,backgroundColor:R,data:S,total:S.reduce((V,{y:H})=>V+Number(H),0),...Ey,fill:D}});return x.sort((_,M)=>Number(_.total)<Number(M.total)?-1:1),{datasets:x,colorMap:w}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Mt={useBarChartOptions:Ly,useChartJSCommon:Ny,useChartLegendValues:Wy,useExploreResultToDatasets:rx,useExploreResultToTimeDataset:lx,useDoughnutChartOptions:Yy,useLinechartOptions:ix,useI18n:rd,useReportChartDataForSynthetics:(n,t)=>{p.watch([n,t],(e,i,r)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),r(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})}};/*!
18
+ `):n}function Op(n,t){const{element:e,datasetIndex:i,index:r}=t,a=n.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:n,label:s,parsed:a.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Bl(n,t){const e=n.chart.ctx,{body:i,footer:r,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=dt(t.bodyFont),c=dt(t.titleFont),u=dt(t.footerFont),d=a.length,h=r.length,f=i.length,g=St(t.padding);let v=g.height,b=0,m=i.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(v+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;v+=f*x+(m-f)*l.lineHeight+(m-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const w=function(x){b=Math.max(b,e.measureText(x).width+y)};return e.save(),e.font=c.string,st(n.title,w),e.font=l.string,st(n.beforeBody.concat(n.afterBody),w),y=t.displayColors?s+2+t.boxPadding:0,st(i,x=>{st(x.before,w),st(x.lines,w),st(x.after,w)}),y=0,e.font=u.string,st(n.footer,w),e.restore(),b+=g.width,{width:b,height:v}}function Ep(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Rp(n,t,e,i){const{x:r,width:a}=i,s=e.caretSize+e.caretPadding;if(n==="left"&&r+a+s>t.width||n==="right"&&r-a-s<0)return!0}function Ap(n,t,e,i){const{x:r,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),Rp(c,n,t,e)&&(c="center"),c}function zl(n,t,e){const i=e.yAlign||t.yAlign||Ep(n,e);return{xAlign:e.xAlign||t.xAlign||Ap(n,t,e,i),yAlign:i}}function Lp(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Ip(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Hl(n,t,e,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=xe(s);let g=Lp(t,o);const v=Ip(t,l,c);return l==="center"?o==="left"?g+=c:o==="right"&&(g-=c):o==="left"?g-=Math.max(u,h)+r:o==="right"&&(g+=Math.max(d,f)+r),{x:Pt(g,0,i.width-t.width),y:Pt(v,0,i.height-t.height)}}function Ui(n,t,e){const i=St(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function $l(n){return te([],he(n))}function Np(n,t,e){return we(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Vl(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const jl={beforeTitle:oe,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:oe,beforeBody:oe,beforeLabel:oe,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return B(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:oe,afterBody:oe,beforeFooter:oe,footer:oe,afterFooter:oe};function Ut(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?jl[t].call(e,i):r}class ea extends Ot{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,a=new Ir(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Np(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=Ut(i,"beforeTitle",this,t),a=Ut(i,"title",this,t),s=Ut(i,"afterTitle",this,t);let o=[];return o=te(o,he(r)),o=te(o,he(a)),o=te(o,he(s)),o}getBeforeBody(t,e){return $l(Ut(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return st(t,a=>{const s={before:[],lines:[],after:[]},o=Vl(i,a);te(s.before,he(Ut(o,"beforeLabel",this,a))),te(s.lines,Ut(o,"label",this,a)),te(s.after,he(Ut(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,e){return $l(Ut(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=Ut(i,"beforeFooter",this,t),a=Ut(i,"footer",this,t),s=Ut(i,"afterFooter",this,t);let o=[];return o=te(o,he(r)),o=te(o,he(a)),o=te(o,he(s)),o}_createItems(t){const e=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Op(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),st(o,u=>{const d=Vl(t.callbacks,u);r.push(Ut(d,"labelColor",this,u)),a.push(Ut(d,"labelPointStyle",this,u)),s.push(Ut(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const o=Bn[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=Bl(this,i),c=Object.assign({},o,l),u=zl(this.chart,i,c),d=Hl(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const a=this.getCaretPosition(t,i,r);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=xe(o),{x:h,y:f}=t,{width:g,height:v}=e;let b,m,y,w,x,_;return a==="center"?(x=f+v/2,r==="left"?(b=h,m=b-s,w=x+s,_=x-s):(b=h+g,m=b+s,w=x-s,_=x+s),y=b):(r==="left"?m=h+Math.max(l,u)+s:r==="right"?m=h+g-Math.max(c,d)-s:m=this.caretX,a==="top"?(w=f,x=w-s,b=m-s,y=m+s):(w=f+v,x=w+s,b=m+s,y=m-s),_=w),{x1:b,x2:m,x3:y,y1:w,y2:x,y3:_}}drawTitle(t,e,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=nn(i.rtl,this.x,this.width);for(t.x=Ui(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",s=dt(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=dt(a.bodyFont),d=Ui(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=e.y+f;if(a.usePointStyle){const v={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=r.leftForLtr(h,c)+c/2,m=g+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Pr(t,v,b,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Pr(t,v,b,m)}else{t.lineWidth=q(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const v=r.leftForLtr(h,c),b=r.leftForLtr(r.xPlus(h,1),c-2),m=xe(s.borderRadius);Object.values(m).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Je(t,{x:v,y:g,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Je(t,{x:b,y:g+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(v,g,c,l),t.strokeRect(v,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(b,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=dt(i.bodyFont);let h=d.lineHeight,f=0;const g=nn(i.rtl,this.x,this.width),v=function(S){e.fillText(S,g.x(t.x+f),t.y+h/2),t.y+=h+a},b=g.textAlign(s);let m,y,w,x,_,M,T;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Ui(this,b,i),e.fillStyle=i.bodyColor,st(this.beforeBody,v),f=o&&b!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,M=r.length;x<M;++x){for(m=r[x],y=this.labelTextColors[x],e.fillStyle=y,st(m.before,v),w=m.lines,o&&w.length&&(this._drawColorBox(e,t,x,g,i),h=Math.max(d.lineHeight,l)),_=0,T=w.length;_<T;++_)v(w[_]),h=d.lineHeight;st(m.after,v)}f=0,h=d.lineHeight,st(this.afterBody,v),t.y-=a}drawFooter(t,e,i){const r=this.footer,a=r.length;let s,o;if(a){const l=nn(i.rtl,this.x,this.width);for(t.x=Ui(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=dt(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=xe(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,i,r),e.lineTo(o+c-h,l),e.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,e,i,r),e.lineTo(o+c,l+u-g),e.quadraticCurveTo(o+c,l+u,o+c-g,l+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(o+f,l+u),e.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,e,i,r),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=Bn[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Bl(this,t),l=Object.assign({},s,this._size),c=zl(e,t,l),u=Hl(t,l,c,e);(r._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=St(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,e),Do(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),ko(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!gi(i,r),s=this._positionChanged(r,e);(a||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,i),o=this._positionChanged(s,t),l=e||!gi(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return e;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:r,options:a}=this,s=Bn[a.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}C(ea,"positioners",Bn);var Bi={id:"tooltip",_element:ea,positioners:Bn,afterInit(n,t,e){e&&(n.tooltip=new ea({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Fp=Object.freeze({__proto__:null,Colors:Kg,Decimation:tp,Filler:xp,Legend:Dp,SubTitle:Pp,Title:Cp,Tooltip:Bi});const Wp=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Yp(n,t,e,i){const r=n.indexOf(t);if(r===-1)return Wp(n,t,e,i);const a=n.lastIndexOf(t);return r!==a?e:r}const Up=(n,t)=>n===null?null:Pt(Math.round(n),0,t);function ql(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class na extends ze{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:a}of e)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(B(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Yp(i,t,U(e,t),this._addedLabels),Up(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=e;s++)r.push({value:s});return r}getLabelForValue(t){return ql.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}C(na,"id","category"),C(na,"defaults",{ticks:{callback:ql}});function Bp(n,t){const e=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=n,f=a||1,g=u-1,{min:v,max:b}=t,m=!B(s),y=!B(o),w=!B(c),x=(b-v)/(d+1);let _=Gs((b-v)/g/f)*f,M,T,S,k;if(_<1e-14&&!m&&!y)return[{value:v},{value:b}];k=Math.ceil(b/_)-Math.floor(v/_),k>g&&(_=Gs(k*_/g/f)*f),B(l)||(M=Math.pow(10,l),_=Math.ceil(_*M)/M),r==="ticks"?(T=Math.floor(v/_)*_,S=Math.ceil(b/_)*_):(T=v,S=b),m&&y&&a&&Fd((o-s)/a,_/1e3)?(k=Math.round(Math.min((o-s)/_,u)),_=(o-s)/k,T=s,S=o):w?(T=m?s:T,S=y?o:S,k=c-1,_=(S-T)/k):(k=(S-T)/_,wn(k,Math.round(k),_/1e3)?k=Math.round(k):k=Math.ceil(k));const D=Math.max(Qs(_),Qs(T));M=Math.pow(10,B(l)?D:l),T=Math.round(T*M)/M,S=Math.round(S*M)/M;let R=0;for(m&&(h&&T!==s?(e.push({value:s}),T<s&&R++,wn(Math.round((T+R*_)*M)/M,s,Xl(s,x,n))&&R++):T<s&&R++);R<k;++R){const I=Math.round((T+R*_)*M)/M;if(y&&I>o)break;e.push({value:I})}return y&&h&&S!==o?e.length&&wn(e[e.length-1].value,o,Xl(o,x,n))?e[e.length-1].value=o:e.push({value:o}):(!y||S===o)&&e.push({value:S}),e}function Xl(n,t,{horizontal:e,minRotation:i}){const r=Tt(i),a=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class zi extends ze{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return B(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=e?r:l,o=l=>a=i?a:l;if(t){const l=Zt(r),c=Zt(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(r-l)}this.min=r,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,s=Bp(r,a);return t.bounds==="ticks"&&Ks(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Tn(t,this.chart.options.locale,this.options.ticks.format)}}class ia extends zi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?t:0,this.max=gt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Tt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}C(ia,"id","linear"),C(ia,"defaults",{ticks:{callback:xi.formatters.numeric}});const zn=n=>Math.floor(ve(n)),He=(n,t)=>Math.pow(10,zn(n)+t);function Gl(n){return n/Math.pow(10,zn(n))===1}function Kl(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function zp(n,t){const e=t-n;let i=zn(e);for(;Kl(n,t,i)>10;)i++;for(;Kl(n,t,i)<10;)i--;return Math.min(i,zn(n))}function Hp(n,{min:t,max:e}){t=Ht(n.min,t);const i=[],r=zn(t);let a=zp(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),h=Ht(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<e;)i.push({value:h,major:Gl(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=Ht(n.max,h);return i.push({value:f,major:Gl(f),significand:d}),i}class ra extends ze{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=zi.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return gt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=gt(t)?Math.max(0,t):null,this.max=gt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!gt(this._userMin)&&(this.min=t===He(this.min,0)?He(this.min,-1):He(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=e?r:o;i===r&&(i<=0?(a(1),s(10)):(a(He(i,-1)),s(He(r,1)))),i<=0&&a(He(r,-1)),r<=0&&s(He(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Hp(e,this);return t.bounds==="ticks"&&Ks(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Tn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ve(t),this._valueRange=ve(this.max)-ve(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ve(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}C(ra,"id","logarithmic"),C(ra,"defaults",{ticks:{callback:xi.formatters.logarithmic,major:{enabled:!0}}});function aa(n){const t=n.ticks;if(t.display&&n.display){const e=St(t.backdropPadding);return U(t.font&&t.font.size,pt.font.size)+e.height}return 0}function $p(n,t,e){return e=it(e)?e:[e],{w:th(n,t.string,e),h:e.length*t.lineHeight}}function Ql(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function Vp(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?Q/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));r[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+r[l],o),d=dt(c.font),h=$p(n.ctx,d,n._pointLabels[l]);i[l]=h;const f=$t(n.getIndexAngle(l)+o),g=Math.round(vi(f)),v=Ql(g,u.x,h.w,0,180),b=Ql(g,u.y,h.h,90,270);jp(e,t,f,v,b)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Gp(n,i,r)}function jp(n,t,e,i,r){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,n.l=Math.min(n.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,n.t=Math.min(n.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function qp(n,t,e){const i=n.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,i+r+s,a),c=Math.round(vi($t(l.angle+ut))),u=Zp(l.y,o.h,c),d=Kp(c),h=Qp(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function Xp(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:a}=n;return!(ue({x:e,y:i},t)||ue({x:e,y:a},t)||ue({x:r,y:i},t)||ue({x:r,y:a},t))}function Gp(n,t,e){const i=[],r=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:aa(a)/2,additionalAngle:s?Q/r:0};let c;for(let u=0;u<r;u++){l.padding=e[u],l.size=t[u];const d=qp(n,u,l);i.push(d),o==="auto"&&(d.visible=Xp(d,c),d.visible&&(c=d))}return i}function Kp(n){return n===0||n===180?"center":n<180?"left":"right"}function Qp(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Zp(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Jp(n,t,e){const{left:i,top:r,right:a,bottom:s}=e,{backdropColor:o}=t;if(!B(o)){const l=xe(t.borderRadius),c=St(t.backdropPadding);n.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(g=>g!==0)?(n.beginPath(),Je(n,{x:u,y:d,w:h,h:f,radius:l}),n.fill()):n.fillRect(u,d,h,f)}}function tm(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const a=n._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(n.getPointLabelContext(r));Jp(e,s,a);const o=dt(s.font),{x:l,y:c,textAlign:u}=a;We(e,n._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function Zl(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,ct);else{let a=n.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=n.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function em(n,t,e,i,r){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),Zl(n,e,s,i),a.closePath(),a.stroke(),a.restore())}function nm(n,t,e){return we(n,{label:e,index:t,type:"pointLabel"})}class Hn extends zi{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=St(aa(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=gt(t)&&!isNaN(t)?t:0,this.max=gt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/aa(this.options))}generateTickLabels(t){zi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=at(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Vp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=ct/(this._pointLabels.length||1),i=this.options.startAngle||0;return $t(t*e+Tt(i))}getDistanceFromCenterForValue(t){if(B(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(B(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return nm(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-ut+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Zl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&tm(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),g=a.setContext(h);em(this,f,l,s,g)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!e.reverse)return;const c=i.setContext(this.getContext(l)),u=dt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=St(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}We(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}C(Hn,"id","radialLinear"),C(Hn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),C(Hn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),C(Hn,"descriptors",{angleLines:{_fallback:"grid"}});const Hi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Bt=Object.keys(Hi);function Jl(n,t){return n-t}function tc(n,t){if(B(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:a}=n._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),gt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(ye(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,r)),+s)}function ec(n,t,e,i){const r=Bt.length;for(let a=Bt.indexOf(n);a<r-1;++a){const s=Hi[Bt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=i)return Bt[a]}return Bt[r-1]}function im(n,t,e,i,r){for(let a=Bt.length-1;a>=Bt.indexOf(e);a--){const s=Bt[a];if(Hi[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return Bt[e?Bt.indexOf(e):0]}function rm(n){for(let t=Bt.indexOf(n)+1,e=Bt.length;t<e;++t)if(Hi[Bt[t]].common)return Bt[t]}function nc(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Mr(e,t),a=e[i]>=t?e[i]:e[r];n[a]=!0}}function am(n,t,e,i){const r=n._adapter,a=+r.startOf(t[0].value,i),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,i))l=e[o],l>=0&&(t[l].major=!0);return t}function ic(n,t,e){const i=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,i.push({value:o,major:!1});return a===0||!e?i:am(n,i,r,e)}class $n extends ze{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),r=this._adapter=new jo._date(t.adapters.date);r.init(e),xn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:tc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=gt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),a=gt(a)&&!isNaN(a)?a:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const a=this.min,s=this.max,o=Bd(r,a,s);return this._unit=e.unit||(i.autoSkip?ec(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):im(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:rm(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),ic(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Pt(e,0,s),i=Pt(i,0,s),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||ec(a.minUnit,e,i,this._getLabelCapacity(e)),o=U(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=ye(l)||l===!0,u={};let d=e,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,e,s)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+s);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)nc(u,h,g);return(h===i||r.bounds==="ticks"||f===1)&&nc(u,h,g),Object.keys(u).sort(Jl).map(v=>+v)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,a=this._unit,s=e||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,r){const a=this.options,s=a.ticks.callback;if(s)return at(s,[t,e,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[e],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=Tt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:i*a+o*s,h:i*s+o*a}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,a=this._tickFormatFunction(t,0,ic(this,[t],this._majorUnit),r),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(tc(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return eo(t.sort(Jl))}}C($n,"id","time"),C($n,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function $i(n,t,e){let i=0,r=n.length-1,a,s,o,l;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=ce(n,"pos",t)),{pos:a,time:o}=n[i],{pos:s,time:l}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=ce(n,"time",t)),{time:a,pos:o}=n[i],{time:s,pos:l}=n[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class sa extends $n{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=$i(e,this.min),this._tableRange=$i(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=i&&r.push(c);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,o=r.length;s<o;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((r,a)=>r-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return($i(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return $i(this._table,i*this._tableRange+this._minPos,!0)}}C(sa,"id","timeseries"),C(sa,"defaults",$n.defaults);var sm=Object.freeze({__proto__:null,CategoryScale:na,LinearScale:ia,LogarithmicScale:ra,RadialLinearScale:Hn,TimeScale:$n,TimeSeriesScale:sa});const om=[mf,$g,Fp,sm],lm=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],cm=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],um=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],dm=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],rc=(n,t,e)=>{let i=n;return typeof t=="string"||Array.isArray(t)?i=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(i=n.toLocaleString(void 0,e)),i};function oa(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?dm:um:t.binary?cm:lm,i=t.space?" ":"";if(t.signed&&n===0)return` 0${i}${e[0]}`;const r=n<0,a=r?"-":t.signed?"+":"";r&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=rc(n,t.locale,s);return a+u+i+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=rc(Number(n),t.locale,s),c=e[o];return a+l+i+c}function fe(n){"@babel/helpers - typeof";return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(n)}function ht(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function L(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function W(n){L(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||fe(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ac(n,t){L(2,arguments);var e=W(n),i=ht(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function la(n,t){L(2,arguments);var e=W(n),i=ht(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}function Vn(n,t){L(2,arguments);var e=W(n).getTime(),i=ht(t);return new Date(e+i)}var hm=36e5;function fm(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*hm)}var gm={};function De(){return gm}function sc(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Vi(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function ca(n){L(1,arguments);var t=W(n);return t.setHours(0,0,0,0),t}var pm=864e5;function mm(n,t){L(2,arguments);var e=ca(n),i=ca(t),r=e.getTime()-Vi(e),a=i.getTime()-Vi(i);return Math.round((r-a)/pm)}var bm=6e4;function vm(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*bm)}function ym(n,t){L(2,arguments);var e=ht(t),i=e*3;return la(n,i)}function xm(n,t){L(2,arguments);var e=ht(t);return Vn(n,e*1e3)}function wm(n,t){L(2,arguments);var e=ht(t),i=e*7;return ac(n,i)}function _m(n,t){L(2,arguments);var e=ht(t);return la(n,e*12)}function jn(n,t){L(2,arguments);var e=W(n),i=W(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}var ji=6e4,qn=36e5,Mm=1e3,Tm=3600;function Sm(n){return L(1,arguments),n instanceof Date||fe(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ua(n){if(L(1,arguments),!Sm(n)&&typeof n!="number")return!1;var t=W(n);return!isNaN(Number(t))}function Dm(n,t){L(2,arguments);var e=W(n),i=W(t),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function km(n,t){L(2,arguments);var e=W(n),i=W(t);return e.getFullYear()-i.getFullYear()}function oc(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function lc(n,t){L(2,arguments);var e=W(n),i=W(t),r=oc(e,i),a=Math.abs(mm(e,i));e.setDate(e.getDate()-r*a);var s=+(oc(e,i)===-r),o=r*(a-s);return o===0?0:o}function qi(n,t){return L(2,arguments),W(n).getTime()-W(t).getTime()}var cc={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Cm="trunc";function Xn(n){return n?cc[n]:cc[Cm]}function Pm(n,t,e){L(2,arguments);var i=qi(n,t)/qn;return Xn(e==null?void 0:e.roundingMethod)(i)}function Om(n,t,e){L(2,arguments);var i=qi(n,t)/ji;return Xn(e==null?void 0:e.roundingMethod)(i)}function uc(n){L(1,arguments);var t=W(n);return t.setHours(23,59,59,999),t}function dc(n){L(1,arguments);var t=W(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Em(n){L(1,arguments);var t=W(n);return uc(t).getTime()===dc(t).getTime()}function hc(n,t){L(2,arguments);var e=W(n),i=W(t),r=jn(e,i),a=Math.abs(Dm(e,i)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*a);var o=jn(e,i)===-r;Em(W(n))&&a===1&&jn(n,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function Rm(n,t,e){L(2,arguments);var i=hc(n,t)/3;return Xn(e==null?void 0:e.roundingMethod)(i)}function Am(n,t,e){L(2,arguments);var i=qi(n,t)/1e3;return Xn(e==null?void 0:e.roundingMethod)(i)}function Lm(n,t,e){L(2,arguments);var i=lc(n,t)/7;return Xn(e==null?void 0:e.roundingMethod)(i)}function Im(n,t){L(2,arguments);var e=W(n),i=W(t),r=jn(e,i),a=Math.abs(km(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=jn(e,i)===-r,o=r*(a-Number(s));return o===0?0:o}function Nm(n){L(1,arguments);var t=W(n);return t.setSeconds(0,0),t}function Fm(n){L(1,arguments);var t=W(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Wm(n){L(1,arguments);var t=W(n);return t.setDate(1),t.setHours(0,0,0,0),t}function Ym(n){L(1,arguments);var t=W(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function Um(n){L(1,arguments);var t=W(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Bm(n){L(1,arguments);var t=W(n);return t.setMinutes(59,59,999),t}function zm(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getDay(),g=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+g),h.setHours(23,59,59,999),h}function Hm(n){L(1,arguments);var t=W(n);return t.setSeconds(59,999),t}function $m(n){L(1,arguments);var t=W(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function Vm(n){L(1,arguments);var t=W(n);return t.setMilliseconds(999),t}function fc(n,t){L(2,arguments);var e=ht(t);return Vn(n,-e)}var jm=864e5;function qm(n){L(1,arguments);var t=W(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=e-i;return Math.floor(r/jm)+1}function an(n){L(1,arguments);var t=1,e=W(n),i=e.getUTCDay(),r=(i<t?7:0)+i-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function gc(n){L(1,arguments);var t=W(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=an(i),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=an(a);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function Xm(n){L(1,arguments);var t=gc(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=an(e);return i}var Gm=6048e5;function pc(n){L(1,arguments);var t=W(n),e=an(t).getTime()-Xm(t).getTime();return Math.round(e/Gm)+1}function $e(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=W(n),f=h.getUTCDay(),g=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function da(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=W(n),d=u.getUTCFullYear(),h=De(),f=ht((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(d+1,0,f),g.setUTCHours(0,0,0,0);var v=$e(g,t),b=new Date(0);b.setUTCFullYear(d,0,f),b.setUTCHours(0,0,0,0);var m=$e(b,t);return u.getTime()>=v.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function Km(n,t){var e,i,r,a,s,o,l,c;L(1,arguments);var u=De(),d=ht((e=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),h=da(n,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var g=$e(f,t);return g}var Qm=6048e5;function mc(n,t){L(1,arguments);var e=W(n),i=$e(e,t).getTime()-Km(e,t).getTime();return Math.round(i/Qm)+1}function ot(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}var Zm={y:function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return ot(e==="yy"?r%100:r,e.length)},M:function(t,e){var i=t.getUTCMonth();return e==="M"?String(i+1):ot(i+1,2)},d:function(t,e){return ot(t.getUTCDate(),e.length)},a:function(t,e){var i=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(t,e){return ot(t.getUTCHours()%12||12,e.length)},H:function(t,e){return ot(t.getUTCHours(),e.length)},m:function(t,e){return ot(t.getUTCMinutes(),e.length)},s:function(t,e){return ot(t.getUTCSeconds(),e.length)},S:function(t,e){var i=e.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return ot(a,e.length)}};const ke=Zm;var sn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jm={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if(e==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return ke.y(t,e)},Y:function(t,e,i,r){var a=da(t,r),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return ot(o,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):ot(s,e.length)},R:function(t,e){var i=gc(t);return ot(i,e.length)},u:function(t,e){var i=t.getUTCFullYear();return ot(i,e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return ot(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return ot(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return ke.M(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return ot(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var a=mc(t,r);return e==="wo"?i.ordinalNumber(a,{unit:"week"}):ot(a,e.length)},I:function(t,e,i){var r=pc(t);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):ot(r,e.length)},d:function(t,e,i){return e==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):ke.d(t,e)},D:function(t,e,i){var r=qm(t);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):ot(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ot(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ot(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return ot(a,e.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r=t.getUTCHours(),a;switch(r===12?a=sn.noon:r===0?a=sn.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r=t.getUTCHours(),a;switch(r>=17?a=sn.evening:r>=12?a=sn.afternoon:r>=4?a=sn.morning:a=sn.night,e){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,i){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return ke.h(t,e)},H:function(t,e,i){return e==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ke.H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):ot(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):ot(r,e.length)},m:function(t,e,i){return e==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ke.m(t,e)},s:function(t,e,i){return e==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ke.s(t,e)},S:function(t,e){return ke.S(t,e)},X:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return vc(s);case"XXXX":case"XX":return Ve(s);case"XXXXX":case"XXX":default:return Ve(s,":")}},x:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return vc(s);case"xxxx":case"xx":return Ve(s);case"xxxxx":case"xxx":default:return Ve(s,":")}},O:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bc(s,":");case"OOOO":default:return"GMT"+Ve(s,":")}},z:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bc(s,":");case"zzzz":default:return"GMT"+Ve(s,":")}},t:function(t,e,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return ot(s,e.length)},T:function(t,e,i,r){var a=r._originalDate||t,s=a.getTime();return ot(s,e.length)}};function bc(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+ot(a,2)}function vc(n,t){if(n%60===0){var e=n>0?"-":"+";return e+ot(Math.abs(n)/60,2)}return Ve(n,t)}function Ve(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=ot(Math.floor(r/60),2),s=ot(r%60,2);return i+a+e+s}const t0=Jm;var yc=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},xc=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},e0=function(t,e){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return yc(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",yc(r,e)).replace("{{time}}",xc(a,e))},n0={p:xc,P:e0};const ha=n0;var i0=["D","DD"],r0=["YY","YYYY"];function wc(n){return i0.indexOf(n)!==-1}function _c(n){return r0.indexOf(n)!==-1}function Xi(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var a0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},s0=function(t,e,i){var r,a=a0[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const o0=s0;function fa(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,i=n.formats[e]||n.formats[n.defaultWidth];return i}}var l0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},u0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d0={date:fa({formats:l0,defaultWidth:"full"}),time:fa({formats:c0,defaultWidth:"full"}),dateTime:fa({formats:u0,defaultWidth:"full"})};const h0=d0;var f0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},g0=function(t,e,i,r){return f0[t]};const p0=g0;function Gn(n){return function(t,e){var i=e!=null&&e.context?String(e.context):"standalone",r;if(i==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;r=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;r=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return r[c]}}var m0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},b0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},v0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},y0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},x0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},w0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},_0=function(t,e){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},M0={ordinalNumber:_0,era:Gn({values:m0,defaultWidth:"wide"}),quarter:Gn({values:b0,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Gn({values:v0,defaultWidth:"wide"}),day:Gn({values:y0,defaultWidth:"wide"}),dayPeriod:Gn({values:x0,defaultWidth:"wide",formattingValues:w0,defaultFormattingWidth:"wide"})};const T0=M0;function Kn(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.width,r=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?D0(o,function(d){return d.test(s)}):S0(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function S0(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function D0(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function k0(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(n.matchPattern);if(!i)return null;var r=i[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var C0=/^(\d+)(th|st|nd|rd)?/i,P0=/\d+/i,O0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},E0={any:[/^b/i,/^(a|c)/i]},R0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},A0={any:[/1/i,/2/i,/3/i,/4/i]},L0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},I0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},N0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},W0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Y0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},U0={ordinalNumber:k0({matchPattern:C0,parsePattern:P0,valueCallback:function(t){return parseInt(t,10)}}),era:Kn({matchPatterns:O0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any"}),quarter:Kn({matchPatterns:R0,defaultMatchWidth:"wide",parsePatterns:A0,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Kn({matchPatterns:L0,defaultMatchWidth:"wide",parsePatterns:I0,defaultParseWidth:"any"}),day:Kn({matchPatterns:N0,defaultMatchWidth:"wide",parsePatterns:F0,defaultParseWidth:"any"}),dayPeriod:Kn({matchPatterns:W0,defaultMatchWidth:"any",parsePatterns:Y0,defaultParseWidth:"any"})},B0={code:"en-US",formatDistance:o0,formatLong:h0,formatRelative:p0,localize:T0,match:U0,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Mc=B0;var z0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$0=/^'([^]*?)'?$/,V0=/''/g,j0=/[a-zA-Z]/;function q0(n,t,e){var i,r,a,s,o,l,c,u,d,h,f,g,v,b,m,y,w,x;L(2,arguments);var _=String(t),M=De(),T=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:M.locale)!==null&&i!==void 0?i:Mc,S=ht((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:M.firstWeekContainsDate)!==null&&s!==void 0?s:(d=M.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=ht((f=(g=(v=(b=e==null?void 0:e.weekStartsOn)!==null&&b!==void 0?b:e==null||(m=e.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&v!==void 0?v:M.weekStartsOn)!==null&&g!==void 0?g:(w=M.locale)===null||w===void 0||(x=w.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var D=W(n);if(!ua(D))throw new RangeError("Invalid time value");var R=Vi(D),I=fc(D,R),V={firstWeekContainsDate:S,weekStartsOn:k,locale:T,_originalDate:D},H=_.match(H0).map(function(F){var z=F[0];if(z==="p"||z==="P"){var j=ha[z];return j(F,T.formatLong)}return F}).join("").match(z0).map(function(F){if(F==="''")return"'";var z=F[0];if(z==="'")return X0(F);var j=t0[z];if(j)return!(e!=null&&e.useAdditionalWeekYearTokens)&&_c(F)&&Xi(F,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&wc(F)&&Xi(F,t,String(n)),j(I,F,T.localize,V);if(z.match(j0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");return F}).join("");return H}function X0(n){var t=n.match($0);return t?t[1].replace(V0,"'"):n}function G0(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Tc(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function K0(n,t){if(n){if(typeof n=="string")return Tc(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Tc(n,t)}}function Sc(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=K0(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function E(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ga(n,t){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},ga(n,t)}function tt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&ga(n,t)}function Gi(n){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gi(n)}function Q0(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Z0(n,t){if(t&&(fe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E(n)}function et(n){var t=Q0();return function(){var i=Gi(n),r;if(t){var a=Gi(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Z0(this,r)}}function Z(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function J0(n,t){if(fe(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(fe(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Dc(n){var t=J0(n,"string");return fe(t)==="symbol"?t:String(t)}function kc(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,Dc(i.key),i)}}function J(n,t,e){return t&&kc(n.prototype,t),e&&kc(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function P(n,t,e){return t=Dc(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var tb=10,Cc=function(){function n(){Z(this,n),P(this,"priority",void 0),P(this,"subPriority",0)}return J(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),eb=function(n){tt(e,n);var t=et(e);function e(i,r,a,s,o){var l;return Z(this,e),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return J(e,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,s){return this.setValue(r,a,this.value,s)}}]),e}(Cc),nb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",tb),P(E(i),"subPriority",-1),i}return J(e,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}}]),e}(Cc),rt=function(){function n(){Z(this,n),P(this,"incompatibleTokens",void 0),P(this,"priority",void 0),P(this,"subPriority",void 0)}return J(n,[{key:"run",value:function(e,i,r,a){var s=this.parse(e,i,r,a);return s?{setter:new eb(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}(),ib=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",140),P(E(i),"incompatibleTokens",["R","u","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,s){return a.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),wt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ee={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _t(n,t){return n&&{value:t(n.value),rest:n.rest}}function mt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function ne(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var i=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(r*qn+a*ji+s*Mm),rest:t.slice(e[0].length)}}function Pc(n){return mt(wt.anyDigitsSigned,n)}function yt(n,t){switch(n){case 1:return mt(wt.singleDigit,t);case 2:return mt(wt.twoDigits,t);case 3:return mt(wt.threeDigits,t);case 4:return mt(wt.fourDigits,t);default:return mt(new RegExp("^\\d{1,"+n+"}"),t)}}function Ki(n,t){switch(n){case 1:return mt(wt.singleDigitSigned,t);case 2:return mt(wt.twoDigitsSigned,t);case 3:return mt(wt.threeDigitsSigned,t);case 4:return mt(wt.fourDigitsSigned,t);default:return mt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function pa(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Oc(n,t){var e=t>0,i=e?t:1-t,r;if(i<=50)r=n||100;else{var a=i+50,s=Math.floor(a/100)*100,o=n>=a%100;r=n+s-(o?100:0)}return e?r:1-r}function Ec(n){return n%400===0||n%4===0&&n%100!==0}var rb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return _t(yt(4,r),o);case"yo":return _t(s.ordinalNumber(r,{unit:"year"}),o);default:return _t(yt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s){var o=r.getUTCFullYear();if(s.isTwoDigitYear){var l=Oc(s.year,o);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),ab=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return _t(yt(4,r),o);case"Yo":return _t(s.ordinalNumber(r,{unit:"year"}),o);default:return _t(yt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s,o){var l=da(r,o);if(s.isTwoDigitYear){var c=Oc(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),$e(r,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),$e(r,o)}}]),e}(rt),sb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a){return Ki(a==="R"?4:a.length,r)}},{key:"set",value:function(r,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),an(o)}}]),e}(rt),ob=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",130),P(E(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a){return Ki(a==="u"?4:a.length,r)}},{key:"set",value:function(r,a,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),lb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",120),P(E(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return yt(a.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),cb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",120),P(E(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return yt(a.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),ub=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),P(E(i),"priority",110),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return _t(mt(wt.month,r),o);case"MM":return _t(yt(2,r),o);case"Mo":return _t(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt),db=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",110),P(E(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return _t(mt(wt.month,r),o);case"LL":return _t(yt(2,r),o);case"Lo":return _t(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function hb(n,t,e){L(2,arguments);var i=W(n),r=ht(t),a=mc(i,e)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var fb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",100),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"w":return mt(wt.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return $e(hb(r,s,o),o)}}]),e}(rt);function gb(n,t){L(2,arguments);var e=W(n),i=ht(t),r=pc(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}var pb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",100),P(E(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"I":return mt(wt.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return an(gb(r,s))}}]),e}(rt),mb=[31,28,31,30,31,30,31,31,30,31,30,31],bb=[31,29,31,30,31,30,31,31,30,31,30,31],vb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"subPriority",1),P(E(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"d":return mt(wt.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Ec(s),l=r.getUTCMonth();return o?a>=1&&a<=bb[l]:a>=1&&a<=mb[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(rt),yb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"subpriority",1),P(E(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return mt(wt.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Ec(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function ma(n,t,e){var i,r,a,s,o,l,c,u;L(2,arguments);var d=De(),h=ht((i=(r=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=W(n),g=ht(t),v=f.getUTCDay(),b=g%7,m=(b+7)%7,y=(m<h?7:0)+g-v;return f.setUTCDate(f.getUTCDate()+y),f}var xb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt),wb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return _t(yt(a.length,r),l);case"eo":return _t(s.ordinalNumber(r,{unit:"day"}),l);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt),_b=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return _t(yt(a.length,r),l);case"co":return _t(s.ordinalNumber(r,{unit:"day"}),l);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=ma(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(rt);function Mb(n,t){L(2,arguments);var e=ht(t);e%7===0&&(e=e-7);var i=1,r=W(n),a=r.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<i?7:0)+e-a;return r.setUTCDate(r.getUTCDate()+l),r}var Tb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",90),P(E(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return yt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return _t(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return _t(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return _t(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return _t(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,s){return r=Mb(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(rt),Sb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),Db=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),kb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",80),P(E(i),"incompatibleTokens",["a","b","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(pa(s),0,0,0),r}}]),e}(rt),Cb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["H","K","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"h":return mt(wt.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):!o&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(rt),Pb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"H":return mt(wt.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,s){return r.setUTCHours(s,0,0,0),r}}]),e}(rt),Ob=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["h","H","k","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"K":return mt(wt.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(rt),Eb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",70),P(E(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"k":return mt(wt.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,s){var o=s<=24?s%24:s;return r.setUTCHours(o,0,0,0),r}}]),e}(rt),Rb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",60),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"m":return mt(wt.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCMinutes(s,0,0),r}}]),e}(rt),Ab=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",50),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a,s){switch(a){case"s":return mt(wt.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return yt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCSeconds(s,0),r}}]),e}(rt),Lb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",30),P(E(i),"incompatibleTokens",["t","T"]),i}return J(e,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return _t(yt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),e}(rt),Ib=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",10),P(E(i),"incompatibleTokens",["t","T","x"]),i}return J(e,[{key:"parse",value:function(r,a){switch(a){case"X":return ne(ee.basicOptionalMinutes,r);case"XX":return ne(ee.basic,r);case"XXXX":return ne(ee.basicOptionalSeconds,r);case"XXXXX":return ne(ee.extendedOptionalSeconds,r);case"XXX":default:return ne(ee.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(rt),Nb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",10),P(E(i),"incompatibleTokens",["t","T","X"]),i}return J(e,[{key:"parse",value:function(r,a){switch(a){case"x":return ne(ee.basicOptionalMinutes,r);case"xx":return ne(ee.basic,r);case"xxxx":return ne(ee.basicOptionalSeconds,r);case"xxxxx":return ne(ee.extendedOptionalSeconds,r);case"xxx":default:return ne(ee.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(rt),Fb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",40),P(E(i),"incompatibleTokens","*"),i}return J(e,[{key:"parse",value:function(r){return Pc(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(rt),Wb=function(n){tt(e,n);var t=et(e);function e(){var i;Z(this,e);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),P(E(i),"priority",20),P(E(i),"incompatibleTokens","*"),i}return J(e,[{key:"parse",value:function(r){return Pc(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(rt),Yb={G:new ib,y:new rb,Y:new ab,R:new sb,u:new ob,Q:new lb,q:new cb,M:new ub,L:new db,w:new fb,I:new pb,d:new vb,D:new yb,E:new xb,e:new wb,c:new _b,i:new Tb,a:new Sb,b:new Db,B:new kb,h:new Cb,H:new Pb,K:new Ob,k:new Eb,m:new Rb,s:new Ab,S:new Lb,X:new Ib,x:new Nb,t:new Fb,T:new Wb},Ub=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zb=/^'([^]*?)'?$/,Hb=/''/g,$b=/\S/,Vb=/[a-zA-Z]/;function jb(n,t,e,i){var r,a,s,o,l,c,u,d,h,f,g,v,b,m,y,w,x,_;L(3,arguments);var M=String(n),T=String(t),S=De(),k=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Mc;if(!k.match)throw new RangeError("locale must contain match property");var D=ht((s=(o=(l=(c=i==null?void 0:i.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(u=i.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=ht((g=(v=(b=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(y=i.locale)===null||y===void 0||(w=y.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&b!==void 0?b:S.weekStartsOn)!==null&&v!==void 0?v:(x=S.locale)===null||x===void 0||(_=x.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&g!==void 0?g:0);if(!(R>=0&&R<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return M===""?W(e):new Date(NaN);var I={firstWeekContainsDate:D,weekStartsOn:R,locale:k},V=[new nb],H=T.match(Bb).map(function(K){var Y=K[0];if(Y in ha){var Ct=ha[Y];return Ct(K,k.formatLong)}return K}).join("").match(Ub),F=[],z=Sc(H),j;try{var kt=function(){var Y=j.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&_c(Y)&&Xi(Y,T,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&wc(Y)&&Xi(Y,T,n);var Ct=Y[0],Qt=Yb[Ct];if(Qt){var hr=Qt.incompatibleTokens;if(Array.isArray(hr)){var fr=F.find(function(gr){return hr.includes(gr.token)||gr.token===Ct});if(fr)throw new RangeError("The format string mustn't contain `".concat(fr.fullToken,"` and `").concat(Y,"` at the same time"))}else if(Qt.incompatibleTokens==="*"&&F.length>0)throw new RangeError("The format string mustn't contain `".concat(Y,"` and any other token at the same time"));F.push({token:Ct,fullToken:Y});var ui=Qt.run(M,Y,k.match,I);if(!ui)return{v:new Date(NaN)};V.push(ui.setter),M=ui.rest}else{if(Ct.match(Vb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ct+"`");if(Y==="''"?Y="'":Ct==="'"&&(Y=qb(Y)),M.indexOf(Y)===0)M=M.slice(Y.length);else return{v:new Date(NaN)}}};for(z.s();!(j=z.n()).done;){var ft=kt();if(fe(ft)==="object")return ft.v}}catch(K){z.e(K)}finally{z.f()}if(M.length>0&&$b.test(M))return new Date(NaN);var zt=V.map(function(K){return K.priority}).sort(function(K,Y){return Y-K}).filter(function(K,Y,Ct){return Ct.indexOf(K)===Y}).map(function(K){return V.filter(function(Y){return Y.priority===K}).sort(function(Y,Ct){return Ct.subPriority-Y.subPriority})}).map(function(K){return K[0]}),O=W(e);if(isNaN(O.getTime()))return new Date(NaN);var A=fc(O,Vi(O)),N={},X=Sc(zt),G;try{for(X.s();!(G=X.n()).done;){var nt=G.value;if(!nt.validate(A,I))return new Date(NaN);var xt=nt.set(A,N,I);Array.isArray(xt)?(A=xt[0],G0(N,xt[1])):A=xt}}catch(K){X.e(K)}finally{X.f()}return A}function qb(n){return n.match(zb)[1].replace(Hb,"'")}function Xb(n){L(1,arguments);var t=W(n);return t.setMinutes(0,0,0),t}function Gb(n){L(1,arguments);var t=W(n);return t.setMilliseconds(0),t}function Kb(n){L(1,arguments);var t=n/qn;return Math.floor(t)}function Rc(n,t){var e;L(1,arguments);var i=ht((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=tv(n),a;if(r.date){var s=ev(r.date,i);a=nv(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=iv(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=rv(r.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var Qi={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Jb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function tv(n){var t={},e=n.split(Qi.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],Qi.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Qi.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){var r=Qi.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function ev(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=n.match(e);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:a===null?r:a*100,restDateString:n.slice((i[1]||i[2]).length)}}function nv(n,t){if(t===null)return new Date(NaN);var e=n.match(Qb);if(!e)return new Date(NaN);var i=!!e[4],r=Qn(e[1]),a=Qn(e[2])-1,s=Qn(e[3]),o=Qn(e[4]),l=Qn(e[5])-1;if(i)return cv(t,o,l)?av(t,o,l):new Date(NaN);var c=new Date(0);return!ov(t,a,s)||!lv(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function Qn(n){return n?parseInt(n):1}function iv(n){var t=n.match(Zb);if(!t)return NaN;var e=ba(t[1]),i=ba(t[2]),r=ba(t[3]);return uv(e,i,r)?e*qn+i*ji+r*1e3:NaN}function ba(n){return n&&parseFloat(n.replace(",","."))||0}function rv(n){if(n==="Z")return 0;var t=n.match(Jb);if(!t)return 0;var e=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return dv(i,r)?e*(i*qn+r*ji):NaN}function av(n,t,e){var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var sv=[31,null,31,30,31,30,31,31,30,31,30,31];function Ac(n){return n%400===0||n%4===0&&n%100!==0}function ov(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(sv[t]||(Ac(n)?29:28))}function lv(n,t){return t>=1&&t<=(Ac(n)?366:365)}function cv(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function uv(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function dv(n,t){return t>=0&&t<=59}function hv(n){L(1,arguments);var t=n/Tm;return Math.floor(t)}var Et=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(Et||{}),Zi=(n=>(n.GAUGE="Gauge",n))(Zi||{}),Dt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Dt||{}),on=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(on||{});const va=(n,t)=>{var i,r;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}if(e.body&&!n.locked){const a=e.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Et.HORIZONTAL_BAR,Et.VERTICAL_BAR].includes(n.chartType),l=[Zi.GAUGE,Et.DOUGHNUT].includes(n.chartType);n.tooltipContext=e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;n.units==="bytes"?h=isNaN(d)?d:oa(d):h=`${d%1===0?us.format(d):us.format(Number(d.toFixed(Oy)))} ${n.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},fv=n=>n&&n.datasets&&n.datasets.length,gv=n=>fv(n)&&n.datasets.some(t=>t.data.length),pv=n=>gv(n)&&n.datasets.some(t=>t.data.length>1),mv=n=>pv(n)&&n.datasets.some(t=>t.data[0]&&ua(t.data[0].x)),bv=n=>mv(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),ya=(n,t,e)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return n.x<e?n.x+t*a*(1-r):n.x-t*s*(1-r)},vv=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xa={exports:{}},Lc={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Lc);var bt=Lc.exports,wa={exports:{}},_a={exports:{}},Ic={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ic);var Nc=Ic.exports,Ma={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}n.exports=t.default})(Ma,Ma.exports);var It=Ma.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Nc),r=e(It);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(_a,_a.exports);var yv=_a.exports,Ta={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Nc),r=e(It);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ta,Ta.exports);var ie=Ta.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(yv),r=e(ie),a=e(It);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}n.exports=t.default})(wa,wa.exports);var xv=wa.exports,Sa={exports:{}},Da={exports:{}},ka={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}n.exports=t.default})(ka,ka.exports);var je=ka.exports;const wv=Zn(je);(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(je),r=e(ie),a=e(It);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}n.exports=t.default})(Da,Da.exports);var _v=Da.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(_v),r=e(It),a=e(je);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}n.exports=t.default})(Sa,Sa.exports);var Mv=Sa.exports,Ca={exports:{}},Pa={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(ie),r=e(It),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(Pa,Pa.exports);var Tv=Pa.exports,Oa={exports:{}},Ea={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ie),r=e(It);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Ea,Ea.exports);var Ra=Ea.exports,Aa={exports:{}},La={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(ie),r=e(It),a=e(Ra);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}n.exports=t.default})(La,La.exports);var Fc=La.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Fc),r=e(Ra),a=e(It);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}n.exports=t.default})(Aa,Aa.exports);var Sv=Aa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(Ra),a=e(Sv),s=e(It),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Oa,Oa.exports);var Dv=Oa.exports,Ia={exports:{}},Na={exports:{}},qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.getDefaultOptions=kv,qe.setDefaultOptions=Cv;var Wc={};function kv(){return Wc}function Cv(n){Wc=n}(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(ie),r=e(It),a=e(je),s=qe;function o(l,c){var u,d,h,f,g,v,b,m;(0,r.default)(1,arguments);var y=(0,s.getDefaultOptions)(),w=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(g=c.locale)===null||g===void 0||(v=g.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:y.weekStartsOn)!==null&&d!==void 0?d:(b=y.locale)===null||b===void 0||(m=b.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=(0,i.default)(l),_=x.getUTCDay(),M=(_<w?7:0)+_-w;return x.setUTCDate(x.getUTCDate()-M),x.setUTCHours(0,0,0,0),x}n.exports=t.default})(Na,Na.exports);var Fa=Na.exports,Wa={exports:{}},Ya={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(It),a=e(Fa),s=e(je),o=qe;function l(c,u){var d,h,f,g,v,b,m,y;(0,r.default)(1,arguments);var w=(0,i.default)(c),x=w.getUTCFullYear(),_=(0,o.getDefaultOptions)(),M=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(m=_.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=new Date(0);T.setUTCFullYear(x+1,0,M),T.setUTCHours(0,0,0,0);var S=(0,a.default)(T,u),k=new Date(0);k.setUTCFullYear(x,0,M),k.setUTCHours(0,0,0,0);var D=(0,a.default)(k,u);return w.getTime()>=S.getTime()?x+1:w.getTime()>=D.getTime()?x:x-1}n.exports=t.default})(Ya,Ya.exports);var Yc=Ya.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Yc),r=e(It),a=e(Fa),s=e(je),o=qe;function l(c,u){var d,h,f,g,v,b,m,y;(0,r.default)(1,arguments);var w=(0,o.getDefaultOptions)(),x=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(b=v.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&f!==void 0?f:w.firstWeekContainsDate)!==null&&h!==void 0?h:(m=w.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1),_=(0,i.default)(c,u),M=new Date(0);M.setUTCFullYear(_,0,x),M.setUTCHours(0,0,0,0);var T=(0,a.default)(M,u);return T}n.exports=t.default})(Wa,Wa.exports);var Pv=Wa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(ie),r=e(Fa),a=e(Pv),s=e(It),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}n.exports=t.default})(Ia,Ia.exports);var Ov=Ia.exports,Ua={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}n.exports=t.default})(Ua,Ua.exports);var Uc=Ua.exports,Ba={exports:{}};(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uc),r={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,i.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,i.default)(c+1,2)},d:function(o,l){return(0,i.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,i.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,i.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,i.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,i.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,i.default)(d,l.length)}},a=r;t.default=a,n.exports=t.default})(Ba,Ba.exports);var Ev=Ba.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Tv),r=e(Dv),a=e(Fc),s=e(Ov),o=e(Yc),l=e(Uc),c=e(Ev),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,y,w){var x=m.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return w.era(x,{width:"abbreviated"});case"GGGGG":return w.era(x,{width:"narrow"});case"GGGG":default:return w.era(x,{width:"wide"})}},y:function(m,y,w){if(y==="yo"){var x=m.getUTCFullYear(),_=x>0?x:1-x;return w.ordinalNumber(_,{unit:"year"})}return c.default.y(m,y)},Y:function(m,y,w,x){var _=(0,o.default)(m,x),M=_>0?_:1-_;if(y==="YY"){var T=M%100;return(0,l.default)(T,2)}return y==="Yo"?w.ordinalNumber(M,{unit:"year"}):(0,l.default)(M,y.length)},R:function(m,y){var w=(0,a.default)(m);return(0,l.default)(w,y.length)},u:function(m,y){var w=m.getUTCFullYear();return(0,l.default)(w,y.length)},Q:function(m,y,w){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"Q":return String(x);case"QQ":return(0,l.default)(x,2);case"Qo":return w.ordinalNumber(x,{unit:"quarter"});case"QQQ":return w.quarter(x,{width:"abbreviated",context:"formatting"});case"QQQQQ":return w.quarter(x,{width:"narrow",context:"formatting"});case"QQQQ":default:return w.quarter(x,{width:"wide",context:"formatting"})}},q:function(m,y,w){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"q":return String(x);case"qq":return(0,l.default)(x,2);case"qo":return w.ordinalNumber(x,{unit:"quarter"});case"qqq":return w.quarter(x,{width:"abbreviated",context:"standalone"});case"qqqqq":return w.quarter(x,{width:"narrow",context:"standalone"});case"qqqq":default:return w.quarter(x,{width:"wide",context:"standalone"})}},M:function(m,y,w){var x=m.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(m,y);case"Mo":return w.ordinalNumber(x+1,{unit:"month"});case"MMM":return w.month(x,{width:"abbreviated",context:"formatting"});case"MMMMM":return w.month(x,{width:"narrow",context:"formatting"});case"MMMM":default:return w.month(x,{width:"wide",context:"formatting"})}},L:function(m,y,w){var x=m.getUTCMonth();switch(y){case"L":return String(x+1);case"LL":return(0,l.default)(x+1,2);case"Lo":return w.ordinalNumber(x+1,{unit:"month"});case"LLL":return w.month(x,{width:"abbreviated",context:"standalone"});case"LLLLL":return w.month(x,{width:"narrow",context:"standalone"});case"LLLL":default:return w.month(x,{width:"wide",context:"standalone"})}},w:function(m,y,w,x){var _=(0,s.default)(m,x);return y==="wo"?w.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,y.length)},I:function(m,y,w){var x=(0,r.default)(m);return y==="Io"?w.ordinalNumber(x,{unit:"week"}):(0,l.default)(x,y.length)},d:function(m,y,w){return y==="do"?w.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,y)},D:function(m,y,w){var x=(0,i.default)(m);return y==="Do"?w.ordinalNumber(x,{unit:"dayOfYear"}):(0,l.default)(x,y.length)},E:function(m,y,w){var x=m.getUTCDay();switch(y){case"E":case"EE":case"EEE":return w.day(x,{width:"abbreviated",context:"formatting"});case"EEEEE":return w.day(x,{width:"narrow",context:"formatting"});case"EEEEEE":return w.day(x,{width:"short",context:"formatting"});case"EEEE":default:return w.day(x,{width:"wide",context:"formatting"})}},e:function(m,y,w,x){var _=m.getUTCDay(),M=(_-x.weekStartsOn+8)%7||7;switch(y){case"e":return String(M);case"ee":return(0,l.default)(M,2);case"eo":return w.ordinalNumber(M,{unit:"day"});case"eee":return w.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return w.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return w.day(_,{width:"short",context:"formatting"});case"eeee":default:return w.day(_,{width:"wide",context:"formatting"})}},c:function(m,y,w,x){var _=m.getUTCDay(),M=(_-x.weekStartsOn+8)%7||7;switch(y){case"c":return String(M);case"cc":return(0,l.default)(M,y.length);case"co":return w.ordinalNumber(M,{unit:"day"});case"ccc":return w.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return w.day(_,{width:"narrow",context:"standalone"});case"cccccc":return w.day(_,{width:"short",context:"standalone"});case"cccc":default:return w.day(_,{width:"wide",context:"standalone"})}},i:function(m,y,w){var x=m.getUTCDay(),_=x===0?7:x;switch(y){case"i":return String(_);case"ii":return(0,l.default)(_,y.length);case"io":return w.ordinalNumber(_,{unit:"day"});case"iii":return w.day(x,{width:"abbreviated",context:"formatting"});case"iiiii":return w.day(x,{width:"narrow",context:"formatting"});case"iiiiii":return w.day(x,{width:"short",context:"formatting"});case"iiii":default:return w.day(x,{width:"wide",context:"formatting"})}},a:function(m,y,w){var x=m.getUTCHours(),_=x/12>=1?"pm":"am";switch(y){case"a":case"aa":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(m,y,w){var x=m.getUTCHours(),_;switch(x===12?_=u.noon:x===0?_=u.midnight:_=x/12>=1?"pm":"am",y){case"b":case"bb":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(m,y,w){var x=m.getUTCHours(),_;switch(x>=17?_=u.evening:x>=12?_=u.afternoon:x>=4?_=u.morning:_=u.night,y){case"B":case"BB":case"BBB":return w.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return w.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return w.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(m,y,w){if(y==="ho"){var x=m.getUTCHours()%12;return x===0&&(x=12),w.ordinalNumber(x,{unit:"hour"})}return c.default.h(m,y)},H:function(m,y,w){return y==="Ho"?w.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,y)},K:function(m,y,w){var x=m.getUTCHours()%12;return y==="Ko"?w.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},k:function(m,y,w){var x=m.getUTCHours();return x===0&&(x=24),y==="ko"?w.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},m:function(m,y,w){return y==="mo"?w.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,y)},s:function(m,y,w){return y==="so"?w.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,y)},S:function(m,y){return c.default.S(m,y)},X:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();if(M===0)return"Z";switch(y){case"X":return f(M);case"XXXX":case"XX":return g(M);case"XXXXX":case"XXX":default:return g(M,":")}},x:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"x":return f(M);case"xxxx":case"xx":return g(M);case"xxxxx":case"xxx":default:return g(M,":")}},O:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+h(M,":");case"OOOO":default:return"GMT"+g(M,":")}},z:function(m,y,w,x){var _=x._originalDate||m,M=_.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+h(M,":");case"zzzz":default:return"GMT"+g(M,":")}},t:function(m,y,w,x){var _=x._originalDate||m,M=Math.floor(_.getTime()/1e3);return(0,l.default)(M,y.length)},T:function(m,y,w,x){var _=x._originalDate||m,M=_.getTime();return(0,l.default)(M,y.length)}};function h(b,m){var y=b>0?"-":"+",w=Math.abs(b),x=Math.floor(w/60),_=w%60;if(_===0)return y+String(x);var M=m||"";return y+String(x)+M+(0,l.default)(_,2)}function f(b,m){if(b%60===0){var y=b>0?"-":"+";return y+(0,l.default)(Math.abs(b)/60,2)}return g(b,m)}function g(b,m){var y=m||"",w=b>0?"-":"+",x=Math.abs(b),_=(0,l.default)(Math.floor(x/60),2),M=(0,l.default)(x%60,2);return w+_+y+M}var v=d;t.default=v,n.exports=t.default})(Ca,Ca.exports);var Rv=Ca.exports,za={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},i=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},r=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],h=u[2];if(!h)return e(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",e(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(za,za.exports);var Av=za.exports,Ha={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}n.exports=t.default})(Ha,Ha.exports);var Bc=Ha.exports;const zc=Zn(Bc);var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.isProtectedDayOfYearToken=Nv,Jn.isProtectedWeekYearToken=Fv,Jn.throwProtectedError=Wv;var Lv=["D","DD"],Iv=["YY","YYYY"];function Nv(n){return Lv.indexOf(n)!==-1}function Fv(n){return Iv.indexOf(n)!==-1}function Wv(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var $a={exports:{}},Va={exports:{}},ja={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},r=i;t.default=r,n.exports=t.default})(ja,ja.exports);var Yv=ja.exports,qa={exports:{}},Xa={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}n.exports=t.default})(Xa,Xa.exports);var Uv=Xa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uv),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(qa,qa.exports);var Bv=qa.exports,Ga={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(s,o,l,c){return e[s]},r=i;t.default=r,n.exports=t.default})(Ga,Ga.exports);var zv=Ga.exports,Ka={exports:{}},Qa={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}n.exports=t.default})(Qa,Qa.exports);var Hv=Qa.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Hv),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(g,v){var b=Number(g),m=b%100;if(m>20||m<10)switch(m%10){case 1:return b+"st";case 2:return b+"nd";case 3:return b+"rd"}return b+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(g){return g-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},h=d;t.default=h,n.exports=t.default})(Ka,Ka.exports);var $v=Ka.exports,Za={exports:{}},Ja={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(b){return b.test(d)}):i(h,function(b){return b.test(d)}),g;g=a.valueCallback?a.valueCallback(f):f,g=o.valueCallback?o.valueCallback(g):g;var v=s.slice(d.length);return{value:g,rest:v}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Ja,Ja.exports);var Vv=Ja.exports,ts={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(ts,ts.exports);var jv=ts.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Vv),r=e(jv),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},h={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},g={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(x){return parseInt(x,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(x){return x+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:g,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:b,defaultParseWidth:"any"})},y=m;t.default=y,n.exports=t.default})(Za,Za.exports);var qv=Za.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Yv),r=e(Bv),a=e(zv),s=e($v),o=e(qv),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Va,Va.exports);var Xv=Va.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Xv),r=i.default;t.default=r,n.exports=t.default})($a,$a.exports);var Gv=$a.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=w;var i=e(xv),r=e(Mv),a=e(ie),s=e(Rv),o=e(Av),l=e(Bc),c=Jn,u=e(je),d=e(It),h=qe,f=e(Gv),g=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b=/^'([^]*?)'?$/,m=/''/g,y=/[a-zA-Z]/;function w(_,M,T){var S,k,D,R,I,V,H,F,z,j,kt,ft,zt,O,A,N,X,G;(0,d.default)(2,arguments);var nt=String(M),xt=(0,h.getDefaultOptions)(),K=(S=(k=T==null?void 0:T.locale)!==null&&k!==void 0?k:xt.locale)!==null&&S!==void 0?S:f.default,Y=(0,u.default)((D=(R=(I=(V=T==null?void 0:T.firstWeekContainsDate)!==null&&V!==void 0?V:T==null||(H=T.locale)===null||H===void 0||(F=H.options)===null||F===void 0?void 0:F.firstWeekContainsDate)!==null&&I!==void 0?I:xt.firstWeekContainsDate)!==null&&R!==void 0?R:(z=xt.locale)===null||z===void 0||(j=z.options)===null||j===void 0?void 0:j.firstWeekContainsDate)!==null&&D!==void 0?D:1);if(!(Y>=1&&Y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Ct=(0,u.default)((kt=(ft=(zt=(O=T==null?void 0:T.weekStartsOn)!==null&&O!==void 0?O:T==null||(A=T.locale)===null||A===void 0||(N=A.options)===null||N===void 0?void 0:N.weekStartsOn)!==null&&zt!==void 0?zt:xt.weekStartsOn)!==null&&ft!==void 0?ft:(X=xt.locale)===null||X===void 0||(G=X.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&kt!==void 0?kt:0);if(!(Ct>=0&&Ct<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!K.localize)throw new RangeError("locale must contain localize property");if(!K.formatLong)throw new RangeError("locale must contain formatLong property");var Qt=(0,a.default)(_);if(!(0,i.default)(Qt))throw new RangeError("Invalid time value");var hr=(0,l.default)(Qt),fr=(0,r.default)(Qt,hr),ui={firstWeekContainsDate:Y,weekStartsOn:Ct,locale:K,_originalDate:Qt},gr=nt.match(v).map(function(Vt){var Ie=Vt[0];if(Ie==="p"||Ie==="P"){var pr=o.default[Ie];return pr(Vt,K.formatLong)}return Vt}).join("").match(g).map(function(Vt){if(Vt==="''")return"'";var Ie=Vt[0];if(Ie==="'")return x(Vt);var pr=s.default[Ie];if(pr)return!(T!=null&&T.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(Vt)&&(0,c.throwProtectedError)(Vt,M,String(_)),!(T!=null&&T.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(Vt)&&(0,c.throwProtectedError)(Vt,M,String(_)),pr(fr,Vt,K.localize,ui);if(Ie.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ie+"`");return Vt}).join("");return gr}function x(_){var M=_.match(b);return M?M[1].replace(m,"'"):_}n.exports=t.default})(xa,xa.exports);var Kv=xa.exports;const Qv=Zn(Kv);function Hc(n,t,e){var i=ty(n,e.timeZone,e.locale);return i.formatToParts?Zv(i,t):Jv(i,t)}function Zv(n,t){for(var e=n.formatToParts(t),i=e.length-1;i>=0;--i)if(e[i].type==="timeZoneName")return e[i].value}function Jv(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(e);return i?i[0].substr(1):""}function ty(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function ey(n,t){var e=ay(t);return e.formatToParts?iy(e,n):ry(e,n)}var ny={year:0,month:1,day:2,hour:3,minute:4,second:5};function iy(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=ny[e[r].type];a>=0&&(i[a]=parseInt(e[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function ry(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var es={};function ay(n){if(!es[n]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";es[n]=e?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return es[n]}function $c(n,t,e,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(i,r,a,s),o}var Vc=36e5,sy=6e4,ns={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function is(n,t,e){var i,r;if(!n||(i=ns.timezoneZ.exec(n),i))return 0;var a;if(i=ns.timezoneHH.exec(n),i)return a=parseInt(i[1],10),jc(a)?-(a*Vc):NaN;if(i=ns.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return jc(a,s)?(r=Math.abs(a)*Vc+s*sy,a>0?-r:r):NaN}if(cy(n)){t=new Date(t||Date.now());var o=e?t:oy(t),l=rs(o,n),c=e?l:ly(t,l,n);return-c}return NaN}function oy(n){return $c(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function rs(n,t){var e=ey(n,t),i=$c(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),r=n.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function ly(n,t,e){var i=n.getTime(),r=i-t,a=rs(new Date(r),e);if(t===a)return t;r-=a-t;var s=rs(new Date(r),e);return a===s?a:Math.max(a,s)}function jc(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var qc={};function cy(n){if(qc[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),qc[n]=!0,!0}catch{return!1}}var uy=60*1e3,dy={X:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);if(r===0)return"Z";switch(t){case"X":return Xc(r);case"XXXX":case"XX":return ln(r);case"XXXXX":case"XXX":default:return ln(r,":")}},x:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);switch(t){case"x":return Xc(r);case"xxxx":case"xx":return ln(r);case"xxxxx":case"xxx":default:return ln(r,":")}},O:function(n,t,e,i){var r=as(i.timeZone,i._originalDate||n);switch(t){case"O":case"OO":case"OOO":return"GMT"+hy(r,":");case"OOOO":default:return"GMT"+ln(r,":")}},z:function(n,t,e,i){var r=i._originalDate||n;switch(t){case"z":case"zz":case"zzz":return Hc("short",r,i);case"zzzz":default:return Hc("long",r,i)}}};function as(n,t){var e=n?is(n,t,!0)/uy:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Ji(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}function ln(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=Ji(Math.floor(r/60),2),s=Ji(Math.floor(r%60),2);return i+a+e+s}function Xc(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Ji(Math.abs(n)/60,2)}return ln(n,t)}function hy(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),a=i%60;if(a===0)return e+String(r);var s=t||"";return e+String(r)+s+Ji(a,2)}const fy=dy;var gy=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ss=36e5,Gc=6e4,py=2,Nt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:gy};function Kc(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},i=e.additionalDigits==null?py:wv(e.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var r=my(n),a=by(r.date,i),s=a.year,o=a.restDateString,l=vy(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=yy(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=is(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=zc(new Date(c+u)),d=zc(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function my(n){var t={},e=Nt.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=Nt.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=Nt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function by(n,t){var e=Nt.YYY[t],i=Nt.YYYYY[t],r;if(r=Nt.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=Nt.YY.exec(n)||e.exec(n),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function vy(n,t){if(t===null)return null;var e,i,r,a;if(n.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(e=Nt.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,Jc(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=Nt.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return _y(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=Nt.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Jc(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=Nt.Www.exec(n),e)return a=parseInt(e[1],10)-1,tu(t,a)?Qc(t,a):new Date(NaN);if(e=Nt.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return tu(t,a,l)?Qc(t,a,l):new Date(NaN)}return null}function yy(n){var t,e,i;if(t=Nt.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),os(e)?e%24*ss:NaN;if(t=Nt.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),os(e,i)?e%24*ss+i*Gc:NaN;if(t=Nt.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return os(e,i,r)?e%24*ss+i*Gc+r*1e3:NaN}return null}function Qc(n,t,e){t=t||0,e=e||0;var i=new Date(0);i.setUTCFullYear(n,0,4);var r=i.getUTCDay()||7,a=t*7+e+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var xy=[31,28,31,30,31,30,31,31,30,31,30,31],wy=[31,29,31,30,31,30,31,31,30,31,30,31];function Zc(n){return n%400===0||n%4===0&&n%100!==0}function Jc(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=Zc(n);if(i&&e>wy[t]||!i&&e>xy[t])return!1}return!0}function _y(n,t){if(t<1)return!1;var e=Zc(n);return!(e&&t>366||!e&&t>365)}function tu(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function os(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var My=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Ty(n,t,e){var i=String(t),r=e||{},a=i.match(My);if(a){var s=Kc(n,r);i=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+fy[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return Qv(n,i,r)}var ls={exports:{}},cs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}n.exports=t.default})(cs,cs.exports);var Sy=cs.exports;(function(n,t){var e=bt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(Sy);function r(a){return(0,i.default)({},a)}n.exports=t.default})(ls,ls.exports);var Dy=ls.exports;const ky=Zn(Dy);function Cy(n,t,e){var i=Kc(n,e),r=is(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Py(n,t,e,i){var r=ky(i);return r.timeZone=t,Ty(Cy(n,t),e,r)}const Oy=2,us=new Intl.NumberFormat(((id=document==null?void 0:document.documentElement)==null?void 0:id.lang)||"en-US");function Ey(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let i="MMM dd, YYY hh:mm a";t.short&&(i="MMM dd, YYY"),t.includeTZ&&(i+=" (z)");const r=new Date(n);return Py(r,e,i)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const ds=10,Gt=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],ti=(n,t)=>(t||Gt)[n%Gt.length],ei=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),r=parseInt(n.substring(4,6),16);e=e-t,i=i-t,r=r-t,e>255?e=255:e<0&&(e=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length===1?"0"+r.toString(16):r.toString(16);return`#${a}${s}${o}`},eu="#6f7787",Ry={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},hs=new Map,fs=(n,t)=>t==="bytes"?oa(n):t==="count/minute"?n.toFixed(2):us.format(n),nu=n=>{const e=document.createElement("canvas").getContext("2d"),i=dt({});return e.font=i.string,e.measureText(n).width},Ay=()=>{const n="label_height";if(!hs.has(n)){const t=dt({});hs.set(n,t.lineHeight)}return hs.get(n)},Ly=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),iu=(n,t)=>t.datasets.reduce((e,i,r)=>n.isDatasetVisible(r)?e+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),ru=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`;function Iy(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Bi.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=ya(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offset,y:c,xAlign:u}},Hr.modes.customInteractionMode=function(i,r){const a=_e(r,i),s=[];return Hr.evaluateInteractionItems(i,i.options.indexAxis||"x",a,(o,l,c)=>{i.options.indexAxis==="y"&&o.inYRange(a.y,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c}),i.options.indexAxis==="x"&&o.inXRange(a.x,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c})}),s},p.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:n.indexAxis,scales:{x:{border:{display:!1},stacked:n.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const g=10;return d&&d.length>g?d.slice(0,g)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:n.indexAxis==="y"?!B((i=n.metricAxesTitle)==null?void 0:i.value):!B((r=n.dimensionAxesTitle)==null?void 0:r.value),text:n.indexAxis==="y"?(a=n.metricAxesTitle)==null?void 0:a.value:(s=n.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>ds?d.slice(0,ds)+"...":d):f.getLabelForValue(Number(d))}},title:{display:n.indexAxis==="x"?!B((o=n.metricAxesTitle)==null?void 0:o.value):!B((l=n.dimensionAxesTitle)==null?void 0:l.value),text:n.indexAxis==="x"?(c=n.metricAxesTitle)==null?void 0:c.value:(u=n.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:d=>{va(n.tooltipState,d)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Yt.register(...om);const Ny=(n,t)=>{const e=t.datasets.map(r=>r.label),i=n.datasets.map(r=>r.label);return n.datasets.length===t.datasets.length&&e.every((r,a)=>r===i[a])};function Fy(n,t,e,i,r){const a=p.shallowRef(null),s=(o,l)=>{if(t.value)return new Yt(t.value,{type:n,data:o,plugins:i,options:l})};return p.onMounted(()=>{a.value=s(e.value,r.value)}),p.onUnmounted(()=>{B(a.value)||a.value.destroy()}),p.watch(e,(o,l)=>{if(Ny(l,o)&&!B(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else B(a.value)||a.value.destroy(),a.value=s(o,r.value)}),p.watch(t,()=>{B(a.value)||a.value.destroy(),a.value=s(e.value,r.value)}),p.watch(r,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(B(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var au={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(g,v){v&&v%3===0&&h.push(d),h.push(g)}),h.reverse().join("")}function e(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var i=1e3,r=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,i,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(au);var Wy=au.exports;const ni=Zn(Wy);function Yy(n,t,e){const{i18n:i}=Mt.useI18n();return{legendValues:p.computed(()=>n.value.datasets.reduce((a,s)=>{const o=s.total?s.total:s.data.reduce((c,u)=>c+(typeof u=="number"?Number(u)||0:Number(u.y)||0),0);let l;if(e.value==="bytes")l=isNaN(o)?"0":oa(o);else{l=`${ni(o,{capital:!0})} ${e.value}`;const c=e.value&&i&&i.te(`chartUnits.${e.value}`)&&i.t(`chartUnits.${e.value}`)||e.value;l=i&&i.t("legend.datapointValueDisplay",{value:ni(o,{capital:!0}),unit:c})||`${ni(o,{capital:!0})} ${e.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Uy(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Bi.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=ya(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offset,y:c,xAlign:u}},{options:p.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:i=>{va(n.tooltipState,i)}}}}))}}var By=Object.defineProperty,zy=(n,t,e)=>t in n?By(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,re=(n,t,e)=>(zy(n,typeof t!="symbol"?t+"":t,e),e),$=(n=>(n.MINUTELY="Minutely",n.HOURLY="Hourly",n.DAILY="Daily",n.WEEKLY="Weekly",n))($||{}),vt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(vt||{});const Hy={[$.MINUTELY]:60*1e3,[$.HOURLY]:60*60*1e3,[$.DAILY]:60*60*24*1e3,[$.WEEKLY]:60*60*24*7*1e3};function ii(n){return n&&Object.values($).find(t=>n<=Hy[t])||null}function gs(n){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(n)}function tr(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ae(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function cn(n){ae(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||gs(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function su(n,t){ae(2,arguments);var e=cn(n),i=tr(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function $y(n,t){ae(2,arguments);var e=cn(n),i=tr(t);if(isNaN(i))return new Date(NaN);if(!i)return e;var r=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}var Vy={};function jy(){return Vy}function er(n,t){var e,i,r,a,s,o,l,c;ae(1,arguments);var u=jy(),d=tr((e=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=cn(n),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function ou(n){ae(1,arguments);var t=cn(n);return t.setHours(0,0,0,0),t}var qy=60,Xy=3600;function un(n){ae(1,arguments);var t=cn(n);return t.setDate(1),t.setHours(0,0,0,0),t}function Gy(n){ae(1,arguments);var t=cn(n),e=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(e,i+1,0),r.setHours(0,0,0,0),r.getDate()}function Ky(n){return ae(1,arguments),Math.floor(n*Xy)}function Qy(n){ae(1,arguments);var t=n/qy;return Math.floor(t)}function lu(n,t){ae(2,arguments);var e=tr(t);return $y(n,-e)}class Kt{constructor(t){re(this,"timeframeText"),re(this,"key"),re(this,"display"),re(this,"timeframeLength"),re(this,"allowedTiers"),re(this,"defaultResponseGranularity"),re(this,"dataGranularity"),re(this,"isRelative"),re(this,"_startCustom"),re(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add($.MINUTELY),e>=2&&e<=7*24&&t.add($.HOURLY),e>=2*24&&t.add($.DAILY),e>=2*24*14&&t.add($.WEEKLY),t}}class Zy extends Kt{rawStart(){return er(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class Jy extends Kt{rawStart(){return un(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class tx extends Kt{rawEnd(){return er(new Date,{weekStartsOn:1})}rawStart(){return er(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class ex extends Kt{rawEnd(){return un(new Date)}rawStart(){return un(lu(new Date,1))}}vt.FIFTEEN_MIN,new Kt({key:vt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:$.MINUTELY,dataGranularity:$.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.ONE_HOUR,new Kt({key:vt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:$.MINUTELY,dataGranularity:$.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.SIX_HOUR,new Kt({key:vt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.TWELVE_HOUR,new Kt({key:vt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.ONE_DAY,new Kt({key:vt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:$.HOURLY,dataGranularity:$.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),vt.SEVEN_DAY,new Kt({key:vt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),vt.THIRTY_DAY,new Kt({key:vt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),vt.CURRENT_WEEK,new Zy({key:vt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=er(new Date,{weekStartsOn:1});return(ou(su(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.CURRENT_MONTH,new Jy({key:vt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=un(new Date);return(ou(su(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.PREVIOUS_WEEK,new tx({key:vt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),vt.PREVIOUS_MONTH,new ex({key:vt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=un(new Date),e=un(lu(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=nx(t,e)),60*60*24*Gy(new Date().setMonth(new Date().getMonth()-1))+Ky(n)},defaultResponseGranularity:$.DAILY,dataGranularity:$.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function nx(n,t){return Qy(n.getTimezoneOffset()-t.getTimezoneOffset())}function ix(n){const t=p.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!B((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),e=p.computed(()=>{var l,c;return{title:{display:!B((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};Bi.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,h=n.tooltipState.height||this.height,f=u.width/2,g=u.height/2,v=ya(c,d,f);let b=vv(c,h,g);const m=c.y<g?"top":"bottom",y=c.x<f?"left":"center";return h>u.height&&(b=0),{x:v,y:b,xAlign:y,yAlign:m}};const r=p.computed(()=>{switch(n.granularity.value){case $.MINUTELY:return"minute";case $.HOURLY:return"hour";case $.DAILY:return"day";default:return"day"}}),a=p.computed(()=>n.timeRangeMs?Kb(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm":hv(Number(n.timeRangeSec.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=p.computed(()=>[$.DAILY,$.WEEKLY].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:p.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:r.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{va(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function rx(n,t){const{i18n:e}=Mt.useI18n();return p.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(m=>{const y=l?`${m.event[u]},${m.event[d]}`:`${u},${d}`,w=m.event[h];return[y,w]})),g=l&&a[u]||s,v=l&&a[d]||s;return!g||!v?{labels:[],datasets:[]}:{labels:l?a[u].map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m):s.map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m),datasets:v&&Array.from(v).flatMap((m,y)=>{if(!m)return[];let{colorPalette:w}=n;B(w)&&(w=Gt);const x={},_=Array.isArray(w)?ti(y,w):w[m]||ti(y);return x[m]=_,{label:e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m,backgroundColor:_,data:g.map(M=>f[`${M},${m}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const ax=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((i,r)=>i+r*e),sx=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Rc(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},ox=(n,t,e,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-i)/e)*e+i,l=Math.floor((s-i)/e)*e+i+e;return ax(o,l,e)};function lx(n,t){const{i18n:e}=Mt.useI18n();return p.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const g=sx(o),v=ox(o,l,f,g,r),b=new Set,m=r!=null&&r.length?r.reduce((_,M)=>{const T=new Date(M.timestamp).valueOf(),S=M.event;return b.add(u),T in _||(_[T]={}),u in _[T]||(_[T][u]={}),h.forEach(k=>{S[d]===k||d===k?_[T][u][k]=Math.round(Number(S[u])*1e3)/1e3:c.length||(_[T][u][k]=Math.round(Number(S[k])*1e3)/1e3)}),_},{}):{},y=[...b].reduce((_,M)=>(h.forEach(T=>_.push([M,T])),_),[]),w={},x=[...y].map(([_,M],T)=>{const S=v.map(V=>V in m&&_ in m[V]?{x:V,y:m[V][_][M]||0}:{x:V,y:0});let{colorPalette:k,fill:D}=n;B(k)&&(k=Gt);const R=Array.isArray(k)?ti(T,k):k[M]||ti(T),I=ei(R,50);return w[M]=R,{rawDimension:M,rawMetric:_,label:e&&e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||M,borderColor:I,backgroundColor:R,data:S,total:S.reduce((V,{y:H})=>V+Number(H),0),...Ry,fill:D}});return x.sort((_,M)=>Number(_.total)<Number(M.total)?-1:1),{datasets:x,colorMap:w}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Mt={useBarChartOptions:Iy,useChartJSCommon:Fy,useChartLegendValues:Yy,useExploreResultToDatasets:rx,useExploreResultToTimeDataset:lx,useDoughnutChartOptions:Uy,useLinechartOptions:ix,useI18n:ad,useReportChartDataForSynthetics:(n,t)=>{p.watch([n,t],(e,i,r)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),r(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})}};/*!
20
20
  * chartjs-plugin-annotation v3.0.1
21
21
  * https://www.chartjs.org/chartjs-plugin-annotation/index
22
22
  * (c) 2023 chartjs-plugin-annotation Contributors
23
23
  * Released under the MIT License
24
- */const lu={modes:{point(n,t){return nr(n,t,{intersect:!0})},nearest(n,t,e){return dx(n,t,e)},x(n,t,e){return nr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return nr(n,t,{intersect:e.intersect,axis:"y"})}}};function ps(n,t,e){return(lu.modes[e.mode]||lu.modes.nearest)(n,t,e)}function cx(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function ux(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function nr(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):cx(i,t,e.axis))}function dx(n,t,e){let i=Number.POSITIVE_INFINITY;return nr(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=ux(t,s,e.axis),l=Ze(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const hx=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Xe=.001,ir=(n,t,e)=>Math.min(e,Math.max(t,n));function fx(n,t,e){for(const i of Object.keys(n))n[i]=ir(n[i],t,e);return n}function gx(n,t,e,i){if(!n||!t||e<=0)return!1;const r=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+r,2)}function cu(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-Xe&&n.x<=i+o+Xe,c=n.y>=e-o-Xe&&n.y<=r+o+Xe;return a==="x"?l:(a==="y"||l)&&c}function dn(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function px(n,t,e,i=!0){const r=e.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(hx(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const uu=n=>typeof n=="string"&&n.endsWith("%"),du=n=>parseFloat(n)/100,hu=n=>ir(du(n),0,1),rr=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),mx={box:n=>rr(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>rr(n.centerX,n.centerY),line:n=>rr(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>rr(n.centerX,n.centerY)};function ms(n,t){return t==="start"?0:t==="end"?n:uu(t)?hu(t)*n:n/2}function Ce(n,t,e=!0){return typeof t=="number"?t:uu(t)?(e?hu(t):du(t))*n:n}function bx(n,t){const{x:e,width:i}=n,r=t.textAlign;return r==="center"?e+i/2:r==="end"||r==="right"?e+i:e}function bs(n,t="center"){return q(n)?{x:U(n.x,t),y:U(n.y,t)}:(n=U(n,t),{x:n,y:n})}function fu(n){return n&&(Ft(n.xValue)||Ft(n.yValue))}function ri(n,t,e){const i=e.init;if(i){if(i===!0)return pu(t,e)}else return;return vx(n,t,e)}function gu(n,t,e){let i=!1;return t.forEach(r=>{Wt(n[r])?(i=!0,e[r]=n[r]):Ft(e[r])&&delete e[r]}),i}function pu(n,t){const e=t.type||"line";return mx[e](n)}function vx(n,t,e){const i=at(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return pu(t,e);if(q(i))return i}const vs=new Map,yx=n=>isNaN(n)||n<=0,xx=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ar(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function ys(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Tt(i)),n.translate(-t,-e))}function Pe(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function hn(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function xs(n,t){const e=t.content;if(ar(e))return{width:Ce(e.width,t.width),height:Ce(e.height,t.height)};const i=t.font,r=it(i)?i.map(l=>dt(l)):[dt(i)],a=t.textStrokeWidth,s=it(e)?e:[e],o=s.join()+xx(r)+a+(n._measureText?"-spriting":"");return vs.has(o)||vs.set(o,Sx(n,s,r,a)),vs.get(o)}function mu(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),hn(n,e);const o=Pe(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),Je(n,{x:i,y:r,w:a,h:s,radius:fx(xe(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function wx(n,t,e){const i=e.content;if(ar(i)){n.save(),n.globalAlpha=Cx(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=it(i)?i:[i],a=e.font,s=it(a)?a.map(d=>dt(d)):[dt(a)],o=e.color,l=it(o)?o:[o],c=bx(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,_x(n,e)&&Dx(n,{x:c,y:u},r,s),kx(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function _x(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Mx(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*_r;if(ar(s)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}yx(r)||Tx(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function Tx(n,{x:t,y:e,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,i,0,ct),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=bi,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=bi,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+qt)*c,l=Math.sin(s+qt)*c,n.arc(t-o,e-l,u,s-Q,s-ut),n.arc(t+l,e-o,u,s-ut,s),n.arc(t+o,e+l,u,s,s+ut),n.arc(t-l,e+o,u,s+ut,s+Q),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=qt;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=qt;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=qt,o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*i,e+Math.sin(s)*i);break}n.fill()}function Sx(n,t,e,i){n.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+i),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function Dx(n,{x:t,y:e},i,r){n.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function kx(n,{x:t,y:e},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function Cx(n,t){const e=ye(n)?n:t;return ye(e)?ir(e,0,1):1}const bu={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fn(n,t,e){return t=typeof t=="number"?t:n.parse(t),gt(t)?n.getPixelForValue(t):e}function Ge(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const r=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function vu(n,t){if(n){const e=n.options.reverse,i=fn(n,t.min,e?t.end:t.start),r=fn(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function yu(n,t){const{chartArea:e,scales:i}=n,r=i[Ge(i,t,"xScaleID")],a=i[Ge(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=fn(r,t.xValue,r.left+r.width/2)),a&&(o=fn(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function ws(n,t){const e=n.scales,i=e[Ge(e,t,"xScaleID")],r=e[Ge(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=_u(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=_u(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function xu(n,t){if(!fu(t)){const e=ws(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const r=i*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return Ox(n,t)}function Px(n,t){const{scales:e,chartArea:i}=n,r=e[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?Ex(r,a,t):Rx(e,a,t),a}function wu(n,t){const e=ws(n,t);return e.initProperties=ri(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:Ix(n,e,t),initProperties:e.initProperties}],e}function Ox(n,t){const e=yu(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function _u(n,t){const e=vu(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Ex(n,t,e){const i=fn(n,e.value,NaN),r=fn(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function Rx(n,t,e){for(const i of Object.keys(bu)){const r=n[Ge(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=bu[i],d=vu(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function Ax({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return Mu({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:e.width})}function Lx({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return Mu({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:e.height})}function Mu(n,t){const{start:e,end:i,borderWidth:r}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-e-s-o-t.size;return e+r/2+l+ms(c,a)}function Ix(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=bs(i.position),a=St(i.padding),s=xs(n.ctx,i),o=Ax({properties:t,options:e},s,r,a),l=Lx({properties:t,options:e},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function Ke(n,t,e){const i=Math.cos(e),r=Math.sin(e),a=t.x,s=t.y;return{x:a+i*(n.x-a)-r*(n.y-s),y:s+r*(n.x-a)+i*(n.y-s)}}const _s=["enter","leave"],Ms=_s.concat("click");function Nx(n,t,e){t.listened=gu(e,Ms,t.listeners),t.moveListened=!1,t._getElements=ps,_s.forEach(i=>{Wt(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&Wt(i.click)&&(t.listened=!0),t.moveListened||_s.forEach(r=>{Wt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function Fx(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return Wx(n,t,e);case"click":return Yx(n,t,e)}}function Wx(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=ps(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=Tu(a,"leave",r,i);return Tu(a,"enter",i,r)||s}function Tu({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Su(s.options[e]||n.listeners[e],s,t)||a);return a}function Yx(n,t,e){const i=n.listeners,r=ps(n,t,e.interaction);let a;for(const s of r)a=Su(s.options.click||i.click,s,t)||a;return a}function Su(n,t,e){return at(n,[t.$context,e])===!0}const sr=["afterDraw","beforeDraw"];function Ux(n,t,e){const i=t.visibleElements;t.hooked=gu(e,sr,t.hooks),t.hooked||i.forEach(r=>{t.hooked||sr.forEach(a=>{Wt(r.options[a])&&(t.hooked=!0)})})}function Du(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return at(i,[t.$context])}}function Bx(n,t,e){const i=jx(n.scales,t,e);let r=ku(t,i,"min","suggestedMin");r=ku(t,i,"max","suggestedMax")||r,r&&Wt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function zx(n,t){for(const e of n)$x(e,t)}function ku(n,t,e,i){if(gt(t[e])&&!Hx(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function Hx(n,t,e){return Ft(n[t])||Ft(n[e])}function $x(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Ge(t,n,e);i&&!t[i]&&Vx(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function Vx(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(Ft(n[e+i]))return!0;return!1}function jx(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:U(t.min,Number.NEGATIVE_INFINITY),max:U(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?Cu(o,t,["value","endValue"],s):Ge(n,o,a)===r&&Cu(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Cu(n,t,e,i){for(const r of e){const a=n[r];if(Ft(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class gn extends Ot{inRange(t,e,i,r){const{x:a,y:s}=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.options.rotation));return cu({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return dn(this,t)}draw(t){t.save(),ys(t,this.getCenterPoint(),this.options.rotation),mu(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return wu(t,e)}}gn.id="boxAnnotation",gn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},gn.defaultRoutes={borderColor:"color",backgroundColor:"color"},gn.descriptors={label:{_fallback:!0}};const Pu=["left","bottom","top","right"];class ai extends Ot{inRange(t,e,i,r){const{x:a,y:s}=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.rotation));return cu({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return dn(this,t)}draw(t){const e=this.options,i=!Ft(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),ys(t,this.getCenterPoint(),this.rotation),Xx(t,this),mu(t,this,e),wx(t,ew(this),e),t.restore())}resolveElementProperties(t,e){let i;if(fu(e))i=yu(t,e);else{const{centerX:o,centerY:l}=ws(t,e);i={x:o,y:l}}const r=St(e.padding),a=xs(t.ctx,e),s=qx(i,a,e,r);return{initProperties:ri(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}ai.id="labelAnnotation",ai.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ai.defaultRoutes={borderColor:"color"};function qx(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=bs(e.position,"center"),o=Ou(n.x,r,e.xAdjust,s.x),l=Ou(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function Ou(n,t,e=0,i){return n-ms(t,i)+e}function Xx(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&Jx(t,a);if(!s||nw(t,a,s))return;if(n.save(),n.beginPath(),!Pe(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=Gx(t,s),{sideStart:u,sideEnd:d}=Qx(t,s,l);(a.margin>0||r.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const h=Ke({x:e,y:i},t.getCenterPoint(),Tt(-t.rotation));n.lineTo(h.x,h.y),n.stroke(),n.restore()}function Gx(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=Kx(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:i},l={x:o.x,y:a}):(o={x:e,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function Kx(n,t){const{width:e,height:i,options:r}=n,a=r.callout.margin+r.borderWidth/2;return t==="right"?e+a:t==="bottom"?i+a:-a}function Qx(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=Zx(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+Ce(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+Ce(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function Zx(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function Jx(n,t){const e=t.position;return Pu.includes(e)?e:tw(n,t)}function tw(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=n,f={x:u,y:d},g=t.start,v=Ce(s,g),b=Ce(o,g),m=[e,e+v,e+v,r],y=[i+b,a,i,a],w=[];for(let x=0;x<4;x++){const _=Ke({x:m[x],y:y[x]},f,Tt(h));w.push({position:Pu[x],distance:Ze(_,{x:l,y:c})})}return w.sort((x,_)=>x.distance-_.distance)[0].position}function ew({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=St(r.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function nw(n,t,e){const{pointX:i,pointY:r}=n,a=t.margin;let s=i,o=r;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ts=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Ss=(n,t,e)=>Ts(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,Eu=(n,t,e)=>Ts(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,si=n=>n*n,iw=(n,t,{x:e,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(e,r),end:Math.max(e,r),value:n},Ru=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Ds=(n,t,e,i)=>({x:Ru(n.x,t.x,e.x,i),y:Ru(n.y,t.y,e.y,i)}),Au=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Lu=(n,t,e,i)=>-Math.atan2(Au(n.x,t.x,e.x,i),Au(n.y,t.y,e.y,i))+.5*Q;class oi extends Ot{inRange(t,e,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){Pe(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=e*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||ks(this,s,r);return l.restore(),f}const c=si(a);return ow(this,s,c,r)||ks(this,s,r)}return rw(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return dn(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!Pe(t,o))return t.restore();hn(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return pw(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Yu(this),f=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),Cs(t,0,d,c),Cs(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=Px(t,e),{x:r,y:a,x2:s,y2:o}=i,l=aw(i,t.chartArea),c=l?sw({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=ri(t,c,e),e.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=gw(c,e,Ze(d,h))}const u=lw(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}oi.id="lineAnnotation";const Iu={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};oi.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Iu),fill:!1,length:12,start:Object.assign({},Iu),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ai.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},oi.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},oi.defaultRoutes={borderColor:"color"};function rw(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=iw(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||ks(n,{mouseX:t,mouseY:e},a,i)}function aw({x:n,y:t,x2:e,y2:i},{top:r,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<r&&i<r||t>s&&i>s)}function Nu({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=Eu(s,{x:n,y:t},e),n=s),n>r&&(t=Eu(r,{x:n,y:t},e),n=r),t<i&&(n=Ss(i,{x:n,y:t},e),t=i),t>a&&(n=Ss(a,{x:n,y:t},e),t=a),{x:n,y:t}}function sw(n,t,e){const{x:i,y:r}=Nu(n,t,e),{x:a,y:s}=Nu(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function ow(n,{mouseX:t,mouseY:e},i=Xe,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=si(c)+si(u),h=d===0?-1:((t-a)*c+(e-s)*u)/d;let f,g;return h<0?(f=a,g=s):h>1?(f=o,g=l):(f=a+h*c,g=s+h*u),si(t-f)+si(e-g)<=i}function ks(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function lw(n,t,e){const i=e.borderWidth,r=St(e.padding),a=xs(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return uw(t,e,{width:s,height:o,padding:r},n.chartArea)}function cw(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>Q/2?a-Q:a<Q/-2?a+Q:a}function uw(n,t,e,i){const{width:r,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?cw(n):Tt(t.rotation),h=dw(r,a,d),f=hw(n,t,{labelSize:h,padding:s},i),g=n.cp?Ds(c,n.cp,u,f):Ts(c,u,f),v={size:h.w,min:i.left,max:i.right,padding:s.left},b={size:h.h,min:i.top,max:i.bottom,padding:s.top},m=Wu(g.x,v)+o,y=Wu(g.y,b)+l;return{x:m-r/2,y:y-a/2,x2:m+r/2,y2:y+a/2,centerX:m,centerY:y,pointX:g.x,pointY:g.y,width:r,height:a,rotation:vi(d)}}function dw(n,t,e){const i=Math.cos(e),r=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*r),h:Math.abs(n*r)+Math.abs(t*i)}}function hw(n,t,e,i){let r;const a=fw(n,i);return t.position==="start"?r=Fu({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-Fu({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=ms(1,t.position),r}function Fu(n,t,e,i){const{labelSize:r,padding:a}=t,s=n.w*i.dx,o=n.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return ir(Math.max(l,c),0,.25)}function fw(n,t){const{x:e,x2:i,y:r,y2:a}=n,s=Math.min(r,a)-t.top,o=Math.min(e,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(e,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Wu(n,t){const{size:e,min:i,max:r,padding:a}=t,s=e/2;return e>r-i?(r+i)/2:(i>=n-a-s&&(n=i+a+s),r<=n+a+s&&(n=r-a-s),n)}function Yu(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Uu(n,e),endAdjust:Uu(n,i)}}function Uu(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,r=n.options.borderWidth/2,a={x:e,y:i+r};return Math.abs(Ss(0,a,{x:0,y:r}))}function Cs(n,t,e,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+e;n.beginPath(),hn(n,i),Pe(n,i),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function gw(n,t,e){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-r,a-i),u=bs(t.controlPoint,0),d={x:o+Ce(e,u.x,!1),y:l+Ce(e,u.y,!1)};return Ke(d,{x:o,y:l},c)}function Bu(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),Cs(n,0,-r,a),n.restore())}function pw(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Yu(t),f={x:r,y:a},g={x:s,y:o},v=Lu(f,e,g,0),b=Lu(f,e,g,1)-Q,m=Ds(f,e,g,d/i),y=Ds(f,e,g,1-h/i),w=new Path2D;n.beginPath(),w.moveTo(m.x,m.y),w.quadraticCurveTo(e.x,e.y,y.x,y.y),n.shadowColor=l.borderShadowColor,n.stroke(w),t.path=w,t.ctx=n,Bu(n,m,{angle:v,adjust:d},c),Bu(n,y,{angle:b,adjust:h},u)}class li extends Ot{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return mw({x:t,y:e},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-a));return f[i]>=h.start-d-Xe&&f[i]<=h.end+d+Xe}getCenterPoint(t){return dn(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),ys(t,this.getCenterPoint(),s.rotation),hn(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=Pe(t,s);t.ellipse(r,a,i/2,e/2,Q/2,0,2*Q),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return wu(t,e)}}li.id="ellipseAnnotation",li.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},gn.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},li.defaultRoutes={borderColor:"color",backgroundColor:"color"},li.descriptors={label:{_fallback:!0}};function mw(n,t,e,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=Tt(e||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),g=Math.pow(h*(n.x-s)+f*(n.y-o),2),v=Math.pow(f*(n.x-s)-h*(n.y-o),2);return g/Math.pow(l+d,2)+v/Math.pow(c+d,2)<=1.0001}class or extends Ot{inRange(t,e,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return gx({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return dn(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,hn(t,e);const r=Pe(t,e);Mx(t,this,this.centerX,this.centerY),r&&!ar(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=xu(t,e);return i.initProperties=ri(t,i,e),i}}or.id="pointAnnotation",or.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},or.defaultRoutes={borderColor:"color",backgroundColor:"color"};class lr extends Ot{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&vw(this.elements,t,e,r);const a=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return dn(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,hn(t,i);const r=Pe(t,i);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=xu(t,e),{sides:r,rotation:a}=e,s=[],o=2*Q/r;let l=a*_r;for(let c=0;c<r;c++,l+=o){const u=bw(i,e,l);u.initProperties=ri(t,i,e),s.push(u)}return i.elements=s,i}}lr.id="polygonAnnotation",lr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},lr.defaultRoutes={borderColor:"color",backgroundColor:"color"};function bw({centerX:n,centerY:t},{radius:e,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function vw(n,t,e,i){let r=!1,a=n[n.length-1].getProps(["bX","bY"],i);for(const s of n){const o=s.getProps(["bX","bY"],i);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const Oe={box:gn,ellipse:li,label:ai,line:oi,point:or,polygon:lr};Object.keys(Oe).forEach(n=>{pt.describe(`elements.${Oe[n].id}`,{_fallback:"plugins.annotation.common"})});const yw={update:Object.assign},xw=Ms.concat(sr),zu=(n,t)=>q(t)?Es(n,t):n,Ps=n=>n==="color"||n==="font";function Os(n="line"){return Oe[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function ww(n,t,e,i){const r=Mw(n,e.animations,i),a=t.annotations,s=Dw(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Hu(s,o,l.type),u=l.setContext(Sw(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=_w(d),"elements"in d&&(Tw(c,d.elements,u,r),delete d.elements),Ft(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=$u(u),r.update(c,d)}}function _w(n){return isNaN(n.x)||isNaN(n.y)}function Mw(n,t,e){return e==="reset"||e==="none"||e==="resize"?yw:new Ir(n,t)}function Tw(n,t,e,i){const r=n.elements||(n.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=Hu(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=$u(c),i.update(l,o)}}function Hu(n,t,e,i){const r=Oe[Os(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function $u(n){const t=Oe[Os(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Es(n,t.defaults),Es(n,t.defaultRoutes));for(const i of xw)e[i]=n[i];return e}function Es(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];Ps(i)&&it(a)?e[i]=a.map(s=>zu(s,r)):e[i]=zu(a,r)}return e}function Sw(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function Dw(n,t){const e=t.length,i=n.length;if(i<e){const r=e-i;n.splice(i,0,...new Array(r))}else i>e&&n.splice(e,i-e);return n}var kw="3.0.1";const Ee=new Map,Cw=Ms.concat(sr);var cr={id:"annotation",version:kw,beforeRegister(){px("chart.js","4.0",Yt.version)},afterRegister(){Yt.register(Oe)},afterUnregister(){Yt.unregister(Oe)},beforeInit(n){Ee.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=Ee.get(n),r=i.annotations=[];let a=e.annotations;q(a)?Object.keys(a).forEach(s=>{const o=a[s];q(o)&&(o.id=s,r.push(o))}):it(a)&&r.push(...a),zx(r,n.scales)},afterDataLimits(n,t){const e=Ee.get(n);Bx(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=Ee.get(n);Nx(n,i,e),ww(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),Ux(n,i,e)},beforeDatasetsDraw(n,t,e){ur(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ur(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ur(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ur(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=Ee.get(n);Fx(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){Ee.delete(n)},_getState(n){return Ee.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!Cw.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Oe[Os(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Ps,_fallback:!0},_indexable:Ps}},additionalOptionScopes:[""]};function ur(n,t,e){const{ctx:i,chartArea:r}=n,a=Ee.get(n);e&&Dn(i,r);const s=Pw(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)Ow(i,r,a,o);e&&kn(i)}function Pw(n,t){const e=[];for(const i of n)if(i.options.drawTime===t&&e.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&e.push({element:r});return e}function Ow(n,t,e,i){const r=i.element;i.main?(Du(e,r,"beforeDraw"),r.draw(n,t),Du(e,r,"afterDraw")):r.draw(n,t)}const Ew={class:"tooltip"},Rw={class:"tooltip-title"},Aw={class:"title font-bold"},Lw={key:1,class:"subtitle"},Iw={key:0},Nw={class:"display-label"},Fw={class:"display-value"},Ww=p.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=n,i=p.ref(null),r=p.ref(!1),a=p.ref({x:0,y:0}),s=p.ref({x:0,y:0}),o=p.ref({left:e.left,top:e.top});p.watch(i,h=>{if(h){const{width:f,height:g}=h.getBoundingClientRect();t("dimensions",{width:f,height:g})}}),p.watch(()=>e.locked,h=>{h?(o.value.left=e.left,o.value.top=e.top):h===!1&&(t("top",o.value.top),t("left",o.value.left))});function l(h){i.value&&(r.value=!0,a.value={x:i.value.offsetLeft,y:i.value.offsetTop},s.value={x:h.clientX,y:h.clientY},window.addEventListener("mousemove",u),window.addEventListener("mouseup",d))}let c=null;function u(h){h.preventDefault(),h.stopPropagation(),r.value&&(c!==null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{const f=h.clientX-s.value.x,g=h.clientY-s.value.y;o.value.left=`${a.value.x+f}px`,o.value.top=`${a.value.y+g}px`}))}function d(){r.value=!1,c!==null&&window.cancelAnimationFrame(c),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)}return(h,f)=>{const g=p.resolveComponent("KIcon");return n.showTooltip?(p.openBlock(),p.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:p.normalizeClass(["tooltip-container",{locked:n.locked}]),style:p.normalizeStyle({left:n.locked?o.value.left:n.left,top:n.locked?o.value.top:n.top,pointerEvents:n.locked?"all":"none"}),onMousedown:l},[p.createElementVNode("ul",Ew,[p.createElementVNode("li",Rw,[p.createElementVNode("span",Aw,p.toDisplayString(n.tooltipTitle),1),n.locked?(p.openBlock(),p.createBlock(g,{key:0,class:"drag-icon",icon:"drag"})):p.createCommentVNode("",!0),n.context?(p.openBlock(),p.createElementBlock("span",Lw,p.toDisplayString(n.context),1)):p.createCommentVNode("",!0)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.series,({backgroundColor:v,borderColor:b,label:m,value:y})=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:m},[n.series.length?(p.openBlock(),p.createElementBlock("li",Iw,[p.createElementVNode("div",{class:"tooltip-legend",style:p.normalizeStyle({background:v,"border-color":b})},null,4),p.createElementVNode("span",Nw,p.toDisplayString(m),1),p.createElementVNode("span",Fw,p.toDisplayString(y),1)])):p.createCommentVNode("",!0)],64))),128))])],38)):p.createCommentVNode("",!0)}}}),G_="",Re=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},Rs=Re(Ww,[["__scopeId","data-v-09b76e24"]]),Yw=["onClick"],Uw={class:"label"},Bw={key:0,class:"sub-label"},zw=p.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){const t=n,e=p.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Yt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Yt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[Dt.Right]:"vertical",[Dt.Bottom]:"horizontal",[Dt.Hidden]:"hidden"})[l],s=p.inject("showLegendValues",!0),o=p.inject("legendPosition",p.ref(Dt.Right));return(l,c)=>p.unref(o)!==p.unref(Dt).Hidden?(p.openBlock(),p.createElementBlock("ul",{key:0,class:p.normalizeClass(["legend-container",a(p.unref(o))]),"data-testid":"legend"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:g,value:v})=>(p.openBlock(),p.createElementBlock("li",{key:h,onClick:b=>i(f,g)},[p.createElementVNode("div",{class:"legend",style:p.normalizeStyle({background:u,"border-color":d})},null,4),p.createElementVNode("div",{class:p.normalizeClass({"strike-through":!r(f,g)})},[p.createElementVNode("div",Uw,p.toDisplayString(h),1),v&&p.unref(s)?(p.openBlock(),p.createElementBlock("div",Bw,p.toDisplayString(v.formatted),1)):p.createCommentVNode("",!0)],2)],8,Yw))),128))],2)):p.createCommentVNode("",!0)}}),K_="",As=Re(zw,[["__scopeId","data-v-c16b4571"]]);let dr;const Hw=new Uint8Array(16);function $w(){if(!dr&&(dr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dr(Hw)}const Rt=[];for(let n=0;n<256;++n)Rt.push((n+256).toString(16).slice(1));function Vw(n,t=0){return(Rt[n[t+0]]+Rt[n[t+1]]+Rt[n[t+2]]+Rt[n[t+3]]+"-"+Rt[n[t+4]]+Rt[n[t+5]]+"-"+Rt[n[t+6]]+Rt[n[t+7]]+"-"+Rt[n[t+8]]+Rt[n[t+9]]+"-"+Rt[n[t+10]]+Rt[n[t+11]]+Rt[n[t+12]]+Rt[n[t+13]]+Rt[n[t+14]]+Rt[n[t+15]]).toLowerCase()}const Vu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ae(n,t,e){if(Vu.randomUUID&&!t&&!n)return Vu.randomUUID();n=n||{};const i=n.random||(n.rng||$w)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let r=0;r<16;++r)t[e+r]=i[r];return t}return Vw(i)}const ju=(n,t,e,i)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,i),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},Ls={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;ju(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;ju(e,t,n.scales.y.top,n.scales.y.bottom)}}},qu=(n,t)=>{const e=n.ctx,i=n.scales.y,r=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):e.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),e.restore()},Xu={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&qu(n,this.clickedElements)},afterEvent:function(n,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((r=n.options.interaction)==null?void 0:r.mode)||"index",i=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,qu(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)}},Gu=6,jw=20,qw=400,Xw="100%",Is=30,Gw=40,Kw=0,Qw=10,Zw=10,Jw=1,t_=p.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=({chart:O},A)=>{var G;const N=O.data,X=(G=N.labels)==null?void 0:G.indexOf(A);return N.datasets.reduce((nt,xt,K)=>{if(O.isDatasetVisible(K)){const Y=xt.data[X];return isNaN(Y)?nt:nt+Y}else return nt},0)},r=(O,A,N,X)=>{const G=X==="horizontal";A===null&&(A=e.t("entityNoName"));const nt={type:"label",yValue:Y=>G?A:i(Y,A),xValue:Y=>G?i(Y,A):A},xt={...nt,position:G?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>G?0:-Math.abs(Ry()),content:Y=>fs(i(Y,A),N)},K={...nt,content:Y=>ru(i(Y,A),iu(Y.chart,O)),position:G?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:Y=>G?nu(fs(i(Y,A),N)):0,color:eu};return{[`${A}-value`]:xt,[`${A}-percent`]:K}},a=p.ref(),s=p.ref(),o=p.ref(Ae()),l=Ae(),c=Ae(),u=p.ref([]),d=p.toRef(t,"chartData"),h=p.ref(p.inject("legendPosition",Dt.Right)),f=p.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),g=p.toRef(t,"metricUnit"),v=p.computed(()=>g.value&&e.t(`chartUnits.${g.value}`)),b=p.computed(()=>p.toRef(t,"orientation").value==="horizontal"),m=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:v,offset:0,width:0,height:0,locked:!1,chartType:b.value?Et.HORIZONTAL_BAR:Et.VERTICAL_BAR}),y=p.ref(0),w=()=>{var O;return t.annotations&&((O=d.value.labels)==null?void 0:O.reduce((A,N)=>Object.assign(A,r(d.value,N,g.value,t.orientation)),{}))},x={id:o.value,afterUpdate(O){y.value+=1,u.value=O.options.plugins.legend.labels.generateLabels(O).map(A=>({...A,value:t.legendValues&&t.legendValues[A.text]})).sort((A,N)=>A.value&&N.value&&N.value.raw-A.value.raw)}},_={id:l,afterUpdate(O){O.options.plugins.annotation.annotations=R.value?w():{}}},S=[x,{id:"axisHover",afterEvent(O,A){if(f.value.show=!1,A.event.type==="mousemove"){const N=A.event,X=O.options.indexAxis,G=O.scales,nt=O.scales[X].getLabelForValue(Number(O.scales[X].getValueForPixel(N[X])));if((K=>K==="x"?N.y>G.x.top:N.x<G.y.right)(X))if(m.showTooltip=!1,nt.length>ds){const Y=O.canvas.getContext("2d").measureText(nt).width,Ct=Math.abs(Math.round(N.x-Y*.5)),Qt=Math.round(N.x+Y*.5);f.value.left=X==="x"?`${(Ct>0?Ct:Qt)-f.value.offset}px`:`${N.x-Y*.5-f.value.offset}px`,f.value.top=`${N.y-50}px`,f.value.show=!0,f.value.text=nt}else f.value.show=!1;else f.value.show=!1}}},{id:c,afterUpdate(O){O.options.layout.padding.right=b.value?F.value:0}},Xu,...t.annotations?[_]:[]],k=p.computed(()=>d.value.labels&&d.value.labels.length||0),D=p.computed(()=>{var A,N;let O=Xw;if(a.value&&(O=a.value.width,a.value&&((A=d.value)!=null&&A.labels)&&((N=d.value)==null?void 0:N.labels.length)>Is&&!b.value)){const X=d.value.labels.length;O=`${a.value.offsetWidth+(X-Is)*Gw}px`}return O}),R=p.toRef(t,"annotations"),I=p.computed(()=>{var A;let O=qw;if((A=d.value)!=null&&A.labels&&b.value){const X=d.value.labels.length*jw;O=Math.max(X,O)}return`${O}px`});Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey")),p.onMounted(()=>{t.annotations&&Yt.register(cr)});const V=p.computed(()=>{const O=Mt.useBarChartOptions({tooltipState:m,legendID:o.value,stacked:p.toRef(t,"stacked"),metricAxesTitle:p.toRef(t,"metricAxesTitle"),dimensionAxesTitle:p.toRef(t,"dimensionAxesTitle"),indexAxis:b.value?"y":"x"});return{...O.value,plugins:{...O.value.plugins,annotation:{annotations:w(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*Gu}}}}),H=Mt.useChartJSCommon("bar",a,p.toRef(t,"chartData"),S,V),F=p.computed(()=>{y.value;const O=d.value.labels,A=d.value.datasets,N=O.map((nt,xt)=>A.reduce((K,Y)=>isNaN(Number(Y.data[xt]))?K:K+Number(Y.data[xt]),0)),X=H.value?iu(H.value,d.value):Ay(d.value);return N.map(nt=>nu(fs(nt,g.value)+ru(nt,X))).reduce((nt,xt)=>Math.max(nt,xt),0)+Gu});p.onUnmounted(()=>{Yt.unregister(cr)});const z={[Dt.Right]:"legend-row",[Dt.Bottom]:"column"},j=p.computed(()=>{if(s.value&&H.value){const O=window.devicePixelRatio,A=H.value,N=A.scales.y.width*O+Jw,X=(A.scales.y.height+A.scales.y.top+A.scales.x.height)*O,G=s.value.getContext("2d");return G.scale(O,O),G.canvas.width=N,G.canvas.height=X,G.canvas.style.width=`${N/O}px`,G.canvas.style.height=`${X/O}px`,{scale:O,width:N*O,height:X*O,targetCtx:G}}return null}),kt=O=>{if(j.value&&H.value){const A=j.value.scale,N=j.value.targetCtx,X=j.value.width,G=j.value.height,nt=H.value,xt=nt.canvas,K=O.target;N.fillStyle="white",K.scrollLeft>=Kw&&K.scrollLeft<=Qw?(N.globalCompositeOperation="source-over",N.clearRect(0,0,X,G),N.drawImage(xt,0,0,X,G,0,0,X,G),N.globalCompositeOperation="destination-over",N.fillRect(0,0,X,G)):(N.globalCompositeOperation="source-over",N.fillRect(0,(nt.scales.y.height+nt.scales.y.top+Zw)*A,X,nt.scales.x.height*A)),m.offset=K.scrollLeft,f.value.offset=K.scrollLeft}},ft=({width:O,height:A})=>{m.width=O,m.height=A};p.watch(()=>t.orientation,()=>{var O;if(s.value&&j.value){const A=j.value.width,N=j.value.height;((O=s.value)==null?void 0:O.getContext("2d")).clearRect(0,0,A,N)}}),p.watch(R,O=>{H.value&&(O?(H.value.options.plugins.annotation.annotations=w(d.value),Yt.register(cr),H.value.update()):(H.value.options.plugins.annotation.annotations={},Yt.unregister(cr),H.value.update()))});const zt=()=>{var O;m.showTooltip&&(m.locked=!m.locked,H.value&&(Ls.clickedSegment=m.locked?(O=H.value.tooltip)==null?void 0:O.dataPoints[0]:void 0))};return(O,A)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",z[h.value]])},[p.createElementVNode("canvas",{ref_key:"axis",ref:s,class:"axis"},null,512),p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({"overflow-x":k.value>Is?"auto":"hidden"}),"on:scroll":kt,onClick:A[0]||(A[0]=N=>zt())},[p.createElementVNode("div",{class:"chart-body",style:p.normalizeStyle({width:D.value,height:I.value})},[p.createElementVNode("canvas",{ref_key:"canvas",ref:a},null,512)],4)],36),f.value.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:"axis-tooltip",style:p.normalizeStyle({top:f.value.top,left:f.value.left})},p.toDisplayString(f.value.text),5)):p.createCommentVNode("",!0),p.createVNode(Rs,{left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ft},null,8,["left","locked","series","show-tooltip","tooltip-title","top"]),p.createVNode(As,{id:o.value,"chart-instance":p.unref(H),items:u.value},null,8,["id","chart-instance","items"])],2))}}),Z_="",e_=Re(t_,[["__scopeId","data-v-cbec002d"]]);/*!
24
+ */const cu={modes:{point(n,t){return nr(n,t,{intersect:!0})},nearest(n,t,e){return dx(n,t,e)},x(n,t,e){return nr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return nr(n,t,{intersect:e.intersect,axis:"y"})}}};function ps(n,t,e){return(cu.modes[e.mode]||cu.modes.nearest)(n,t,e)}function cx(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function ux(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function nr(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):cx(i,t,e.axis))}function dx(n,t,e){let i=Number.POSITIVE_INFINITY;return nr(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=ux(t,s,e.axis),l=Ze(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const hx=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Xe=.001,ir=(n,t,e)=>Math.min(e,Math.max(t,n));function fx(n,t,e){for(const i of Object.keys(n))n[i]=ir(n[i],t,e);return n}function gx(n,t,e,i){if(!n||!t||e<=0)return!1;const r=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+r,2)}function uu(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-Xe&&n.x<=i+o+Xe,c=n.y>=e-o-Xe&&n.y<=r+o+Xe;return a==="x"?l:(a==="y"||l)&&c}function dn(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function px(n,t,e,i=!0){const r=e.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(hx(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const du=n=>typeof n=="string"&&n.endsWith("%"),hu=n=>parseFloat(n)/100,fu=n=>ir(hu(n),0,1),rr=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),mx={box:n=>rr(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>rr(n.centerX,n.centerY),line:n=>rr(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>rr(n.centerX,n.centerY)};function ms(n,t){return t==="start"?0:t==="end"?n:du(t)?fu(t)*n:n/2}function Ce(n,t,e=!0){return typeof t=="number"?t:du(t)?(e?fu(t):hu(t))*n:n}function bx(n,t){const{x:e,width:i}=n,r=t.textAlign;return r==="center"?e+i/2:r==="end"||r==="right"?e+i:e}function bs(n,t="center"){return q(n)?{x:U(n.x,t),y:U(n.y,t)}:(n=U(n,t),{x:n,y:n})}function gu(n){return n&&(Ft(n.xValue)||Ft(n.yValue))}function ri(n,t,e){const i=e.init;if(i){if(i===!0)return mu(t,e)}else return;return vx(n,t,e)}function pu(n,t,e){let i=!1;return t.forEach(r=>{Wt(n[r])?(i=!0,e[r]=n[r]):Ft(e[r])&&delete e[r]}),i}function mu(n,t){const e=t.type||"line";return mx[e](n)}function vx(n,t,e){const i=at(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return mu(t,e);if(q(i))return i}const vs=new Map,yx=n=>isNaN(n)||n<=0,xx=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ar(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function ys(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Tt(i)),n.translate(-t,-e))}function Pe(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function hn(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function xs(n,t){const e=t.content;if(ar(e))return{width:Ce(e.width,t.width),height:Ce(e.height,t.height)};const i=t.font,r=it(i)?i.map(l=>dt(l)):[dt(i)],a=t.textStrokeWidth,s=it(e)?e:[e],o=s.join()+xx(r)+a+(n._measureText?"-spriting":"");return vs.has(o)||vs.set(o,Sx(n,s,r,a)),vs.get(o)}function bu(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),hn(n,e);const o=Pe(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),Je(n,{x:i,y:r,w:a,h:s,radius:fx(xe(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function wx(n,t,e){const i=e.content;if(ar(i)){n.save(),n.globalAlpha=Cx(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=it(i)?i:[i],a=e.font,s=it(a)?a.map(d=>dt(d)):[dt(a)],o=e.color,l=it(o)?o:[o],c=bx(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,_x(n,e)&&Dx(n,{x:c,y:u},r,s),kx(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function _x(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Mx(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*_r;if(ar(s)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}yx(r)||Tx(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function Tx(n,{x:t,y:e,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,i,0,ct),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=bi,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=bi,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+qt)*c,l=Math.sin(s+qt)*c,n.arc(t-o,e-l,u,s-Q,s-ut),n.arc(t+l,e-o,u,s-ut,s),n.arc(t+o,e+l,u,s,s+ut),n.arc(t-l,e+o,u,s+ut,s+Q),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=qt;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=qt;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=qt,o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*i,e+Math.sin(s)*i);break}n.fill()}function Sx(n,t,e,i){n.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+i),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function Dx(n,{x:t,y:e},i,r){n.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function kx(n,{x:t,y:e},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function Cx(n,t){const e=ye(n)?n:t;return ye(e)?ir(e,0,1):1}const vu={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fn(n,t,e){return t=typeof t=="number"?t:n.parse(t),gt(t)?n.getPixelForValue(t):e}function Ge(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const r=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function yu(n,t){if(n){const e=n.options.reverse,i=fn(n,t.min,e?t.end:t.start),r=fn(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function xu(n,t){const{chartArea:e,scales:i}=n,r=i[Ge(i,t,"xScaleID")],a=i[Ge(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=fn(r,t.xValue,r.left+r.width/2)),a&&(o=fn(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function ws(n,t){const e=n.scales,i=e[Ge(e,t,"xScaleID")],r=e[Ge(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=Mu(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Mu(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function wu(n,t){if(!gu(t)){const e=ws(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const r=i*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return Ox(n,t)}function Px(n,t){const{scales:e,chartArea:i}=n,r=e[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?Ex(r,a,t):Rx(e,a,t),a}function _u(n,t){const e=ws(n,t);return e.initProperties=ri(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:Ix(n,e,t),initProperties:e.initProperties}],e}function Ox(n,t){const e=xu(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function Mu(n,t){const e=yu(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Ex(n,t,e){const i=fn(n,e.value,NaN),r=fn(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function Rx(n,t,e){for(const i of Object.keys(vu)){const r=n[Ge(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=vu[i],d=yu(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function Ax({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return Tu({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:e.width})}function Lx({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return Tu({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:e.height})}function Tu(n,t){const{start:e,end:i,borderWidth:r}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-e-s-o-t.size;return e+r/2+l+ms(c,a)}function Ix(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=bs(i.position),a=St(i.padding),s=xs(n.ctx,i),o=Ax({properties:t,options:e},s,r,a),l=Lx({properties:t,options:e},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function Ke(n,t,e){const i=Math.cos(e),r=Math.sin(e),a=t.x,s=t.y;return{x:a+i*(n.x-a)-r*(n.y-s),y:s+r*(n.x-a)+i*(n.y-s)}}const _s=["enter","leave"],Ms=_s.concat("click");function Nx(n,t,e){t.listened=pu(e,Ms,t.listeners),t.moveListened=!1,t._getElements=ps,_s.forEach(i=>{Wt(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&Wt(i.click)&&(t.listened=!0),t.moveListened||_s.forEach(r=>{Wt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function Fx(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return Wx(n,t,e);case"click":return Yx(n,t,e)}}function Wx(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=ps(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=Su(a,"leave",r,i);return Su(a,"enter",i,r)||s}function Su({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Du(s.options[e]||n.listeners[e],s,t)||a);return a}function Yx(n,t,e){const i=n.listeners,r=ps(n,t,e.interaction);let a;for(const s of r)a=Du(s.options.click||i.click,s,t)||a;return a}function Du(n,t,e){return at(n,[t.$context,e])===!0}const sr=["afterDraw","beforeDraw"];function Ux(n,t,e){const i=t.visibleElements;t.hooked=pu(e,sr,t.hooks),t.hooked||i.forEach(r=>{t.hooked||sr.forEach(a=>{Wt(r.options[a])&&(t.hooked=!0)})})}function ku(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return at(i,[t.$context])}}function Bx(n,t,e){const i=jx(n.scales,t,e);let r=Cu(t,i,"min","suggestedMin");r=Cu(t,i,"max","suggestedMax")||r,r&&Wt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function zx(n,t){for(const e of n)$x(e,t)}function Cu(n,t,e,i){if(gt(t[e])&&!Hx(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function Hx(n,t,e){return Ft(n[t])||Ft(n[e])}function $x(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Ge(t,n,e);i&&!t[i]&&Vx(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function Vx(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(Ft(n[e+i]))return!0;return!1}function jx(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:U(t.min,Number.NEGATIVE_INFINITY),max:U(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?Pu(o,t,["value","endValue"],s):Ge(n,o,a)===r&&Pu(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Pu(n,t,e,i){for(const r of e){const a=n[r];if(Ft(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class gn extends Ot{inRange(t,e,i,r){const{x:a,y:s}=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.options.rotation));return uu({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return dn(this,t)}draw(t){t.save(),ys(t,this.getCenterPoint(),this.options.rotation),bu(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return _u(t,e)}}gn.id="boxAnnotation",gn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},gn.defaultRoutes={borderColor:"color",backgroundColor:"color"},gn.descriptors={label:{_fallback:!0}};const Ou=["left","bottom","top","right"];class ai extends Ot{inRange(t,e,i,r){const{x:a,y:s}=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.rotation));return uu({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return dn(this,t)}draw(t){const e=this.options,i=!Ft(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),ys(t,this.getCenterPoint(),this.rotation),Xx(t,this),bu(t,this,e),wx(t,ew(this),e),t.restore())}resolveElementProperties(t,e){let i;if(gu(e))i=xu(t,e);else{const{centerX:o,centerY:l}=ws(t,e);i={x:o,y:l}}const r=St(e.padding),a=xs(t.ctx,e),s=qx(i,a,e,r);return{initProperties:ri(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}ai.id="labelAnnotation",ai.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ai.defaultRoutes={borderColor:"color"};function qx(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=bs(e.position,"center"),o=Eu(n.x,r,e.xAdjust,s.x),l=Eu(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function Eu(n,t,e=0,i){return n-ms(t,i)+e}function Xx(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&Jx(t,a);if(!s||nw(t,a,s))return;if(n.save(),n.beginPath(),!Pe(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=Gx(t,s),{sideStart:u,sideEnd:d}=Qx(t,s,l);(a.margin>0||r.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const h=Ke({x:e,y:i},t.getCenterPoint(),Tt(-t.rotation));n.lineTo(h.x,h.y),n.stroke(),n.restore()}function Gx(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=Kx(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:i},l={x:o.x,y:a}):(o={x:e,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function Kx(n,t){const{width:e,height:i,options:r}=n,a=r.callout.margin+r.borderWidth/2;return t==="right"?e+a:t==="bottom"?i+a:-a}function Qx(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=Zx(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+Ce(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+Ce(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function Zx(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function Jx(n,t){const e=t.position;return Ou.includes(e)?e:tw(n,t)}function tw(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=n,f={x:u,y:d},g=t.start,v=Ce(s,g),b=Ce(o,g),m=[e,e+v,e+v,r],y=[i+b,a,i,a],w=[];for(let x=0;x<4;x++){const _=Ke({x:m[x],y:y[x]},f,Tt(h));w.push({position:Ou[x],distance:Ze(_,{x:l,y:c})})}return w.sort((x,_)=>x.distance-_.distance)[0].position}function ew({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=St(r.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function nw(n,t,e){const{pointX:i,pointY:r}=n,a=t.margin;let s=i,o=r;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ts=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Ss=(n,t,e)=>Ts(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,Ru=(n,t,e)=>Ts(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,si=n=>n*n,iw=(n,t,{x:e,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(e,r),end:Math.max(e,r),value:n},Au=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Ds=(n,t,e,i)=>({x:Au(n.x,t.x,e.x,i),y:Au(n.y,t.y,e.y,i)}),Lu=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Iu=(n,t,e,i)=>-Math.atan2(Lu(n.x,t.x,e.x,i),Lu(n.y,t.y,e.y,i))+.5*Q;class oi extends Ot{inRange(t,e,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){Pe(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=e*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||ks(this,s,r);return l.restore(),f}const c=si(a);return ow(this,s,c,r)||ks(this,s,r)}return rw(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return dn(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!Pe(t,o))return t.restore();hn(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return pw(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Uu(this),f=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),Cs(t,0,d,c),Cs(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=Px(t,e),{x:r,y:a,x2:s,y2:o}=i,l=aw(i,t.chartArea),c=l?sw({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=ri(t,c,e),e.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=gw(c,e,Ze(d,h))}const u=lw(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}oi.id="lineAnnotation";const Nu={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};oi.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Nu),fill:!1,length:12,start:Object.assign({},Nu),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ai.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},oi.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},oi.defaultRoutes={borderColor:"color"};function rw(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=iw(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||ks(n,{mouseX:t,mouseY:e},a,i)}function aw({x:n,y:t,x2:e,y2:i},{top:r,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<r&&i<r||t>s&&i>s)}function Fu({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=Ru(s,{x:n,y:t},e),n=s),n>r&&(t=Ru(r,{x:n,y:t},e),n=r),t<i&&(n=Ss(i,{x:n,y:t},e),t=i),t>a&&(n=Ss(a,{x:n,y:t},e),t=a),{x:n,y:t}}function sw(n,t,e){const{x:i,y:r}=Fu(n,t,e),{x:a,y:s}=Fu(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function ow(n,{mouseX:t,mouseY:e},i=Xe,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=si(c)+si(u),h=d===0?-1:((t-a)*c+(e-s)*u)/d;let f,g;return h<0?(f=a,g=s):h>1?(f=o,g=l):(f=a+h*c,g=s+h*u),si(t-f)+si(e-g)<=i}function ks(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function lw(n,t,e){const i=e.borderWidth,r=St(e.padding),a=xs(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return uw(t,e,{width:s,height:o,padding:r},n.chartArea)}function cw(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>Q/2?a-Q:a<Q/-2?a+Q:a}function uw(n,t,e,i){const{width:r,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?cw(n):Tt(t.rotation),h=dw(r,a,d),f=hw(n,t,{labelSize:h,padding:s},i),g=n.cp?Ds(c,n.cp,u,f):Ts(c,u,f),v={size:h.w,min:i.left,max:i.right,padding:s.left},b={size:h.h,min:i.top,max:i.bottom,padding:s.top},m=Yu(g.x,v)+o,y=Yu(g.y,b)+l;return{x:m-r/2,y:y-a/2,x2:m+r/2,y2:y+a/2,centerX:m,centerY:y,pointX:g.x,pointY:g.y,width:r,height:a,rotation:vi(d)}}function dw(n,t,e){const i=Math.cos(e),r=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*r),h:Math.abs(n*r)+Math.abs(t*i)}}function hw(n,t,e,i){let r;const a=fw(n,i);return t.position==="start"?r=Wu({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-Wu({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=ms(1,t.position),r}function Wu(n,t,e,i){const{labelSize:r,padding:a}=t,s=n.w*i.dx,o=n.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return ir(Math.max(l,c),0,.25)}function fw(n,t){const{x:e,x2:i,y:r,y2:a}=n,s=Math.min(r,a)-t.top,o=Math.min(e,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(e,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Yu(n,t){const{size:e,min:i,max:r,padding:a}=t,s=e/2;return e>r-i?(r+i)/2:(i>=n-a-s&&(n=i+a+s),r<=n+a+s&&(n=r-a-s),n)}function Uu(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Bu(n,e),endAdjust:Bu(n,i)}}function Bu(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,r=n.options.borderWidth/2,a={x:e,y:i+r};return Math.abs(Ss(0,a,{x:0,y:r}))}function Cs(n,t,e,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+e;n.beginPath(),hn(n,i),Pe(n,i),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function gw(n,t,e){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-r,a-i),u=bs(t.controlPoint,0),d={x:o+Ce(e,u.x,!1),y:l+Ce(e,u.y,!1)};return Ke(d,{x:o,y:l},c)}function zu(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),Cs(n,0,-r,a),n.restore())}function pw(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Uu(t),f={x:r,y:a},g={x:s,y:o},v=Iu(f,e,g,0),b=Iu(f,e,g,1)-Q,m=Ds(f,e,g,d/i),y=Ds(f,e,g,1-h/i),w=new Path2D;n.beginPath(),w.moveTo(m.x,m.y),w.quadraticCurveTo(e.x,e.y,y.x,y.y),n.shadowColor=l.borderShadowColor,n.stroke(w),t.path=w,t.ctx=n,zu(n,m,{angle:v,adjust:d},c),zu(n,y,{angle:b,adjust:h},u)}class li extends Ot{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return mw({x:t,y:e},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-a));return f[i]>=h.start-d-Xe&&f[i]<=h.end+d+Xe}getCenterPoint(t){return dn(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),ys(t,this.getCenterPoint(),s.rotation),hn(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=Pe(t,s);t.ellipse(r,a,i/2,e/2,Q/2,0,2*Q),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return _u(t,e)}}li.id="ellipseAnnotation",li.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},gn.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},li.defaultRoutes={borderColor:"color",backgroundColor:"color"},li.descriptors={label:{_fallback:!0}};function mw(n,t,e,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=Tt(e||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),g=Math.pow(h*(n.x-s)+f*(n.y-o),2),v=Math.pow(f*(n.x-s)-h*(n.y-o),2);return g/Math.pow(l+d,2)+v/Math.pow(c+d,2)<=1.0001}class or extends Ot{inRange(t,e,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return gx({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return dn(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,hn(t,e);const r=Pe(t,e);Mx(t,this,this.centerX,this.centerY),r&&!ar(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=wu(t,e);return i.initProperties=ri(t,i,e),i}}or.id="pointAnnotation",or.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},or.defaultRoutes={borderColor:"color",backgroundColor:"color"};class lr extends Ot{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&vw(this.elements,t,e,r);const a=Ke({x:t,y:e},this.getCenterPoint(r),Tt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return dn(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,hn(t,i);const r=Pe(t,i);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=wu(t,e),{sides:r,rotation:a}=e,s=[],o=2*Q/r;let l=a*_r;for(let c=0;c<r;c++,l+=o){const u=bw(i,e,l);u.initProperties=ri(t,i,e),s.push(u)}return i.elements=s,i}}lr.id="polygonAnnotation",lr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},lr.defaultRoutes={borderColor:"color",backgroundColor:"color"};function bw({centerX:n,centerY:t},{radius:e,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function vw(n,t,e,i){let r=!1,a=n[n.length-1].getProps(["bX","bY"],i);for(const s of n){const o=s.getProps(["bX","bY"],i);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const Oe={box:gn,ellipse:li,label:ai,line:oi,point:or,polygon:lr};Object.keys(Oe).forEach(n=>{pt.describe(`elements.${Oe[n].id}`,{_fallback:"plugins.annotation.common"})});const yw={update:Object.assign},xw=Ms.concat(sr),Hu=(n,t)=>q(t)?Es(n,t):n,Ps=n=>n==="color"||n==="font";function Os(n="line"){return Oe[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function ww(n,t,e,i){const r=Mw(n,e.animations,i),a=t.annotations,s=Dw(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=$u(s,o,l.type),u=l.setContext(Sw(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=_w(d),"elements"in d&&(Tw(c,d.elements,u,r),delete d.elements),Ft(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Vu(u),r.update(c,d)}}function _w(n){return isNaN(n.x)||isNaN(n.y)}function Mw(n,t,e){return e==="reset"||e==="none"||e==="resize"?yw:new Ir(n,t)}function Tw(n,t,e,i){const r=n.elements||(n.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=$u(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=Vu(c),i.update(l,o)}}function $u(n,t,e,i){const r=Oe[Os(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function Vu(n){const t=Oe[Os(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Es(n,t.defaults),Es(n,t.defaultRoutes));for(const i of xw)e[i]=n[i];return e}function Es(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];Ps(i)&&it(a)?e[i]=a.map(s=>Hu(s,r)):e[i]=Hu(a,r)}return e}function Sw(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function Dw(n,t){const e=t.length,i=n.length;if(i<e){const r=e-i;n.splice(i,0,...new Array(r))}else i>e&&n.splice(e,i-e);return n}var kw="3.0.1";const Ee=new Map,Cw=Ms.concat(sr);var cr={id:"annotation",version:kw,beforeRegister(){px("chart.js","4.0",Yt.version)},afterRegister(){Yt.register(Oe)},afterUnregister(){Yt.unregister(Oe)},beforeInit(n){Ee.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=Ee.get(n),r=i.annotations=[];let a=e.annotations;q(a)?Object.keys(a).forEach(s=>{const o=a[s];q(o)&&(o.id=s,r.push(o))}):it(a)&&r.push(...a),zx(r,n.scales)},afterDataLimits(n,t){const e=Ee.get(n);Bx(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=Ee.get(n);Nx(n,i,e),ww(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),Ux(n,i,e)},beforeDatasetsDraw(n,t,e){ur(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ur(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ur(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ur(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=Ee.get(n);Fx(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){Ee.delete(n)},_getState(n){return Ee.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!Cw.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Oe[Os(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Ps,_fallback:!0},_indexable:Ps}},additionalOptionScopes:[""]};function ur(n,t,e){const{ctx:i,chartArea:r}=n,a=Ee.get(n);e&&Dn(i,r);const s=Pw(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)Ow(i,r,a,o);e&&kn(i)}function Pw(n,t){const e=[];for(const i of n)if(i.options.drawTime===t&&e.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&e.push({element:r});return e}function Ow(n,t,e,i){const r=i.element;i.main?(ku(e,r,"beforeDraw"),r.draw(n,t),ku(e,r,"afterDraw")):r.draw(n,t)}const Ew={class:"tooltip"},Rw={class:"tooltip-title"},Aw={class:"title font-bold"},Lw={key:1,class:"subtitle"},Iw={key:0},Nw={class:"display-label"},Fw={class:"display-value"},Ww=p.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=n,i=p.ref(null),r=p.ref(!1),a=p.ref({x:0,y:0}),s=p.ref({x:0,y:0}),o=p.ref({left:e.left,top:e.top});p.watch(i,h=>{if(h){const{width:f,height:g}=h.getBoundingClientRect();t("dimensions",{width:f,height:g})}}),p.watch(()=>e.locked,h=>{h?(o.value.left=e.left,o.value.top=e.top):h===!1&&(t("top",o.value.top),t("left",o.value.left))});function l(h){i.value&&(r.value=!0,a.value={x:i.value.offsetLeft,y:i.value.offsetTop},s.value={x:h.clientX,y:h.clientY},window.addEventListener("mousemove",u),window.addEventListener("mouseup",d))}let c=null;function u(h){h.preventDefault(),h.stopPropagation(),r.value&&(c!==null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{const f=h.clientX-s.value.x,g=h.clientY-s.value.y;o.value.left=`${a.value.x+f}px`,o.value.top=`${a.value.y+g}px`}))}function d(){r.value=!1,c!==null&&window.cancelAnimationFrame(c),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)}return(h,f)=>{const g=p.resolveComponent("KIcon");return n.showTooltip?(p.openBlock(),p.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:p.normalizeClass(["tooltip-container",{locked:n.locked}]),style:p.normalizeStyle({left:n.locked?o.value.left:n.left,top:n.locked?o.value.top:n.top,pointerEvents:n.locked?"all":"none"}),onMousedown:l},[p.createElementVNode("ul",Ew,[p.createElementVNode("li",Rw,[p.createElementVNode("span",Aw,p.toDisplayString(n.tooltipTitle),1),n.locked?(p.openBlock(),p.createBlock(g,{key:0,class:"drag-icon",icon:"drag"})):p.createCommentVNode("",!0),n.context?(p.openBlock(),p.createElementBlock("span",Lw,p.toDisplayString(n.context),1)):p.createCommentVNode("",!0)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(n.series,({backgroundColor:v,borderColor:b,label:m,value:y})=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:m},[n.series.length?(p.openBlock(),p.createElementBlock("li",Iw,[p.createElementVNode("div",{class:"tooltip-legend",style:p.normalizeStyle({background:v,"border-color":b})},null,4),p.createElementVNode("span",Nw,p.toDisplayString(m),1),p.createElementVNode("span",Fw,p.toDisplayString(y),1)])):p.createCommentVNode("",!0)],64))),128))])],38)):p.createCommentVNode("",!0)}}}),G_="",Re=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},Rs=Re(Ww,[["__scopeId","data-v-09b76e24"]]),Yw=["onClick"],Uw={class:"label"},Bw={key:0,class:"sub-label"},zw=p.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){const t=n,e=p.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Yt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Yt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[Dt.Right]:"vertical",[Dt.Bottom]:"horizontal",[Dt.Hidden]:"hidden"})[l],s=p.inject("showLegendValues",!0),o=p.inject("legendPosition",p.ref(Dt.Right));return(l,c)=>p.unref(o)!==p.unref(Dt).Hidden?(p.openBlock(),p.createElementBlock("ul",{key:0,class:p.normalizeClass(["legend-container",a(p.unref(o))]),"data-testid":"legend"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.value,({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:g,value:v})=>(p.openBlock(),p.createElementBlock("li",{key:h,onClick:b=>i(f,g)},[p.createElementVNode("div",{class:"legend",style:p.normalizeStyle({background:u,"border-color":d})},null,4),p.createElementVNode("div",{class:p.normalizeClass({"strike-through":!r(f,g)})},[p.createElementVNode("div",Uw,p.toDisplayString(h),1),v&&p.unref(s)?(p.openBlock(),p.createElementBlock("div",Bw,p.toDisplayString(v.formatted),1)):p.createCommentVNode("",!0)],2)],8,Yw))),128))],2)):p.createCommentVNode("",!0)}}),K_="",As=Re(zw,[["__scopeId","data-v-c16b4571"]]);let dr;const Hw=new Uint8Array(16);function $w(){if(!dr&&(dr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dr(Hw)}const Rt=[];for(let n=0;n<256;++n)Rt.push((n+256).toString(16).slice(1));function Vw(n,t=0){return(Rt[n[t+0]]+Rt[n[t+1]]+Rt[n[t+2]]+Rt[n[t+3]]+"-"+Rt[n[t+4]]+Rt[n[t+5]]+"-"+Rt[n[t+6]]+Rt[n[t+7]]+"-"+Rt[n[t+8]]+Rt[n[t+9]]+"-"+Rt[n[t+10]]+Rt[n[t+11]]+Rt[n[t+12]]+Rt[n[t+13]]+Rt[n[t+14]]+Rt[n[t+15]]).toLowerCase()}const ju={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ae(n,t,e){if(ju.randomUUID&&!t&&!n)return ju.randomUUID();n=n||{};const i=n.random||(n.rng||$w)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let r=0;r<16;++r)t[e+r]=i[r];return t}return Vw(i)}const qu=(n,t,e,i)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,i),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},Ls={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;qu(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;qu(e,t,n.scales.y.top,n.scales.y.bottom)}}},Xu=(n,t)=>{const e=n.ctx,i=n.scales.y,r=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):e.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),e.restore()},Gu={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&Xu(n,this.clickedElements)},afterEvent:function(n,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((r=n.options.interaction)==null?void 0:r.mode)||"index",i=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,Xu(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)}},Ku=6,jw=20,qw=400,Xw="100%",Is=30,Gw=40,Kw=0,Qw=10,Zw=10,Jw=1,t_=p.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=({chart:O},A)=>{var G;const N=O.data,X=(G=N.labels)==null?void 0:G.indexOf(A);return N.datasets.reduce((nt,xt,K)=>{if(O.isDatasetVisible(K)){const Y=xt.data[X];return isNaN(Y)?nt:nt+Y}else return nt},0)},r=(O,A,N,X)=>{const G=X==="horizontal";A===null&&(A=e.t("entityNoName"));const nt={type:"label",yValue:Y=>G?A:i(Y,A),xValue:Y=>G?i(Y,A):A},xt={...nt,position:G?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>G?0:-Math.abs(Ay()),content:Y=>fs(i(Y,A),N)},K={...nt,content:Y=>ru(i(Y,A),iu(Y.chart,O)),position:G?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:Y=>G?nu(fs(i(Y,A),N)):0,color:eu};return{[`${A}-value`]:xt,[`${A}-percent`]:K}},a=p.ref(),s=p.ref(),o=p.ref(Ae()),l=Ae(),c=Ae(),u=p.ref([]),d=p.toRef(t,"chartData"),h=p.ref(p.inject("legendPosition",Dt.Right)),f=p.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),g=p.toRef(t,"metricUnit"),v=p.computed(()=>g.value&&e.t(`chartUnits.${g.value}`)),b=p.computed(()=>p.toRef(t,"orientation").value==="horizontal"),m=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:v,offset:0,width:0,height:0,locked:!1,chartType:b.value?Et.HORIZONTAL_BAR:Et.VERTICAL_BAR}),y=p.ref(0),w=()=>{var O;return t.annotations&&((O=d.value.labels)==null?void 0:O.reduce((A,N)=>Object.assign(A,r(d.value,N,g.value,t.orientation)),{}))},x={id:o.value,afterUpdate(O){y.value+=1,u.value=O.options.plugins.legend.labels.generateLabels(O).map(A=>({...A,value:t.legendValues&&t.legendValues[A.text]})).sort((A,N)=>A.value&&N.value&&N.value.raw-A.value.raw)}},_={id:l,afterUpdate(O){O.options.plugins.annotation.annotations=R.value?w():{}}},S=[x,{id:"axisHover",afterEvent(O,A){if(f.value.show=!1,A.event.type==="mousemove"){const N=A.event,X=O.options.indexAxis,G=O.scales,nt=O.scales[X].getLabelForValue(Number(O.scales[X].getValueForPixel(N[X])));if((K=>K==="x"?N.y>G.x.top:N.x<G.y.right)(X))if(m.showTooltip=!1,nt.length>ds){const Y=O.canvas.getContext("2d").measureText(nt).width,Ct=Math.abs(Math.round(N.x-Y*.5)),Qt=Math.round(N.x+Y*.5);f.value.left=X==="x"?`${(Ct>0?Ct:Qt)-f.value.offset}px`:`${N.x-Y*.5-f.value.offset}px`,f.value.top=`${N.y-50}px`,f.value.show=!0,f.value.text=nt}else f.value.show=!1;else f.value.show=!1}}},{id:c,afterUpdate(O){O.options.layout.padding.right=b.value?F.value:0}},Gu,...t.annotations?[_]:[]],k=p.computed(()=>d.value.labels&&d.value.labels.length||0),D=p.computed(()=>{var A,N;let O=Xw;if(a.value&&(O=a.value.width,a.value&&((A=d.value)!=null&&A.labels)&&((N=d.value)==null?void 0:N.labels.length)>Is&&!b.value)){const X=d.value.labels.length;O=`${a.value.offsetWidth+(X-Is)*Gw}px`}return O}),R=p.toRef(t,"annotations"),I=p.computed(()=>{var A;let O=qw;if((A=d.value)!=null&&A.labels&&b.value){const X=d.value.labels.length*jw;O=Math.max(X,O)}return`${O}px`});Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey")),p.onMounted(()=>{t.annotations&&Yt.register(cr)});const V=p.computed(()=>{const O=Mt.useBarChartOptions({tooltipState:m,legendID:o.value,stacked:p.toRef(t,"stacked"),metricAxesTitle:p.toRef(t,"metricAxesTitle"),dimensionAxesTitle:p.toRef(t,"dimensionAxesTitle"),indexAxis:b.value?"y":"x"});return{...O.value,plugins:{...O.value.plugins,annotation:{annotations:w(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*Ku}}}}),H=Mt.useChartJSCommon("bar",a,p.toRef(t,"chartData"),S,V),F=p.computed(()=>{y.value;const O=d.value.labels,A=d.value.datasets,N=O.map((nt,xt)=>A.reduce((K,Y)=>isNaN(Number(Y.data[xt]))?K:K+Number(Y.data[xt]),0)),X=H.value?iu(H.value,d.value):Ly(d.value);return N.map(nt=>nu(fs(nt,g.value)+ru(nt,X))).reduce((nt,xt)=>Math.max(nt,xt),0)+Ku});p.onUnmounted(()=>{Yt.unregister(cr)});const z={[Dt.Right]:"legend-row",[Dt.Bottom]:"column"},j=p.computed(()=>{if(s.value&&H.value){const O=window.devicePixelRatio,A=H.value,N=A.scales.y.width*O+Jw,X=(A.scales.y.height+A.scales.y.top+A.scales.x.height)*O,G=s.value.getContext("2d");return G.scale(O,O),G.canvas.width=N,G.canvas.height=X,G.canvas.style.width=`${N/O}px`,G.canvas.style.height=`${X/O}px`,{scale:O,width:N*O,height:X*O,targetCtx:G}}return null}),kt=O=>{if(j.value&&H.value){const A=j.value.scale,N=j.value.targetCtx,X=j.value.width,G=j.value.height,nt=H.value,xt=nt.canvas,K=O.target;N.fillStyle="white",K.scrollLeft>=Kw&&K.scrollLeft<=Qw?(N.globalCompositeOperation="source-over",N.clearRect(0,0,X,G),N.drawImage(xt,0,0,X,G,0,0,X,G),N.globalCompositeOperation="destination-over",N.fillRect(0,0,X,G)):(N.globalCompositeOperation="source-over",N.fillRect(0,(nt.scales.y.height+nt.scales.y.top+Zw)*A,X,nt.scales.x.height*A)),m.offset=K.scrollLeft,f.value.offset=K.scrollLeft}},ft=({width:O,height:A})=>{m.width=O,m.height=A};p.watch(()=>t.orientation,()=>{var O;if(s.value&&j.value){const A=j.value.width,N=j.value.height;((O=s.value)==null?void 0:O.getContext("2d")).clearRect(0,0,A,N)}}),p.watch(R,O=>{H.value&&(O?(H.value.options.plugins.annotation.annotations=w(d.value),Yt.register(cr),H.value.update()):(H.value.options.plugins.annotation.annotations={},Yt.unregister(cr),H.value.update()))});const zt=()=>{var O;m.showTooltip&&(m.locked=!m.locked,H.value&&(Ls.clickedSegment=m.locked?(O=H.value.tooltip)==null?void 0:O.dataPoints[0]:void 0))};return(O,A)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",z[h.value]])},[p.createElementVNode("canvas",{ref_key:"axis",ref:s,class:"axis"},null,512),p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({"overflow-x":k.value>Is?"auto":"hidden"}),"on:scroll":kt,onClick:A[0]||(A[0]=N=>zt())},[p.createElementVNode("div",{class:"chart-body",style:p.normalizeStyle({width:D.value,height:I.value})},[p.createElementVNode("canvas",{ref_key:"canvas",ref:a},null,512)],4)],36),f.value.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:"axis-tooltip",style:p.normalizeStyle({top:f.value.top,left:f.value.left})},p.toDisplayString(f.value.text),5)):p.createCommentVNode("",!0),p.createVNode(Rs,{left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ft},null,8,["left","locked","series","show-tooltip","tooltip-title","top"]),p.createVNode(As,{id:o.value,"chart-instance":p.unref(H),items:u.value},null,8,["id","chart-instance","items"])],2))}}),Z_="",e_=Re(t_,[["__scopeId","data-v-cbec002d"]]);/*!
25
25
  * chartjs-adapter-date-fns v3.0.0
26
26
  * https://www.chartjs.org
27
27
  * (c) 2022 chartjs-adapter-date-fns Contributors
28
28
  * Released under the MIT license
29
- */const n_={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};jo._date.override({_id:"date-fns",formats:function(){return n_},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=W(n):e==="string"&&(typeof t=="string"?n=Vb(n,t,new Date,this.options):n=Rc(n,this.options)),ua(n)?n.getTime():null},format:function(n,t){return j0(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Vn(n,t);case"second":return ym(n,t);case"minute":return bm(n,t);case"hour":return hm(n,t);case"day":return ac(n,t);case"week":return xm(n,t);case"month":return la(n,t);case"quarter":return vm(n,t);case"year":return wm(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qi(n,t);case"second":return Rm(n,t);case"minute":return Pm(n,t);case"hour":return Cm(n,t);case"day":return lc(n,t);case"week":return Am(n,t);case"month":return hc(n,t);case"quarter":return Em(n,t);case"year":return Lm(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return Xb(n);case"minute":return Im(n);case"hour":return qb(n);case"day":return ca(n);case"week":return sc(n);case"isoWeek":return sc(n,{weekStartsOn:+e});case"month":return Fm(n);case"quarter":return Nm(n);case"year":return Ym(n);default:return n}},endOf:function(n,t){switch(t){case"second":return $m(n);case"minute":return zm(n);case"hour":return Um(n);case"day":return uc(n);case"week":return Bm(n);case"month":return dc(n);case"quarter":return Hm(n);case"year":return Wm(n);default:return n}}});const Ku={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},i_={type:{type:String,required:!0},...Ku},r_=p.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pn(n){return p.isProxy(n)?p.toRaw(n):n}function a_(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return p.isProxy(t)?new Proxy(n,{}):n}function s_(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Qu(n,t){n.labels=t}function Zu(n,t,e){const i=[];n.datasets=t.map(r=>{const a=n.datasets.find(s=>s[e]===r[e]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function o_(n,t){const e={labels:[],datasets:[]};return Qu(e,n.labels),Zu(e,n.datasets,t),e}const l_=p.defineComponent({props:i_,setup(n,t){let{expose:e}=t;const i=p.ref(null),r=p.shallowRef(null);e({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=n,f=o_(c,h),g=a_(f,c);r.value=new Yt(i.value,{type:l,data:g,options:{...u},plugins:d})},s=()=>{const l=p.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(n.updateMode)};return p.onMounted(a),p.onBeforeUnmount(s),p.watch([()=>n.options,()=>n.data],(l,c)=>{let[u,d]=l,[h,f]=c;const g=p.toRaw(r.value);if(!g)return;let v=!1;if(u){const b=pn(u),m=pn(h);b&&b!==m&&(s_(g,b),v=!0)}if(d){const b=pn(d.labels),m=pn(f.labels),y=pn(d.datasets),w=pn(f.datasets);b!==m&&(Qu(g.config.data,b),v=!0),y&&y!==w&&(Zu(g.config.data,y,n.datasetIdKey),v=!0)}v&&o(g)},{deep:!0}),()=>p.h("canvas",{ref:i})}});function Ns(n,t){return Yt.register(t),p.defineComponent({props:Ku,setup(e,i){let{expose:r}=i;const a=p.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>p.h(l_,r_({ref:s},{type:n,...e}))}})}const c_=Ns("bar",On),Ju=Ns("doughnut",Me),u_=Ns("line",En),d_=p.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Dt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(Ae()),r=p.ref(Ae()),a=p.ref([]),s=p.toRef(t,"metricUnit"),o=p.computed(()=>s.value&&e.t(`chartUnits.${s.value}`)),l=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:o,offset:0,width:0,height:0,chartType:Et.DOUGHNUT}),c={id:i.value,afterUpdate(b){a.value=b.options.plugins.legend.labels.generateLabels(b).map(m=>({...m,value:t.legendValues&&t.legendValues[m.text],hidden:!1}))}},u=p.computed(()=>[t.chartData.datasets.reduce((m,y)=>(m.labels.push(y.label),m.backgroundColor.push(y.backgroundColor),m.borderColor.push(ei(y.backgroundColor,50)),m.data.push(y.data.reduce((w,x)=>w+x,0)),m),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),d=p.computed(()=>({...t.chartData,datasets:u.value}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const{options:h}=Mt.useDoughnutChartOptions({tooltipState:l,legendID:i.value}),f=p.ref(),g=b=>({[Dt.Right]:"legend-row",[Dt.Bottom]:"column",[Dt.Hidden]:"hidden"})[b],v=({width:b,height:m})=>{l.width=b,l.height=m};return(b,m)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width})},[p.createVNode(p.unref(Ju),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:d.value,options:p.unref(h),plugins:[c]},null,8,["chart-id","data","options","plugins"]),p.createVNode(Rs,{left:l.left,series:l.tooltipSeries,"show-tooltip":l.showTooltip,"tooltip-title":n.tooltipTitle,top:l.top,unit:n.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),p.createVNode(As,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),J_="",h_=Re(d_,[["__scopeId","data-v-ed0242ad"]]),f_=p.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:Et.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(),r=p.ref(Ae()),a=p.ref(Ae()),s=p.ref([]),o=p.toRef(t,"metricUnit"),l=p.ref(),c=p.ref(p.inject("legendPosition",Dt.Right)),u=p.computed(()=>o.value&&e.t(`chartUnits.${o.value}`)),d=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type,locked:!1}),h={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(_=>({..._,value:t.legendValues&&t.legendValues[_.text]})).sort((_,M)=>_.value&&M.value&&M.value.raw-_.value.raw)}},f=p.computed(()=>[h,Xu,...t.type===Et.TIMESERIES_LINE?[Ls]:[]]),{options:g}=Mt.useLinechartOptions({tooltipState:d,timeRangeMs:p.toRef(t,"timeRangeMs"),timeRangeSec:p.toRef(t,"timeRangeSec"),granularity:p.toRef(t,"granularity"),legendID:r.value,stacked:p.toRef(t,"stacked"),metricAxesTitle:p.toRef(t,"metricAxesTitle"),dimensionAxesTitle:p.toRef(t,"dimensionAxesTitle")}),v=p.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,_)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[_%t.datasetColors.length],x.borderColor=ei(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=ei(x.backgroundColor,50)),x.fill=p.toRef(t,"fill").value,x))}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const b=x=>Oy(x,{short:[$.DAILY,$.WEEKLY].includes(t.granularity)}),m=x=>({[Dt.Right]:"legend-row",[Dt.Bottom]:"column",[Dt.Hidden]:"hidden"})[x],y=({width:x,height:_})=>{d.width=x,d.height=_},w=()=>{var x;d.locked=!d.locked,i.value&&(Ls.clickedSegment=d.locked?(x=i.value.chart.tooltip)==null?void 0:x.dataPoints[0]:void 0)};return(x,_)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",m(c.value)]),"data-testid":"line-chart-parent"},[p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width}),onClick:_[0]||(_[0]=M=>w())},[n.type===p.unref(Et).TIMESERIES_LINE?(p.openBlock(),p.createBlock(p.unref(u_),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:v.value,"data-testid":"time-series-line-chart",options:p.unref(g),plugins:f.value},null,8,["chart-id","data","options","plugins"])):n.type===p.unref(Et).TIMESERIES_BAR?(p.openBlock(),p.createBlock(p.unref(c_),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:v.value,"data-testid":"time-series-bar-chart",options:p.unref(g),plugins:f.value},null,8,["chart-id","data","options","plugins"])):p.createCommentVNode("",!0)],4),p.createVNode(Rs,{ref_key:"tooltipElement",ref:l,context:b(d.tooltipContext),"data-testid":"tooltip",left:d.left,locked:d.locked,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":n.tooltipTitle,top:d.top,unit:n.metricUnit,onDimensions:y,onLeft:_[1]||(_[1]=M=>d.left=M),onTop:_[2]||(_[2]=M=>d.top=M)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),p.createVNode(As,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),t1="",g_=Re(f_,[["__scopeId","data-v-f1086e90"]]),p_="#995c00",m_={class:"analytics-chart-shell"},b_={class:"chart-header"},v_={key:0,class:"chart-title"},y_={id:"result-truncated"},x_={class:"limit-icon-wrapper"},w_={key:1,class:"analytics-chart-parent"},__=p.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:Dt.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.toRef(t,"chartData"),r=p.toRef(t,"chartOptions"),a=p.toRef(t,"legendPosition"),s=p.computed(()=>b.value?Mt.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value:Mt.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value),o=p.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"start"in i.value.meta?i.value.meta.end-i.value.meta.start:void 0:0}),l=p.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:void 0:0}),c=p.computed(()=>{var D;return(D=i.value.meta)!=null&&D.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),u=p.computed(()=>t.showLegendValues&&t.legendPosition!==Dt.Bottom),{legendValues:d}=Mt.useChartLegendValues(s,t.chartOptions.type,c),h=p.computed(()=>{var D,R,I;return((I=(R=(D=i.value)==null?void 0:D.meta)==null?void 0:R.limit)==null?void 0:I.toString())||null}),f=p.computed(()=>{var D,R;return((R=(D=i.value)==null?void 0:D.meta)==null?void 0:R.truncated)||!1}),g=e.t("limitedResultsShown",{maxReturned:h.value}),v=p.computed(()=>[Et.VERTICAL_BAR.toString(),Et.HORIZONTAL_BAR.toString()].includes(r.value.type)),b=p.computed(()=>[Et.TIMESERIES_BAR,Et.TIMESERIES_LINE].some(D=>D===r.value.type)),m=p.computed(()=>r.value.type===Et.DOUGHNUT),y=p.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),w=p.computed(()=>{var I,V,H;if(!((I=i.value)!=null&&I.meta.metricNames)||!((V=i.value)!=null&&V.meta.metricUnits))return;const D=i.value.meta.metricNames[0],R=i.value.meta.metricUnits[D];return((H=r.value)==null?void 0:H.metricAxesTitle)||e.te(`metricAxisTitles.${D}`)&&e.te(`chartUnits.${R}`)&&e.t(`metricAxisTitles.${D}`,{unit:e.t(`chartUnits.${R}`)})||void 0}),x=p.computed(()=>{const D=b.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||e.te(`chartLabels.${D}`)&&e.t(`chartLabels.${D}`)||void 0}),_=p.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const D=ii(i.value.meta.granularity.duration);return e.t(`granularityAxisTitles.${D}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const D=ii(Number(i.value.meta.granularity));return e.t(`granularityAxisTitles.${D}`)}return e.t("chartlabels.Time")}),M=p.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),T=p.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),S=p.computed(()=>b.value?mv(s.value):i.value&&i.value.meta&&i.value.records.length),k=p.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?ii(i.value.meta.granularity)||$.HOURLY:ii(i.value.meta.granularity.duration)||$.HOURLY:ii(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||$.HOURLY);return p.provide("showLegendValues",u),p.provide("legendPosition",a),(D,R)=>{const I=p.resolveComponent("KIcon"),V=p.resolveComponent("KTooltip"),H=p.resolveComponent("KEmptyState");return p.openBlock(),p.createElementBlock("div",m_,[p.createElementVNode("div",b_,[n.chartTitle?(p.openBlock(),p.createElementBlock("div",v_,p.toDisplayString(n.chartTitle),1)):p.createCommentVNode("",!0),p.createElementVNode("div",y_,[S.value&&f.value&&h.value?(p.openBlock(),p.createBlock(V,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(p.unref(g)),1)]),default:p.withCtx(()=>[p.createElementVNode("div",x_,[p.createVNode(I,{class:"warning-icon",color:"currentColor","hide-title":"",icon:"warning","secondary-color":p.unref(p_),size:"18"},null,8,["secondary-color"])])]),_:1})):p.createCommentVNode("",!0)])]),S.value?(p.openBlock(),p.createElementBlock("div",w_,[b.value?(p.openBlock(),p.createBlock(g_,{key:0,"chart-data":s.value,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":_.value,fill:n.chartOptions.fill,granularity:k.value,height:n.height,"legend-values":p.unref(d),"metric-axes-title":w.value,"metric-unit":c.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":l.value,"time-range-sec":o.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type,width:n.width},null,8,["chart-data","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type","width"])):v.value?(p.openBlock(),p.createBlock(e_,{key:1,annotations:n.showAnnotations,"chart-data":s.value,"data-testid":"bar-chart-container","dimension-axes-title":x.value,"legend-values":p.unref(d),"metric-axes-title":w.value,"metric-unit":c.value,orientation:y.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):m.value?(p.openBlock(),p.createBlock(h_,{key:2,"chart-data":s.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":p.unref(d),"metric-unit":c.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle,width:n.width},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title","width"])):p.createCommentVNode("",!0)])):(p.openBlock(),p.createBlock(H,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(M.value),1)]),message:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(T.value),1)]),_:1}))])}}}),e1="",M_=Re(__,[["__scopeId","data-v-bf8d9004"]]),T_={class:"chart-parent","data-testid":"doughnut-chart-parent"},S_={class:"chart-totals-flex"},D_={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},k_=p.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:on.Hidden},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(Ae()),r=p.toRef(t,"metricDisplay"),a=p.computed(()=>[t.chartData.datasets.reduce((v,b)=>(v.labels.push(b.label),v.borderColor.push(b.backgroundColor),v.backgroundColor.push(b.backgroundColor),v.data.push(b.data.reduce((m,y)=>m+y,0)),v),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),s=p.computed(()=>({...t.chartData,datasets:a.value}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const o={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},l=p.ref(),c=p.computed(()=>{var g;return ni((g=a==null?void 0:a.value[0])==null?void 0:g.data[0],{capital:!0})}),u=p.computed(()=>{var g,v;return ni(((g=a==null?void 0:a.value[0])==null?void 0:g.data[0])+((v=a==null?void 0:a.value[0])==null?void 0:v.data[1]),{capital:!0})}),d=p.computed(()=>{var g;return`color: ${(g=a==null?void 0:a.value[0])==null?void 0:g.backgroundColor[0]}`}),h=p.computed(()=>[on.Full,on.SingleMetric].includes(r.value)),f=p.computed(()=>r.value===on.Full);return(g,v)=>(p.openBlock(),p.createElementBlock("div",T_,[p.createElementVNode("div",S_,[h.value?(p.openBlock(),p.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:p.normalizeStyle(d.value)},p.toDisplayString(c.value),5)):p.createCommentVNode("",!0),f.value?(p.openBlock(),p.createElementBlock("div",D_,p.toDisplayString(p.unref(e).t("total"))+": "+p.toDisplayString(u.value),1)):p.createCommentVNode("",!0)]),p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width})},[p.createVNode(p.unref(Ju),{ref_key:"chartInstance",ref:l,"chart-id":i.value,data:s.value,options:o},null,8,["chart-id","data","options"])],4)]))}}),n1="",C_=Re(k_,[["__scopeId","data-v-11178902"]]),P_={class:"simple-chart-shell"},O_={key:1,class:"analytics-chart-parent"},E_=p.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.toRef(t,"chartData"),r=p.toRef(t,"chartOptions"),a=p.computed(()=>Mt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value),s=p.computed(()=>{var u;return(u=i.value.meta)!=null&&u.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),o=p.computed(()=>r.value.type===Zi.GAUGE),l=p.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),c=p.computed(()=>i.value&&i.value.meta&&i.value.records.length);return(u,d)=>{const h=p.resolveComponent("KEmptyState");return p.openBlock(),p.createElementBlock("div",P_,[c.value?(p.openBlock(),p.createElementBlock("div",O_,[o.value?(p.openBlock(),p.createBlock(C_,{key:0,"chart-data":a.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","synthetics-data-key","width"])):p.createCommentVNode("",!0)])):(p.openBlock(),p.createBlock(h,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(l.value),1)]),_:1}))])}}}),i1="",R_=Re(E_,[["__scopeId","data-v-ff742efb"]]),Fs="#e0e4ea",A_={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ci=(n,t)=>{let e=1;const i=A_[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},td=new Map([[100,ci("100",[100,101,102,103])],[200,ci("200",[200,201,202,203,204,205,206,207,208,226])],[300,ci("300",[300,301,302,303,304,305,307,308])],[400,ci("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ci("500",[500,501,502,503,504,505,506,507,508,510,511])]]),ed=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=td.get(e);return i===void 0?Fs:i.get(t)??i.get(-1)??Fs},L_=n=>{const t=ed(n);return{solid:t,light:t}};lt.AnalyticsChart=M_,lt.ChartLegendPosition=Dt,lt.ChartMetricDisplay=on,lt.ChartTypes=Et,lt.ChartTypesSimple=Zi,lt.SimpleChart=R_,lt.accessibleGrey=eu,lt.codesInSpec=td,lt.darkenColor=ei,lt.datavisPalette=Gt,lt.lightGrey=Fs,lt.lookupDatavisColor=ti,lt.lookupStatusCodeCategoryColor=L_,lt.lookupStatusCodeColor=ed,Object.defineProperty(lt,Symbol.toStringTag,{value:"Module"})});
29
+ */const n_={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};jo._date.override({_id:"date-fns",formats:function(){return n_},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=W(n):e==="string"&&(typeof t=="string"?n=jb(n,t,new Date,this.options):n=Rc(n,this.options)),ua(n)?n.getTime():null},format:function(n,t){return q0(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Vn(n,t);case"second":return xm(n,t);case"minute":return vm(n,t);case"hour":return fm(n,t);case"day":return ac(n,t);case"week":return wm(n,t);case"month":return la(n,t);case"quarter":return ym(n,t);case"year":return _m(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qi(n,t);case"second":return Am(n,t);case"minute":return Om(n,t);case"hour":return Pm(n,t);case"day":return lc(n,t);case"week":return Lm(n,t);case"month":return hc(n,t);case"quarter":return Rm(n,t);case"year":return Im(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return Gb(n);case"minute":return Nm(n);case"hour":return Xb(n);case"day":return ca(n);case"week":return sc(n);case"isoWeek":return sc(n,{weekStartsOn:+e});case"month":return Wm(n);case"quarter":return Fm(n);case"year":return Um(n);default:return n}},endOf:function(n,t){switch(t){case"second":return Vm(n);case"minute":return Hm(n);case"hour":return Bm(n);case"day":return uc(n);case"week":return zm(n);case"month":return dc(n);case"quarter":return $m(n);case"year":return Ym(n);default:return n}}});const Qu={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},i_={type:{type:String,required:!0},...Qu},r_=p.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pn(n){return p.isProxy(n)?p.toRaw(n):n}function a_(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return p.isProxy(t)?new Proxy(n,{}):n}function s_(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Zu(n,t){n.labels=t}function Ju(n,t,e){const i=[];n.datasets=t.map(r=>{const a=n.datasets.find(s=>s[e]===r[e]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function o_(n,t){const e={labels:[],datasets:[]};return Zu(e,n.labels),Ju(e,n.datasets,t),e}const l_=p.defineComponent({props:i_,setup(n,t){let{expose:e}=t;const i=p.ref(null),r=p.shallowRef(null);e({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=n,f=o_(c,h),g=a_(f,c);r.value=new Yt(i.value,{type:l,data:g,options:{...u},plugins:d})},s=()=>{const l=p.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(n.updateMode)};return p.onMounted(a),p.onBeforeUnmount(s),p.watch([()=>n.options,()=>n.data],(l,c)=>{let[u,d]=l,[h,f]=c;const g=p.toRaw(r.value);if(!g)return;let v=!1;if(u){const b=pn(u),m=pn(h);b&&b!==m&&(s_(g,b),v=!0)}if(d){const b=pn(d.labels),m=pn(f.labels),y=pn(d.datasets),w=pn(f.datasets);b!==m&&(Zu(g.config.data,b),v=!0),y&&y!==w&&(Ju(g.config.data,y,n.datasetIdKey),v=!0)}v&&o(g)},{deep:!0}),()=>p.h("canvas",{ref:i})}});function Ns(n,t){return Yt.register(t),p.defineComponent({props:Qu,setup(e,i){let{expose:r}=i;const a=p.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>p.h(l_,r_({ref:s},{type:n,...e}))}})}const c_=Ns("bar",On),td=Ns("doughnut",Me),u_=Ns("line",En),d_=p.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Dt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(Ae()),r=p.ref(Ae()),a=p.ref([]),s=p.toRef(t,"metricUnit"),o=p.computed(()=>s.value&&e.t(`chartUnits.${s.value}`)),l=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:o,offset:0,width:0,height:0,chartType:Et.DOUGHNUT}),c={id:i.value,afterUpdate(b){a.value=b.options.plugins.legend.labels.generateLabels(b).map(m=>({...m,value:t.legendValues&&t.legendValues[m.text],hidden:!1}))}},u=p.computed(()=>[t.chartData.datasets.reduce((m,y)=>(m.labels.push(y.label),m.backgroundColor.push(y.backgroundColor),m.borderColor.push(ei(y.backgroundColor,50)),m.data.push(y.data.reduce((w,x)=>w+x,0)),m),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),d=p.computed(()=>({...t.chartData,datasets:u.value}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const{options:h}=Mt.useDoughnutChartOptions({tooltipState:l,legendID:i.value}),f=p.ref(),g=b=>({[Dt.Right]:"legend-row",[Dt.Bottom]:"column",[Dt.Hidden]:"hidden"})[b],v=({width:b,height:m})=>{l.width=b,l.height=m};return(b,m)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width})},[p.createVNode(p.unref(td),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:d.value,options:p.unref(h),plugins:[c]},null,8,["chart-id","data","options","plugins"]),p.createVNode(Rs,{left:l.left,series:l.tooltipSeries,"show-tooltip":l.showTooltip,"tooltip-title":n.tooltipTitle,top:l.top,unit:n.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),p.createVNode(As,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),J_="",h_=Re(d_,[["__scopeId","data-v-ed0242ad"]]),f_=p.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:Et.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(),r=p.ref(Ae()),a=p.ref(Ae()),s=p.ref([]),o=p.toRef(t,"metricUnit"),l=p.ref(),c=p.ref(p.inject("legendPosition",Dt.Right)),u=p.computed(()=>o.value&&e.t(`chartUnits.${o.value}`)),d=p.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type,locked:!1}),h={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(_=>({..._,value:t.legendValues&&t.legendValues[_.text]})).sort((_,M)=>_.value&&M.value&&M.value.raw-_.value.raw)}},f=p.computed(()=>[h,Gu,...t.type===Et.TIMESERIES_LINE?[Ls]:[]]),{options:g}=Mt.useLinechartOptions({tooltipState:d,timeRangeMs:p.toRef(t,"timeRangeMs"),timeRangeSec:p.toRef(t,"timeRangeSec"),granularity:p.toRef(t,"granularity"),legendID:r.value,stacked:p.toRef(t,"stacked"),metricAxesTitle:p.toRef(t,"metricAxesTitle"),dimensionAxesTitle:p.toRef(t,"dimensionAxesTitle")}),v=p.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,_)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[_%t.datasetColors.length],x.borderColor=ei(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=ei(x.backgroundColor,50)),x.fill=p.toRef(t,"fill").value,x))}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const b=x=>Ey(x,{short:[$.DAILY,$.WEEKLY].includes(t.granularity)}),m=x=>({[Dt.Right]:"legend-row",[Dt.Bottom]:"column",[Dt.Hidden]:"hidden"})[x],y=({width:x,height:_})=>{d.width=x,d.height=_},w=()=>{var x;d.locked=!d.locked,i.value&&(Ls.clickedSegment=d.locked?(x=i.value.chart.tooltip)==null?void 0:x.dataPoints[0]:void 0)};return(x,_)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["chart-parent",m(c.value)]),"data-testid":"line-chart-parent"},[p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width}),onClick:_[0]||(_[0]=M=>w())},[n.type===p.unref(Et).TIMESERIES_LINE?(p.openBlock(),p.createBlock(p.unref(u_),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:v.value,"data-testid":"time-series-line-chart",options:p.unref(g),plugins:f.value},null,8,["chart-id","data","options","plugins"])):n.type===p.unref(Et).TIMESERIES_BAR?(p.openBlock(),p.createBlock(p.unref(c_),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:v.value,"data-testid":"time-series-bar-chart",options:p.unref(g),plugins:f.value},null,8,["chart-id","data","options","plugins"])):p.createCommentVNode("",!0)],4),p.createVNode(Rs,{ref_key:"tooltipElement",ref:l,context:b(d.tooltipContext),"data-testid":"tooltip",left:d.left,locked:d.locked,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":n.tooltipTitle,top:d.top,unit:n.metricUnit,onDimensions:y,onLeft:_[1]||(_[1]=M=>d.left=M),onTop:_[2]||(_[2]=M=>d.top=M)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),p.createVNode(As,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),t1="",g_=Re(f_,[["__scopeId","data-v-f1086e90"]]),p_="#995c00",m_={class:"analytics-chart-shell"},b_={class:"chart-header"},v_={key:0,class:"chart-title"},y_={id:"result-truncated"},x_={class:"limit-icon-wrapper"},w_={key:1,class:"analytics-chart-parent"},__=p.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:Dt.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.toRef(t,"chartData"),r=p.toRef(t,"chartOptions"),a=p.toRef(t,"legendPosition"),s=p.computed(()=>b.value?Mt.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value:Mt.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value),o=p.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"start"in i.value.meta?i.value.meta.end-i.value.meta.start:void 0:0}),l=p.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:void 0:0}),c=p.computed(()=>{var D;return(D=i.value.meta)!=null&&D.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),u=p.computed(()=>t.showLegendValues&&t.legendPosition!==Dt.Bottom),{legendValues:d}=Mt.useChartLegendValues(s,t.chartOptions.type,c),h=p.computed(()=>{var D,R,I;return((I=(R=(D=i.value)==null?void 0:D.meta)==null?void 0:R.limit)==null?void 0:I.toString())||null}),f=p.computed(()=>{var D,R;return((R=(D=i.value)==null?void 0:D.meta)==null?void 0:R.truncated)||!1}),g=e.t("limitedResultsShown",{maxReturned:h.value}),v=p.computed(()=>[Et.VERTICAL_BAR.toString(),Et.HORIZONTAL_BAR.toString()].includes(r.value.type)),b=p.computed(()=>[Et.TIMESERIES_BAR,Et.TIMESERIES_LINE].some(D=>D===r.value.type)),m=p.computed(()=>r.value.type===Et.DOUGHNUT),y=p.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),w=p.computed(()=>{var I,V,H;if(!((I=i.value)!=null&&I.meta.metricNames)||!((V=i.value)!=null&&V.meta.metricUnits))return;const D=i.value.meta.metricNames[0],R=i.value.meta.metricUnits[D];return((H=r.value)==null?void 0:H.metricAxesTitle)||e.te(`metricAxisTitles.${D}`)&&e.te(`chartUnits.${R}`)&&e.t(`metricAxisTitles.${D}`,{unit:e.t(`chartUnits.${R}`)})||void 0}),x=p.computed(()=>{const D=b.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||e.te(`chartLabels.${D}`)&&e.t(`chartLabels.${D}`)||void 0}),_=p.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const D=ii(i.value.meta.granularity.duration);return e.t(`granularityAxisTitles.${D}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const D=ii(Number(i.value.meta.granularity));return e.t(`granularityAxisTitles.${D}`)}return e.t("chartlabels.Time")}),M=p.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),T=p.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),S=p.computed(()=>b.value?bv(s.value):i.value&&i.value.meta&&i.value.records.length),k=p.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?ii(i.value.meta.granularity)||$.HOURLY:ii(i.value.meta.granularity.duration)||$.HOURLY:ii(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||$.HOURLY);return p.provide("showLegendValues",u),p.provide("legendPosition",a),(D,R)=>{const I=p.resolveComponent("KIcon"),V=p.resolveComponent("KTooltip"),H=p.resolveComponent("KEmptyState");return p.openBlock(),p.createElementBlock("div",m_,[p.createElementVNode("div",b_,[n.chartTitle?(p.openBlock(),p.createElementBlock("div",v_,p.toDisplayString(n.chartTitle),1)):p.createCommentVNode("",!0),p.createElementVNode("div",y_,[S.value&&f.value&&h.value?(p.openBlock(),p.createBlock(V,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(p.unref(g)),1)]),default:p.withCtx(()=>[p.createElementVNode("div",x_,[p.createVNode(I,{class:"warning-icon",color:"currentColor","hide-title":"",icon:"warning","secondary-color":p.unref(p_),size:"18"},null,8,["secondary-color"])])]),_:1})):p.createCommentVNode("",!0)])]),S.value?(p.openBlock(),p.createElementBlock("div",w_,[b.value?(p.openBlock(),p.createBlock(g_,{key:0,"chart-data":s.value,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":_.value,fill:n.chartOptions.fill,granularity:k.value,height:n.height,"legend-values":p.unref(d),"metric-axes-title":w.value,"metric-unit":c.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":l.value,"time-range-sec":o.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type,width:n.width},null,8,["chart-data","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type","width"])):v.value?(p.openBlock(),p.createBlock(e_,{key:1,annotations:n.showAnnotations,"chart-data":s.value,"data-testid":"bar-chart-container","dimension-axes-title":x.value,"legend-values":p.unref(d),"metric-axes-title":w.value,"metric-unit":c.value,orientation:y.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):m.value?(p.openBlock(),p.createBlock(h_,{key:2,"chart-data":s.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":p.unref(d),"metric-unit":c.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle,width:n.width},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title","width"])):p.createCommentVNode("",!0)])):(p.openBlock(),p.createBlock(H,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(M.value),1)]),message:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(T.value),1)]),_:1}))])}}}),e1="",M_=Re(__,[["__scopeId","data-v-bf8d9004"]]),T_={class:"chart-parent","data-testid":"doughnut-chart-parent"},S_={class:"chart-totals-flex"},D_={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},k_=p.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:on.Hidden},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Gt},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.ref(Ae()),r=p.toRef(t,"metricDisplay"),a=p.computed(()=>[t.chartData.datasets.reduce((v,b)=>(v.labels.push(b.label),v.borderColor.push(b.backgroundColor),v.backgroundColor.push(b.backgroundColor),v.data.push(b.data.reduce((m,y)=>m+y,0)),v),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),s=p.computed(()=>({...t.chartData,datasets:a.value}));Mt.useReportChartDataForSynthetics(p.toRef(t,"chartData"),p.toRef(t,"syntheticsDataKey"));const o={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},l=p.ref(),c=p.computed(()=>{var g;return ni((g=a==null?void 0:a.value[0])==null?void 0:g.data[0],{capital:!0})}),u=p.computed(()=>{var g,v;return ni(((g=a==null?void 0:a.value[0])==null?void 0:g.data[0])+((v=a==null?void 0:a.value[0])==null?void 0:v.data[1]),{capital:!0})}),d=p.computed(()=>{var g;return`color: ${(g=a==null?void 0:a.value[0])==null?void 0:g.backgroundColor[0]}`}),h=p.computed(()=>[on.Full,on.SingleMetric].includes(r.value)),f=p.computed(()=>r.value===on.Full);return(g,v)=>(p.openBlock(),p.createElementBlock("div",T_,[p.createElementVNode("div",S_,[h.value?(p.openBlock(),p.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:p.normalizeStyle(d.value)},p.toDisplayString(c.value),5)):p.createCommentVNode("",!0),f.value?(p.openBlock(),p.createElementBlock("div",D_,p.toDisplayString(p.unref(e).t("total"))+": "+p.toDisplayString(u.value),1)):p.createCommentVNode("",!0)]),p.createElementVNode("div",{class:"chart-container",style:p.normalizeStyle({height:n.height,width:n.width})},[p.createVNode(p.unref(td),{ref_key:"chartInstance",ref:l,"chart-id":i.value,data:s.value,options:o},null,8,["chart-id","data","options"])],4)]))}}),n1="",C_=Re(k_,[["__scopeId","data-v-11178902"]]),P_={class:"simple-chart-shell"},O_={key:1,class:"analytics-chart-parent"},E_=p.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Mt.useI18n(),i=p.toRef(t,"chartData"),r=p.toRef(t,"chartOptions"),a=p.computed(()=>Mt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Gt},i).value),s=p.computed(()=>{var u;return(u=i.value.meta)!=null&&u.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),o=p.computed(()=>r.value.type===Zi.GAUGE),l=p.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),c=p.computed(()=>i.value&&i.value.meta&&i.value.records.length);return(u,d)=>{const h=p.resolveComponent("KEmptyState");return p.openBlock(),p.createElementBlock("div",P_,[c.value?(p.openBlock(),p.createElementBlock("div",O_,[o.value?(p.openBlock(),p.createBlock(C_,{key:0,"chart-data":a.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","synthetics-data-key","width"])):p.createCommentVNode("",!0)])):(p.openBlock(),p.createBlock(h,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(l.value),1)]),_:1}))])}}}),i1="",R_=Re(E_,[["__scopeId","data-v-ff742efb"]]),Fs="#e0e4ea",A_={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ci=(n,t)=>{let e=1;const i=A_[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},ed=new Map([[100,ci("100",[100,101,102,103])],[200,ci("200",[200,201,202,203,204,205,206,207,208,226])],[300,ci("300",[300,301,302,303,304,305,307,308])],[400,ci("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ci("500",[500,501,502,503,504,505,506,507,508,510,511])]]),nd=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=ed.get(e);return i===void 0?Fs:i.get(t)??i.get(-1)??Fs},L_=n=>{const t=nd(n);return{solid:t,light:t}};lt.AnalyticsChart=M_,lt.ChartLegendPosition=Dt,lt.ChartMetricDisplay=on,lt.ChartTypes=Et,lt.ChartTypesSimple=Zi,lt.SimpleChart=R_,lt.accessibleGrey=eu,lt.codesInSpec=ed,lt.darkenColor=ei,lt.datavisPalette=Gt,lt.lightGrey=Fs,lt.lookupDatavisColor=ti,lt.lookupStatusCodeCategoryColor=L_,lt.lookupStatusCodeColor=nd,Object.defineProperty(lt,Symbol.toStringTag,{value:"Module"})});