@kong-ui-public/analytics-chart 2.3.4 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vitals-chart.es.js +1012 -1012
- package/dist/vitals-chart.umd.js +15 -15
- package/package.json +4 -4
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
(function(st,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(st=typeof globalThis<"u"?globalThis:st||self,h(st["kong-ui-publicvitals-chart"]={},st.Vue,st["kong-ui-public-i18n"]))})(this,function(st,h,on){"use strict";var
|
|
1
|
+
(function(st,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(st=typeof globalThis<"u"?globalThis:st||self,h(st["kong-ui-publicvitals-chart"]={},st.Vue,st["kong-ui-public-i18n"]))})(this,function(st,h,on){"use strict";var Dk=Object.defineProperty;var Ck=(st,h,on)=>h in st?Dk(st,h,{enumerable:!0,configurable:!0,writable:!0,value:on}):st[h]=on;var H=(st,h,on)=>(Ck(st,typeof h!="symbol"?h+"":h,on),on);var Cn,op;const wp={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",debug:"debug",total:"Total",chartUnits:{ms:"ms",bytes:"Byte{plural}",count:"request{plural}","count/minute":"rpm",requests:"request{plural}"},csvExport:{noDataRange:"No data in selected range",noDataRetry:"Please adjust the time period and try again",timeRangeSelected:"selected",defaultFilename:"Chart Export",exportPreview:"Export Preview",exportButton:"Export",exportTimeRange:"Time range",exportDescription:"Exports a CSV of the data represented in the chart.",previewRows:"Previewing {rowsMax} of {rowsTotal} row{plural}",downloadButton:"Export",cancelButton:"Cancel",UtcOffset:"UTC Offset",Timestamp:"Timestamp"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{request_count:"Request Count",requests_per_minute:"Requests per Minute",response_latency_p99:"Response Latency (p99)",response_latency_p95:"Response Latency (p95)",response_latency_p50:"Response Latency (p50)",kong_latency_p99:"Kong Latency (p99)",kong_latency_p95:"Kong Latency (p95)",kong_latency_p50:"Kong Latency (p50)",upstream_latency_p99:"Upstream Latency (p99)",upstream_latency_p95:"Upstream Latency (p95)",upstream_latency_p50:"Upstream Latency (p50)",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)",control_plane:"Control Plane",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",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)",CONTROL_PLANE:"Control Plane"},metricAxisTitles:{request_count:"Request Count",requests_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}",upstream_latency_p99:"Upstream Latency (p99) in {unit}",upstream_latency_p95:"Upstream Latency (p95) in {unit}",upstream_latency_p50:"Upstream Latency (p50) in {unit}",kong_latency_p99:"Kong Latency (p99) in {unit}",kong_latency_p95:"Kong Latency (p95) in {unit}",kong_latency_p50:"Kong 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}",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"},topNTable:{nameLabel:"Name",defaultEmptyStateTitle:"No data to display",defaultErrorStateTitle:"Something went wrong",errors:{meta:"Error: response must contain 'meta'",display:"Error: 'display' response incorrectly formatted (must have at least one key)",metricNames:"Error: 'metricNames' response incorrectly formatted (must have at least one entry)"}}};function _p(){const n=on.createI18n("en-us",wp);return{i18n:n,i18nT:on.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 wi(n){return n+.5|0}const ln=(n,t,e)=>Math.max(Math.min(n,e),t);function _i(n){return ln(wi(n*2.55),0,255)}function cn(n){return ln(wi(n*255),0,255)}function je(n){return ln(wi(n/2.55)/100,0,1)}function rc(n){return ln(wi(n*100),0,100)}const Te={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},La=[..."0123456789ABCDEF"],Tp=n=>La[n&15],Mp=n=>La[(n&240)>>4]+La[n&15],gr=n=>(n&240)>>4===(n&15),
|
|
6
|
+
*/function wi(n){return n+.5|0}const ln=(n,t,e)=>Math.max(Math.min(n,e),t);function _i(n){return ln(wi(n*2.55),0,255)}function cn(n){return ln(wi(n*255),0,255)}function je(n){return ln(wi(n/2.55)/100,0,1)}function rc(n){return ln(wi(n*100),0,100)}const Te={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},La=[..."0123456789ABCDEF"],Tp=n=>La[n&15],Mp=n=>La[(n&240)>>4]+La[n&15],gr=n=>(n&240)>>4===(n&15),Dp=n=>gr(n.r)&&gr(n.g)&&gr(n.b)&&gr(n.a);function Cp(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Te[n[1]]*17,g:255&Te[n[2]]*17,b:255&Te[n[3]]*17,a:t===5?Te[n[4]]*17:255}:(t===7||t===9)&&(e={r:Te[n[1]]<<4|Te[n[2]],g:Te[n[3]]<<4|Te[n[4]],b:Te[n[5]]<<4|Te[n[6]],a:t===9?Te[n[7]]<<4|Te[n[8]]:255})),e}const Sp=(n,t)=>n<255?t(n):"";function kp(n){var t=Dp(n)?Tp:Mp;return n?"#"+t(n.r)+t(n.g)+t(n.b)+Sp(n.a,t):void 0}const Op=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ac(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 Pp(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 Ep(n,t,e){const i=ac(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 Rp(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 Ia(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=Rp(e,i,r,u,a),l=l*60+.5),[l|0,c||0,o]}function Na(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(cn)}function Fa(n,t,e){return Na(ac,n,t,e)}function Ap(n,t,e){return Na(Ep,n,t,e)}function Lp(n,t,e){return Na(Pp,n,t,e)}function sc(n){return(n%360+360)%360}function Ip(n){const t=Op.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?_i(+t[5]):cn(+t[5]));const r=sc(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=Ap(r,a,s):t[1]==="hsv"?i=Lp(r,a,s):i=Fa(r,a,s),{r:i[0],g:i[1],b:i[2],a:e}}function Np(n,t){var e=Ia(n);e[0]=sc(e[0]+t),e=Fa(e),n.r=e[0],n.g=e[1],n.b=e[2]}function Fp(n){if(!n)return;const t=Ia(n),e=t[0],i=rc(t[1]),r=rc(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${je(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const oc={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"},lc={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 Up(){const n={},t=Object.keys(lc),e=Object.keys(oc);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,oc[a]);a=parseInt(lc[s],16),n[o]=[a>>16&255,a>>8&255,a&255]}return n}let mr;function Bp(n){mr||(mr=Up(),mr.transparent=[0,0,0,0]);const t=mr[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Yp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Wp(n){const t=Yp.exec(n);let e=255,i,r,a;if(t){if(t[7]!==i){const s=+t[7];e=t[8]?_i(s):ln(s*255,0,255)}return i=+t[1],r=+t[3],a=+t[5],i=255&(t[2]?_i(i):ln(i,0,255)),r=255&(t[4]?_i(r):ln(r,0,255)),a=255&(t[6]?_i(a):ln(a,0,255)),{r:i,g:r,b:a,a:e}}}function zp(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${je(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Ua=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Jn=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Hp(n,t,e){const i=Jn(je(n.r)),r=Jn(je(n.g)),a=Jn(je(n.b));return{r:cn(Ua(i+e*(Jn(je(t.r))-i))),g:cn(Ua(r+e*(Jn(je(t.g))-r))),b:cn(Ua(a+e*(Jn(je(t.b))-a))),a:n.a+e*(t.a-n.a)}}function yr(n,t,e){if(n){let i=Ia(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=Fa(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function cc(n,t){return n&&Object.assign(t||{},n)}function uc(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=cn(n[3]))):(t=cc(n,{r:0,g:0,b:0,a:1}),t.a=cn(t.a)),t}function $p(n){return n.charAt(0)==="r"?Wp(n):Ip(n)}class Ti{constructor(t){if(t instanceof Ti)return t;const e=typeof t;let i;e==="object"?i=uc(t):e==="string"&&(i=Cp(t)||Bp(t)||$p(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=cc(this._rgb);return t&&(t.a=je(t.a)),t}set rgb(t){this._rgb=uc(t)}rgbString(){return this._valid?zp(this._rgb):void 0}hexString(){return this._valid?kp(this._rgb):void 0}hslString(){return this._valid?Fp(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=Hp(this._rgb,t._rgb,e)),this}clone(){return new Ti(this.rgb)}alpha(t){return this._rgb.a=cn(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=wi(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 yr(this._rgb,2,t),this}darken(t){return yr(this._rgb,2,-t),this}saturate(t){return yr(this._rgb,1,t),this}desaturate(t){return yr(this._rgb,1,-t),this}rotate(t){return Np(this._rgb,t),this}}/*!
|
|
7
7
|
* Chart.js v4.4.1
|
|
8
8
|
* https://www.chartjs.org
|
|
9
9
|
* (c) 2023 Chart.js Contributors
|
|
10
10
|
* Released under the MIT License
|
|
11
|
-
*/function Ve(){}const jp=(()=>{let n=0;return()=>n++})();function at(n){return n===null||typeof n>"u"}function yt(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 ct(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Nt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function xe(n,t){return Nt(n)?n:t}function it(n,t){return typeof n>"u"?t:n}const Vp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,dc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Mt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function Ct(n,t,e,i){let r,a,s;if(yt(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(ct(n))for(s=Object.keys(n),a=s.length,r=0;r<a;r++)t.call(e,n[s[r]],s[r])}function br(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 vr(n){if(yt(n))return n.map(vr);if(ct(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=vr(n[e[r]]);return t}return n}function fc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function qp(n,t,e,i){if(!fc(n))return;const r=t[n],a=e[n];ct(r)&&ct(a)?Mi(r,a,i):t[n]=vr(a)}function Mi(n,t,e){const i=yt(t)?t:[t],r=i.length;if(!ct(n))return n;e=e||{};const a=e.merger||qp;let s;for(let o=0;o<r;++o){if(s=i[o],!ct(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 Ci(n,t){return Mi(n,t,{merger:Xp})}function Xp(n,t,e){if(!fc(n))return;const i=t[n],r=e[n];ct(i)&&ct(r)?Ci(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=vr(r))}const hc={"":n=>n,x:n=>n.x,y:n=>n.y};function Gp(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 Kp(n){const t=Gp(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function un(n,t){return(hc[t]||(hc[t]=Kp(t)))(n)}function Ba(n){return n.charAt(0).toUpperCase()+n.slice(1)}const fe=n=>typeof n<"u",he=n=>typeof n=="function",pc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Qp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const ft=Math.PI,Ot=2*ft,Zp=Ot+ft,xr=Number.POSITIVE_INFINITY,Ya=ft/180,Rt=ft/2,Me=ft/4,wr=ft*2/3,dn=Math.log10,Ne=Math.sign;function Si(n,t,e){return Math.abs(n-t)<e}function gc(n){const t=Math.round(n);n=Si(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(dn(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Jp(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 fn(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tg(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function mc(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 Gt(n){return n*(ft/180)}function _r(n){return n*(180/ft)}function yc(n){if(!Nt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function bc(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*ft&&(a+=Ot),{angle:a,distance:r}}function ti(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function eg(n,t){return(n-t+Zp)%Ot-ft}function we(n){return(n%Ot+Ot)%Ot}function Di(n,t,e,i){const r=we(n),a=we(t),s=we(e),o=we(a-r),l=we(s-r),c=we(r-a),u=we(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Zt(n,t,e){return Math.max(t,Math.min(e,n))}function ng(n){return Zt(n,-32768,32767)}function qe(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Wa(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 Xe=(n,t,e,i)=>Wa(n,e,i?r=>{const a=n[r][t];return a<e||a===e&&n[r+1][t]===e}:r=>n[r][t]<e),ig=(n,t,e)=>Wa(n,e,i=>n[i][t]>=e);function rg(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 vc=["push","pop","shift","splice","unshift"];function ag(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),vc.forEach(e=>{const i="_onData"+Ba(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 xc(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)&&(vc.forEach(a=>{delete n[a]}),delete n._chartjs)}function wc(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const _c=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Tc(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,_c.call(window,()=>{i=!1,n.apply(t,e)}))}}function sg(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",re=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,og=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Mc(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:f}=s.getUserBounds();d&&(r=Zt(Math.min(Xe(o,l,c).lo,e?i:Xe(t,l,s.getPixelForValue(c)).lo),0,i-1)),f?a=Zt(Math.max(Xe(o,s.axis,u,!0).hi+1,e?0:Xe(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function Cc(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 Tr=n=>n===0||n===1,Sc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*Ot/e)),Dc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*Ot/e)+1,ki={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*Rt)+1,easeOutSine:n=>Math.sin(n*Rt),easeInOutSine:n=>-.5*(Math.cos(ft*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=>Tr(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=>Tr(n)?n:Sc(n,.075,.3),easeOutElastic:n=>Tr(n)?n:Dc(n,.075,.3),easeInOutElastic(n){return Tr(n)?n:n<.5?.5*Sc(n*2,.1125,.45):.5+.5*Dc(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-ki.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?ki.easeInBounce(n*2)*.5:ki.easeOutBounce(n*2-1)*.5+.5};function Ha(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kc(n){return Ha(n)?n:new Ti(n)}function $a(n){return Ha(n)?n:new Ti(n).saturate(.5).darken(.1).hexString()}const lg=["x","y","borderWidth","radius","tension"],cg=["color","borderColor","backgroundColor"];function ug(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:cg},numbers:{type:"number",properties:lg}}),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 dg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oc=new Map;function fg(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Oc.get(e);return i||(i=new Intl.NumberFormat(n,t),Oc.set(e,i)),i}function Oi(n,t,e){return fg(t,e).format(n)}const Pc={values(n){return yt(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=hg(n,e)}const s=dn(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),Oi(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(dn(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Pc.numeric.call(this,n,t,e):""}};function hg(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 Mr={formatters:Pc};function pg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:Mr.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 Pn=Object.create(null),ja=Object.create(null);function Pi(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 Va(n,t,e){return typeof t=="string"?Mi(Pi(n,t),e):Mi(Pi(n,""),t)}class gg{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)=>$a(r.backgroundColor),this.hoverBorderColor=(i,r)=>$a(r.borderColor),this.hoverColor=(i,r)=>$a(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 Va(this,t,e)}get(t){return Pi(this,t)}describe(t,e){return Va(ja,t,e)}override(t,e){return Va(Pn,t,e)}route(t,e,i,r){const a=Pi(this,t),s=Pi(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 ct(l)?Object.assign({},c,l):it(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Bt=new gg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ug,dg,pg]);function mg(n){return!n||at(n.size)||at(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Cr(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 yg(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,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!yt(d))s=Cr(n,r,a,s,d);else if(yt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!yt(f)&&(s=Cr(n,r,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete r[a[l]];a.splice(0,p)}return s}function En(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 Ec(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function qa(n,t,e,i){Rc(n,t,e,i,null)}function Rc(n,t,e,i,r){let a,s,o,l,c,u,d,f;const p=t.pointStyle,b=t.rotation,x=t.radius;let g=(b||0)*Ya;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:r?n.ellipse(e,i,r/2,x,0,0,Ot):n.arc(e,i,x,0,Ot),n.closePath();break;case"triangle":u=r?r/2:x,n.moveTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=wr,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=wr,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Me)*l,d=Math.cos(g+Me)*(r?r/2-c:l),o=Math.sin(g+Me)*l,f=Math.sin(g+Me)*(r?r/2-c:l),n.arc(e-d,i-o,c,g-ft,g-Rt),n.arc(e+f,i-s,c,g-Rt,g),n.arc(e+d,i+o,c,g,g+Rt),n.arc(e-f,i+s,c,g+Rt,g+ft),n.closePath();break;case"rect":if(!b){l=Math.SQRT1_2*x,u=r?r/2:l,n.rect(e-u,i-l,2*u,2*l);break}g+=Me;case"rectRot":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+f,i-s),n.lineTo(e+d,i+o),n.lineTo(e-f,i+s),n.closePath();break;case"crossRot":g+=Me;case"cross":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"star":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s),g+=Me,d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"line":s=r?r/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,i-o),n.lineTo(e+s,i+o);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(g)*(r?r/2:x),i+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function Ge(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 Ei(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Ri(n){n.restore()}function bg(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 vg(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 xg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),at(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 wg(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 _g(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function Rn(n,t,e,i,r,a={}){const s=yt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=r.string,xg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&_g(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),at(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,i,a.maxWidth)),n.fillText(c,e,i,a.maxWidth),wg(n,e,i,c,a),i+=Number(r.lineHeight);n.restore()}function ei(n,t){const{x:e,y:i,w:r,h:a,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,1.5*ft,ft,!0),n.lineTo(e,i+a-s.bottomLeft),n.arc(e+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,ft,Rt,!0),n.lineTo(e+r-s.bottomRight,i+a),n.arc(e+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,Rt,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-Rt,!0),n.lineTo(e+s.topLeft,i)}const Tg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Mg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cg(n,t){const e=(""+n).match(Tg);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 Sg=n=>+n||0;function Xa(n,t){const e={},i=ct(t),r=i?Object.keys(t):t,a=ct(n)?i?s=>it(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=Sg(a(s));return e}function Ac(n){return Xa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function hn(n){return Xa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Kt(n){const t=Ac(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function At(n,t){n=n||{},t=t||Bt.font;let e=it(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=it(n.style,t.style);i&&!(""+i).match(Mg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:it(n.family,t.family),lineHeight:Cg(it(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:it(n.weight,t.weight),string:""};return r.string=mg(r),r}function Ai(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&&yt(o)&&(o=o[e%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Dg(n,t,e){const{min:i,max:r}=n,a=dc(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 pn(n,t){return Object.assign(Object.create(n),t)}function Ga(n,t=[""],e,i,r=()=>n[0]){const a=e||n;typeof i>"u"&&(i=Uc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>Ga([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 Ic(o,l,()=>Ig(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Bc(o).includes(l)},ownKeys(o){return Bc(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function ni(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lc(n,i),setContext:a=>ni(n,a,e,i),override:a=>ni(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 Ic(a,s,()=>Og(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 Lc(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:he(e)?e:()=>e,isIndexable:he(i)?i:()=>i}}const kg=(n,t)=>n?n+Ba(t):t,Ka=(n,t)=>ct(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ic(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Og(n,t,e){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;let o=i[t];return he(o)&&s.isScriptable(t)&&(o=Pg(t,o,n,e)),yt(o)&&o.length&&(o=Eg(t,o,n,s.isIndexable)),Ka(t,o)&&(o=ni(o,r,a&&a[t],s)),o}function Pg(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),Ka(n,l)&&(l=Qa(r._scopes,r,n,l)),l}function Eg(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(ct(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Qa(c,r,n,u);t.push(ni(d,a,s&&s[n],o))}}return t}function Nc(n,t,e){return he(n)?n(t,e):n}const Rg=(n,t)=>n===!0?t:typeof n=="string"?un(t,n):void 0;function Ag(n,t,e,i,r){for(const a of t){const s=Rg(e,a);if(s){n.add(s);const o=Nc(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 Qa(n,t,e,i){const r=t._rootScopes,a=Nc(t._fallback,e,i),s=[...n,...r],o=new Set;o.add(i);let l=Fc(o,s,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=Fc(o,s,a,l,i),l===null)?!1:Ga(Array.from(o),[""],r,a,()=>Lg(t,e,i))}function Fc(n,t,e,i,r){for(;e;)e=Ag(n,t,e,i,r);return e}function Lg(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return yt(r)&&ct(e)?e:r||{}}function Ig(n,t,e,i){let r;for(const a of t)if(r=Uc(kg(a,n),e),typeof r<"u")return Ka(n,r)?Qa(e,i,n,r):r}function Uc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Bc(n){let t=n._keys;return t||(t=n._keys=Ng(n._scopes)),t}function Ng(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 Yc(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(un(u,a),c)};return s}const Fg=Number.EPSILON||1e-14,ii=(n,t)=>t<n.length&&!n[t].skip&&n[t],Wc=n=>n==="x"?"y":"x";function Ug(n,t,e,i){const r=n.skip?t:n,a=t,s=e.skip?t:e,o=ti(a,r),l=ti(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,f=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+f*(s.x-r.x),y:a.y+f*(s.y-r.y)}}}function Bg(n,t,e){const i=n.length;let r,a,s,o,l,c=ii(n,0);for(let u=0;u<i-1;++u)if(l=c,c=ii(n,u+1),!(!l||!c)){if(Si(t[u],0,Fg)){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 Yg(n,t,e="x"){const i=Wc(e),r=n.length;let a,s,o,l=ii(n,0);for(let c=0;c<r;++c){if(s=o,o=l,l=ii(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 Wg(n,t="x"){const e=Wc(t),i=n.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=ii(n,0);for(s=0;s<i;++s)if(o=l,l=c,c=ii(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?Ne(r[s-1])!==Ne(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}Bg(n,r,a),Yg(n,a,t)}function Sr(n,t,e){return Math.max(Math.min(n,e),t)}function zg(n,t){let e,i,r,a,s,o=Ge(n[0],t);for(e=0,i=n.length;e<i;++e)s=a,a=o,o=e<i-1&&Ge(n[e+1],t),a&&(r=n[e],s&&(r.cp1x=Sr(r.cp1x,t.left,t.right),r.cp1y=Sr(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=Sr(r.cp2x,t.left,t.right),r.cp2y=Sr(r.cp2y,t.top,t.bottom)))}function Hg(n,t,e,i,r){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Wg(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=Ug(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&&zg(n,e)}function Za(){return typeof window<"u"&&typeof document<"u"}function Ja(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Dr(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 kr=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function $g(n,t){return kr(n).getPropertyValue(t)}const jg=["top","right","bottom","left"];function An(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const a=jg[r];i[a]=parseFloat(n[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Vg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function qg(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(Vg(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 gn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=kr(e),a=r.boxSizing==="border-box",s=An(r,"padding"),o=An(r,"border","width"),{x:l,y:c,box:u}=qg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:b}=t;return a&&(p-=s.width+o.width,b-=s.height+o.height),{x:Math.round((l-d)/p*e.width/i),y:Math.round((c-f)/b*e.height/i)}}function Xg(n,t,e){let i,r;if(t===void 0||e===void 0){const a=Ja(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=kr(a),l=An(o,"border","width"),c=An(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,i=Dr(o.maxWidth,a,"clientWidth"),r=Dr(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||xr,maxHeight:r||xr}}const Or=n=>Math.round(n*10)/10;function Gg(n,t,e,i){const r=kr(n),a=An(r,"margin"),s=Dr(r.maxWidth,n,"clientWidth")||xr,o=Dr(r.maxHeight,n,"clientHeight")||xr,l=Xg(n,t,e);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const f=An(r,"border","width"),p=An(r,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Or(Math.min(c,s,l.maxWidth)),u=Or(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Or(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Or(Math.floor(u*i))),{width:c,height:u}}function zc(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 Kg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Za()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function Hc(n,t){const e=$g(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ln(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qg(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 Zg(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=Ln(n,r,e),o=Ln(r,a,e),l=Ln(a,t,e),c=Ln(s,o,e),u=Ln(o,l,e);return Ln(c,u,e)}const Jg=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}}},tm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ri(n,t,e){return n?Jg(t,e):tm()}function $c(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 jc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Di,compare:eg,normalize:we}:{between:qe,compare:(t,e)=>t-e,normalize:t=>t}}function qc({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 em(n,t,e){const{property:i,start:r,end:a}=e,{between:s,normalize:o}=Vc(i),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][i]),r,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Xc(n,t,e){if(!e)return[n];const{property:i,start:r,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Vc(i),{start:u,end:d,loop:f,style:p}=em(n,t,e),b=[];let x=!1,g=null,y,v,m;const w=()=>l(r,m,y)&&o(r,m)!==0,T=()=>o(a,y)===0||l(a,m,y),D=()=>x||w(),k=()=>!x||T();for(let M=u,C=u;M<=d;++M)v=t[M%s],!v.skip&&(y=c(v[i]),y!==m&&(x=l(y,r,a),g===null&&D()&&(g=o(y,r)===0?M:C),g!==null&&k()&&(b.push(qc({start:g,end:M,loop:f,count:s,style:p})),g=null),C=M,m=y));return g!==null&&b.push(qc({start:g,end:d,loop:f,count:s,style:p})),b}function Gc(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const a=Xc(i[r],n.points,t);a.length&&e.push(...a)}return e}function nm(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 im(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 rm(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const a=!!n._loop,{start:s,end:o}=nm(e,r,a,i);if(i===!0)return Kc(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 Kc(n,im(e,s,l,c),e,t)}function Kc(n,t,e,i){return!i||!i.setContext||!e?t:am(n,t,e,i)}function am(n,t,e,i){const r=n._chart.getContext(),a=Qc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(b,x,g,y){const v=o?-1:1;if(b!==x){for(b+=l;e[b%l].skip;)b-=v;for(;e[x%l].skip;)x+=v;b%l!==x%l&&(c.push({start:b%l,end:x%l,loop:g,style:y}),u=y,d=x%l)}}for(const b of t){d=o?d:b.start;let x=e[d%l],g;for(f=d+1;f<=b.end;f++){const y=e[f%l];g=Qc(i.setContext(pn(r,{type:"segment",p0:x,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),sm(g,u)&&p(d,f-1,b.loop,u),x=y,u=g}d<f-1&&p(d,f-1,b.loop,u)}return c}function Qc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function sm(n,t){if(!t)return!1;const e=[],i=function(r,a){return Ha(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
|
|
11
|
+
*/function Ve(){}const jp=(()=>{let n=0;return()=>n++})();function at(n){return n===null||typeof n>"u"}function yt(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 ct(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Nt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function xe(n,t){return Nt(n)?n:t}function it(n,t){return typeof n>"u"?t:n}const Vp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,dc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Mt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function Dt(n,t,e,i){let r,a,s;if(yt(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(ct(n))for(s=Object.keys(n),a=s.length,r=0;r<a;r++)t.call(e,n[s[r]],s[r])}function br(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 vr(n){if(yt(n))return n.map(vr);if(ct(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=vr(n[e[r]]);return t}return n}function fc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function qp(n,t,e,i){if(!fc(n))return;const r=t[n],a=e[n];ct(r)&&ct(a)?Mi(r,a,i):t[n]=vr(a)}function Mi(n,t,e){const i=yt(t)?t:[t],r=i.length;if(!ct(n))return n;e=e||{};const a=e.merger||qp;let s;for(let o=0;o<r;++o){if(s=i[o],!ct(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 Di(n,t){return Mi(n,t,{merger:Xp})}function Xp(n,t,e){if(!fc(n))return;const i=t[n],r=e[n];ct(i)&&ct(r)?Di(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=vr(r))}const hc={"":n=>n,x:n=>n.x,y:n=>n.y};function Gp(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 Kp(n){const t=Gp(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function un(n,t){return(hc[t]||(hc[t]=Kp(t)))(n)}function Ba(n){return n.charAt(0).toUpperCase()+n.slice(1)}const fe=n=>typeof n<"u",he=n=>typeof n=="function",pc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Qp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const ft=Math.PI,Ot=2*ft,Zp=Ot+ft,xr=Number.POSITIVE_INFINITY,Ya=ft/180,Rt=ft/2,Me=ft/4,wr=ft*2/3,dn=Math.log10,Ne=Math.sign;function Ci(n,t,e){return Math.abs(n-t)<e}function gc(n){const t=Math.round(n);n=Ci(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(dn(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Jp(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 fn(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tg(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function mc(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 Gt(n){return n*(ft/180)}function _r(n){return n*(180/ft)}function yc(n){if(!Nt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function bc(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*ft&&(a+=Ot),{angle:a,distance:r}}function ti(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function eg(n,t){return(n-t+Zp)%Ot-ft}function we(n){return(n%Ot+Ot)%Ot}function Si(n,t,e,i){const r=we(n),a=we(t),s=we(e),o=we(a-r),l=we(s-r),c=we(r-a),u=we(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Zt(n,t,e){return Math.max(t,Math.min(e,n))}function ng(n){return Zt(n,-32768,32767)}function qe(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Wa(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 Xe=(n,t,e,i)=>Wa(n,e,i?r=>{const a=n[r][t];return a<e||a===e&&n[r+1][t]===e}:r=>n[r][t]<e),ig=(n,t,e)=>Wa(n,e,i=>n[i][t]>=e);function rg(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 vc=["push","pop","shift","splice","unshift"];function ag(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),vc.forEach(e=>{const i="_onData"+Ba(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 xc(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)&&(vc.forEach(a=>{delete n[a]}),delete n._chartjs)}function wc(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const _c=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Tc(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,_c.call(window,()=>{i=!1,n.apply(t,e)}))}}function sg(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",re=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,og=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Mc(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:f}=s.getUserBounds();d&&(r=Zt(Math.min(Xe(o,l,c).lo,e?i:Xe(t,l,s.getPixelForValue(c)).lo),0,i-1)),f?a=Zt(Math.max(Xe(o,s.axis,u,!0).hi+1,e?0:Xe(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function Dc(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 Tr=n=>n===0||n===1,Cc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*Ot/e)),Sc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*Ot/e)+1,ki={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*Rt)+1,easeOutSine:n=>Math.sin(n*Rt),easeInOutSine:n=>-.5*(Math.cos(ft*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=>Tr(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=>Tr(n)?n:Cc(n,.075,.3),easeOutElastic:n=>Tr(n)?n:Sc(n,.075,.3),easeInOutElastic(n){return Tr(n)?n:n<.5?.5*Cc(n*2,.1125,.45):.5+.5*Sc(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-ki.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?ki.easeInBounce(n*2)*.5:ki.easeOutBounce(n*2-1)*.5+.5};function Ha(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kc(n){return Ha(n)?n:new Ti(n)}function $a(n){return Ha(n)?n:new Ti(n).saturate(.5).darken(.1).hexString()}const lg=["x","y","borderWidth","radius","tension"],cg=["color","borderColor","backgroundColor"];function ug(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:cg},numbers:{type:"number",properties:lg}}),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 dg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oc=new Map;function fg(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Oc.get(e);return i||(i=new Intl.NumberFormat(n,t),Oc.set(e,i)),i}function Oi(n,t,e){return fg(t,e).format(n)}const Pc={values(n){return yt(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=hg(n,e)}const s=dn(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),Oi(n,i,l)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(dn(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Pc.numeric.call(this,n,t,e):""}};function hg(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 Mr={formatters:Pc};function pg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:Mr.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 Pn=Object.create(null),ja=Object.create(null);function Pi(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 Va(n,t,e){return typeof t=="string"?Mi(Pi(n,t),e):Mi(Pi(n,""),t)}class gg{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)=>$a(r.backgroundColor),this.hoverBorderColor=(i,r)=>$a(r.borderColor),this.hoverColor=(i,r)=>$a(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 Va(this,t,e)}get(t){return Pi(this,t)}describe(t,e){return Va(ja,t,e)}override(t,e){return Va(Pn,t,e)}route(t,e,i,r){const a=Pi(this,t),s=Pi(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 ct(l)?Object.assign({},c,l):it(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Bt=new gg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ug,dg,pg]);function mg(n){return!n||at(n.size)||at(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Dr(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 yg(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,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!yt(d))s=Dr(n,r,a,s,d);else if(yt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!yt(f)&&(s=Dr(n,r,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete r[a[l]];a.splice(0,p)}return s}function En(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 Ec(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function qa(n,t,e,i){Rc(n,t,e,i,null)}function Rc(n,t,e,i,r){let a,s,o,l,c,u,d,f;const p=t.pointStyle,b=t.rotation,x=t.radius;let g=(b||0)*Ya;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:r?n.ellipse(e,i,r/2,x,0,0,Ot):n.arc(e,i,x,0,Ot),n.closePath();break;case"triangle":u=r?r/2:x,n.moveTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=wr,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),g+=wr,n.lineTo(e+Math.sin(g)*u,i-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Me)*l,d=Math.cos(g+Me)*(r?r/2-c:l),o=Math.sin(g+Me)*l,f=Math.sin(g+Me)*(r?r/2-c:l),n.arc(e-d,i-o,c,g-ft,g-Rt),n.arc(e+f,i-s,c,g-Rt,g),n.arc(e+d,i+o,c,g,g+Rt),n.arc(e-f,i+s,c,g+Rt,g+ft),n.closePath();break;case"rect":if(!b){l=Math.SQRT1_2*x,u=r?r/2:l,n.rect(e-u,i-l,2*u,2*l);break}g+=Me;case"rectRot":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+f,i-s),n.lineTo(e+d,i+o),n.lineTo(e-f,i+s),n.closePath();break;case"crossRot":g+=Me;case"cross":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"star":d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s),g+=Me,d=Math.cos(g)*(r?r/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(r?r/2:x),n.moveTo(e-d,i-o),n.lineTo(e+d,i+o),n.moveTo(e+f,i-s),n.lineTo(e-f,i+s);break;case"line":s=r?r/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,i-o),n.lineTo(e+s,i+o);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(g)*(r?r/2:x),i+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function Ge(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 Ei(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Ri(n){n.restore()}function bg(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 vg(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 xg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),at(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 wg(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 _g(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function Rn(n,t,e,i,r,a={}){const s=yt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=r.string,xg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&_g(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),at(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,i,a.maxWidth)),n.fillText(c,e,i,a.maxWidth),wg(n,e,i,c,a),i+=Number(r.lineHeight);n.restore()}function ei(n,t){const{x:e,y:i,w:r,h:a,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,1.5*ft,ft,!0),n.lineTo(e,i+a-s.bottomLeft),n.arc(e+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,ft,Rt,!0),n.lineTo(e+r-s.bottomRight,i+a),n.arc(e+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,Rt,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-Rt,!0),n.lineTo(e+s.topLeft,i)}const Tg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Mg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Dg(n,t){const e=(""+n).match(Tg);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 Cg=n=>+n||0;function Xa(n,t){const e={},i=ct(t),r=i?Object.keys(t):t,a=ct(n)?i?s=>it(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=Cg(a(s));return e}function Ac(n){return Xa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function hn(n){return Xa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Kt(n){const t=Ac(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function At(n,t){n=n||{},t=t||Bt.font;let e=it(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=it(n.style,t.style);i&&!(""+i).match(Mg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:it(n.family,t.family),lineHeight:Dg(it(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:it(n.weight,t.weight),string:""};return r.string=mg(r),r}function Ai(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&&yt(o)&&(o=o[e%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Sg(n,t,e){const{min:i,max:r}=n,a=dc(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 pn(n,t){return Object.assign(Object.create(n),t)}function Ga(n,t=[""],e,i,r=()=>n[0]){const a=e||n;typeof i>"u"&&(i=Uc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>Ga([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 Ic(o,l,()=>Ig(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Bc(o).includes(l)},ownKeys(o){return Bc(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function ni(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lc(n,i),setContext:a=>ni(n,a,e,i),override:a=>ni(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 Ic(a,s,()=>Og(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 Lc(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:he(e)?e:()=>e,isIndexable:he(i)?i:()=>i}}const kg=(n,t)=>n?n+Ba(t):t,Ka=(n,t)=>ct(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ic(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Og(n,t,e){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=n;let o=i[t];return he(o)&&s.isScriptable(t)&&(o=Pg(t,o,n,e)),yt(o)&&o.length&&(o=Eg(t,o,n,s.isIndexable)),Ka(t,o)&&(o=ni(o,r,a&&a[t],s)),o}function Pg(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),Ka(n,l)&&(l=Qa(r._scopes,r,n,l)),l}function Eg(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(ct(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Qa(c,r,n,u);t.push(ni(d,a,s&&s[n],o))}}return t}function Nc(n,t,e){return he(n)?n(t,e):n}const Rg=(n,t)=>n===!0?t:typeof n=="string"?un(t,n):void 0;function Ag(n,t,e,i,r){for(const a of t){const s=Rg(e,a);if(s){n.add(s);const o=Nc(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 Qa(n,t,e,i){const r=t._rootScopes,a=Nc(t._fallback,e,i),s=[...n,...r],o=new Set;o.add(i);let l=Fc(o,s,e,a||e,i);return l===null||typeof a<"u"&&a!==e&&(l=Fc(o,s,a,l,i),l===null)?!1:Ga(Array.from(o),[""],r,a,()=>Lg(t,e,i))}function Fc(n,t,e,i,r){for(;e;)e=Ag(n,t,e,i,r);return e}function Lg(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return yt(r)&&ct(e)?e:r||{}}function Ig(n,t,e,i){let r;for(const a of t)if(r=Uc(kg(a,n),e),typeof r<"u")return Ka(n,r)?Qa(e,i,n,r):r}function Uc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Bc(n){let t=n._keys;return t||(t=n._keys=Ng(n._scopes)),t}function Ng(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 Yc(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(un(u,a),c)};return s}const Fg=Number.EPSILON||1e-14,ii=(n,t)=>t<n.length&&!n[t].skip&&n[t],Wc=n=>n==="x"?"y":"x";function Ug(n,t,e,i){const r=n.skip?t:n,a=t,s=e.skip?t:e,o=ti(a,r),l=ti(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,f=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+f*(s.x-r.x),y:a.y+f*(s.y-r.y)}}}function Bg(n,t,e){const i=n.length;let r,a,s,o,l,c=ii(n,0);for(let u=0;u<i-1;++u)if(l=c,c=ii(n,u+1),!(!l||!c)){if(Ci(t[u],0,Fg)){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 Yg(n,t,e="x"){const i=Wc(e),r=n.length;let a,s,o,l=ii(n,0);for(let c=0;c<r;++c){if(s=o,o=l,l=ii(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 Wg(n,t="x"){const e=Wc(t),i=n.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=ii(n,0);for(s=0;s<i;++s)if(o=l,l=c,c=ii(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?Ne(r[s-1])!==Ne(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}Bg(n,r,a),Yg(n,a,t)}function Cr(n,t,e){return Math.max(Math.min(n,e),t)}function zg(n,t){let e,i,r,a,s,o=Ge(n[0],t);for(e=0,i=n.length;e<i;++e)s=a,a=o,o=e<i-1&&Ge(n[e+1],t),a&&(r=n[e],s&&(r.cp1x=Cr(r.cp1x,t.left,t.right),r.cp1y=Cr(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=Cr(r.cp2x,t.left,t.right),r.cp2y=Cr(r.cp2y,t.top,t.bottom)))}function Hg(n,t,e,i,r){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Wg(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=Ug(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&&zg(n,e)}function Za(){return typeof window<"u"&&typeof document<"u"}function Ja(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Sr(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 kr=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function $g(n,t){return kr(n).getPropertyValue(t)}const jg=["top","right","bottom","left"];function An(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const a=jg[r];i[a]=parseFloat(n[t+"-"+a+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Vg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function qg(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(Vg(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 gn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=kr(e),a=r.boxSizing==="border-box",s=An(r,"padding"),o=An(r,"border","width"),{x:l,y:c,box:u}=qg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:b}=t;return a&&(p-=s.width+o.width,b-=s.height+o.height),{x:Math.round((l-d)/p*e.width/i),y:Math.round((c-f)/b*e.height/i)}}function Xg(n,t,e){let i,r;if(t===void 0||e===void 0){const a=Ja(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=kr(a),l=An(o,"border","width"),c=An(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,i=Sr(o.maxWidth,a,"clientWidth"),r=Sr(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:i||xr,maxHeight:r||xr}}const Or=n=>Math.round(n*10)/10;function Gg(n,t,e,i){const r=kr(n),a=An(r,"margin"),s=Sr(r.maxWidth,n,"clientWidth")||xr,o=Sr(r.maxHeight,n,"clientHeight")||xr,l=Xg(n,t,e);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const f=An(r,"border","width"),p=An(r,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Or(Math.min(c,s,l.maxWidth)),u=Or(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Or(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Or(Math.floor(u*i))),{width:c,height:u}}function zc(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 Kg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Za()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function Hc(n,t){const e=$g(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ln(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qg(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 Zg(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=Ln(n,r,e),o=Ln(r,a,e),l=Ln(a,t,e),c=Ln(s,o,e),u=Ln(o,l,e);return Ln(c,u,e)}const Jg=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}}},tm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ri(n,t,e){return n?Jg(t,e):tm()}function $c(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 jc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Si,compare:eg,normalize:we}:{between:qe,compare:(t,e)=>t-e,normalize:t=>t}}function qc({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 em(n,t,e){const{property:i,start:r,end:a}=e,{between:s,normalize:o}=Vc(i),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][i]),r,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Xc(n,t,e){if(!e)return[n];const{property:i,start:r,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Vc(i),{start:u,end:d,loop:f,style:p}=em(n,t,e),b=[];let x=!1,g=null,y,v,m;const w=()=>l(r,m,y)&&o(r,m)!==0,T=()=>o(a,y)===0||l(a,m,y),S=()=>x||w(),k=()=>!x||T();for(let M=u,D=u;M<=d;++M)v=t[M%s],!v.skip&&(y=c(v[i]),y!==m&&(x=l(y,r,a),g===null&&S()&&(g=o(y,r)===0?M:D),g!==null&&k()&&(b.push(qc({start:g,end:M,loop:f,count:s,style:p})),g=null),D=M,m=y));return g!==null&&b.push(qc({start:g,end:d,loop:f,count:s,style:p})),b}function Gc(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const a=Xc(i[r],n.points,t);a.length&&e.push(...a)}return e}function nm(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 im(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 rm(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const a=!!n._loop,{start:s,end:o}=nm(e,r,a,i);if(i===!0)return Kc(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 Kc(n,im(e,s,l,c),e,t)}function Kc(n,t,e,i){return!i||!i.setContext||!e?t:am(n,t,e,i)}function am(n,t,e,i){const r=n._chart.getContext(),a=Qc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(b,x,g,y){const v=o?-1:1;if(b!==x){for(b+=l;e[b%l].skip;)b-=v;for(;e[x%l].skip;)x+=v;b%l!==x%l&&(c.push({start:b%l,end:x%l,loop:g,style:y}),u=y,d=x%l)}}for(const b of t){d=o?d:b.start;let x=e[d%l],g;for(f=d+1;f<=b.end;f++){const y=e[f%l];g=Qc(i.setContext(pn(r,{type:"segment",p0:x,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),sm(g,u)&&p(d,f-1,b.loop,u),x=y,u=g}d<f-1&&p(d,f-1,b.loop,u)}return c}function Qc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function sm(n,t){if(!t)return!1;const e=[],i=function(r,a){return Ha(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.4.1
|
|
13
13
|
* https://www.chartjs.org
|
|
14
14
|
* (c) 2023 Chart.js Contributors
|
|
15
15
|
* Released under the MIT License
|
|
16
|
-
*/class om{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=_c.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 Ke=new om;const Zc="transparent",lm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=kc(n||Zc),r=i.valid&&kc(t||Zc);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class cm{constructor(t,e,i,r){const a=e[i];r=Ai([t.to,r,a,t.from]);const s=Ai([t.from,a,r]);this._active=!0,this._fn=t.fn||lm[t.type||typeof s],this._easing=ki[t.easing]||ki.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=Ai([t.to,e,r,t.from]),this._from=Ai([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 ts{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!ct(t))return;const e=Object.keys(Bt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!ct(a))return;const s={};for(const o of e)s[o]=a[o];(yt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,e){const i=e.options,r=dm(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&um(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 f=i.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new cm(f,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 Ke.add(this._chart,i),!0}}function um(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 dm(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 Jc(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 fm(n,t,e){if(e===!1)return!1;const i=Jc(n,e),r=Jc(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function hm(n){let t,e,i,r;return ct(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 tu(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 eu(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],Nt(c)&&(a||t===0||Ne(t)===Ne(c))&&(t+=c)}return t}}function pm(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 nu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function gm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function mm(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 ym(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function iu(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 ru(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=gm(a,s,i),d=t.length;let f;for(let p=0;p<d;++p){const b=t[p],{[l]:x,[c]:g}=b,y=b._stacks||(b._stacks={});f=y[c]=ym(r,u,x),f[o]=g,f._top=iu(f,s,!0,i.type),f._bottom=iu(f,s,!1,i.type);const v=f._visualValues||(f._visualValues={});v[o]=g}}function es(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function bm(n,t){return pn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function vm(n,t,e){return pn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Li(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 ns=n=>n==="reset"||n==="none",au=(n,t)=>t?n:Object.assign({},n),xm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:tu(e,!0),values:null};class Ee{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=nu(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&&Li(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(d,f,p,b)=>d==="x"?f:d==="r"?b:p,a=e.xAxisID=it(i.xAxisID,es(t,"x")),s=e.yAxisID=it(i.yAxisID,es(t,"y")),o=e.rAxisID=it(i.rAxisID,es(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&&xc(this._data,this),t._stacked&&Li(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(ct(e))this._data=pm(e);else if(i!==e){if(i){xc(i,this);const r=this._cachedMeta;Li(r),r._parsed=[]}e&&Object.isExtensible(e)&&ag(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=nu(e.vScale,e),e.stack!==i.stack&&(r=!0,Li(e),e.stack=i.stack),this._resyncElements(t),(r||a!==e._stacked)&&ru(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,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{yt(r[t])?f=this.parseArrayData(i,r,t,e):ct(r[t])?f=this.parseObjectData(i,r,t,e):f=this.parsePrimitiveData(i,r,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)i._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);i._sorted=l}s&&ru(this,f)}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 f,p,b;for(f=0,p=r;f<p;++f)b=f+i,d[f]={[o]:u||a.parse(c[b],b),[l]:s.parse(e[b],b)};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,f,p;for(u=0,d=r;u<d;++u)f=u+i,p=e[f],c[u]={x:a.parse(un(p,o),f),y:s.parse(un(p,l),f)};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:tu(r,!0),values:e._stacks[t.axis]._visualValues};return eu(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=eu(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=xm(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=mm(o);let f,p;function b(){p=r[f];const x=p[o.axis];return!Nt(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!b()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!b()){this.updateRangeFromParsed(c,t,p,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],Nt(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=hm(it(this.options.clip,fm(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=vm(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=bm(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&&fe(i);if(o)return au(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Bt.elements[t]),b=()=>this.getContext(i,r,e),x=c.resolveNamedOptions(f,p,b,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(au(x,l))),x}_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),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,i,e))}const c=new ts(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||ns(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){ns(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!ns(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&&Li(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])}}H(Ee,"defaults",{}),H(Ee,"datasetElementType",null),H(Ee,"dataElementType",null);function wm(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=wc(i.sort((r,a)=>r-a))}return n._cache.$bar}function _m(n){const t=n.iScale,e=wm(t,n.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(fe(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 Tm(n,t,e,i){const r=e.barThickness;let a,s;return at(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 Mm(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 Cm(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 su(n,t,e,i){return yt(n)?Cm(n,t,e,i):t[e.axis]=e.parse(n,i),t}function ou(n,t,e,i){const r=n.iScale,a=n.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,f;for(c=e,u=e+i;c<u;++c)f=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(su(f,d,a,c));return l}function is(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Sm(n,t,e){return n!==0?Ne(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Dm(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 km(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}=Dm(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=c:(e._bottom||0)===i?r=u:(a[lu(u,s,o,l)]=!0,r=c)),a[lu(r,s,o,l)]=!0,n.borderSkipped=a}function lu(n,t,e,i){return i?(n=Om(n,t,e),n=cu(n,e,t)):n=cu(n,t,e),n}function Om(n,t,e){return n===t?e:n===e?t:n}function cu(n,t,e){return n==="start"?t:n==="end"?e:n}function Pm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Ii extends Ee{parsePrimitiveData(t,e,i,r){return ou(t,e,i,r)}parseArrayData(t,e,i,r){return ou(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 f,p,b,x;for(f=i,p=i+r;f<p;++f)x=e[f],b={},b[a.axis]=a.parse(un(x,c),f),d.push(su(un(x,u),b,s,f));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=is(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:f}=this._getSharedOptions(e,r);for(let p=e;p<e+i;p++){const b=this.getParsed(p),x=a||at(b[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),y=(b._stacks||{})[o.axis],v={horizontal:c,base:x.base,enableBorderRadius:!y||is(b._custom)||s===y._top||s===y._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":r));const m=v.options||t[p].options;km(v,m,y,s),Pm(v,m,u.ratio),this.updateElement(t[p],p,v,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(at(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||_m(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=is(c);let d=l[e.axis],f=0,p=i?this.applyStack(e,l,i):d,b,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Ne(d)!==Ne(c.barEnd)&&(f=0),f+=d);const g=!at(a)&&!u?a:f;let y=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?b=e.getPixelForValue(f+p):b=y,x=b-y,Math.abs(x)<s){x=Sm(x,e,o)*s,d===o&&(y-=x/2);const v=e.getPixelForDecimal(0),m=e.getPixelForDecimal(1),w=Math.min(v,m),T=Math.max(v,m);y=Math.max(Math.min(y,T),w),b=y+x,i&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(b)-e.getValueForPixel(y))}if(y===e.getPixelForValue(o)){const v=Ne(x)*e.getLineWidthForValue(o)/2;y+=v,x-=v}return{size:x,base:y,head:b,center:b+x/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,a=r.skipNull,s=it(r.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?Mm(t,e,r,c):Tm(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)}}H(Ii,"id","bar"),H(Ii,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Ii,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Pr extends Ee{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=it(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=it(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 f=e;f<e+i;f++){const p=t[f],b=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(b[u]),y=x[d]=a?o.getBasePixel():o.getPixelForValue(b[d]);x.skip=isNaN(g)||isNaN(y),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":r),a&&(x.options.radius=0)),this.updateElement(p,f,x,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+=it(i&&i._custom,a),r}}H(Pr,"id","bubble"),H(Pr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(Pr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Em(n,t,e){let i=1,r=1,a=0,s=0;if(t<Ot){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(m,w,T)=>Di(m,o,l,!0)?1:Math.max(w,w*e,T,T*e),b=(m,w,T)=>Di(m,o,l,!0)?-1:Math.min(w,w*e,T,T*e),x=p(0,c,d),g=p(Rt,u,f),y=b(ft,c,d),v=b(ft+Rt,u,f);i=(x-y)/2,r=(g-v)/2,a=-(x+y)/2,s=-(g+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class mn extends Ee{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(ct(i[t])){const{key:l="value"}=this._parsing;a=c=>+un(i[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Gt(this.options.rotation-90)}_getCircumference(){return Gt(this.options.circumference)}_getRotationExtents(){let t=Ot,e=-Ot;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(Vp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:b,offsetY:x}=Em(d,u,l),g=(i.width-s)/f,y=(i.height-s)/p,v=Math.max(Math.min(g,y)/2,0),m=dc(this.options.radius,v),w=Math.max(m*l,0),T=(m-w)/this._getVisibleDatasetWeightTotal();this.offsetX=b*m,this.offsetY=x*m,r.total=this.calculateTotal(),this.outerRadius=m-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*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/Ot)}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,f=a&&c.animateScale,p=f?0:this.innerRadius,b=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,r);let y=this._getRotation(),v;for(v=0;v<e;++v)y+=this._circumference(v,a);for(v=e;v<e+i;++v){const m=this._circumference(v,a),w=t[v],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+m,circumference:m,outerRadius:b,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(v,w.active?"active":r)),y+=m,this.updateElement(w,v,T,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)?Ot*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Oi(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(it(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(mn,"id","doughnut"),H(mn,"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"}),H(mn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(mn,"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 Ni extends Ee{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}=Mc(e,r,s);this._drawStart=o,this._drawCount=l,Cc(e)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;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),f=s.axis,p=o.axis,{spanGaps:b,segment:x}=this.options,g=fn(b)?b:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none",v=e+i,m=t.length;let w=e>0&&this.getParsed(e-1);for(let T=0;T<m;++T){const D=t[T],k=y?D:{};if(T<e||T>=v){k.skip=!0;continue}const M=this.getParsed(T),C=at(M[p]),O=k[f]=s.getPixelForValue(M[f],T),P=k[p]=a||C?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[p],T);k.skip=isNaN(O)||isNaN(P)||C,k.stop=T>0&&Math.abs(M[f]-w[f])>g,x&&(k.parsed=M,k.raw=c.data[T]),d&&(k.options=u||this.resolveDataElementOptions(T,D.active?"active":r)),y||this.updateElement(D,T,k,r),w=M}}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()}}H(Ni,"id","line"),H(Ni,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ni,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Fi extends Ee{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=Oi(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,e,i,r){return Yc.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,f=c.getIndexAngle(0)-.5*ft;let p=f,b;const x=360/this.countVisibleElements();for(b=0;b<e;++b)p+=this._computeAngle(b,r,x);for(b=e;b<e+i;b++){const g=t[b];let y=p,v=p+this._computeAngle(b,r,x),m=s.getDataVisibility(b)?c.getDistanceFromCenterForValue(this.getParsed(b).r):0;p=v,a&&(l.animateScale&&(m=0),l.animateRotate&&(y=v=f));const w={x:u,y:d,innerRadius:0,outerRadius:m,startAngle:y,endAngle:v,options:this.resolveDataElementOptions(b,g.active?"active":r)};this.updateElement(g,b,w,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)?Gt(this.resolveDataElementOptions(t,e).angle||i):0}}H(Fi,"id","polarArea"),H(Fi,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Fi,"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 rs extends mn{}H(rs,"id","pie"),H(rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Er extends Ee{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 Yc.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,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,r)}}}H(Er,"id","radar"),H(Er,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Er,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Rr extends Ee{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}=Mc(e,i,r);if(this._drawStart=a,this._drawCount=s,Cc(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),f=this.includeOptions(r,d),p=s.axis,b=o.axis,{spanGaps:x,segment:g}=this.options,y=fn(x)?x:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||r==="none";let m=e>0&&this.getParsed(e-1);for(let w=e;w<e+i;++w){const T=t[w],D=this.getParsed(w),k=v?T:{},M=at(D[b]),C=k[p]=s.getPixelForValue(D[p],w),O=k[b]=a||M?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,D,l):D[b],w);k.skip=isNaN(C)||isNaN(O)||M,k.stop=w>0&&Math.abs(D[p]-m[p])>y,g&&(k.parsed=D,k.raw=c.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,T.active?"active":r)),v||this.updateElement(T,w,k,r),m=D}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}}H(Rr,"id","scatter"),H(Rr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Rr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Rm=Object.freeze({__proto__:null,BarController:Ii,BubbleController:Pr,DoughnutController:mn,LineController:Ni,PieController:rs,PolarAreaController:Fi,RadarController:Er,ScatterController:Rr});function In(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class as{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(as.prototype,t)}init(){}formats(){return In()}parse(){return In()}format(){return In()}add(){return In()}diff(){return In()}startOf(){return In()}endOf(){return In()}}var uu={_date:as};function Am(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?ig:Xe;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),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Ui(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:f}=Am(a[o],t,s,r);for(let p=d;p<=f;++p){const b=u[p];b.skip||i(b,c,p)}}}function Lm(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 ss(n,t,e,i,r){const a=[];return!r&&!n.isPointInArea(t)||Ui(n,e,t,function(o,l,c){!r&&!Ge(o,n.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Im(n,t,e,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=bc(s,{x:t.x,y:t.y});Di(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return Ui(n,e,t,a),r}function Nm(n,t,e,i,r,a){let s=[];const o=Lm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,r);if(i&&!p)return;const b=u.getCenterPoint(r);if(!(!!a||n.isPointInArea(b))&&!p)return;const g=o(t,b);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Ui(n,e,t,c),s}function os(n,t,e,i,r,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!i?Im(n,t,e,r):Nm(n,t,e,i,r,a)}function du(n,t,e,i,r){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Ui(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 ls={evaluateInteractionItems:Ui,modes:{index(n,t,e,i){const r=gn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?ss(n,r,a,i,s):os(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=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?ss(n,r,a,i,s):os(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=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,r,a,i,s)},nearest(n,t,e,i){const r=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return os(n,r,a,e.intersect,i,s)},x(n,t,e,i){const r=gn(t,n);return du(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=gn(t,n);return du(n,r,"y",e.intersect,i)}}};const fu=["left","top","right","bottom"];function Bi(n,t){return n.filter(e=>e.pos===t)}function hu(n,t){return n.filter(e=>fu.indexOf(e.pos)===-1&&e.box.axis===t)}function Yi(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 Fm(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 Um(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:a}=e;if(!i||!fu.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 Bm(n,t){const e=Um(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 Ym(n){const t=Fm(n),e=Yi(t.filter(c=>c.box.fullSize),!0),i=Yi(Bi(t,"left"),!0),r=Yi(Bi(t,"right")),a=Yi(Bi(t,"top"),!0),s=Yi(Bi(t,"bottom")),o=hu(t,"x"),l=hu(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Bi(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function pu(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function gu(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 Wm(n,t,e,i){const{pos:r,box:a}=e,s=n.maxPadding;if(!ct(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&&gu(s,a.getPadding());const o=Math.max(0,t.outerWidth-pu(s,n,"left","right")),l=Math.max(0,t.outerHeight-pu(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 zm(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 Hm(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 Wi(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,Hm(o.horizontal,t));const{same:d,other:f}=Wm(t,e,o,i);c|=d&&r.length,u=u||f,l.fullSize||r.push(o)}return c&&Wi(r,t,e,i)||u}function Ar(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 mu(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,f=c.size||l.height;fe(c.start)&&(s=c.start),l.fullSize?Ar(l,r.left,s,e.outerWidth-r.right-r.left,f):Ar(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;fe(c.start)&&(a=c.start),l.fullSize?Ar(l,a,r.top,f,e.outerHeight-r.bottom-r.top):Ar(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var ae={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=Kt(n.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(e-r.height,0),o=Ym(n.boxes),l=o.vertical,c=o.horizontal;Ct(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},r);gu(f,Kt(i));const p=Object.assign({maxPadding:f,w:a,h:s,x:r.left,y:r.top},r),b=Bm(l.concat(c),d);Wi(o.fullSize,p,d,b),Wi(l,p,d,b),Wi(c,p,d,b)&&Wi(l,p,d,b),zm(p),mu(o.leftAndTop,p,d,b),p.x+=p.w,p.y+=p.h,mu(o.rightAndBottom,p,d,b),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ct(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class yu{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 $m extends yu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Lr="$chartjs",jm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bu=n=>n===null||n==="";function Vm(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Lr]={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",bu(r)){const a=Hc(n,"width");a!==void 0&&(n.width=a)}if(bu(i))if(n.style.height==="")n.height=n.width/(t||2);else{const a=Hc(n,"height");a!==void 0&&(n.height=a)}return n}const vu=Kg?{passive:!0}:!1;function qm(n,t,e){n.addEventListener(t,e,vu)}function Xm(n,t,e){n.canvas.removeEventListener(t,e,vu)}function Gm(n,t){const e=jm[n.type]||n.type,{x:i,y:r}=gn(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ir(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Km(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ir(o.addedNodes,i),s=s&&!Ir(o.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Qm(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ir(o.removedNodes,i),s=s&&!Ir(o.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const zi=new Map;let xu=0;function wu(){const n=window.devicePixelRatio;n!==xu&&(xu=n,zi.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zm(n,t){zi.size||window.addEventListener("resize",wu),zi.set(n,t)}function Jm(n){zi.delete(n),zi.size||window.removeEventListener("resize",wu)}function t0(n,t,e){const i=n.canvas,r=i&&Ja(i);if(!r)return;const a=Tc((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),Zm(n,a),s}function cs(n,t,e){e&&e.disconnect(),t==="resize"&&Jm(n)}function e0(n,t,e){const i=n.canvas,r=Tc(a=>{n.ctx!==null&&e(Gm(a,n))},n);return qm(i,t,r),r}class n0 extends yu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Vm(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Lr])return!1;const i=e[Lr].initial;["height","width"].forEach(a=>{const s=i[a];at(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[Lr],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Km,detach:Qm,resize:t0}[e]||e0;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:cs,detach:cs,resize:cs}[e]||Xm)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Gg(t,e,i,r)}isAttached(t){const e=Ja(t);return!!(e&&e.isConnected)}}function i0(n){return!Za()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?$m:n0}class ee{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return fn(this.x)&&fn(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}}H(ee,"defaults",{}),H(ee,"defaultRoutes");function r0(n,t){const e=n.options.ticks,i=a0(n),r=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?o0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return l0(t,c,a,s/r),c;const u=s0(a,t,r);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Nr(t,c,u,at(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Nr(t,c,u,a[d],a[d+1]);return Nr(t,c,u,l,at(p)?t.length:l+p),c}return Nr(t,c,u),c}function a0(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 s0(n,t,e){const i=c0(n),r=t.length/e;if(!i)return Math.max(r,1);const a=Jp(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 o0(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function l0(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 Nr(n,t,e,i,r){const a=it(i,0),s=Math.min(it(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 c0(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 u0=n=>n==="left"?"right":n==="right"?"left":n,_u=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Tu=(n,t)=>Math.min(t||n,n);function Mu(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 d0(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 f0(n,t){Ct(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 Hi(n){return n.drawTicks?n.tickLength:0}function Cu(n,t){if(!n.display)return 0;const e=At(n.font,t),i=Kt(n.padding);return(yt(n.text)?n.text.length:1)*e.lineHeight+i.height}function h0(n,t){return pn(n,{scale:t,type:"scale"})}function p0(n,t,e){return pn(n,{tick:e,index:t,type:"tick"})}function g0(n,t,e){let i=za(n);return(e&&t!=="right"||!e&&t==="right")&&(i=u0(i)),i}function m0(n,t,e,i){const{top:r,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,b;const x=s-r,g=o-a;if(n.isHorizontal()){if(p=re(i,a,o),ct(e)){const y=Object.keys(e)[0],v=e[y];b=u[y].getPixelForValue(v)+x-t}else e==="center"?b=(c.bottom+c.top)/2+x-t:b=_u(n,e,t);f=o-a}else{if(ct(e)){const y=Object.keys(e)[0],v=e[y];p=u[y].getPixelForValue(v)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=_u(n,e,t);b=re(i,s,r),d=e==="left"?-Rt:Rt}return{titleX:p,titleY:b,maxWidth:f,rotation:d}}class Nn extends ee{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=xe(t,Number.POSITIVE_INFINITY),e=xe(e,Number.NEGATIVE_INFINITY),i=xe(i,Number.POSITIVE_INFINITY),r=xe(r,Number.NEGATIVE_INFINITY),{min:xe(t,i),max:xe(e,r),minDefined:Nt(t),maxDefined:Nt(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:xe(e,xe(i,e)),max:xe(i,xe(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(){Mt(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=Dg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Mu(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=r0(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(){Mt(this.options.afterUpdate,[this])}beforeSetDimensions(){Mt(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(){Mt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Mt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Mt(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=Mt(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){Mt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Mt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Tu(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,f=u.highest.height,p=Zt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:p/(i-1),d+6>o&&(o=p/(i-(t.offset?.5:1)),l=this.maxHeight-Hi(t.grid)-e.padding-Cu(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=_r(Math.min(Math.asin(Zt((u.highest.height+6)/o,-1,1)),Math.asin(Zt(l/c,-1,1))-Math.asin(Zt(f/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Mt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mt(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=Cu(r,e.options.font);if(o?(t.width=this.maxWidth,t.height=Hi(a)+l):(t.height=this.maxHeight,t.width=Hi(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=i.padding*2,b=Gt(this.labelRotation),x=Math.cos(b),g=Math.sin(b);if(o){const y=i.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=i.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(c,u,g,x)}}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 f=0,p=0;l?c?(f=r*t.width,p=i*e.height):(f=i*t.height,p=r*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-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(){Mt(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++)at(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=Mu(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/Tu(e,i));let c=0,u=0,d,f,p,b,x,g,y,v,m,w,T;for(d=0;d<e;d+=l){if(b=t[d].label,x=this._resolveTickFontOptions(d),r.font=g=x.string,y=a[g]=a[g]||{data:{},gc:[]},v=x.lineHeight,m=w=0,!at(b)&&!yt(b))m=Cr(r,y.data,y.gc,m,b),w=v;else if(yt(b))for(f=0,p=b.length;f<p;++f)T=b[f],!at(T)&&!yt(T)&&(m=Cr(r,y.data,y.gc,m,T),w+=v);s.push(m),o.push(w),c=Math.max(m,c),u=Math.max(w,u)}f0(a,e);const D=s.indexOf(c),k=o.indexOf(u),M=C=>({width:s[C]||0,height:o[C]||0});return{first:M(0),last:M(e-1),widest:M(D),highest:M(k),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 ng(this._alignToPixels?En(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=p0(this.getContext(),t,i))}return this.$context||(this.$context=h0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Gt(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),f=Hi(a),p=[],b=o.setContext(this.getContext()),x=b.display?b.width:0,g=x/2,y=function(z){return En(i,z,x)};let v,m,w,T,D,k,M,C,O,P,R,F;if(s==="top")v=y(this.bottom),k=this.bottom-f,C=v-g,P=y(t.top)+g,F=t.bottom;else if(s==="bottom")v=y(this.top),P=t.top,F=y(t.bottom)-g,k=v+g,C=this.top+f;else if(s==="left")v=y(this.right),D=this.right-f,M=v-g,O=y(t.left)+g,R=t.right;else if(s==="right")v=y(this.left),O=t.left,R=y(t.right)-g,D=v+g,M=this.left+f;else if(e==="x"){if(s==="center")v=y((t.top+t.bottom)/2+.5);else if(ct(s)){const z=Object.keys(s)[0],I=s[z];v=y(this.chart.scales[z].getPixelForValue(I))}P=t.top,F=t.bottom,k=v+g,C=k+f}else if(e==="y"){if(s==="center")v=y((t.left+t.right)/2);else if(ct(s)){const z=Object.keys(s)[0],I=s[z];v=y(this.chart.scales[z].getPixelForValue(I))}D=v-g,M=D-f,O=t.left,R=t.right}const q=it(r.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(m=0;m<d;m+=$){const z=this.getContext(m),I=a.setContext(z),rt=o.setContext(z),B=I.lineWidth,bt=I.color,dt=rt.dash||[],W=rt.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;w=d0(this,m,l),w!==void 0&&(T=En(i,w,B),c?D=M=O=R=T:k=C=P=F=T,p.push({tx1:D,ty1:k,tx2:M,ty2:C,x1:O,y1:P,x2:R,y2:F,width:B,color:bt,borderDash:dt,borderDashOffset:W,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=v,p}_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,f=Hi(i.grid),p=f+u,b=d?-u:p,x=-Gt(this.labelRotation),g=[];let y,v,m,w,T,D,k,M,C,O,P,R,F="middle";if(r==="top")D=this.bottom-b,k=this._getXAxisLabelAlignment();else if(r==="bottom")D=this.top+b,k=this._getXAxisLabelAlignment();else if(r==="left"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(r==="right"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(e==="x"){if(r==="center")D=(t.top+t.bottom)/2+p;else if(ct(r)){const $=Object.keys(r)[0],z=r[$];D=this.chart.scales[$].getPixelForValue(z)+p}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")T=(t.left+t.right)/2-p;else if(ct(r)){const $=Object.keys(r)[0],z=r[$];T=this.chart.scales[$].getPixelForValue(z)}k=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(y=0,v=o.length;y<v;++y){m=o[y],w=m.label;const $=a.setContext(this.getContext(y));M=this.getPixelForTick(y)+a.labelOffset,C=this._resolveTickFontOptions(y),O=C.lineHeight,P=yt(w)?w.length:1;const z=P/2,I=$.color,rt=$.textStrokeColor,B=$.textStrokeWidth;let bt=k;s?(T=M,k==="inner"&&(y===v-1?bt=this.options.reverse?"left":"right":y===0?bt=this.options.reverse?"right":"left":bt="center"),r==="top"?c==="near"||x!==0?R=-P*O+O/2:c==="center"?R=-q.highest.height/2-z*O+O:R=-q.highest.height+O/2:c==="near"||x!==0?R=O/2:c==="center"?R=q.highest.height/2-z*O:R=q.highest.height-P*O,d&&(R*=-1),x!==0&&!$.showLabelBackdrop&&(T+=O/2*Math.sin(x))):(D=M,R=(1-P)*O/2);let dt;if($.showLabelBackdrop){const W=Kt($.backdropPadding),L=q.heights[y],U=q.widths[y];let j=R-W.top,Z=0-W.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(k){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":y===v-1?Z-=U:y>0&&(Z-=U/2);break}dt={left:Z,top:j,width:U+W.width,height:L+W.height,color:$.backdropColor}}g.push({label:w,font:C,textOffset:R,options:{rotation:x,color:I,strokeColor:rt,strokeWidth:B,textAlign:bt,textBaseline:F,translation:[T,D],backdrop:dt}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Gt(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,f;this.isHorizontal()?(c=En(t,this.left,s)-s/2,u=En(t,this.right,o)+o/2,d=f=l):(d=En(t,this.top,s)-s/2,f=En(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,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Ei(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;Rn(i,c,0,u,l,o)}r&&Ri(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const a=At(i.font),s=Kt(i.padding),o=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||ct(e)?(l+=s.bottom,yt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=m0(this,l,e,o);Rn(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:f,textAlign:g0(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=it(t.grid&&t.grid.z,-1),r=it(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Nn.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 At(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Fr{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;v0(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,y0(t,s,i),this.override&&Bt.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 Bt[r]&&(delete Bt[r][i],this.override&&delete Pn[i])}}function y0(n,t,e){const i=Mi(Object.create(null),[e?Bt.get(e):{},Bt.get(t),n.defaults]);Bt.set(t,i),n.defaultRoutes&&b0(t,n.defaultRoutes),n.descriptors&&Bt.describe(t,n.descriptors)}function b0(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(".");Bt.route(a,r,l,o)})}function v0(n){return"id"in n&&"defaults"in n}class x0{constructor(){this.controllers=new Fr(Ee,"datasets",!0),this.elements=new Fr(ee,"elements"),this.plugins=new Fr(Object,"plugins"),this.scales=new Fr(Nn,"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):Ct(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,i){const r=Ba(t);Mt(i["before"+r],[],i),e[t](i),Mt(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 Fe=new x0;class w0{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(Mt(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){at(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=it(i.options&&i.options.plugins,{}),a=_0(i);return r===!1&&!e?[]:M0(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 _0(n){const t={},e=[],i=Object.keys(Fe.plugins.items);for(let a=0;a<i.length;a++)e.push(Fe.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 T0(n,t){return!t&&n===!1?null:n===!0?{}:n}function M0(n,{plugins:t,localIds:e},i,r){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=T0(i[l],r);c!==null&&a.push({plugin:o,options:C0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function C0(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 us(n,t){const e=Bt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function S0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function D0(n,t){return n===t?"_index_":"_value_"}function Su(n){if(n==="x"||n==="y"||n==="r")return n}function k0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function ds(n,...t){if(Su(n))return n;for(const e of t){const i=e.axis||k0(e.position)||n.length>1&&Su(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Du(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function O0(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 Du(n,"x",e[0])||Du(n,"y",e[0])}return{}}function P0(n,t){const e=Pn[n.type]||{scales:{}},i=t.scales||{},r=us(n.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!ct(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=ds(s,o,O0(s,n),Bt.scales[o.type]),c=D0(l,r),u=e.scales||{};a[s]=Ci(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||us(o,t),u=(Pn[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=S0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Ci(a[p],[{axis:f},i[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Ci(o,[Bt.scales[o.type],Bt.scale])}),a}function ku(n){const t=n.options||(n.options={});t.plugins=it(t.plugins,{}),t.scales=P0(n,t)}function Ou(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function E0(n){return n=n||{},n.data=Ou(n.data),ku(n),n}const Pu=new Map,Eu=new Set;function Ur(n,t){let e=Pu.get(n);return e||(e=t(),Pu.set(n,e),Eu.add(e)),e}const $i=(n,t,e)=>{const i=un(t,e);i!==void 0&&n.add(i)};class R0{constructor(t){this._config=E0(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=Ou(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(),ku(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ur(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ur(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ur(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Ur(`${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=>$i(l,t,d))),u.forEach(d=>$i(l,r,d)),u.forEach(d=>$i(l,Pn[a]||{},d)),u.forEach(d=>$i(l,Bt,d)),u.forEach(d=>$i(l,ja,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Eu.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Pn[e]||{},Bt.datasets[e]||{},{type:e},Bt,ja]}resolveNamedOptions(t,e,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Ru(this._resolverCache,t,r);let l=s;if(L0(s,e)){a.$shared=!1,i=he(i)?i():i;const c=this.createResolver(t,i,o);l=ni(s,i,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,i=[""],r){const{resolver:a}=Ru(this._resolverCache,t,i);return ct(e)?ni(a,e,void 0,r):a}}function Ru(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:Ga(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const A0=n=>ct(n)&&Object.getOwnPropertyNames(n).some(t=>he(n[t]));function L0(n,t){const{isScriptable:e,isIndexable:i}=Lc(n);for(const r of t){const a=e(r),s=i(r),o=(s||a)&&n[r];if(a&&(he(o)||A0(o))||s&&yt(o))return!0}return!1}var I0="4.4.1";const N0=["top","bottom","left","right","chartArea"];function Au(n,t){return n==="top"||n==="bottom"||N0.indexOf(n)===-1&&t==="x"}function Lu(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Iu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Mt(e&&e.onComplete,[n],t)}function F0(n){const t=n.chart,e=t.options.animation;Mt(e&&e.onProgress,[n],t)}function Nu(n){return Za()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Br={},Fu=n=>{const t=Nu(n);return Object.values(Br).filter(e=>e.canvas===t).pop()};function U0(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 B0(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Yr(n,t,e){return n.options.clip?n[e]:t[e]}function Y0(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Yr(e,t,"left"),right:Yr(e,t,"right"),top:Yr(i,t,"top"),bottom:Yr(i,t,"bottom")}:t}let Ce=(Sn=class{static register(...t){Fe.add(...t),Uu()}static unregister(...t){Fe.remove(...t),Uu()}constructor(t,e){const i=this.config=new R0(e),r=Nu(t),a=Fu(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||i0(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=jp(),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 w0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Br[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ke.listen(this,"complete",Iu),Ke.listen(this,"progress",F0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:a}=this;return at(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 Fe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():zc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Ke.stop(this),this}resize(t,e){Ke.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,zc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Mt(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Ct(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=ds(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ct(a,s=>{const o=s.options,l=o.id,c=ds(l,o),u=it(o.type,s.dtype);(o.position===void 0||Au(o.position,c)!==Au(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 f=Fe.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),Ct(r,(s,o)=>{s||delete i[o]}),Ct(i,s=>{ae.configure(this,s,s.options),ae.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(Lu("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||us(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=Fe.getController(o),{datasetElementType:c,dataElementType:u}=Bt.datasets[o];Object.assign(l,{dataElementType:Fe.getElement(u),datasetElementType:c&&Fe.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Ct(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),f=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||Ct(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Lu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Ct(this.scales,t=>{ae.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!pc(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;U0(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(!pc(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;ae.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Ct(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,he(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&&(Ke.has(this)?this.attached&&!Ke.running(this)&&Ke.start(this):(this.draw(),Iu({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=Y0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Ei(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&&Ri(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ge(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const a=ls.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=pn(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);fe(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(),Ke.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(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Br[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)};Ct(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(){Ct(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Ct(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}});!br(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=Qp(t),c=B0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Mt(a.onHover,[t,o,this],this),l&&Mt(a.onClick,[t,o,this],this));const u=!br(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)}},H(Sn,"defaults",Bt),H(Sn,"instances",Br),H(Sn,"overrides",Pn),H(Sn,"registry",Fe),H(Sn,"version",I0),H(Sn,"getChart",Fu),Sn);function Uu(){return Ct(Ce.instances,n=>n._plugins.invalidate())}function W0(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+Rt,i-Rt),n.closePath(),n.clip()}function z0(n){return Xa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function H0(n,t,e,i){const r=z0(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 Zt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Zt(r.innerStart,0,s),innerEnd:Zt(r.innerEnd,0,s)}}function ai(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Wr(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),f=u>0?u+i+e+c:0;let p=0;const b=r-l;if(i){const $=u>0?u-i:0,z=d>0?d-i:0,I=($+z)/2,rt=I!==0?b*I/(I+i):b;p=(b-rt)/2}const x=Math.max(.001,b*d-e/ft)/d,g=(b-x)/2,y=l+g+p,v=r-g-p,{outerStart:m,outerEnd:w,innerStart:T,innerEnd:D}=H0(t,f,d,v-y),k=d-m,M=d-w,C=y+m/k,O=v-w/M,P=f+T,R=f+D,F=y+T/P,q=v-D/R;if(n.beginPath(),a){const $=(C+O)/2;if(n.arc(s,o,d,C,$),n.arc(s,o,d,$,O),w>0){const B=ai(M,O,s,o);n.arc(B.x,B.y,w,O,v+Rt)}const z=ai(R,v,s,o);if(n.lineTo(z.x,z.y),D>0){const B=ai(R,q,s,o);n.arc(B.x,B.y,D,v+Rt,q+Math.PI)}const I=(v-D/f+(y+T/f))/2;if(n.arc(s,o,f,v-D/f,I,!0),n.arc(s,o,f,I,y+T/f,!0),T>0){const B=ai(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,y-Rt)}const rt=ai(k,y,s,o);if(n.lineTo(rt.x,rt.y),m>0){const B=ai(k,C,s,o);n.arc(B.x,B.y,m,y-Rt,C)}}else{n.moveTo(s,o);const $=Math.cos(C)*d+s,z=Math.sin(C)*d+o;n.lineTo($,z);const I=Math.cos(O)*d+s,rt=Math.sin(O)*d+o;n.lineTo(I,rt)}n.closePath()}function $0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Wr(n,t,e,i,l,r);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%Ot||Ot))}return Wr(n,t,e,i,l,r),n.fill(),l}function j0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let b=t.endAngle;if(a){Wr(n,t,e,i,b,r);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(b=s+(o%Ot||Ot))}p&&W0(n,t,b),a||(Wr(n,t,e,i,b,r),n.stroke())}class ji extends ee{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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}=bc(a,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),p=(this.options.spacing+this.options.borderWidth)/2,x=it(f,c-l)>=Ot||Di(s,l,c),g=qe(o,u+p,d+p);return x&&g}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,f=(o+l+u+c)/2;return{x:i+Math.cos(d)*f,y:r+Math.sin(d)*f}}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>Ot?Math.floor(r/Ot):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(ft,r||0)),u=a*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,$0(e,this,u,s,o),j0(e,this,u,s,o),e.restore()}}H(ji,"id","arc"),H(ji,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H(ji,"defaultRoutes",{backgroundColor:"backgroundColor"}),H(ji,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Bu(n,t,e=t){n.lineCap=it(e.borderCapStyle,t.borderCapStyle),n.setLineDash(it(e.borderDash,t.borderDash)),n.lineDashOffset=it(e.borderDashOffset,t.borderDashOffset),n.lineJoin=it(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=it(e.borderWidth,t.borderWidth),n.strokeStyle=it(e.borderColor,t.borderColor)}function V0(n,t,e){n.lineTo(e.x,e.y)}function q0(n){return n.stepped?bg:n.tension||n.cubicInterpolationMode==="monotone"?vg:V0}function Yu(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 X0(n,t,e,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Yu(r,e,i),u=q0(a);let{move:d=!0,reverse:f}=i||{},p,b,x;for(p=0;p<=c;++p)b=r[(o+(f?c-p:p))%s],!b.skip&&(d?(n.moveTo(b.x,b.y),d=!1):u(n,x,b,f,a.stepped),x=b);return l&&(b=r[(o+(f?c:0))%s],u(n,x,b,f,a.stepped)),!!l}function G0(n,t,e,i){const r=t.points,{count:a,start:s,ilen:o}=Yu(r,e,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,f,p,b,x,g,y;const v=w=>(s+(c?o-w:w))%a,m=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,y))};for(l&&(p=r[v(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=r[v(f)],p.skip)continue;const w=p.x,T=p.y,D=w|0;D===b?(T<x?x=T:T>g&&(g=T),u=(d*u+w)/++d):(m(),n.lineTo(w,T),b=D,d=0,x=g=T),y=T}m()}function fs(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?G0:X0}function K0(n){return n.stepped?Qg:n.tension||n.cubicInterpolationMode==="monotone"?Zg:Ln}function Q0(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),Bu(n,t.options),n.stroke(r)}function Z0(n,t,e,i){const{segments:r,options:a}=t,s=fs(t);for(const o of r)Bu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const J0=typeof Path2D=="function";function ty(n,t,e,i){J0&&!t.options.segment?Q0(n,t,e,i):Z0(n,t,e,i)}class yn extends ee{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;Hg(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=rm(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=Gc(this,{property:e,start:r,end:r});if(!s.length)return;const o=[],l=K0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],b=a[f];if(p===b){o.push(p);continue}const x=Math.abs((r-p[e])/(b[e]-p[e])),g=l(p,b,x,i.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,i){return fs(this)(t,this,e,i)}path(t,e,i){const r=this.segments,a=fs(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(),ty(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(yn,"id","line"),H(yn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(yn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(yn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Wu(n,t,e,i){const r=n.options,{[e]:a}=n.getProps([e],i);return Math.abs(t-a)<r.radius+r.hitRadius}class zr extends ee{constructor(e){super();H(this,"parsed");H(this,"skip");H(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 Wu(this,e,"x",i)}inYRange(e,i){return Wu(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||!Ge(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,qa(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(zr,"id","point"),H(zr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zu(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 bn(n,t,e,i){return n?0:Zt(t,e,i)}function ey(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,a=Ac(i);return{t:bn(r.top,a.top,0,e),r:bn(r.right,a.right,0,t),b:bn(r.bottom,a.bottom,0,e),l:bn(r.left,a.left,0,t)}}function ny(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,a=hn(r),s=Math.min(t,e),o=n.borderSkipped,l=i||ct(r);return{topLeft:bn(!l||o.top||o.left,a.topLeft,0,s),topRight:bn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:bn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:bn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function iy(n){const t=zu(n),e=t.right-t.left,i=t.bottom-t.top,r=ey(n,e/2,i/2),a=ny(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 hs(n,t,e,i){const r=t===null,a=e===null,o=n&&!(r&&a)&&zu(n,i);return o&&(r||qe(t,o.left,o.right))&&(a||qe(e,o.top,o.bottom))}function ry(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function ay(n,t){n.rect(t.x,t.y,t.w,t.h)}function ps(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 Hr extends ee{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}=iy(this),o=ry(s.radius)?ei:ay;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,ps(s,e,a)),t.clip(),o(t,ps(a,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,ps(a,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return hs(this,t,e,i)}inXRange(t,e){return hs(this,t,null,e)}inYRange(t,e){return hs(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}}H(Hr,"id","bar"),H(Hr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(Hr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sy=Object.freeze({__proto__:null,ArcElement:ji,BarElement:Hr,LineElement:yn,PointElement:zr});const gs=["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)"],Hu=gs.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $u(n){return gs[n%gs.length]}function ju(n){return Hu[n%Hu.length]}function oy(n,t){return n.borderColor=$u(t),n.backgroundColor=ju(t),++t}function ly(n,t){return n.backgroundColor=n.data.map(()=>$u(t++)),t}function cy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function uy(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof mn?t=ly(e,t):r instanceof Fi?t=cy(e,t):r&&(t=oy(e,t))}}function Vu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dy(n){return n&&(n.borderColor||n.backgroundColor)}var fy={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&&(Vu(i)||dy(r)||a&&Vu(a)))return;const s=uy(n);i.forEach(s)}};function hy(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,f,p,b,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,y=0,v;const m=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,e)+t,T=w-m;for(v=m;v<w;v++)g+=n[v].x,y+=n[v].y;g/=T,y/=T;const D=Math.floor(d*o)+1+t,k=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:M,y:C}=n[u];for(p=b=-1,v=D;v<k;v++)b=.5*Math.abs((M-g)*(n[v].y-C)-(M-n[v].x)*(y-C)),b>p&&(p=b,f=n[v],x=v);s[l++]=f,u=x}return s[l++]=n[c],s}function py(n,t,e,i){let r=0,a=0,s,o,l,c,u,d,f,p,b,x;const g=[],y=t+e-1,v=n[t].x,w=n[y].x-v;for(s=t;s<t+e;++s){o=n[s],l=(o.x-v)/w*i,c=o.y;const T=l|0;if(T===u)c<b?(b=c,d=s):c>x&&(x=c,f=s),r=(a*r+o.x)/++a;else{const D=s-1;if(!at(d)&&!at(f)){const k=Math.min(d,f),M=Math.max(d,f);k!==p&&k!==D&&g.push({...n[k],x:r}),M!==p&&M!==D&&g.push({...n[M],x:r})}s>0&&D!==p&&g.push(n[D]),g.push(o),u=T,a=0,b=x=c,d=f=p=s}}return g}function qu(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 Xu(n){n.data.datasets.forEach(t=>{qu(t)})}function gy(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=Zt(Xe(t,a.axis,s).lo,0,e-1)),c?r=Zt(Xe(t,a.axis,o).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var my={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xu(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(Ai([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:f}=gy(l,c);const p=e.threshold||4*i;if(f<=p){qu(r);return}at(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let b;switch(e.algorithm){case"lttb":b=hy(c,d,f,i,e);break;case"min-max":b=py(c,d,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=b})},destroy(n){Xu(n)}};function yy(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=ys(l,c,r);const u=ms(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=Gc(t,u);for(const f of d){const p=ms(e,a[f.start],a[f.end],f.loop),b=Xc(o,r,p);for(const x of b)s.push({source:x,target:f,start:{[e]:Gu(u,p,"start",Math.max)},end:{[e]:Gu(u,p,"end",Math.min)}})}}return s}function ms(n,t,e,i){if(i)return;let r=t[n],a=e[n];return n==="angle"&&(r=we(r),a=we(a)),{property:n,start:r,end:a}}function by(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ys(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 ys(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Gu(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Ku(n,t){let e=[],i=!1;return yt(n)?(i=!0,e=n):e=by(n,t),e.length?new yn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Qu(n){return n&&n.fill!==!1}function vy(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(!Nt(r))return r;if(s=n[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function xy(n,t,e){const i=My(n);if(ct(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return Nt(r)&&Math.floor(r)===r?wy(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function wy(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function _y(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:ct(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ty(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:ct(n)?i=n.value:i=t.getBaseValue(),i}function My(n){const t=n.options,e=t.fill;let i=it(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Cy(n){const{scale:t,index:e,line:i}=n,r=[],a=i.segments,s=i.points,o=Sy(t,e);o.push(Ku({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++)Dy(r,s[u],o)}return new yn({points:r,options:{}})}function Sy(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 Dy(n,t,e){const i=[];for(let r=0;r<e.length;r++){const a=e[r],{first:s,last:o,point:l}=ky(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(n.push(l),!o)break}}n.push(...i)}function ky(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],f=s[u.end][e];if(qe(r,d,f)){o=r===d,l=r===f;break}}return{first:o,last:l,point:i}}class Zu{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:Ot},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 Oy(n){const{chart:t,fill:e,line:i}=n;if(Nt(e))return Py(t,e);if(e==="stack")return Cy(n);if(e==="shape")return!0;const r=Ey(n);return r instanceof Zu?r:Ku(r,i)}function Py(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ey(n){return(n.scale||{}).getPointPositionForValue?Ay(n):Ry(n)}function Ry(n){const{scale:t={},fill:e}=n,i=_y(e,t);if(Nt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Ay(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=Ty(e,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Zu({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 bs(n,t,e){const i=Oy(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&&(Ei(n,e),Ly(n,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:s}),Ri(n))}function Ly(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&&(Ju(n,i,s.top),td(n,{line:e,target:i,color:r,scale:o,property:l}),n.restore(),n.save(),Ju(n,i,s.bottom)),td(n,{line:e,target:i,color:a,scale:o,property:l}),n.restore()}function Ju(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[ys(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 td(n,t){const{line:e,target:i,property:r,color:a,scale:s}=t,o=yy(e,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=i!==!0;n.save(),n.fillStyle=f,Iy(n,s,p&&ms(r,u,d)),n.beginPath();const b=!!e.pathSegment(n,l);let x;if(p){b?n.closePath():ed(n,i,d,r);const g=!!i.pathSegment(n,c,{move:b,reverse:!0});x=b&&g,x||ed(n,i,u,r)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Iy(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 ed(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var Ny={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 yn&&(l={visible:n.isDatasetVisible(s),index:s,fill:xy(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=vy(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&&bs(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;Qu(a)&&bs(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Qu(i)||e.drawTime!=="beforeDatasetDraw"||bs(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nd=(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)}},Fy=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class id extends ee{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=Mt(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=At(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=nd(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 f=-1,p=-u;return this.legendItems.forEach((b,x)=>{const g=i+e/2+a.measureText(b.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:r},c[c.length-1]+=g+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,f=0,p=0,b=0,x=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:v,itemHeight:m}=Uy(i,e,a,g,r);y>0&&p+m+2*o>u&&(d+=f+o,c.push({width:f,height:p}),b+=f+o,x++,f=p=0),l[y]={left:b,top:p,col:x,width:v,height:m},f=Math.max(f,v),p+=m+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:a}}=this,s=ri(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=re(i,this.left+r,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=re(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=re(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=re(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;Ei(t,this),this._draw(),Ri(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=Bt.color,l=ri(t.rtl,this.left,this.width),c=At(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:b,boxHeight:x,itemHeight:g}=nd(s,d),y=function(D,k,M){if(isNaN(b)||b<=0||isNaN(x)||x<0)return;r.save();const C=it(M.lineWidth,1);if(r.fillStyle=it(M.fillStyle,o),r.lineCap=it(M.lineCap,"butt"),r.lineDashOffset=it(M.lineDashOffset,0),r.lineJoin=it(M.lineJoin,"miter"),r.lineWidth=C,r.strokeStyle=it(M.strokeStyle,o),r.setLineDash(it(M.lineDash,[])),s.usePointStyle){const O={radius:x*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:C},P=l.xPlus(D,b/2),R=k+f;Rc(r,O,P,R,s.pointStyleWidth&&b)}else{const O=k+Math.max((d-x)/2,0),P=l.leftForLtr(D,b),R=hn(M.borderRadius);r.beginPath(),Object.values(R).some(F=>F!==0)?ei(r,{x:P,y:O,w:b,h:x,radius:R}):r.rect(P,O,b,x),r.fill(),C!==0&&r.stroke()}r.restore()},v=function(D,k,M){Rn(r,M.text,D,k+g/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},m=this.isHorizontal(),w=this._computeTitleHeight();m?p={x:re(a,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:p={x:this.left+u,y:re(a,this.top+w+u,this.bottom-e[0].height),line:0},$c(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((D,k)=>{r.strokeStyle=D.fontColor,r.fillStyle=D.fontColor;const M=r.measureText(D.text).width,C=l.textAlign(D.textAlign||(D.textAlign=s.textAlign)),O=b+f+M;let P=p.x,R=p.y;l.setWidth(this.width),m?k>0&&P+O+u>this.right&&(R=p.y+=T,p.line++,P=p.x=re(a,this.left+u,this.right-i[p.line])):k>0&&R+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,R=p.y=re(a,this.top+w+u,this.bottom-e[p.line].height));const F=l.x(P);if(y(F,R,D),P=og(C,P+b+f,m?P+O:this.right,t.rtl),v(l.x(P),R,D),m)p.x+=O+u;else if(typeof D.text!="string"){const q=c.lineHeight;p.y+=rd(D,q)+u}else p.y+=T}),jc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=At(e.font),r=Kt(e.padding);if(!e.display)return;const a=ri(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,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=re(t.align,d,this.right-f);else{const b=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+re(t.align,this.top,this.bottom-b-t.labels.padding-this._computeTitleHeight())}const p=re(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Rn(s,e.text,p,u,i)}_computeTitleHeight(){const t=this.options.title,e=At(t.font),i=Kt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,a;if(qe(t,this.left,this.right)&&qe(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],qe(t,r.left,r.left+r.width)&&qe(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Wy(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=Fy(r,i);r&&!a&&Mt(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&Mt(e.onHover,[t,i,this],this)}else i&&Mt(e.onClick,[t,i,this],this)}}function Uy(n,t,e,i,r){const a=By(i,n,t,e),s=Yy(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function By(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 Yy(n,t,e){let i=n;return typeof t.text!="string"&&(i=rd(t,e)),i}function rd(n,t){const e=n.text?n.text.length:0;return t*e}function Wy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var zy={id:"legend",_element:id,start(n,t,e){const i=n.legend=new id({ctx:n.ctx,options:e,chart:n});ae.configure(n,i,e),ae.addBox(n,i)},stop(n){ae.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;ae.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=Kt(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 vs extends ee{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=yt(i.text)?i.text.length:1;this._padding=Kt(i.padding);const a=r*At(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=re(o,i,a),d=e+t,c=a-i):(s.position==="left"?(u=i+t,d=re(o,r,e),l=ft*-.5):(u=a-t,d=re(o,e,r),l=ft*.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=At(e.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);Rn(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function Hy(n,t){const e=new vs({ctx:n.ctx,options:t,chart:n});ae.configure(n,e,t),ae.addBox(n,e),n.titleBlock=e}var $y={id:"title",_element:vs,start(n,t,e){Hy(n,e)},stop(n){const t=n.titleBlock;ae.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;ae.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 $r=new WeakMap;var jy={id:"subtitle",start(n,t,e){const i=new vs({ctx:n.ctx,options:e,chart:n});ae.configure(n,i,e),ae.addBox(n,i),$r.set(n,i)},stop(n){ae.removeBox(n,$r.get(n)),$r.delete(n)},beforeUpdate(n,t,e){const i=$r.get(n);ae.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 Vi={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=ti(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 Ue(n,t){return t&&(yt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Qe(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
16
|
+
*/class om{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=_c.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 Ke=new om;const Zc="transparent",lm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=kc(n||Zc),r=i.valid&&kc(t||Zc);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class cm{constructor(t,e,i,r){const a=e[i];r=Ai([t.to,r,a,t.from]);const s=Ai([t.from,a,r]);this._active=!0,this._fn=t.fn||lm[t.type||typeof s],this._easing=ki[t.easing]||ki.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=Ai([t.to,e,r,t.from]),this._from=Ai([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 ts{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!ct(t))return;const e=Object.keys(Bt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!ct(a))return;const s={};for(const o of e)s[o]=a[o];(yt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,e){const i=e.options,r=dm(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&um(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 f=i.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new cm(f,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 Ke.add(this._chart,i),!0}}function um(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 dm(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 Jc(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 fm(n,t,e){if(e===!1)return!1;const i=Jc(n,e),r=Jc(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function hm(n){let t,e,i,r;return ct(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 tu(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 eu(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],Nt(c)&&(a||t===0||Ne(t)===Ne(c))&&(t+=c)}return t}}function pm(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 nu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function gm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function mm(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 ym(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function iu(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 ru(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=gm(a,s,i),d=t.length;let f;for(let p=0;p<d;++p){const b=t[p],{[l]:x,[c]:g}=b,y=b._stacks||(b._stacks={});f=y[c]=ym(r,u,x),f[o]=g,f._top=iu(f,s,!0,i.type),f._bottom=iu(f,s,!1,i.type);const v=f._visualValues||(f._visualValues={});v[o]=g}}function es(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function bm(n,t){return pn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function vm(n,t,e){return pn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Li(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 ns=n=>n==="reset"||n==="none",au=(n,t)=>t?n:Object.assign({},n),xm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:tu(e,!0),values:null};class Ee{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=nu(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&&Li(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(d,f,p,b)=>d==="x"?f:d==="r"?b:p,a=e.xAxisID=it(i.xAxisID,es(t,"x")),s=e.yAxisID=it(i.yAxisID,es(t,"y")),o=e.rAxisID=it(i.rAxisID,es(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&&xc(this._data,this),t._stacked&&Li(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(ct(e))this._data=pm(e);else if(i!==e){if(i){xc(i,this);const r=this._cachedMeta;Li(r),r._parsed=[]}e&&Object.isExtensible(e)&&ag(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=nu(e.vScale,e),e.stack!==i.stack&&(r=!0,Li(e),e.stack=i.stack),this._resyncElements(t),(r||a!==e._stacked)&&ru(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,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{yt(r[t])?f=this.parseArrayData(i,r,t,e):ct(r[t])?f=this.parseObjectData(i,r,t,e):f=this.parsePrimitiveData(i,r,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)i._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);i._sorted=l}s&&ru(this,f)}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 f,p,b;for(f=0,p=r;f<p;++f)b=f+i,d[f]={[o]:u||a.parse(c[b],b),[l]:s.parse(e[b],b)};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,f,p;for(u=0,d=r;u<d;++u)f=u+i,p=e[f],c[u]={x:a.parse(un(p,o),f),y:s.parse(un(p,l),f)};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:tu(r,!0),values:e._stacks[t.axis]._visualValues};return eu(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=eu(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=xm(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=mm(o);let f,p;function b(){p=r[f];const x=p[o.axis];return!Nt(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!b()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!b()){this.updateRangeFromParsed(c,t,p,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],Nt(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=hm(it(this.options.clip,fm(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=vm(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=bm(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&&fe(i);if(o)return au(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Bt.elements[t]),b=()=>this.getContext(i,r,e),x=c.resolveNamedOptions(f,p,b,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(au(x,l))),x}_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),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,i,e))}const c=new ts(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||ns(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){ns(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!ns(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&&Li(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])}}H(Ee,"defaults",{}),H(Ee,"datasetElementType",null),H(Ee,"dataElementType",null);function wm(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=wc(i.sort((r,a)=>r-a))}return n._cache.$bar}function _m(n){const t=n.iScale,e=wm(t,n.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(fe(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 Tm(n,t,e,i){const r=e.barThickness;let a,s;return at(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 Mm(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 Dm(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 su(n,t,e,i){return yt(n)?Dm(n,t,e,i):t[e.axis]=e.parse(n,i),t}function ou(n,t,e,i){const r=n.iScale,a=n.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,f;for(c=e,u=e+i;c<u;++c)f=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(su(f,d,a,c));return l}function is(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Cm(n,t,e){return n!==0?Ne(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Sm(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 km(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}=Sm(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=c:(e._bottom||0)===i?r=u:(a[lu(u,s,o,l)]=!0,r=c)),a[lu(r,s,o,l)]=!0,n.borderSkipped=a}function lu(n,t,e,i){return i?(n=Om(n,t,e),n=cu(n,e,t)):n=cu(n,t,e),n}function Om(n,t,e){return n===t?e:n===e?t:n}function cu(n,t,e){return n==="start"?t:n==="end"?e:n}function Pm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Ii extends Ee{parsePrimitiveData(t,e,i,r){return ou(t,e,i,r)}parseArrayData(t,e,i,r){return ou(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 f,p,b,x;for(f=i,p=i+r;f<p;++f)x=e[f],b={},b[a.axis]=a.parse(un(x,c),f),d.push(su(un(x,u),b,s,f));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=is(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:f}=this._getSharedOptions(e,r);for(let p=e;p<e+i;p++){const b=this.getParsed(p),x=a||at(b[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),y=(b._stacks||{})[o.axis],v={horizontal:c,base:x.base,enableBorderRadius:!y||is(b._custom)||s===y._top||s===y._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":r));const m=v.options||t[p].options;km(v,m,y,s),Pm(v,m,u.ratio),this.updateElement(t[p],p,v,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(at(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||_m(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=is(c);let d=l[e.axis],f=0,p=i?this.applyStack(e,l,i):d,b,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Ne(d)!==Ne(c.barEnd)&&(f=0),f+=d);const g=!at(a)&&!u?a:f;let y=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?b=e.getPixelForValue(f+p):b=y,x=b-y,Math.abs(x)<s){x=Cm(x,e,o)*s,d===o&&(y-=x/2);const v=e.getPixelForDecimal(0),m=e.getPixelForDecimal(1),w=Math.min(v,m),T=Math.max(v,m);y=Math.max(Math.min(y,T),w),b=y+x,i&&!u&&(l._stacks[e.axis]._visualValues[r]=e.getValueForPixel(b)-e.getValueForPixel(y))}if(y===e.getPixelForValue(o)){const v=Ne(x)*e.getLineWidthForValue(o)/2;y+=v,x-=v}return{size:x,base:y,head:b,center:b+x/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,a=r.skipNull,s=it(r.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?Mm(t,e,r,c):Tm(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)}}H(Ii,"id","bar"),H(Ii,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Ii,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Pr extends Ee{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=it(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=it(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 f=e;f<e+i;f++){const p=t[f],b=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(b[u]),y=x[d]=a?o.getBasePixel():o.getPixelForValue(b[d]);x.skip=isNaN(g)||isNaN(y),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":r),a&&(x.options.radius=0)),this.updateElement(p,f,x,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+=it(i&&i._custom,a),r}}H(Pr,"id","bubble"),H(Pr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(Pr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Em(n,t,e){let i=1,r=1,a=0,s=0;if(t<Ot){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(m,w,T)=>Si(m,o,l,!0)?1:Math.max(w,w*e,T,T*e),b=(m,w,T)=>Si(m,o,l,!0)?-1:Math.min(w,w*e,T,T*e),x=p(0,c,d),g=p(Rt,u,f),y=b(ft,c,d),v=b(ft+Rt,u,f);i=(x-y)/2,r=(g-v)/2,a=-(x+y)/2,s=-(g+v)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class mn extends Ee{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(ct(i[t])){const{key:l="value"}=this._parsing;a=c=>+un(i[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Gt(this.options.rotation-90)}_getCircumference(){return Gt(this.options.circumference)}_getRotationExtents(){let t=Ot,e=-Ot;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(Vp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:b,offsetY:x}=Em(d,u,l),g=(i.width-s)/f,y=(i.height-s)/p,v=Math.max(Math.min(g,y)/2,0),m=dc(this.options.radius,v),w=Math.max(m*l,0),T=(m-w)/this._getVisibleDatasetWeightTotal();this.offsetX=b*m,this.offsetY=x*m,r.total=this.calculateTotal(),this.outerRadius=m-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*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/Ot)}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,f=a&&c.animateScale,p=f?0:this.innerRadius,b=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,r);let y=this._getRotation(),v;for(v=0;v<e;++v)y+=this._circumference(v,a);for(v=e;v<e+i;++v){const m=this._circumference(v,a),w=t[v],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+m,circumference:m,outerRadius:b,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(v,w.active?"active":r)),y+=m,this.updateElement(w,v,T,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)?Ot*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=Oi(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(it(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(mn,"id","doughnut"),H(mn,"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"}),H(mn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(mn,"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 Ni extends Ee{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}=Mc(e,r,s);this._drawStart=o,this._drawCount=l,Dc(e)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;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),f=s.axis,p=o.axis,{spanGaps:b,segment:x}=this.options,g=fn(b)?b:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none",v=e+i,m=t.length;let w=e>0&&this.getParsed(e-1);for(let T=0;T<m;++T){const S=t[T],k=y?S:{};if(T<e||T>=v){k.skip=!0;continue}const M=this.getParsed(T),D=at(M[p]),O=k[f]=s.getPixelForValue(M[f],T),P=k[p]=a||D?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[p],T);k.skip=isNaN(O)||isNaN(P)||D,k.stop=T>0&&Math.abs(M[f]-w[f])>g,x&&(k.parsed=M,k.raw=c.data[T]),d&&(k.options=u||this.resolveDataElementOptions(T,S.active?"active":r)),y||this.updateElement(S,T,k,r),w=M}}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()}}H(Ni,"id","line"),H(Ni,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ni,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Fi extends Ee{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=Oi(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,e,i,r){return Yc.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,f=c.getIndexAngle(0)-.5*ft;let p=f,b;const x=360/this.countVisibleElements();for(b=0;b<e;++b)p+=this._computeAngle(b,r,x);for(b=e;b<e+i;b++){const g=t[b];let y=p,v=p+this._computeAngle(b,r,x),m=s.getDataVisibility(b)?c.getDistanceFromCenterForValue(this.getParsed(b).r):0;p=v,a&&(l.animateScale&&(m=0),l.animateRotate&&(y=v=f));const w={x:u,y:d,innerRadius:0,outerRadius:m,startAngle:y,endAngle:v,options:this.resolveDataElementOptions(b,g.active?"active":r)};this.updateElement(g,b,w,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)?Gt(this.resolveDataElementOptions(t,e).angle||i):0}}H(Fi,"id","polarArea"),H(Fi,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Fi,"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 rs extends mn{}H(rs,"id","pie"),H(rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Er extends Ee{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 Yc.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,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,r)}}}H(Er,"id","radar"),H(Er,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Er,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Rr extends Ee{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}=Mc(e,i,r);if(this._drawStart=a,this._drawCount=s,Dc(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),f=this.includeOptions(r,d),p=s.axis,b=o.axis,{spanGaps:x,segment:g}=this.options,y=fn(x)?x:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||r==="none";let m=e>0&&this.getParsed(e-1);for(let w=e;w<e+i;++w){const T=t[w],S=this.getParsed(w),k=v?T:{},M=at(S[b]),D=k[p]=s.getPixelForValue(S[p],w),O=k[b]=a||M?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[b],w);k.skip=isNaN(D)||isNaN(O)||M,k.stop=w>0&&Math.abs(S[p]-m[p])>y,g&&(k.parsed=S,k.raw=c.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,T.active?"active":r)),v||this.updateElement(T,w,k,r),m=S}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}}H(Rr,"id","scatter"),H(Rr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Rr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Rm=Object.freeze({__proto__:null,BarController:Ii,BubbleController:Pr,DoughnutController:mn,LineController:Ni,PieController:rs,PolarAreaController:Fi,RadarController:Er,ScatterController:Rr});function In(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class as{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(as.prototype,t)}init(){}formats(){return In()}parse(){return In()}format(){return In()}add(){return In()}diff(){return In()}startOf(){return In()}endOf(){return In()}}var uu={_date:as};function Am(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?ig:Xe;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),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Ui(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:f}=Am(a[o],t,s,r);for(let p=d;p<=f;++p){const b=u[p];b.skip||i(b,c,p)}}}function Lm(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 ss(n,t,e,i,r){const a=[];return!r&&!n.isPointInArea(t)||Ui(n,e,t,function(o,l,c){!r&&!Ge(o,n.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Im(n,t,e,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=bc(s,{x:t.x,y:t.y});Si(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return Ui(n,e,t,a),r}function Nm(n,t,e,i,r,a){let s=[];const o=Lm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,r);if(i&&!p)return;const b=u.getCenterPoint(r);if(!(!!a||n.isPointInArea(b))&&!p)return;const g=o(t,b);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Ui(n,e,t,c),s}function os(n,t,e,i,r,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!i?Im(n,t,e,r):Nm(n,t,e,i,r,a)}function du(n,t,e,i,r){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Ui(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 ls={evaluateInteractionItems:Ui,modes:{index(n,t,e,i){const r=gn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?ss(n,r,a,i,s):os(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=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?ss(n,r,a,i,s):os(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=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,r,a,i,s)},nearest(n,t,e,i){const r=gn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return os(n,r,a,e.intersect,i,s)},x(n,t,e,i){const r=gn(t,n);return du(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=gn(t,n);return du(n,r,"y",e.intersect,i)}}};const fu=["left","top","right","bottom"];function Bi(n,t){return n.filter(e=>e.pos===t)}function hu(n,t){return n.filter(e=>fu.indexOf(e.pos)===-1&&e.box.axis===t)}function Yi(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 Fm(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 Um(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:a}=e;if(!i||!fu.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 Bm(n,t){const e=Um(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 Ym(n){const t=Fm(n),e=Yi(t.filter(c=>c.box.fullSize),!0),i=Yi(Bi(t,"left"),!0),r=Yi(Bi(t,"right")),a=Yi(Bi(t,"top"),!0),s=Yi(Bi(t,"bottom")),o=hu(t,"x"),l=hu(t,"y");return{fullSize:e,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:Bi(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function pu(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function gu(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 Wm(n,t,e,i){const{pos:r,box:a}=e,s=n.maxPadding;if(!ct(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&&gu(s,a.getPadding());const o=Math.max(0,t.outerWidth-pu(s,n,"left","right")),l=Math.max(0,t.outerHeight-pu(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 zm(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 Hm(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 Wi(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,Hm(o.horizontal,t));const{same:d,other:f}=Wm(t,e,o,i);c|=d&&r.length,u=u||f,l.fullSize||r.push(o)}return c&&Wi(r,t,e,i)||u}function Ar(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 mu(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,f=c.size||l.height;fe(c.start)&&(s=c.start),l.fullSize?Ar(l,r.left,s,e.outerWidth-r.right-r.left,f):Ar(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;fe(c.start)&&(a=c.start),l.fullSize?Ar(l,a,r.top,f,e.outerHeight-r.bottom-r.top):Ar(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var ae={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=Kt(n.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(e-r.height,0),o=Ym(n.boxes),l=o.vertical,c=o.horizontal;Dt(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},r);gu(f,Kt(i));const p=Object.assign({maxPadding:f,w:a,h:s,x:r.left,y:r.top},r),b=Bm(l.concat(c),d);Wi(o.fullSize,p,d,b),Wi(l,p,d,b),Wi(c,p,d,b)&&Wi(l,p,d,b),zm(p),mu(o.leftAndTop,p,d,b),p.x+=p.w,p.y+=p.h,mu(o.rightAndBottom,p,d,b),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Dt(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class yu{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 $m extends yu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Lr="$chartjs",jm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bu=n=>n===null||n==="";function Vm(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Lr]={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",bu(r)){const a=Hc(n,"width");a!==void 0&&(n.width=a)}if(bu(i))if(n.style.height==="")n.height=n.width/(t||2);else{const a=Hc(n,"height");a!==void 0&&(n.height=a)}return n}const vu=Kg?{passive:!0}:!1;function qm(n,t,e){n.addEventListener(t,e,vu)}function Xm(n,t,e){n.canvas.removeEventListener(t,e,vu)}function Gm(n,t){const e=jm[n.type]||n.type,{x:i,y:r}=gn(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Ir(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Km(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ir(o.addedNodes,i),s=s&&!Ir(o.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Qm(n,t,e){const i=n.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ir(o.removedNodes,i),s=s&&!Ir(o.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const zi=new Map;let xu=0;function wu(){const n=window.devicePixelRatio;n!==xu&&(xu=n,zi.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zm(n,t){zi.size||window.addEventListener("resize",wu),zi.set(n,t)}function Jm(n){zi.delete(n),zi.size||window.removeEventListener("resize",wu)}function t0(n,t,e){const i=n.canvas,r=i&&Ja(i);if(!r)return;const a=Tc((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),Zm(n,a),s}function cs(n,t,e){e&&e.disconnect(),t==="resize"&&Jm(n)}function e0(n,t,e){const i=n.canvas,r=Tc(a=>{n.ctx!==null&&e(Gm(a,n))},n);return qm(i,t,r),r}class n0 extends yu{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Vm(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Lr])return!1;const i=e[Lr].initial;["height","width"].forEach(a=>{const s=i[a];at(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[Lr],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Km,detach:Qm,resize:t0}[e]||e0;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:cs,detach:cs,resize:cs}[e]||Xm)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Gg(t,e,i,r)}isAttached(t){const e=Ja(t);return!!(e&&e.isConnected)}}function i0(n){return!Za()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?$m:n0}class ee{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return fn(this.x)&&fn(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}}H(ee,"defaults",{}),H(ee,"defaultRoutes");function r0(n,t){const e=n.options.ticks,i=a0(n),r=Math.min(e.maxTicksLimit||i,i),a=e.major.enabled?o0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return l0(t,c,a,s/r),c;const u=s0(a,t,r);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Nr(t,c,u,at(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Nr(t,c,u,a[d],a[d+1]);return Nr(t,c,u,l,at(p)?t.length:l+p),c}return Nr(t,c,u),c}function a0(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 s0(n,t,e){const i=c0(n),r=t.length/e;if(!i)return Math.max(r,1);const a=Jp(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 o0(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function l0(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 Nr(n,t,e,i,r){const a=it(i,0),s=Math.min(it(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 c0(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 u0=n=>n==="left"?"right":n==="right"?"left":n,_u=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Tu=(n,t)=>Math.min(t||n,n);function Mu(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 d0(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 f0(n,t){Dt(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 Hi(n){return n.drawTicks?n.tickLength:0}function Du(n,t){if(!n.display)return 0;const e=At(n.font,t),i=Kt(n.padding);return(yt(n.text)?n.text.length:1)*e.lineHeight+i.height}function h0(n,t){return pn(n,{scale:t,type:"scale"})}function p0(n,t,e){return pn(n,{tick:e,index:t,type:"tick"})}function g0(n,t,e){let i=za(n);return(e&&t!=="right"||!e&&t==="right")&&(i=u0(i)),i}function m0(n,t,e,i){const{top:r,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,b;const x=s-r,g=o-a;if(n.isHorizontal()){if(p=re(i,a,o),ct(e)){const y=Object.keys(e)[0],v=e[y];b=u[y].getPixelForValue(v)+x-t}else e==="center"?b=(c.bottom+c.top)/2+x-t:b=_u(n,e,t);f=o-a}else{if(ct(e)){const y=Object.keys(e)[0],v=e[y];p=u[y].getPixelForValue(v)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=_u(n,e,t);b=re(i,s,r),d=e==="left"?-Rt:Rt}return{titleX:p,titleY:b,maxWidth:f,rotation:d}}class Nn extends ee{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=xe(t,Number.POSITIVE_INFINITY),e=xe(e,Number.NEGATIVE_INFINITY),i=xe(i,Number.POSITIVE_INFINITY),r=xe(r,Number.NEGATIVE_INFINITY),{min:xe(t,i),max:xe(e,r),minDefined:Nt(t),maxDefined:Nt(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:xe(e,xe(i,e)),max:xe(i,xe(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(){Mt(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=Sg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Mu(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=r0(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(){Mt(this.options.afterUpdate,[this])}beforeSetDimensions(){Mt(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(){Mt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Mt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Mt(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=Mt(e.callback,[a.value,i,t],this)}afterTickToLabelConversion(){Mt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Mt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Tu(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,f=u.highest.height,p=Zt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:p/(i-1),d+6>o&&(o=p/(i-(t.offset?.5:1)),l=this.maxHeight-Hi(t.grid)-e.padding-Du(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=_r(Math.min(Math.asin(Zt((u.highest.height+6)/o,-1,1)),Math.asin(Zt(l/c,-1,1))-Math.asin(Zt(f/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Mt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mt(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=Du(r,e.options.font);if(o?(t.width=this.maxWidth,t.height=Hi(a)+l):(t.height=this.maxHeight,t.width=Hi(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=i.padding*2,b=Gt(this.labelRotation),x=Math.cos(b),g=Math.sin(b);if(o){const y=i.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=i.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(c,u,g,x)}}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 f=0,p=0;l?c?(f=r*t.width,p=i*e.height):(f=i*t.height,p=r*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-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(){Mt(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++)at(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=Mu(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/Tu(e,i));let c=0,u=0,d,f,p,b,x,g,y,v,m,w,T;for(d=0;d<e;d+=l){if(b=t[d].label,x=this._resolveTickFontOptions(d),r.font=g=x.string,y=a[g]=a[g]||{data:{},gc:[]},v=x.lineHeight,m=w=0,!at(b)&&!yt(b))m=Dr(r,y.data,y.gc,m,b),w=v;else if(yt(b))for(f=0,p=b.length;f<p;++f)T=b[f],!at(T)&&!yt(T)&&(m=Dr(r,y.data,y.gc,m,T),w+=v);s.push(m),o.push(w),c=Math.max(m,c),u=Math.max(w,u)}f0(a,e);const S=s.indexOf(c),k=o.indexOf(u),M=D=>({width:s[D]||0,height:o[D]||0});return{first:M(0),last:M(e-1),widest:M(S),highest:M(k),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 ng(this._alignToPixels?En(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=p0(this.getContext(),t,i))}return this.$context||(this.$context=h0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Gt(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),f=Hi(a),p=[],b=o.setContext(this.getContext()),x=b.display?b.width:0,g=x/2,y=function(z){return En(i,z,x)};let v,m,w,T,S,k,M,D,O,P,R,F;if(s==="top")v=y(this.bottom),k=this.bottom-f,D=v-g,P=y(t.top)+g,F=t.bottom;else if(s==="bottom")v=y(this.top),P=t.top,F=y(t.bottom)-g,k=v+g,D=this.top+f;else if(s==="left")v=y(this.right),S=this.right-f,M=v-g,O=y(t.left)+g,R=t.right;else if(s==="right")v=y(this.left),O=t.left,R=y(t.right)-g,S=v+g,M=this.left+f;else if(e==="x"){if(s==="center")v=y((t.top+t.bottom)/2+.5);else if(ct(s)){const z=Object.keys(s)[0],I=s[z];v=y(this.chart.scales[z].getPixelForValue(I))}P=t.top,F=t.bottom,k=v+g,D=k+f}else if(e==="y"){if(s==="center")v=y((t.left+t.right)/2);else if(ct(s)){const z=Object.keys(s)[0],I=s[z];v=y(this.chart.scales[z].getPixelForValue(I))}S=v-g,M=S-f,O=t.left,R=t.right}const q=it(r.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(m=0;m<d;m+=$){const z=this.getContext(m),I=a.setContext(z),rt=o.setContext(z),B=I.lineWidth,bt=I.color,dt=rt.dash||[],W=rt.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;w=d0(this,m,l),w!==void 0&&(T=En(i,w,B),c?S=M=O=R=T:k=D=P=F=T,p.push({tx1:S,ty1:k,tx2:M,ty2:D,x1:O,y1:P,x2:R,y2:F,width:B,color:bt,borderDash:dt,borderDashOffset:W,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=v,p}_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,f=Hi(i.grid),p=f+u,b=d?-u:p,x=-Gt(this.labelRotation),g=[];let y,v,m,w,T,S,k,M,D,O,P,R,F="middle";if(r==="top")S=this.bottom-b,k=this._getXAxisLabelAlignment();else if(r==="bottom")S=this.top+b,k=this._getXAxisLabelAlignment();else if(r==="left"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(r==="right"){const $=this._getYAxisLabelAlignment(f);k=$.textAlign,T=$.x}else if(e==="x"){if(r==="center")S=(t.top+t.bottom)/2+p;else if(ct(r)){const $=Object.keys(r)[0],z=r[$];S=this.chart.scales[$].getPixelForValue(z)+p}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")T=(t.left+t.right)/2-p;else if(ct(r)){const $=Object.keys(r)[0],z=r[$];T=this.chart.scales[$].getPixelForValue(z)}k=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(y=0,v=o.length;y<v;++y){m=o[y],w=m.label;const $=a.setContext(this.getContext(y));M=this.getPixelForTick(y)+a.labelOffset,D=this._resolveTickFontOptions(y),O=D.lineHeight,P=yt(w)?w.length:1;const z=P/2,I=$.color,rt=$.textStrokeColor,B=$.textStrokeWidth;let bt=k;s?(T=M,k==="inner"&&(y===v-1?bt=this.options.reverse?"left":"right":y===0?bt=this.options.reverse?"right":"left":bt="center"),r==="top"?c==="near"||x!==0?R=-P*O+O/2:c==="center"?R=-q.highest.height/2-z*O+O:R=-q.highest.height+O/2:c==="near"||x!==0?R=O/2:c==="center"?R=q.highest.height/2-z*O:R=q.highest.height-P*O,d&&(R*=-1),x!==0&&!$.showLabelBackdrop&&(T+=O/2*Math.sin(x))):(S=M,R=(1-P)*O/2);let dt;if($.showLabelBackdrop){const W=Kt($.backdropPadding),L=q.heights[y],U=q.widths[y];let j=R-W.top,Z=0-W.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(k){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":y===v-1?Z-=U:y>0&&(Z-=U/2);break}dt={left:Z,top:j,width:U+W.width,height:L+W.height,color:$.backdropColor}}g.push({label:w,font:D,textOffset:R,options:{rotation:x,color:I,strokeColor:rt,strokeWidth:B,textAlign:bt,textBaseline:F,translation:[T,S],backdrop:dt}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Gt(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,f;this.isHorizontal()?(c=En(t,this.left,s)-s/2,u=En(t,this.right,o)+o/2,d=f=l):(d=En(t,this.top,s)-s/2,f=En(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,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Ei(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;Rn(i,c,0,u,l,o)}r&&Ri(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const a=At(i.font),s=Kt(i.padding),o=i.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||ct(e)?(l+=s.bottom,yt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=m0(this,l,e,o);Rn(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:f,textAlign:g0(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=it(t.grid&&t.grid.z,-1),r=it(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Nn.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 At(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Fr{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;v0(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,y0(t,s,i),this.override&&Bt.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 Bt[r]&&(delete Bt[r][i],this.override&&delete Pn[i])}}function y0(n,t,e){const i=Mi(Object.create(null),[e?Bt.get(e):{},Bt.get(t),n.defaults]);Bt.set(t,i),n.defaultRoutes&&b0(t,n.defaultRoutes),n.descriptors&&Bt.describe(t,n.descriptors)}function b0(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(".");Bt.route(a,r,l,o)})}function v0(n){return"id"in n&&"defaults"in n}class x0{constructor(){this.controllers=new Fr(Ee,"datasets",!0),this.elements=new Fr(ee,"elements"),this.plugins=new Fr(Object,"plugins"),this.scales=new Fr(Nn,"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):Dt(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,i){const r=Ba(t);Mt(i["before"+r],[],i),e[t](i),Mt(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 Fe=new x0;class w0{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(Mt(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){at(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=it(i.options&&i.options.plugins,{}),a=_0(i);return r===!1&&!e?[]:M0(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 _0(n){const t={},e=[],i=Object.keys(Fe.plugins.items);for(let a=0;a<i.length;a++)e.push(Fe.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 T0(n,t){return!t&&n===!1?null:n===!0?{}:n}function M0(n,{plugins:t,localIds:e},i,r){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=T0(i[l],r);c!==null&&a.push({plugin:o,options:D0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function D0(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 us(n,t){const e=Bt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function C0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function S0(n,t){return n===t?"_index_":"_value_"}function Cu(n){if(n==="x"||n==="y"||n==="r")return n}function k0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function ds(n,...t){if(Cu(n))return n;for(const e of t){const i=e.axis||k0(e.position)||n.length>1&&Cu(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Su(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function O0(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 Su(n,"x",e[0])||Su(n,"y",e[0])}return{}}function P0(n,t){const e=Pn[n.type]||{scales:{}},i=t.scales||{},r=us(n.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!ct(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=ds(s,o,O0(s,n),Bt.scales[o.type]),c=S0(l,r),u=e.scales||{};a[s]=Di(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||us(o,t),u=(Pn[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=C0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Di(a[p],[{axis:f},i[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Di(o,[Bt.scales[o.type],Bt.scale])}),a}function ku(n){const t=n.options||(n.options={});t.plugins=it(t.plugins,{}),t.scales=P0(n,t)}function Ou(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function E0(n){return n=n||{},n.data=Ou(n.data),ku(n),n}const Pu=new Map,Eu=new Set;function Ur(n,t){let e=Pu.get(n);return e||(e=t(),Pu.set(n,e),Eu.add(e)),e}const $i=(n,t,e)=>{const i=un(t,e);i!==void 0&&n.add(i)};class R0{constructor(t){this._config=E0(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=Ou(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(),ku(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ur(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ur(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ur(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Ur(`${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=>$i(l,t,d))),u.forEach(d=>$i(l,r,d)),u.forEach(d=>$i(l,Pn[a]||{},d)),u.forEach(d=>$i(l,Bt,d)),u.forEach(d=>$i(l,ja,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Eu.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Pn[e]||{},Bt.datasets[e]||{},{type:e},Bt,ja]}resolveNamedOptions(t,e,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Ru(this._resolverCache,t,r);let l=s;if(L0(s,e)){a.$shared=!1,i=he(i)?i():i;const c=this.createResolver(t,i,o);l=ni(s,i,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,i=[""],r){const{resolver:a}=Ru(this._resolverCache,t,i);return ct(e)?ni(a,e,void 0,r):a}}function Ru(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:Ga(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const A0=n=>ct(n)&&Object.getOwnPropertyNames(n).some(t=>he(n[t]));function L0(n,t){const{isScriptable:e,isIndexable:i}=Lc(n);for(const r of t){const a=e(r),s=i(r),o=(s||a)&&n[r];if(a&&(he(o)||A0(o))||s&&yt(o))return!0}return!1}var I0="4.4.1";const N0=["top","bottom","left","right","chartArea"];function Au(n,t){return n==="top"||n==="bottom"||N0.indexOf(n)===-1&&t==="x"}function Lu(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Iu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Mt(e&&e.onComplete,[n],t)}function F0(n){const t=n.chart,e=t.options.animation;Mt(e&&e.onProgress,[n],t)}function Nu(n){return Za()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Br={},Fu=n=>{const t=Nu(n);return Object.values(Br).filter(e=>e.canvas===t).pop()};function U0(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 B0(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function Yr(n,t,e){return n.options.clip?n[e]:t[e]}function Y0(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:Yr(e,t,"left"),right:Yr(e,t,"right"),top:Yr(i,t,"top"),bottom:Yr(i,t,"bottom")}:t}let De=(Cn=class{static register(...t){Fe.add(...t),Uu()}static unregister(...t){Fe.remove(...t),Uu()}constructor(t,e){const i=this.config=new R0(e),r=Nu(t),a=Fu(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||i0(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=jp(),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 w0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Br[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ke.listen(this,"complete",Iu),Ke.listen(this,"progress",F0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:a}=this;return at(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 Fe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():zc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Ke.stop(this),this}resize(t,e){Ke.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,zc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Mt(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};Dt(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=ds(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Dt(a,s=>{const o=s.options,l=o.id,c=ds(l,o),u=it(o.type,s.dtype);(o.position===void 0||Au(o.position,c)!==Au(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 f=Fe.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),Dt(r,(s,o)=>{s||delete i[o]}),Dt(i,s=>{ae.configure(this,s,s.options),ae.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(Lu("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||us(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=Fe.getController(o),{datasetElementType:c,dataElementType:u}=Bt.datasets[o];Object.assign(l,{dataElementType:Fe.getElement(u),datasetElementType:c&&Fe.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Dt(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),f=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||Dt(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Lu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Dt(this.scales,t=>{ae.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!pc(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;U0(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(!pc(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;ae.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Dt(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,he(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&&(Ke.has(this)?this.attached&&!Ke.running(this)&&Ke.start(this):(this.draw(),Iu({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=Y0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Ei(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&&Ri(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ge(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const a=ls.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=pn(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);fe(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(),Ke.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(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Br[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)};Dt(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(){Dt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Dt(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}});!br(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=Qp(t),c=B0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,Mt(a.onHover,[t,o,this],this),l&&Mt(a.onClick,[t,o,this],this));const u=!br(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)}},H(Cn,"defaults",Bt),H(Cn,"instances",Br),H(Cn,"overrides",Pn),H(Cn,"registry",Fe),H(Cn,"version",I0),H(Cn,"getChart",Fu),Cn);function Uu(){return Dt(De.instances,n=>n._plugins.invalidate())}function W0(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+Rt,i-Rt),n.closePath(),n.clip()}function z0(n){return Xa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function H0(n,t,e,i){const r=z0(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 Zt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Zt(r.innerStart,0,s),innerEnd:Zt(r.innerEnd,0,s)}}function ai(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Wr(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),f=u>0?u+i+e+c:0;let p=0;const b=r-l;if(i){const $=u>0?u-i:0,z=d>0?d-i:0,I=($+z)/2,rt=I!==0?b*I/(I+i):b;p=(b-rt)/2}const x=Math.max(.001,b*d-e/ft)/d,g=(b-x)/2,y=l+g+p,v=r-g-p,{outerStart:m,outerEnd:w,innerStart:T,innerEnd:S}=H0(t,f,d,v-y),k=d-m,M=d-w,D=y+m/k,O=v-w/M,P=f+T,R=f+S,F=y+T/P,q=v-S/R;if(n.beginPath(),a){const $=(D+O)/2;if(n.arc(s,o,d,D,$),n.arc(s,o,d,$,O),w>0){const B=ai(M,O,s,o);n.arc(B.x,B.y,w,O,v+Rt)}const z=ai(R,v,s,o);if(n.lineTo(z.x,z.y),S>0){const B=ai(R,q,s,o);n.arc(B.x,B.y,S,v+Rt,q+Math.PI)}const I=(v-S/f+(y+T/f))/2;if(n.arc(s,o,f,v-S/f,I,!0),n.arc(s,o,f,I,y+T/f,!0),T>0){const B=ai(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,y-Rt)}const rt=ai(k,y,s,o);if(n.lineTo(rt.x,rt.y),m>0){const B=ai(k,D,s,o);n.arc(B.x,B.y,m,y-Rt,D)}}else{n.moveTo(s,o);const $=Math.cos(D)*d+s,z=Math.sin(D)*d+o;n.lineTo($,z);const I=Math.cos(O)*d+s,rt=Math.sin(O)*d+o;n.lineTo(I,rt)}n.closePath()}function $0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Wr(n,t,e,i,l,r);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%Ot||Ot))}return Wr(n,t,e,i,l,r),n.fill(),l}function j0(n,t,e,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let b=t.endAngle;if(a){Wr(n,t,e,i,b,r);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(b=s+(o%Ot||Ot))}p&&W0(n,t,b),a||(Wr(n,t,e,i,b,r),n.stroke())}class ji extends ee{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(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}=bc(a,{x:e,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),p=(this.options.spacing+this.options.borderWidth)/2,x=it(f,c-l)>=Ot||Si(s,l,c),g=qe(o,u+p,d+p);return x&&g}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,f=(o+l+u+c)/2;return{x:i+Math.cos(d)*f,y:r+Math.sin(d)*f}}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>Ot?Math.floor(r/Ot):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(ft,r||0)),u=a*c;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,$0(e,this,u,s,o),j0(e,this,u,s,o),e.restore()}}H(ji,"id","arc"),H(ji,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H(ji,"defaultRoutes",{backgroundColor:"backgroundColor"}),H(ji,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Bu(n,t,e=t){n.lineCap=it(e.borderCapStyle,t.borderCapStyle),n.setLineDash(it(e.borderDash,t.borderDash)),n.lineDashOffset=it(e.borderDashOffset,t.borderDashOffset),n.lineJoin=it(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=it(e.borderWidth,t.borderWidth),n.strokeStyle=it(e.borderColor,t.borderColor)}function V0(n,t,e){n.lineTo(e.x,e.y)}function q0(n){return n.stepped?bg:n.tension||n.cubicInterpolationMode==="monotone"?vg:V0}function Yu(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 X0(n,t,e,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Yu(r,e,i),u=q0(a);let{move:d=!0,reverse:f}=i||{},p,b,x;for(p=0;p<=c;++p)b=r[(o+(f?c-p:p))%s],!b.skip&&(d?(n.moveTo(b.x,b.y),d=!1):u(n,x,b,f,a.stepped),x=b);return l&&(b=r[(o+(f?c:0))%s],u(n,x,b,f,a.stepped)),!!l}function G0(n,t,e,i){const r=t.points,{count:a,start:s,ilen:o}=Yu(r,e,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,f,p,b,x,g,y;const v=w=>(s+(c?o-w:w))%a,m=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,y))};for(l&&(p=r[v(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=r[v(f)],p.skip)continue;const w=p.x,T=p.y,S=w|0;S===b?(T<x?x=T:T>g&&(g=T),u=(d*u+w)/++d):(m(),n.lineTo(w,T),b=S,d=0,x=g=T),y=T}m()}function fs(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?G0:X0}function K0(n){return n.stepped?Qg:n.tension||n.cubicInterpolationMode==="monotone"?Zg:Ln}function Q0(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),Bu(n,t.options),n.stroke(r)}function Z0(n,t,e,i){const{segments:r,options:a}=t,s=fs(t);for(const o of r)Bu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const J0=typeof Path2D=="function";function ty(n,t,e,i){J0&&!t.options.segment?Q0(n,t,e,i):Z0(n,t,e,i)}class yn extends ee{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;Hg(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=rm(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=Gc(this,{property:e,start:r,end:r});if(!s.length)return;const o=[],l=K0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],b=a[f];if(p===b){o.push(p);continue}const x=Math.abs((r-p[e])/(b[e]-p[e])),g=l(p,b,x,i.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,i){return fs(this)(t,this,e,i)}path(t,e,i){const r=this.segments,a=fs(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(),ty(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(yn,"id","line"),H(yn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(yn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(yn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Wu(n,t,e,i){const r=n.options,{[e]:a}=n.getProps([e],i);return Math.abs(t-a)<r.radius+r.hitRadius}class zr extends ee{constructor(e){super();H(this,"parsed");H(this,"skip");H(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 Wu(this,e,"x",i)}inYRange(e,i){return Wu(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||!Ge(this,i,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,qa(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(zr,"id","point"),H(zr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zu(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 bn(n,t,e,i){return n?0:Zt(t,e,i)}function ey(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,a=Ac(i);return{t:bn(r.top,a.top,0,e),r:bn(r.right,a.right,0,t),b:bn(r.bottom,a.bottom,0,e),l:bn(r.left,a.left,0,t)}}function ny(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,a=hn(r),s=Math.min(t,e),o=n.borderSkipped,l=i||ct(r);return{topLeft:bn(!l||o.top||o.left,a.topLeft,0,s),topRight:bn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:bn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:bn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function iy(n){const t=zu(n),e=t.right-t.left,i=t.bottom-t.top,r=ey(n,e/2,i/2),a=ny(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 hs(n,t,e,i){const r=t===null,a=e===null,o=n&&!(r&&a)&&zu(n,i);return o&&(r||qe(t,o.left,o.right))&&(a||qe(e,o.top,o.bottom))}function ry(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function ay(n,t){n.rect(t.x,t.y,t.w,t.h)}function ps(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 Hr extends ee{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}=iy(this),o=ry(s.radius)?ei:ay;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,ps(s,e,a)),t.clip(),o(t,ps(a,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,ps(a,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return hs(this,t,e,i)}inXRange(t,e){return hs(this,t,null,e)}inYRange(t,e){return hs(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}}H(Hr,"id","bar"),H(Hr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(Hr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sy=Object.freeze({__proto__:null,ArcElement:ji,BarElement:Hr,LineElement:yn,PointElement:zr});const gs=["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)"],Hu=gs.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $u(n){return gs[n%gs.length]}function ju(n){return Hu[n%Hu.length]}function oy(n,t){return n.borderColor=$u(t),n.backgroundColor=ju(t),++t}function ly(n,t){return n.backgroundColor=n.data.map(()=>$u(t++)),t}function cy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function uy(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof mn?t=ly(e,t):r instanceof Fi?t=cy(e,t):r&&(t=oy(e,t))}}function Vu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dy(n){return n&&(n.borderColor||n.backgroundColor)}var fy={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&&(Vu(i)||dy(r)||a&&Vu(a)))return;const s=uy(n);i.forEach(s)}};function hy(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,f,p,b,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,y=0,v;const m=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,e)+t,T=w-m;for(v=m;v<w;v++)g+=n[v].x,y+=n[v].y;g/=T,y/=T;const S=Math.floor(d*o)+1+t,k=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:M,y:D}=n[u];for(p=b=-1,v=S;v<k;v++)b=.5*Math.abs((M-g)*(n[v].y-D)-(M-n[v].x)*(y-D)),b>p&&(p=b,f=n[v],x=v);s[l++]=f,u=x}return s[l++]=n[c],s}function py(n,t,e,i){let r=0,a=0,s,o,l,c,u,d,f,p,b,x;const g=[],y=t+e-1,v=n[t].x,w=n[y].x-v;for(s=t;s<t+e;++s){o=n[s],l=(o.x-v)/w*i,c=o.y;const T=l|0;if(T===u)c<b?(b=c,d=s):c>x&&(x=c,f=s),r=(a*r+o.x)/++a;else{const S=s-1;if(!at(d)&&!at(f)){const k=Math.min(d,f),M=Math.max(d,f);k!==p&&k!==S&&g.push({...n[k],x:r}),M!==p&&M!==S&&g.push({...n[M],x:r})}s>0&&S!==p&&g.push(n[S]),g.push(o),u=T,a=0,b=x=c,d=f=p=s}}return g}function qu(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 Xu(n){n.data.datasets.forEach(t=>{qu(t)})}function gy(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=Zt(Xe(t,a.axis,s).lo,0,e-1)),c?r=Zt(Xe(t,a.axis,o).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var my={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xu(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(Ai([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:f}=gy(l,c);const p=e.threshold||4*i;if(f<=p){qu(r);return}at(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let b;switch(e.algorithm){case"lttb":b=hy(c,d,f,i,e);break;case"min-max":b=py(c,d,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=b})},destroy(n){Xu(n)}};function yy(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=ys(l,c,r);const u=ms(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=Gc(t,u);for(const f of d){const p=ms(e,a[f.start],a[f.end],f.loop),b=Xc(o,r,p);for(const x of b)s.push({source:x,target:f,start:{[e]:Gu(u,p,"start",Math.max)},end:{[e]:Gu(u,p,"end",Math.min)}})}}return s}function ms(n,t,e,i){if(i)return;let r=t[n],a=e[n];return n==="angle"&&(r=we(r),a=we(a)),{property:n,start:r,end:a}}function by(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ys(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 ys(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Gu(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Ku(n,t){let e=[],i=!1;return yt(n)?(i=!0,e=n):e=by(n,t),e.length?new yn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Qu(n){return n&&n.fill!==!1}function vy(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(!Nt(r))return r;if(s=n[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function xy(n,t,e){const i=My(n);if(ct(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return Nt(r)&&Math.floor(r)===r?wy(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function wy(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function _y(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:ct(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ty(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:ct(n)?i=n.value:i=t.getBaseValue(),i}function My(n){const t=n.options,e=t.fill;let i=it(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Dy(n){const{scale:t,index:e,line:i}=n,r=[],a=i.segments,s=i.points,o=Cy(t,e);o.push(Ku({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++)Sy(r,s[u],o)}return new yn({points:r,options:{}})}function Cy(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 Sy(n,t,e){const i=[];for(let r=0;r<e.length;r++){const a=e[r],{first:s,last:o,point:l}=ky(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(n.push(l),!o)break}}n.push(...i)}function ky(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],f=s[u.end][e];if(qe(r,d,f)){o=r===d,l=r===f;break}}return{first:o,last:l,point:i}}class Zu{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:Ot},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 Oy(n){const{chart:t,fill:e,line:i}=n;if(Nt(e))return Py(t,e);if(e==="stack")return Dy(n);if(e==="shape")return!0;const r=Ey(n);return r instanceof Zu?r:Ku(r,i)}function Py(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ey(n){return(n.scale||{}).getPointPositionForValue?Ay(n):Ry(n)}function Ry(n){const{scale:t={},fill:e}=n,i=_y(e,t);if(Nt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Ay(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=Ty(e,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Zu({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 bs(n,t,e){const i=Oy(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&&(Ei(n,e),Ly(n,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:s}),Ri(n))}function Ly(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&&(Ju(n,i,s.top),td(n,{line:e,target:i,color:r,scale:o,property:l}),n.restore(),n.save(),Ju(n,i,s.bottom)),td(n,{line:e,target:i,color:a,scale:o,property:l}),n.restore()}function Ju(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[ys(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 td(n,t){const{line:e,target:i,property:r,color:a,scale:s}=t,o=yy(e,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=i!==!0;n.save(),n.fillStyle=f,Iy(n,s,p&&ms(r,u,d)),n.beginPath();const b=!!e.pathSegment(n,l);let x;if(p){b?n.closePath():ed(n,i,d,r);const g=!!i.pathSegment(n,c,{move:b,reverse:!0});x=b&&g,x||ed(n,i,u,r)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Iy(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 ed(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var Ny={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 yn&&(l={visible:n.isDatasetVisible(s),index:s,fill:xy(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=vy(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&&bs(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;Qu(a)&&bs(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Qu(i)||e.drawTime!=="beforeDatasetDraw"||bs(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nd=(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)}},Fy=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class id extends ee{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=Mt(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=At(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=nd(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 f=-1,p=-u;return this.legendItems.forEach((b,x)=>{const g=i+e/2+a.measureText(b.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:r},c[c.length-1]+=g+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,f=0,p=0,b=0,x=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:v,itemHeight:m}=Uy(i,e,a,g,r);y>0&&p+m+2*o>u&&(d+=f+o,c.push({width:f,height:p}),b+=f+o,x++,f=p=0),l[y]={left:b,top:p,col:x,width:v,height:m},f=Math.max(f,v),p+=m+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:a}}=this,s=ri(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=re(i,this.left+r,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=re(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=re(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=re(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;Ei(t,this),this._draw(),Ri(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=Bt.color,l=ri(t.rtl,this.left,this.width),c=At(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:b,boxHeight:x,itemHeight:g}=nd(s,d),y=function(S,k,M){if(isNaN(b)||b<=0||isNaN(x)||x<0)return;r.save();const D=it(M.lineWidth,1);if(r.fillStyle=it(M.fillStyle,o),r.lineCap=it(M.lineCap,"butt"),r.lineDashOffset=it(M.lineDashOffset,0),r.lineJoin=it(M.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=it(M.strokeStyle,o),r.setLineDash(it(M.lineDash,[])),s.usePointStyle){const O={radius:x*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:D},P=l.xPlus(S,b/2),R=k+f;Rc(r,O,P,R,s.pointStyleWidth&&b)}else{const O=k+Math.max((d-x)/2,0),P=l.leftForLtr(S,b),R=hn(M.borderRadius);r.beginPath(),Object.values(R).some(F=>F!==0)?ei(r,{x:P,y:O,w:b,h:x,radius:R}):r.rect(P,O,b,x),r.fill(),D!==0&&r.stroke()}r.restore()},v=function(S,k,M){Rn(r,M.text,S,k+g/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},m=this.isHorizontal(),w=this._computeTitleHeight();m?p={x:re(a,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:p={x:this.left+u,y:re(a,this.top+w+u,this.bottom-e[0].height),line:0},$c(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((S,k)=>{r.strokeStyle=S.fontColor,r.fillStyle=S.fontColor;const M=r.measureText(S.text).width,D=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),O=b+f+M;let P=p.x,R=p.y;l.setWidth(this.width),m?k>0&&P+O+u>this.right&&(R=p.y+=T,p.line++,P=p.x=re(a,this.left+u,this.right-i[p.line])):k>0&&R+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,R=p.y=re(a,this.top+w+u,this.bottom-e[p.line].height));const F=l.x(P);if(y(F,R,S),P=og(D,P+b+f,m?P+O:this.right,t.rtl),v(l.x(P),R,S),m)p.x+=O+u;else if(typeof S.text!="string"){const q=c.lineHeight;p.y+=rd(S,q)+u}else p.y+=T}),jc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=At(e.font),r=Kt(e.padding);if(!e.display)return;const a=ri(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,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=re(t.align,d,this.right-f);else{const b=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+re(t.align,this.top,this.bottom-b-t.labels.padding-this._computeTitleHeight())}const p=re(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Rn(s,e.text,p,u,i)}_computeTitleHeight(){const t=this.options.title,e=At(t.font),i=Kt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,a;if(qe(t,this.left,this.right)&&qe(e,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],qe(t,r.left,r.left+r.width)&&qe(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Wy(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=Fy(r,i);r&&!a&&Mt(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&Mt(e.onHover,[t,i,this],this)}else i&&Mt(e.onClick,[t,i,this],this)}}function Uy(n,t,e,i,r){const a=By(i,n,t,e),s=Yy(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function By(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 Yy(n,t,e){let i=n;return typeof t.text!="string"&&(i=rd(t,e)),i}function rd(n,t){const e=n.text?n.text.length:0;return t*e}function Wy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var zy={id:"legend",_element:id,start(n,t,e){const i=n.legend=new id({ctx:n.ctx,options:e,chart:n});ae.configure(n,i,e),ae.addBox(n,i)},stop(n){ae.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;ae.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=Kt(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 vs extends ee{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=yt(i.text)?i.text.length:1;this._padding=Kt(i.padding);const a=r*At(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=re(o,i,a),d=e+t,c=a-i):(s.position==="left"?(u=i+t,d=re(o,r,e),l=ft*-.5):(u=a-t,d=re(o,e,r),l=ft*.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=At(e.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);Rn(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function Hy(n,t){const e=new vs({ctx:n.ctx,options:t,chart:n});ae.configure(n,e,t),ae.addBox(n,e),n.titleBlock=e}var $y={id:"title",_element:vs,start(n,t,e){Hy(n,e)},stop(n){const t=n.titleBlock;ae.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;ae.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 $r=new WeakMap;var jy={id:"subtitle",start(n,t,e){const i=new vs({ctx:n.ctx,options:e,chart:n});ae.configure(n,i,e),ae.addBox(n,i),$r.set(n,i)},stop(n){ae.removeBox(n,$r.get(n)),$r.delete(n)},beforeUpdate(n,t,e){const i=$r.get(n);ae.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 Vi={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=ti(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 Ue(n,t){return t&&(yt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Qe(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
17
17
|
`)>-1?n.split(`
|
|
18
|
-
`):n}function Vy(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 ad(n,t){const e=n.chart.ctx,{body:i,footer:r,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=At(t.bodyFont),c=At(t.titleFont),u=At(t.footerFont),d=a.length,f=r.length,p=i.length,b=Kt(t.padding);let x=b.height,g=0,y=i.reduce((w,T)=>w+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*w+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const m=function(w){g=Math.max(g,e.measureText(w).width+v)};return e.save(),e.font=c.string,Ct(n.title,m),e.font=l.string,Ct(n.beforeBody.concat(n.afterBody),m),v=t.displayColors?s+2+t.boxPadding:0,Ct(i,w=>{Ct(w.before,m),Ct(w.lines,m),Ct(w.after,m)}),v=0,e.font=u.string,Ct(n.footer,m),e.restore(),g+=b.width,{width:g,height:x}}function qy(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Xy(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 Gy(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"),Xy(c,n,t,e)&&(c="center"),c}function sd(n,t,e){const i=e.yAlign||t.yAlign||qy(n,e);return{xAlign:e.xAlign||t.xAlign||Gy(n,t,e,i),yAlign:i}}function Ky(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Qy(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function od(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:f,bottomRight:p}=hn(s);let b=Ky(t,o);const x=Qy(t,l,c);return l==="center"?o==="left"?b+=c:o==="right"&&(b-=c):o==="left"?b-=Math.max(u,f)+r:o==="right"&&(b+=Math.max(d,p)+r),{x:Zt(b,0,i.width-t.width),y:Zt(x,0,i.height-t.height)}}function jr(n,t,e){const i=Kt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function ld(n){return Ue([],Qe(n))}function Zy(n,t,e){return pn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function cd(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ud={beforeTitle:Ve,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:Ve,beforeBody:Ve,beforeLabel:Ve,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 at(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:Ve,afterBody:Ve,beforeFooter:Ve,footer:Ve,afterFooter:Ve};function pe(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?ud[t].call(e,i):r}class xs extends ee{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 ts(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Zy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=pe(i,"beforeTitle",this,t),a=pe(i,"title",this,t),s=pe(i,"afterTitle",this,t);let o=[];return o=Ue(o,Qe(r)),o=Ue(o,Qe(a)),o=Ue(o,Qe(s)),o}getBeforeBody(t,e){return ld(pe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return Ct(t,a=>{const s={before:[],lines:[],after:[]},o=cd(i,a);Ue(s.before,Qe(pe(o,"beforeLabel",this,a))),Ue(s.lines,pe(o,"label",this,a)),Ue(s.after,Qe(pe(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,e){return ld(pe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=pe(i,"beforeFooter",this,t),a=pe(i,"footer",this,t),s=pe(i,"afterFooter",this,t);let o=[];return o=Ue(o,Qe(r)),o=Ue(o,Qe(a)),o=Ue(o,Qe(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(Vy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),Ct(o,u=>{const d=cd(t.callbacks,u);r.push(pe(d,"labelColor",this,u)),a.push(pe(d,"labelPointStyle",this,u)),s.push(pe(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=Vi[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=ad(this,i),c=Object.assign({},o,l),u=sd(this.chart,i,c),d=od(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}=hn(o),{x:f,y:p}=t,{width:b,height:x}=e;let g,y,v,m,w,T;return a==="center"?(w=p+x/2,r==="left"?(g=f,y=g-s,m=w+s,T=w-s):(g=f+b,y=g+s,m=w-s,T=w+s),v=g):(r==="left"?y=f+Math.max(l,u)+s:r==="right"?y=f+b-Math.max(c,d)-s:y=this.caretX,a==="top"?(m=p,w=m-s,g=y-s,v=y+s):(m=p+x,w=m+s,g=y+s,v=y-s),T=m),{x1:g,x2:y,x3:v,y1:m,y2:w,y3:T}}drawTitle(t,e,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=ri(i.rtl,this.x,this.width);for(t.x=jr(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",s=At(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=At(a.bodyFont),d=jr(this,"left",a),f=r.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,b=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=r.leftForLtr(f,c)+c/2,y=b+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,qa(t,x,g,y),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,qa(t,x,g,y)}else{t.lineWidth=ct(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 x=r.leftForLtr(f,c),g=r.leftForLtr(r.xPlus(f,1),c-2),y=hn(s.borderRadius);Object.values(y).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ei(t,{x,y:b,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ei(t,{x:g,y:b+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,b,c,l),t.strokeRect(x,b,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,b+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=At(i.bodyFont);let f=d.lineHeight,p=0;const b=ri(i.rtl,this.x,this.width),x=function(M){e.fillText(M,b.x(t.x+p),t.y+f/2),t.y+=f+a},g=b.textAlign(s);let y,v,m,w,T,D,k;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=jr(this,g,i),e.fillStyle=i.bodyColor,Ct(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,D=r.length;w<D;++w){for(y=r[w],v=this.labelTextColors[w],e.fillStyle=v,Ct(y.before,x),m=y.lines,o&&m.length&&(this._drawColorBox(e,t,w,b,i),f=Math.max(d.lineHeight,l)),T=0,k=m.length;T<k;++T)x(m[T]),f=d.lineHeight;Ct(y.after,x)}p=0,f=d.lineHeight,Ct(this.afterBody,x),t.y-=a}drawFooter(t,e,i){const r=this.footer,a=r.length;let s,o;if(a){const l=ri(i.rtl,this.x,this.width);for(t.x=jr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=At(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:f,bottomLeft:p,bottomRight:b}=hn(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-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,i,r),e.lineTo(o+c,l+u-b),e.quadraticCurveTo(o+c,l+u,o+c-b,l+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),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=Vi[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=ad(this,t),l=Object.assign({},s,this._size),c=sd(e,t,l),u=od(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=Kt(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),$c(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),jc(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=!br(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||!br(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.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);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=Vi[a.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}H(xs,"positioners",Vi);var Vr={id:"tooltip",_element:xs,positioners:Vi,afterInit(n,t,e){e&&(n.tooltip=new xs({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:ud},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"]},Jy=Object.freeze({__proto__:null,Colors:fy,Decimation:my,Filler:Ny,Legend:zy,SubTitle:jy,Title:$y,Tooltip:Vr});const tb=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function eb(n,t,e,i){const r=n.indexOf(t);if(r===-1)return tb(n,t,e,i);const a=n.lastIndexOf(t);return r!==a?e:r}const nb=(n,t)=>n===null?null:Zt(Math.round(n),0,t);function dd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class ws extends Nn{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(at(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:eb(i,t,it(e,t),this._addedLabels),nb(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 dd.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}}H(ws,"id","category"),H(ws,"defaults",{ticks:{callback:dd}});function ib(n,t){const e=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,b=u-1,{min:x,max:g}=t,y=!at(s),v=!at(o),m=!at(c),w=(g-x)/(d+1);let T=gc((g-x)/b/p)*p,D,k,M,C;if(T<1e-14&&!y&&!v)return[{value:x},{value:g}];C=Math.ceil(g/T)-Math.floor(x/T),C>b&&(T=gc(C*T/b/p)*p),at(l)||(D=Math.pow(10,l),T=Math.ceil(T*D)/D),r==="ticks"?(k=Math.floor(x/T)*T,M=Math.ceil(g/T)*T):(k=x,M=g),y&&v&&a&&tg((o-s)/a,T/1e3)?(C=Math.round(Math.min((o-s)/T,u)),T=(o-s)/C,k=s,M=o):m?(k=y?s:k,M=v?o:M,C=c-1,T=(M-k)/C):(C=(M-k)/T,Si(C,Math.round(C),T/1e3)?C=Math.round(C):C=Math.ceil(C));const O=Math.max(yc(T),yc(k));D=Math.pow(10,at(l)?O:l),k=Math.round(k*D)/D,M=Math.round(M*D)/D;let P=0;for(y&&(f&&k!==s?(e.push({value:s}),k<s&&P++,Si(Math.round((k+P*T)*D)/D,s,fd(s,w,n))&&P++):k<s&&P++);P<C;++P){const R=Math.round((k+P*T)*D)/D;if(v&&R>o)break;e.push({value:R})}return v&&f&&M!==o?e.length&&Si(e[e.length-1].value,o,fd(o,w,n))?e[e.length-1].value=o:e.push({value:o}):(!v||M===o)&&e.push({value:M}),e}function fd(n,t,{horizontal:e,minRotation:i}){const r=Gt(i),a=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class qr extends Nn{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 at(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=Ne(r),c=Ne(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=ib(r,a);return t.bounds==="ticks"&&mc(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 Oi(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends qr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Nt(t)?t:0,this.max=Nt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Gt(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}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:Mr.formatters.numeric}});const qi=n=>Math.floor(dn(n)),Fn=(n,t)=>Math.pow(10,qi(n)+t);function hd(n){return n/Math.pow(10,qi(n))===1}function pd(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function rb(n,t){const e=t-n;let i=qi(e);for(;pd(n,t,i)>10;)i++;for(;pd(n,t,i)<10;)i--;return Math.min(i,qi(n))}function ab(n,{min:t,max:e}){t=xe(n.min,t);const i=[],r=qi(t);let a=rb(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)),f=xe(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)i.push({value:f,major:hd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=xe(n.max,f);return i.push({value:p,major:hd(p),significand:d}),i}class Ts extends Nn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=qr.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Nt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Nt(t)?Math.max(0,t):null,this.max=Nt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Nt(this._userMin)&&(this.min=t===Fn(this.min,0)?Fn(this.min,-1):Fn(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(Fn(i,-1)),s(Fn(r,1)))),i<=0&&a(Fn(r,-1)),r<=0&&s(Fn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=ab(e,this);return t.bounds==="ticks"&&mc(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":Oi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=dn(t),this._valueRange=dn(this.max)-dn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(dn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(Ts,"id","logarithmic"),H(Ts,"defaults",{ticks:{callback:Mr.formatters.logarithmic,major:{enabled:!0}}});function Ms(n){const t=n.ticks;if(t.display&&n.display){const e=Kt(t.backdropPadding);return it(t.font&&t.font.size,Bt.font.size)+e.height}return 0}function sb(n,t,e){return e=yt(e)?e:[e],{w:yg(n,t.string,e),h:e.length*t.lineHeight}}function gd(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 ob(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?ft/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=At(c.font),f=sb(n.ctx,d,n._pointLabels[l]);i[l]=f;const p=we(n.getIndexAngle(l)+o),b=Math.round(_r(p)),x=gd(b,u.x,f.w,0,180),g=gd(b,u.y,f.h,90,270);lb(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=db(n,i,r)}function lb(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 cb(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(_r(we(l.angle+Rt))),u=pb(l.y,o.h,c),d=fb(c),f=hb(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function ub(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:a}=n;return!(Ge({x:e,y:i},t)||Ge({x:e,y:a},t)||Ge({x:r,y:i},t)||Ge({x:r,y:a},t))}function db(n,t,e){const i=[],r=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ms(a)/2,additionalAngle:s?ft/r:0};let c;for(let u=0;u<r;u++){l.padding=e[u],l.size=t[u];const d=cb(n,u,l);i.push(d),o==="auto"&&(d.visible=ub(d,c),d.visible&&(c=d))}return i}function fb(n){return n===0||n===180?"center":n<180?"left":"right"}function hb(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function pb(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gb(n,t,e){const{left:i,top:r,right:a,bottom:s}=e,{backdropColor:o}=t;if(!at(o)){const l=hn(t.borderRadius),c=Kt(t.backdropPadding);n.fillStyle=o;const u=i-c.left,d=r-c.top,f=a-i+c.width,p=s-r+c.height;Object.values(l).some(b=>b!==0)?(n.beginPath(),ei(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function mb(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));gb(e,s,a);const o=At(s.font),{x:l,y:c,textAlign:u}=a;Rn(e,n._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function md(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,Ot);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 yb(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(),md(n,e,s,i),a.closePath(),a.stroke(),a.restore())}function bb(n,t,e){return pn(n,{label:e,index:t,type:"pointLabel"})}class Xi extends qr{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=Kt(Ms(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=Nt(t)&&!isNaN(t)?t:0,this.max=Nt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ms(this.options))}generateTickLabels(t){qr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=Mt(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?ob(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=Ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return we(t*e+Gt(i))}getDistanceFromCenterForValue(t){if(at(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(at(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 bb(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-Rt+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(),md(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&&mb(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=r.setContext(f),b=a.setContext(f);yb(this,p,l,s,b)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,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=At(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=Kt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}Rn(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(Xi,"id","radialLinear"),H(Xi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(Xi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(Xi,"descriptors",{angleLines:{_fallback:"grid"}});const Xr={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}},ge=Object.keys(Xr);function yd(n,t){return n-t}function bd(n,t){if(at(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)),Nt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(fn(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,r)),+s)}function vd(n,t,e,i){const r=ge.length;for(let a=ge.indexOf(n);a<r-1;++a){const s=Xr[ge[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=i)return ge[a]}return ge[r-1]}function vb(n,t,e,i,r){for(let a=ge.length-1;a>=ge.indexOf(e);a--){const s=ge[a];if(Xr[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return ge[e?ge.indexOf(e):0]}function xb(n){for(let t=ge.indexOf(n)+1,e=ge.length;t<e;++t)if(Xr[ge[t]].common)return ge[t]}function xd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Wa(e,t),a=e[i]>=t?e[i]:e[r];n[a]=!0}}function wb(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 wd(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:wb(n,i,r,e)}class Gi extends Nn{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 uu._date(t.adapters.date);r.init(e),Ci(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:bd(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=Nt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),a=Nt(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=rg(r,a,s);return this._unit=e.unit||(i.autoSkip?vd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):vb(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:xb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),wd(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=Zt(e,0,s),i=Zt(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||vd(a.minUnit,e,i,this._getLabelCapacity(e)),o=it(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=fn(l)||l===!0,u={};let d=e,f,p;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 b=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<i;f=+t.add(f,o,s),p++)xd(u,f,b);return(f===i||r.bounds==="ticks"||p===1)&&xd(u,f,b),Object.keys(u).sort(yd).map(x=>+x)}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 Mt(s,[t,e,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=i[e],p=c&&d&&f&&f.major;return this._adapter.format(t,r||(p?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=Gt(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,wd(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(bd(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wc(t.sort(yd))}}H(Gi,"id","time"),H(Gi,"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 Gr(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}=Xe(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}=Xe(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 Cs extends Gi{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=Gr(e,this.min),this._tableRange=Gr(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(Gr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Gr(this._table,i*this._tableRange+this._minPos,!0)}}H(Cs,"id","timeseries"),H(Cs,"defaults",Gi.defaults);var _b=Object.freeze({__proto__:null,CategoryScale:ws,LinearScale:_s,LogarithmicScale:Ts,RadialLinearScale:Xi,TimeScale:Gi,TimeSeriesScale:Cs});const Tb=[Rm,sy,Jy,_b],Mb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Cb=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Sb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Db=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_d=(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 Ss(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?Db:Sb:t.binary?Cb:Mb,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=_d(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=_d(Number(n),t.locale,s),c=e[o];return a+l+i+c}function Ze(n){"@babel/helpers - typeof";return Ze=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},Ze(n)}function Lt(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 J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ze(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 Td(n,t){J(2,arguments);var e=nt(n),i=Lt(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function Ds(n,t){J(2,arguments);var e=nt(n),i=Lt(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 Ki(n,t){J(2,arguments);var e=nt(n).getTime(),i=Lt(t);return new Date(e+i)}var kb=36e5;function Ob(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*kb)}var Pb={};function vn(){return Pb}function Md(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Kr(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 ks(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Eb=864e5;function Rb(n,t){J(2,arguments);var e=ks(n),i=ks(t),r=e.getTime()-Kr(e),a=i.getTime()-Kr(i);return Math.round((r-a)/Eb)}var Ab=6e4;function Lb(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*Ab)}function Ib(n,t){J(2,arguments);var e=Lt(t),i=e*3;return Ds(n,i)}function Nb(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*1e3)}function Fb(n,t){J(2,arguments);var e=Lt(t),i=e*7;return Td(n,i)}function Ub(n,t){J(2,arguments);var e=Lt(t);return Ds(n,e*12)}function Qi(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}var Qr=6e4,Zi=36e5,Bb=1e3;function Yb(n){return J(1,arguments),n instanceof Date||Ze(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Os(n){if(J(1,arguments),!Yb(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function Wb(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function zb(n,t){J(2,arguments);var e=nt(n),i=nt(t);return e.getFullYear()-i.getFullYear()}function Cd(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 Sd(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Cd(e,i),a=Math.abs(Rb(e,i));e.setDate(e.getDate()-r*a);var s=+(Cd(e,i)===-r),o=r*(a-s);return o===0?0:o}function Zr(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var Dd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Hb="trunc";function Ji(n){return n?Dd[n]:Dd[Hb]}function $b(n,t,e){J(2,arguments);var i=Zr(n,t)/Zi;return Ji(e==null?void 0:e.roundingMethod)(i)}function jb(n,t,e){J(2,arguments);var i=Zr(n,t)/Qr;return Ji(e==null?void 0:e.roundingMethod)(i)}function kd(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Od(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Vb(n){J(1,arguments);var t=nt(n);return kd(t).getTime()===Od(t).getTime()}function Pd(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Qi(e,i),a=Math.abs(Wb(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=Qi(e,i)===-r;Vb(nt(n))&&a===1&&Qi(n,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function qb(n,t,e){J(2,arguments);var i=Pd(n,t)/3;return Ji(e==null?void 0:e.roundingMethod)(i)}function Xb(n,t,e){J(2,arguments);var i=Zr(n,t)/1e3;return Ji(e==null?void 0:e.roundingMethod)(i)}function Gb(n,t,e){J(2,arguments);var i=Sd(n,t)/7;return Ji(e==null?void 0:e.roundingMethod)(i)}function Kb(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Qi(e,i),a=Math.abs(zb(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=Qi(e,i)===-r,o=r*(a-Number(s));return o===0?0:o}function Qb(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function Zb(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Jb(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function tv(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function ev(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nv(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function iv(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getDay(),b=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+b),f.setHours(23,59,59,999),f}function rv(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function av(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function sv(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Ed(n,t){J(2,arguments);var e=Lt(t);return Ki(n,-e)}var ov=864e5;function lv(n){J(1,arguments);var t=nt(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/ov)+1}function si(n){J(1,arguments);var t=1,e=nt(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 Rd(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=si(i),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=si(a);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function cv(n){J(1,arguments);var t=Rd(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=si(e);return i}var uv=6048e5;function Ad(n){J(1,arguments);var t=nt(n),e=si(t).getTime()-cv(t).getTime();return Math.round(e/uv)+1}function Un(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getUTCDay(),b=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-b),f.setUTCHours(0,0,0,0),f}function Ps(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=vn(),p=Lt((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:f.firstWeekContainsDate)!==null&&i!==void 0?i:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(d+1,0,p),b.setUTCHours(0,0,0,0);var x=Un(b,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var y=Un(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function dv(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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),f=Ps(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var b=Un(p,t);return b}var fv=6048e5;function Ld(n,t){J(1,arguments);var e=nt(n),i=Un(e,t).getTime()-dv(e,t).getTime();return Math.round(i/fv)+1}function St(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}var hv={y:function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return St(e==="yy"?r%100:r,e.length)},M:function(t,e){var i=t.getUTCMonth();return e==="M"?String(i+1):St(i+1,2)},d:function(t,e){return St(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 St(t.getUTCHours()%12||12,e.length)},H:function(t,e){return St(t.getUTCHours(),e.length)},m:function(t,e){return St(t.getUTCMinutes(),e.length)},s:function(t,e){return St(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 St(a,e.length)}};const xn=hv;var oi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pv={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 xn.y(t,e)},Y:function(t,e,i,r){var a=Ps(t,r),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return St(o,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):St(s,e.length)},R:function(t,e){var i=Rd(t);return St(i,e.length)},u:function(t,e){var i=t.getUTCFullYear();return St(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 St(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 St(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 xn.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 St(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=Ld(t,r);return e==="wo"?i.ordinalNumber(a,{unit:"week"}):St(a,e.length)},I:function(t,e,i){var r=Ad(t);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):St(r,e.length)},d:function(t,e,i){return e==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):xn.d(t,e)},D:function(t,e,i){var r=lv(t);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):St(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 St(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 St(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 St(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=oi.noon:r===0?a=oi.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=oi.evening:r>=12?a=oi.afternoon:r>=4?a=oi.morning:a=oi.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 xn.h(t,e)},H:function(t,e,i){return e==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):xn.H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):St(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):St(r,e.length)},m:function(t,e,i){return e==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):xn.m(t,e)},s:function(t,e,i){return e==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):xn.s(t,e)},S:function(t,e){return xn.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 Nd(s);case"XXXX":case"XX":return Bn(s);case"XXXXX":case"XXX":default:return Bn(s,":")}},x:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Nd(s);case"xxxx":case"xx":return Bn(s);case"xxxxx":case"xxx":default:return Bn(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"+Id(s,":");case"OOOO":default:return"GMT"+Bn(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"+Id(s,":");case"zzzz":default:return"GMT"+Bn(s,":")}},t:function(t,e,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return St(s,e.length)},T:function(t,e,i,r){var a=r._originalDate||t,s=a.getTime();return St(s,e.length)}};function Id(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+St(a,2)}function Nd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+St(Math.abs(n)/60,2)}return Bn(n,t)}function Bn(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=St(Math.floor(r/60),2),s=St(r%60,2);return i+a+e+s}const gv=pv;var Fd=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"})}},Ud=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"})}},mv=function(t,e){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Fd(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}}",Fd(r,e)).replace("{{time}}",Ud(a,e))},yv={p:Ud,P:mv};const Es=yv;var bv=["D","DD"],vv=["YY","YYYY"];function Bd(n){return bv.indexOf(n)!==-1}function Yd(n){return vv.indexOf(n)!==-1}function Jr(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 xv={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"}},wv=function(t,e,i){var r,a=xv[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 _v=wv;function Rs(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 Tv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sv={date:Rs({formats:Tv,defaultWidth:"full"}),time:Rs({formats:Mv,defaultWidth:"full"}),dateTime:Rs({formats:Cv,defaultWidth:"full"})};const Dv=Sv;var kv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ov=function(t,e,i,r){return kv[t]};const Pv=Ov;function tr(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 Ev={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Av={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"]},Lv={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"]},Iv={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"}},Nv={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"}},Fv=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"},Uv={ordinalNumber:Fv,era:tr({values:Ev,defaultWidth:"wide"}),quarter:tr({values:Rv,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:tr({values:Av,defaultWidth:"wide"}),day:tr({values:Lv,defaultWidth:"wide"}),dayPeriod:tr({values:Iv,defaultWidth:"wide",formattingValues:Nv,defaultFormattingWidth:"wide"})};const Bv=Uv;function er(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)?Wv(o,function(d){return d.test(s)}):Yv(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 Yv(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function Wv(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function zv(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 Hv=/^(\d+)(th|st|nd|rd)?/i,$v=/\d+/i,jv={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},Vv={any:[/^b/i,/^(a|c)/i]},qv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xv={any:[/1/i,/2/i,/3/i,/4/i]},Gv={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},Kv={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]},Qv={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},Zv={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]},Jv={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},tx={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}},ex={ordinalNumber:zv({matchPattern:Hv,parsePattern:$v,valueCallback:function(t){return parseInt(t,10)}}),era:er({matchPatterns:jv,defaultMatchWidth:"wide",parsePatterns:Vv,defaultParseWidth:"any"}),quarter:er({matchPatterns:qv,defaultMatchWidth:"wide",parsePatterns:Xv,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:er({matchPatterns:Gv,defaultMatchWidth:"wide",parsePatterns:Kv,defaultParseWidth:"any"}),day:er({matchPatterns:Qv,defaultMatchWidth:"wide",parsePatterns:Zv,defaultParseWidth:"any"}),dayPeriod:er({matchPatterns:Jv,defaultMatchWidth:"any",parsePatterns:tx,defaultParseWidth:"any"})},nx={code:"en-US",formatDistance:_v,formatLong:Dv,formatRelative:Pv,localize:Bv,match:ex,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Wd=nx;var ix=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ax=/^'([^]*?)'?$/,sx=/''/g,ox=/[a-zA-Z]/;function lx(n,t,e){var i,r,a,s,o,l,c,u,d,f,p,b,x,g,y,v,m,w;J(2,arguments);var T=String(t),D=vn(),k=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:D.locale)!==null&&i!==void 0?i:Wd,M=Lt((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:D.firstWeekContainsDate)!==null&&s!==void 0?s:(d=D.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Lt((p=(b=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(y=e.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&b!==void 0?b:(m=D.locale)===null||m===void 0||(w=m.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=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 O=nt(n);if(!Os(O))throw new RangeError("Invalid time value");var P=Kr(O),R=Ed(O,P),F={firstWeekContainsDate:M,weekStartsOn:C,locale:k,_originalDate:O},q=T.match(rx).map(function($){var z=$[0];if(z==="p"||z==="P"){var I=Es[z];return I($,k.formatLong)}return $}).join("").match(ix).map(function($){if($==="''")return"'";var z=$[0];if(z==="'")return cx($);var I=gv[z];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Yd($)&&Jr($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bd($)&&Jr($,t,String(n)),I(R,$,k.localize,F);if(z.match(ox))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");return $}).join("");return q}function cx(n){var t=n.match(ax);return t?t[1].replace(sx,"'"):n}function ux(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 zd(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 dx(n,t){if(n){if(typeof n=="string")return zd(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 zd(n,t)}}function Hd(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=dx(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 G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function As(n,t){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},As(n,t)}function gt(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&&As(n,t)}function ta(n){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ta(n)}function fx(){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 hx(n,t){if(t&&(Ze(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function mt(n){var t=fx();return function(){var i=ta(n),r;if(t){var a=ta(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return hx(this,r)}}function ht(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function px(n,t){if(Ze(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Ze(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $d(n){var t=px(n,"string");return Ze(t)==="symbol"?t:String(t)}function jd(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,$d(i.key),i)}}function pt(n,t,e){return t&&jd(n.prototype,t),e&&jd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=$d(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var gx=10,Vd=function(){function n(){ht(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return pt(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),mx=function(n){gt(e,n);var t=mt(e);function e(i,r,a,s,o){var l;return ht(this,e),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return pt(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}(Vd),yx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",gx),V(G(i),"subPriority",-1),i}return pt(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}(Vd),wt=function(){function n(){ht(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return pt(n,[{key:"run",value:function(e,i,r,a){var s=this.parse(e,i,r,a);return s?{setter:new mx(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}(),bx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",140),V(G(i),"incompatibleTokens",["R","u","t","T"]),i}return pt(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}(wt),qt={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}/},Be={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 Xt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Yt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ye(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*Zi+a*Qr+s*Bb),rest:t.slice(e[0].length)}}function qd(n){return Yt(qt.anyDigitsSigned,n)}function Vt(n,t){switch(n){case 1:return Yt(qt.singleDigit,t);case 2:return Yt(qt.twoDigits,t);case 3:return Yt(qt.threeDigits,t);case 4:return Yt(qt.fourDigits,t);default:return Yt(new RegExp("^\\d{1,"+n+"}"),t)}}function ea(n,t){switch(n){case 1:return Yt(qt.singleDigitSigned,t);case 2:return Yt(qt.twoDigitsSigned,t);case 3:return Yt(qt.threeDigitsSigned,t);case 4:return Yt(qt.fourDigitsSigned,t);default:return Yt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Ls(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 Xd(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 Gd(n){return n%400===0||n%4===0&&n%100!==0}var vx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Xt(Vt(4,r),o);case"yo":return Xt(s.ordinalNumber(r,{unit:"year"}),o);default:return Xt(Vt(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=Xd(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}(wt),xx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Xt(Vt(4,r),o);case"Yo":return Xt(s.ordinalNumber(r,{unit:"year"}),o);default:return Xt(Vt(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=Ps(r,o);if(s.isTwoDigitYear){var c=Xd(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Un(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),Un(r,o)}}]),e}(wt),wx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){return ea(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),si(o)}}]),e}(wt),_x=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){return ea(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}(wt),Tx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Vt(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}(wt),Mx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Vt(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}(wt),Cx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(i),"priority",110),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Xt(Yt(qt.month,r),o);case"MM":return Xt(Vt(2,r),o);case"Mo":return Xt(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}(wt),Sx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",110),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Xt(Yt(qt.month,r),o);case"LL":return Xt(Vt(2,r),o);case"Lo":return Xt(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}(wt);function Dx(n,t,e){J(2,arguments);var i=nt(n),r=Lt(t),a=Ld(i,e)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var kx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"w":return Yt(qt.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return Un(Dx(r,s,o),o)}}]),e}(wt);function Ox(n,t){J(2,arguments);var e=nt(n),i=Lt(t),r=Ad(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}var Px=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"I":return Yt(qt.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return si(Ox(r,s))}}]),e}(wt),Ex=[31,28,31,30,31,30,31,31,30,31,30,31],Rx=[31,29,31,30,31,30,31,31,30,31,30,31],Ax=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"subPriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"d":return Yt(qt.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(s),l=r.getUTCMonth();return o?a>=1&&a<=Rx[l]:a>=1&&a<=Ex[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Lx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"subpriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return Yt(qt.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(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}(wt);function Is(n,t,e){var i,r,a,s,o,l,c,u;J(2,arguments);var d=vn(),f=Lt((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(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),b=Lt(t),x=p.getUTCDay(),g=b%7,y=(g+7)%7,v=(y<f?7:0)+b-x;return p.setUTCDate(p.getUTCDate()+v),p}var Ix=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return pt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Nx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return pt(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 Xt(Vt(a.length,r),l);case"eo":return Xt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Fx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return pt(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 Xt(Vt(a.length,r),l);case"co":return Xt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt);function Ux(n,t){J(2,arguments);var e=Lt(t);e%7===0&&(e=e-7);var i=1,r=nt(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 Bx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Vt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Xt(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 Xt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Xt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Xt(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=Ux(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Yx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),Wx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),zx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","b","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),Hx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["H","K","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"h":return Yt(qt.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),$x=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"H":return Yt(qt.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),jx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["h","H","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"K":return Yt(qt.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),Vx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"k":return Yt(qt.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),qx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",60),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"m":return Yt(qt.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Vt(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}(wt),Xx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",50),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"s":return Yt(qt.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Vt(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}(wt),Gx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",30),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Xt(Vt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),e}(wt),Kx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","x"]),i}return pt(e,[{key:"parse",value:function(r,a){switch(a){case"X":return Ye(Be.basicOptionalMinutes,r);case"XX":return Ye(Be.basic,r);case"XXXX":return Ye(Be.basicOptionalSeconds,r);case"XXXXX":return Ye(Be.extendedOptionalSeconds,r);case"XXX":default:return Ye(Be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(wt),Qx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","X"]),i}return pt(e,[{key:"parse",value:function(r,a){switch(a){case"x":return Ye(Be.basicOptionalMinutes,r);case"xx":return Ye(Be.basic,r);case"xxxx":return Ye(Be.basicOptionalSeconds,r);case"xxxxx":return Ye(Be.extendedOptionalSeconds,r);case"xxx":default:return Ye(Be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(wt),Zx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",40),V(G(i),"incompatibleTokens","*"),i}return pt(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(wt),Jx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",20),V(G(i),"incompatibleTokens","*"),i}return pt(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(wt),tw={G:new bx,y:new vx,Y:new xx,R:new wx,u:new _x,Q:new Tx,q:new Mx,M:new Cx,L:new Sx,w:new kx,I:new Px,d:new Ax,D:new Lx,E:new Ix,e:new Nx,c:new Fx,i:new Bx,a:new Yx,b:new Wx,B:new zx,h:new Hx,H:new $x,K:new jx,k:new Vx,m:new qx,s:new Xx,S:new Gx,X:new Kx,x:new Qx,t:new Zx,T:new Jx},ew=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iw=/^'([^]*?)'?$/,rw=/''/g,aw=/\S/,sw=/[a-zA-Z]/;function ow(n,t,e,i){var r,a,s,o,l,c,u,d,f,p,b,x,g,y,v,m,w,T;J(3,arguments);var D=String(n),k=String(t),M=vn(),C=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:M.locale)!==null&&r!==void 0?r:Wd;if(!C.match)throw new RangeError("locale must contain match property");var O=Lt((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:M.firstWeekContainsDate)!==null&&o!==void 0?o:(f=M.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=Lt((b=(x=(g=(y=i==null?void 0:i.weekStartsOn)!==null&&y!==void 0?y:i==null||(v=i.locale)===null||v===void 0||(m=v.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&g!==void 0?g:M.weekStartsOn)!==null&&x!==void 0?x:(w=M.locale)===null||w===void 0||(T=w.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&b!==void 0?b:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(k==="")return D===""?nt(e):new Date(NaN);var R={firstWeekContainsDate:O,weekStartsOn:P,locale:C},F=[new yx],q=k.match(nw).map(function(N){var A=N[0];if(A in Es){var Q=Es[A];return Q(N,C.formatLong)}return N}).join("").match(ew),$=[],z=Hd(q),I;try{var rt=function(){var A=I.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Yd(A)&&Jr(A,k,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Bd(A)&&Jr(A,k,n);var Q=A[0],X=tw[Q];if(X){var vt=X.incompatibleTokens;if(Array.isArray(vt)){var ut=$.find(function(_t){return vt.includes(_t.token)||_t.token===Q});if(ut)throw new RangeError("The format string mustn't contain `".concat(ut.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Pt=X.run(D,A,C.match,R);if(!Pt)return{v:new Date(NaN)};F.push(Pt.setter),D=Pt.rest}else{if(Q.match(sw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=lw(A)),D.indexOf(A)===0)D=D.slice(A.length);else return{v:new Date(NaN)}}};for(z.s();!(I=z.n()).done;){var B=rt();if(Ze(B)==="object")return B.v}}catch(N){z.e(N)}finally{z.f()}if(D.length>0&&aw.test(D))return new Date(NaN);var bt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),dt=nt(e);if(isNaN(dt.getTime()))return new Date(NaN);var W=Ed(dt,Kr(dt)),L={},U=Hd(bt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(W,R))return new Date(NaN);var K=Z.set(W,L,R);Array.isArray(K)?(W=K[0],ux(L,K[1])):W=K}}catch(N){U.e(N)}finally{U.f()}return W}function lw(n){return n.match(iw)[1].replace(rw,"'")}function cw(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function uw(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function dw(n){J(1,arguments);var t=n/Zi;return Math.floor(t)}function Kd(n,t){var e;J(1,arguments);var i=Lt((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=gw(n),a;if(r.date){var s=mw(r.date,i);a=yw(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=bw(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=vw(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 na={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fw=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,hw=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pw=/^([+-])(\d{2})(?::?(\d{2}))?$/;function gw(n){var t={},e=n.split(na.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],na.timeZoneDelimiter.test(t.date)&&(t.date=n.split(na.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){var r=na.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function mw(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 yw(n,t){if(t===null)return new Date(NaN);var e=n.match(fw);if(!e)return new Date(NaN);var i=!!e[4],r=nr(e[1]),a=nr(e[2])-1,s=nr(e[3]),o=nr(e[4]),l=nr(e[5])-1;if(i)return Mw(t,o,l)?xw(t,o,l):new Date(NaN);var c=new Date(0);return!_w(t,a,s)||!Tw(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function nr(n){return n?parseInt(n):1}function bw(n){var t=n.match(hw);if(!t)return NaN;var e=Ns(t[1]),i=Ns(t[2]),r=Ns(t[3]);return Cw(e,i,r)?e*Zi+i*Qr+r*1e3:NaN}function Ns(n){return n&&parseFloat(n.replace(",","."))||0}function vw(n){if(n==="Z")return 0;var t=n.match(pw);if(!t)return 0;var e=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return Sw(i,r)?e*(i*Zi+r*Qr):NaN}function xw(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 ww=[31,null,31,30,31,30,31,31,30,31,30,31];function Qd(n){return n%400===0||n%4===0&&n%100!==0}function _w(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(ww[t]||(Qd(n)?29:28))}function Tw(n,t){return t>=1&&t<=(Qd(n)?366:365)}function Mw(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function Cw(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function Sw(n,t){return t>=0&&t<=59}var ne=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ne||{}),ia=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ia||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),li=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(li||{});const Fs=(n,t)=>{var r,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const i=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(r=t.chart.config)==null?void 0:r.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ne.HORIZONTAL_BAR,ne.VERTICAL_BAR].includes(n.chartType),c=[ia.GAUGE,ne.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Ss(f);else{const x=n.translateUnit(n.units,f);p=`${f%1===0?aa.format(f):aa.format(Number(f.toFixed(wf)))} ${x}`}const b=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:b,value:p,rawValue:f}}).sort(i),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},Dw=n=>n&&n.datasets&&n.datasets.length,kw=n=>Dw(n)&&n.datasets.some(t=>t.data.length),Ow=n=>kw(n)&&n.datasets.some(t=>t.data.length>1),Pw=n=>Ow(n)&&n.datasets.some(t=>t.data[0]&&Os(t.data[0].x)),Ew=n=>Pw(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Us=(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)},Rw=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zd(n,t){let e;return(...i)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...i)},t)}}var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bs={exports:{}},Jd={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})(Jd);var zt=Jd.exports,Ys={exports:{}},Ws={exports:{}},tf={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})(tf);var ef=tf.exports,zs={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})(zs,zs.exports);var se=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(se);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})(Ws,Ws.exports);var Aw=Ws.exports,Hs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(se);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})(Hs,Hs.exports);var We=Hs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Aw),r=e(We),a=e(se);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})(Ys,Ys.exports);var Lw=Ys.exports,$s={exports:{}},js={exports:{}},Vs={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})(Vs,Vs.exports);var Wn=Vs.exports;const Iw=Yn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Wn),r=e(We),a=e(se);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})(js,js.exports);var Nw=js.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Nw),r=e(se),a=e(Wn);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})($s,$s.exports);var Fw=$s.exports,qs={exports:{}},Xs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(We),r=e(se),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})(Xs,Xs.exports);var Uw=Xs.exports,Gs={exports:{}},Ks={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(We),r=e(se);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})(Ks,Ks.exports);var Qs=Ks.exports,Zs={exports:{}},Js={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(We),r=e(se),a=e(Qs);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),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Js,Js.exports);var nf=Js.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(nf),r=e(Qs),a=e(se);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})(Zs,Zs.exports);var Bw=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(Qs),a=e(Bw),s=e(se),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})(Gs,Gs.exports);var Yw=Gs.exports,to={exports:{}},eo={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=Ww,zn.setDefaultOptions=zw;var rf={};function Ww(){return rf}function zw(n){rf=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(We),r=e(se),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,b,x,g,y;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),m=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(y=g.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&u!==void 0?u:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),D=(T<m?7:0)+T-m;return w.setUTCDate(w.getUTCDate()-D),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(eo,eo.exports);var no=eo.exports,io={exports:{}},ro={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(se),a=e(no),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,i.default)(c),w=m.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(y=T.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,D),k.setUTCHours(0,0,0,0);var M=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,D),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return m.getTime()>=M.getTime()?w+1:m.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(ro,ro.exports);var af=ro.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(af),r=e(se),a=e(no),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:m.firstWeekContainsDate)!==null&&f!==void 0?f:(y=m.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,w),D.setUTCHours(0,0,0,0);var k=(0,a.default)(D,u);return k}n.exports=t.default})(io,io.exports);var Hw=io.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(no),a=e(Hw),s=e(se),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(to,to.exports);var $w=to.exports,ao={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})(ao,ao.exports);var sf=ao.exports,so={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(sf),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})(so,so.exports);var jw=so.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uw),r=e(Yw),a=e(nf),s=e($w),o=e(af),l=e(sf),c=e(jw),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(y,v,m){var w=y.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return m.era(w,{width:"abbreviated"});case"GGGGG":return m.era(w,{width:"narrow"});case"GGGG":default:return m.era(w,{width:"wide"})}},y:function(y,v,m){if(v==="yo"){var w=y.getUTCFullYear(),T=w>0?w:1-w;return m.ordinalNumber(T,{unit:"year"})}return c.default.y(y,v)},Y:function(y,v,m,w){var T=(0,o.default)(y,w),D=T>0?T:1-T;if(v==="YY"){var k=D%100;return(0,l.default)(k,2)}return v==="Yo"?m.ordinalNumber(D,{unit:"year"}):(0,l.default)(D,v.length)},R:function(y,v){var m=(0,a.default)(y);return(0,l.default)(m,v.length)},u:function(y,v){var m=y.getUTCFullYear();return(0,l.default)(m,v.length)},Q:function(y,v,m){var w=Math.ceil((y.getUTCMonth()+1)/3);switch(v){case"Q":return String(w);case"QQ":return(0,l.default)(w,2);case"Qo":return m.ordinalNumber(w,{unit:"quarter"});case"QQQ":return m.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return m.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return m.quarter(w,{width:"wide",context:"formatting"})}},q:function(y,v,m){var w=Math.ceil((y.getUTCMonth()+1)/3);switch(v){case"q":return String(w);case"qq":return(0,l.default)(w,2);case"qo":return m.ordinalNumber(w,{unit:"quarter"});case"qqq":return m.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return m.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return m.quarter(w,{width:"wide",context:"standalone"})}},M:function(y,v,m){var w=y.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(y,v);case"Mo":return m.ordinalNumber(w+1,{unit:"month"});case"MMM":return m.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return m.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return m.month(w,{width:"wide",context:"formatting"})}},L:function(y,v,m){var w=y.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return m.ordinalNumber(w+1,{unit:"month"});case"LLL":return m.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return m.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return m.month(w,{width:"wide",context:"standalone"})}},w:function(y,v,m,w){var T=(0,s.default)(y,w);return v==="wo"?m.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,v.length)},I:function(y,v,m){var w=(0,r.default)(y);return v==="Io"?m.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(y,v,m){return v==="do"?m.ordinalNumber(y.getUTCDate(),{unit:"date"}):c.default.d(y,v)},D:function(y,v,m){var w=(0,i.default)(y);return v==="Do"?m.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(y,v,m){var w=y.getUTCDay();switch(v){case"E":case"EE":case"EEE":return m.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return m.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return m.day(w,{width:"short",context:"formatting"});case"EEEE":default:return m.day(w,{width:"wide",context:"formatting"})}},e:function(y,v,m,w){var T=y.getUTCDay(),D=(T-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(D);case"ee":return(0,l.default)(D,2);case"eo":return m.ordinalNumber(D,{unit:"day"});case"eee":return m.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return m.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return m.day(T,{width:"short",context:"formatting"});case"eeee":default:return m.day(T,{width:"wide",context:"formatting"})}},c:function(y,v,m,w){var T=y.getUTCDay(),D=(T-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(D);case"cc":return(0,l.default)(D,v.length);case"co":return m.ordinalNumber(D,{unit:"day"});case"ccc":return m.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return m.day(T,{width:"narrow",context:"standalone"});case"cccccc":return m.day(T,{width:"short",context:"standalone"});case"cccc":default:return m.day(T,{width:"wide",context:"standalone"})}},i:function(y,v,m){var w=y.getUTCDay(),T=w===0?7:w;switch(v){case"i":return String(T);case"ii":return(0,l.default)(T,v.length);case"io":return m.ordinalNumber(T,{unit:"day"});case"iii":return m.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return m.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return m.day(w,{width:"short",context:"formatting"});case"iiii":default:return m.day(w,{width:"wide",context:"formatting"})}},a:function(y,v,m){var w=y.getUTCHours(),T=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(y,v,m){var w=y.getUTCHours(),T;switch(w===12?T=u.noon:w===0?T=u.midnight:T=w/12>=1?"pm":"am",v){case"b":case"bb":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(y,v,m){var w=y.getUTCHours(),T;switch(w>=17?T=u.evening:w>=12?T=u.afternoon:w>=4?T=u.morning:T=u.night,v){case"B":case"BB":case"BBB":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(y,v,m){if(v==="ho"){var w=y.getUTCHours()%12;return w===0&&(w=12),m.ordinalNumber(w,{unit:"hour"})}return c.default.h(y,v)},H:function(y,v,m){return v==="Ho"?m.ordinalNumber(y.getUTCHours(),{unit:"hour"}):c.default.H(y,v)},K:function(y,v,m){var w=y.getUTCHours()%12;return v==="Ko"?m.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(y,v,m){var w=y.getUTCHours();return w===0&&(w=24),v==="ko"?m.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(y,v,m){return v==="mo"?m.ordinalNumber(y.getUTCMinutes(),{unit:"minute"}):c.default.m(y,v)},s:function(y,v,m){return v==="so"?m.ordinalNumber(y.getUTCSeconds(),{unit:"second"}):c.default.s(y,v)},S:function(y,v){return c.default.S(y,v)},X:function(y,v,m,w){var T=w._originalDate||y,D=T.getTimezoneOffset();if(D===0)return"Z";switch(v){case"X":return p(D);case"XXXX":case"XX":return b(D);case"XXXXX":case"XXX":default:return b(D,":")}},x:function(y,v,m,w){var T=w._originalDate||y,D=T.getTimezoneOffset();switch(v){case"x":return p(D);case"xxxx":case"xx":return b(D);case"xxxxx":case"xxx":default:return b(D,":")}},O:function(y,v,m,w){var T=w._originalDate||y,D=T.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+f(D,":");case"OOOO":default:return"GMT"+b(D,":")}},z:function(y,v,m,w){var T=w._originalDate||y,D=T.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+f(D,":");case"zzzz":default:return"GMT"+b(D,":")}},t:function(y,v,m,w){var T=w._originalDate||y,D=Math.floor(T.getTime()/1e3);return(0,l.default)(D,v.length)},T:function(y,v,m,w){var T=w._originalDate||y,D=T.getTime();return(0,l.default)(D,v.length)}};function f(g,y){var v=g>0?"-":"+",m=Math.abs(g),w=Math.floor(m/60),T=m%60;if(T===0)return v+String(w);var D=y||"";return v+String(w)+D+(0,l.default)(T,2)}function p(g,y){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,y)}function b(g,y){var v=y||"",m=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),D=(0,l.default)(w%60,2);return m+T+v+D}var x=d;t.default=x,n.exports=t.default})(qs,qs.exports);var Vw=qs.exports,oo={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],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",i(f,c))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(oo,oo.exports);var qw=oo.exports,lo={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})(lo,lo.exports);var of=lo.exports;const lf=Yn(of);var ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.isProtectedDayOfYearToken=Kw,ir.isProtectedWeekYearToken=Qw,ir.throwProtectedError=Zw;var Xw=["D","DD"],Gw=["YY","YYYY"];function Kw(n){return Xw.indexOf(n)!==-1}function Qw(n){return Gw.indexOf(n)!==-1}function Zw(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 co={exports:{}},uo={exports:{}},fo={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})(fo,fo.exports);var Jw=fo.exports,ho={exports:{}},po={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})(po,po.exports);var t_=po.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(t_),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})(ho,ho.exports);var e_=ho.exports,go={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})(go,go.exports);var n_=go.exports,mo={exports:{}},yo={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 f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(yo,yo.exports);var i_=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(i_),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(b,x){var g=Number(b),y=g%100;if(y>20||y<10)switch(y%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(b){return b-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"})},f=d;t.default=f,n.exports=t.default})(mo,mo.exports);var r_=mo.exports,bo={exports:{}},vo={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],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}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})(vo,vo.exports);var a_=vo.exports,xo={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})(xo,xo.exports);var s_=xo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(a_),r=e(s_),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},f={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]},p={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},b={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]},x={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},g={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}},y={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(w){return parseInt(w,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(w){return w+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=y;t.default=v,n.exports=t.default})(bo,bo.exports);var o_=bo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Jw),r=e(e_),a=e(n_),s=e(r_),o=e(o_),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})(uo,uo.exports);var l_=uo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(l_),r=i.default;t.default=r,n.exports=t.default})(co,co.exports);var c_=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var i=e(Lw),r=e(Fw),a=e(We),s=e(Vw),o=e(qw),l=e(of),c=ir,u=e(Wn),d=e(se),f=zn,p=e(c_),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,y=/''/g,v=/[a-zA-Z]/;function m(T,D,k){var M,C,O,P,R,F,q,$,z,I,rt,B,bt,dt,W,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(M=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&M!==void 0?M:p.default,A=(0,u.default)((O=(P=(R=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&R!==void 0?R:K.firstWeekContainsDate)!==null&&P!==void 0?P:(z=K.locale)===null||z===void 0||(I=z.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(bt=(dt=k==null?void 0:k.weekStartsOn)!==null&&dt!==void 0?dt:k==null||(W=k.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&bt!==void 0?bt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ut=(0,r.default)(X,vt),Pt={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var xt=et[0];if(xt==="p"||xt==="P"){var Ft=o.default[xt];return Ft(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var xt=et[0];if(xt==="'")return w(et);var Ft=s.default[xt];if(Ft)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Ft(ut,et,N.localize,Pt);if(xt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+xt+"`");return et}).join("");return _t}function w(T){var D=T.match(g);return D?D[1].replace(y,"'"):T}n.exports=t.default})(Bs,Bs.exports);var u_=Bs.exports;const d_=Yn(u_);function cf(n,t,e){var i=p_(n,e.timeZone,e.locale);return i.formatToParts?f_(i,t):h_(i,t)}function f_(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 h_(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(e);return i?i[0].substr(1):""}function p_(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 g_(n,t){var e=v_(t);return e.formatToParts?y_(e,n):b_(e,n)}var m_={year:0,month:1,day:2,hour:3,minute:4,second:5};function y_(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=m_[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 b_(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 wo={};function v_(n){if(!wo[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";wo[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 wo[n]}function uf(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 df=36e5,x_=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function To(n,t,e){var i,r;if(!n||(i=_o.timezoneZ.exec(n),i))return 0;var a;if(i=_o.timezoneHH.exec(n),i)return a=parseInt(i[1],10),ff(a)?-(a*df):NaN;if(i=_o.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return ff(a,s)?(r=Math.abs(a)*df+s*x_,a>0?-r:r):NaN}if(T_(n)){t=new Date(t||Date.now());var o=e?t:w_(t),l=Mo(o,n),c=e?l:__(t,l,n);return-c}return NaN}function w_(n){return uf(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Mo(n,t){var e=g_(n,t),i=uf(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 __(n,t,e){var i=n.getTime(),r=i-t,a=Mo(new Date(r),e);if(t===a)return t;r-=a-t;var s=Mo(new Date(r),e);return a===s?a:Math.max(a,s)}function ff(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var hf={};function T_(n){if(hf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),hf[n]=!0,!0}catch{return!1}}var M_=60*1e3,C_={X:function(n,t,e,i){var r=Co(i.timeZone,i._originalDate||n);if(r===0)return"Z";switch(t){case"X":return pf(r);case"XXXX":case"XX":return ci(r);case"XXXXX":case"XXX":default:return ci(r,":")}},x:function(n,t,e,i){var r=Co(i.timeZone,i._originalDate||n);switch(t){case"x":return pf(r);case"xxxx":case"xx":return ci(r);case"xxxxx":case"xxx":default:return ci(r,":")}},O:function(n,t,e,i){var r=Co(i.timeZone,i._originalDate||n);switch(t){case"O":case"OO":case"OOO":return"GMT"+S_(r,":");case"OOOO":default:return"GMT"+ci(r,":")}},z:function(n,t,e,i){var r=i._originalDate||n;switch(t){case"z":case"zz":case"zzz":return cf("short",r,i);case"zzzz":default:return cf("long",r,i)}}};function Co(n,t){var e=n?To(n,t,!0)/M_:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ra(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}function ci(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=ra(Math.floor(r/60),2),s=ra(Math.floor(r%60),2);return i+a+e+s}function pf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+ra(Math.abs(n)/60,2)}return ci(n,t)}function S_(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+ra(a,2)}const D_=C_;var k_=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,So=36e5,gf=6e4,O_=2,oe={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:k_};function mf(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?O_:Iw(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=P_(n),a=E_(r.date,i),s=a.year,o=a.restDateString,l=R_(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=A_(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=To(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=lf(new Date(c+u)),d=lf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function P_(n){var t={},e=oe.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=oe.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=oe.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function E_(n,t){var e=oe.YYY[t],i=oe.YYYYY[t],r;if(r=oe.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=oe.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 R_(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=oe.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,vf(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=oe.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return N_(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=oe.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return vf(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=oe.Www.exec(n),e)return a=parseInt(e[1],10)-1,xf(t,a)?yf(t,a):new Date(NaN);if(e=oe.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return xf(t,a,l)?yf(t,a,l):new Date(NaN)}return null}function A_(n){var t,e,i;if(t=oe.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Do(e)?e%24*So:NaN;if(t=oe.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Do(e,i)?e%24*So+i*gf:NaN;if(t=oe.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Do(e,i,r)?e%24*So+i*gf+r*1e3:NaN}return null}function yf(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 L_=[31,28,31,30,31,30,31,31,30,31,30,31],I_=[31,29,31,30,31,30,31,31,30,31,30,31];function bf(n){return n%400===0||n%4===0&&n%100!==0}function vf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=bf(n);if(i&&e>I_[t]||!i&&e>L_[t])return!1}return!0}function N_(n,t){if(t<1)return!1;var e=bf(n);return!(e&&t>366||!e&&t>365)}function xf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Do(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var F_=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ko(n,t,e){var i=String(t),r=e||{},a=i.match(F_);if(a){var s=mf(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,"'"+D_[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return d_(n,i,r)}var Oo={exports:{}},Po={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})(Po,Po.exports);var U_=Po.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(U_);function r(a){return(0,i.default)({},a)}n.exports=t.default})(Oo,Oo.exports);var B_=Oo.exports;const Y_=Yn(B_);function W_(n,t,e){var i=mf(n,e),r=To(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 z_(n,t,e,i){var r=Y_(i);return r.timeZone=t,ko(W_(n,t),e,r)}const wf=2,_f=10,Tf=12,aa=new Intl.NumberFormat(((op=document==null?void 0:document.documentElement)==null?void 0:op.lang)||"en-US");function sa(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 z_(r,e,i)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const oa=10,Mf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Se=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],ui=(n,t)=>(t||Se)[n%Se.length],rr=(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}`},Cf="#6f7787",Sf={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},H_=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=Sf[t])==null?void 0:e.background)||"#fafafa"},$_={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},j_={"4XX":"#FFBA81","5XX":"#FF8484"},V_={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},q_="#dad4c7",X_=n=>{const t=Object.entries(Mf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Mf.standard},G_={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},K_=2,Q_=0,Eo=new Map,Ro=(n,t)=>t==="bytes"?Ss(n):t==="count/minute"?n.toFixed(2):aa.format(n),Df=n=>{const e=document.createElement("canvas").getContext("2d"),i=At({});return e.font=i.string,e.measureText(n).width},Z_=()=>{const n="label_height";if(!Eo.has(n)){const t=At({});Eo.set(n,t.lineHeight)}return Eo.get(n)},J_=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),kf=(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),Of=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`;function t1(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};Vr.positioners.barChartTooltipPosition=function(r,a){if(!r.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Us(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},ls.modes.customInteractionMode=function(r,a){const s=gn(a,r),o=[];return ls.evaluateInteractionItems(r,r.options.indexAxis||"x",s,(l,c,u)=>{r.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),r.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?_f:Tf;return h.computed(()=>{var r,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const b=this;if(b.chart.options.indexAxis===b.axis){f=b.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!at((r=n.metricAxesTitle)==null?void 0:r.value):!at((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const b=this;return b.chart.options.indexAxis===b.axis?(f=b.getLabelForValue(p),f&&f.length>oa?f.slice(0,oa)+"...":f):b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!at((l=n.metricAxesTitle)==null?void 0:l.value):!at((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Fs(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Ce.register(...Tb);const e1=(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 n1(n,t,e,i,r){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new Ce(t.value,{type:n,data:o,plugins:i,options:l})};return h.onMounted(()=>{a.value=s(e.value,r.value)}),h.onBeforeUnmount(()=>{at(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(e1(l,o)&&!at(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 at(a.value)||a.value.destroy(),a.value=s(o,r.value)}),h.watch(t,()=>{at(a.value)||a.value.destroy(),a.value=s(e.value,r.value)}),h.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))&&(at(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Pf={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:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(b,x){x&&x%3===0&&f.push(d),f.push(b)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),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 f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?r:i;return c<p||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",f&&(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})()})(Pf);var i1=Pf.exports;const ar=Yn(i1);function r1(n,t,e){const{i18n:i}=Dt.useI18n(),{translateUnit:r}=Dt.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Ss(l);else{const u=r(e.value,l);c=i&&i.t("legend.datapointValueDisplay",{value:ar(l,{capital:!0}),unit:u})||`${ar(l,{capital:!0})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function a1(n){return h.computed(()=>{var r;if(!((r=n.value)!=null&&r.meta))return"";const e=n.value.meta.start_ms,i=n.value.meta.end_ms;return e&&i?`${sa(e)} - ${sa(i,{includeTZ:!0})}`:""})}function s1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Vr.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=Us(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Fs(n.tooltipState,i)}}}}))}}var o1=Object.defineProperty,l1=(n,t,e)=>t in n?o1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ze=(n,t,e)=>(l1(n,typeof t!="symbol"?t+"":t,e),e),lt=(n=>(n.SECONDLY="Secondly",n.MINUTELY="Minutely",n.HOURLY="Hourly",n.DAILY="Daily",n.WEEKLY="Weekly",n))(lt||{}),Ht=(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))(Ht||{});function Ao(n){"@babel/helpers - typeof";return Ao=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},Ao(n)}function la(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 He(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function di(n){He(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ao(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 Ef(n,t){He(2,arguments);var e=di(n),i=la(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function c1(n,t){He(2,arguments);var e=di(n),i=la(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 u1={};function d1(){return u1}function ca(n,t){var e,i,r,a,s,o,l,c;He(1,arguments);var u=d1(),d=la((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 f=di(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Rf(n){He(1,arguments);var t=di(n);return t.setHours(0,0,0,0),t}var f1=60,h1=3600;function fi(n){He(1,arguments);var t=di(n);return t.setDate(1),t.setHours(0,0,0,0),t}function p1(n){He(1,arguments);var t=di(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 g1(n){return He(1,arguments),Math.floor(n*h1)}function m1(n){He(1,arguments);var t=n/f1;return Math.floor(t)}function Af(n,t){He(2,arguments);var e=la(t);return c1(n,-e)}function Lo(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lf={exports:{}},If={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})(If);var $t=If.exports,Io={exports:{}},No={exports:{}},Nf={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})(Nf);var Ff=Nf.exports,Fo={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})(Fo,Fo.exports);var le=Fo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Ff),r=e(le);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})(No,No.exports);var y1=No.exports,Uo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Ff),r=e(le);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})(Uo,Uo.exports);var $e=Uo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(y1),r=e($e),a=e(le);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})(Io,Io.exports);var b1=Io.exports,Bo={exports:{}},Yo={exports:{}},Wo={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})(Wo,Wo.exports);var Hn=Wo.exports;const v1=Lo(Hn);(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Hn),r=e($e),a=e(le);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})(Yo,Yo.exports);var x1=Yo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(x1),r=e(le),a=e(Hn);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})(Bo,Bo.exports);var w1=Bo.exports,zo={exports:{}},Ho={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e($e),r=e(le),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})(Ho,Ho.exports);var _1=Ho.exports,$o={exports:{}},jo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e($e),r=e(le);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})(jo,jo.exports);var Vo=jo.exports,qo={exports:{}},Xo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e($e),r=e(le),a=e(Vo);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),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Xo,Xo.exports);var Uf=Xo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Uf),r=e(Vo),a=e(le);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})(qo,qo.exports);var T1=qo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(Vo),a=e(T1),s=e(le),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})($o,$o.exports);var M1=$o.exports,Go={exports:{}},Ko={exports:{}},$n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.getDefaultOptions=C1,$n.setDefaultOptions=S1;var Bf={};function C1(){return Bf}function S1(n){Bf=n}(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e($e),r=e(le),a=e(Hn),s=$n;function o(l,c){var u,d,f,p,b,x,g,y;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),m=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(y=g.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&u!==void 0?u:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),D=(T<m?7:0)+T-m;return w.setUTCDate(w.getUTCDate()-D),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(Ko,Ko.exports);var Qo=Ko.exports,Zo={exports:{}},Jo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(le),a=e(Qo),s=e(Hn),o=$n;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,i.default)(c),w=m.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(y=T.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,D),k.setUTCHours(0,0,0,0);var M=(0,a.default)(k,u),C=new Date(0);C.setUTCFullYear(w,0,D),C.setUTCHours(0,0,0,0);var O=(0,a.default)(C,u);return m.getTime()>=M.getTime()?w+1:m.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(Jo,Jo.exports);var Yf=Jo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Yf),r=e(le),a=e(Qo),s=e(Hn),o=$n;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:m.firstWeekContainsDate)!==null&&f!==void 0?f:(y=m.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,w),D.setUTCHours(0,0,0,0);var k=(0,a.default)(D,u);return k}n.exports=t.default})(Zo,Zo.exports);var D1=Zo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(Qo),a=e(D1),s=e(le),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Go,Go.exports);var k1=Go.exports,tl={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})(tl,tl.exports);var Wf=tl.exports,el={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Wf),r={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,i.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,i.default)(l+1,2)},d:function(s,o){return(0,i.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,i.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,i.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,i.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,i.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,i.default)(u,o.length)}},a=r;t.default=a,n.exports=t.default})(el,el.exports);var O1=el.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(_1),r=e(M1),a=e(Uf),s=e(k1),o=e(Yf),l=e(Wf),c=e(O1),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,y,v){var m=g.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return v.era(m,{width:"abbreviated"});case"GGGGG":return v.era(m,{width:"narrow"});case"GGGG":default:return v.era(m,{width:"wide"})}},y:function(g,y,v){if(y==="yo"){var m=g.getUTCFullYear(),w=m>0?m:1-m;return v.ordinalNumber(w,{unit:"year"})}return c.default.y(g,y)},Y:function(g,y,v,m){var w=(0,o.default)(g,m),T=w>0?w:1-w;if(y==="YY"){var D=T%100;return(0,l.default)(D,2)}return y==="Yo"?v.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,y.length)},R:function(g,y){var v=(0,a.default)(g);return(0,l.default)(v,y.length)},u:function(g,y){var v=g.getUTCFullYear();return(0,l.default)(v,y.length)},Q:function(g,y,v){var m=Math.ceil((g.getUTCMonth()+1)/3);switch(y){case"Q":return String(m);case"QQ":return(0,l.default)(m,2);case"Qo":return v.ordinalNumber(m,{unit:"quarter"});case"QQQ":return v.quarter(m,{width:"abbreviated",context:"formatting"});case"QQQQQ":return v.quarter(m,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(m,{width:"wide",context:"formatting"})}},q:function(g,y,v){var m=Math.ceil((g.getUTCMonth()+1)/3);switch(y){case"q":return String(m);case"qq":return(0,l.default)(m,2);case"qo":return v.ordinalNumber(m,{unit:"quarter"});case"qqq":return v.quarter(m,{width:"abbreviated",context:"standalone"});case"qqqqq":return v.quarter(m,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(m,{width:"wide",context:"standalone"})}},M:function(g,y,v){var m=g.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(g,y);case"Mo":return v.ordinalNumber(m+1,{unit:"month"});case"MMM":return v.month(m,{width:"abbreviated",context:"formatting"});case"MMMMM":return v.month(m,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(m,{width:"wide",context:"formatting"})}},L:function(g,y,v){var m=g.getUTCMonth();switch(y){case"L":return String(m+1);case"LL":return(0,l.default)(m+1,2);case"Lo":return v.ordinalNumber(m+1,{unit:"month"});case"LLL":return v.month(m,{width:"abbreviated",context:"standalone"});case"LLLLL":return v.month(m,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(m,{width:"wide",context:"standalone"})}},w:function(g,y,v,m){var w=(0,s.default)(g,m);return y==="wo"?v.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,y.length)},I:function(g,y,v){var m=(0,r.default)(g);return y==="Io"?v.ordinalNumber(m,{unit:"week"}):(0,l.default)(m,y.length)},d:function(g,y,v){return y==="do"?v.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,y)},D:function(g,y,v){var m=(0,i.default)(g);return y==="Do"?v.ordinalNumber(m,{unit:"dayOfYear"}):(0,l.default)(m,y.length)},E:function(g,y,v){var m=g.getUTCDay();switch(y){case"E":case"EE":case"EEE":return v.day(m,{width:"abbreviated",context:"formatting"});case"EEEEE":return v.day(m,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(m,{width:"short",context:"formatting"});case"EEEE":default:return v.day(m,{width:"wide",context:"formatting"})}},e:function(g,y,v,m){var w=g.getUTCDay(),T=(w-m.weekStartsOn+8)%7||7;switch(y){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return v.ordinalNumber(T,{unit:"day"});case"eee":return v.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return v.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(w,{width:"short",context:"formatting"});case"eeee":default:return v.day(w,{width:"wide",context:"formatting"})}},c:function(g,y,v,m){var w=g.getUTCDay(),T=(w-m.weekStartsOn+8)%7||7;switch(y){case"c":return String(T);case"cc":return(0,l.default)(T,y.length);case"co":return v.ordinalNumber(T,{unit:"day"});case"ccc":return v.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return v.day(w,{width:"narrow",context:"standalone"});case"cccccc":return v.day(w,{width:"short",context:"standalone"});case"cccc":default:return v.day(w,{width:"wide",context:"standalone"})}},i:function(g,y,v){var m=g.getUTCDay(),w=m===0?7:m;switch(y){case"i":return String(w);case"ii":return(0,l.default)(w,y.length);case"io":return v.ordinalNumber(w,{unit:"day"});case"iii":return v.day(m,{width:"abbreviated",context:"formatting"});case"iiiii":return v.day(m,{width:"narrow",context:"formatting"});case"iiiiii":return v.day(m,{width:"short",context:"formatting"});case"iiii":default:return v.day(m,{width:"wide",context:"formatting"})}},a:function(g,y,v){var m=g.getUTCHours(),w=m/12>=1?"pm":"am";switch(y){case"a":case"aa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(g,y,v){var m=g.getUTCHours(),w;switch(m===12?w=u.noon:m===0?w=u.midnight:w=m/12>=1?"pm":"am",y){case"b":case"bb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(g,y,v){var m=g.getUTCHours(),w;switch(m>=17?w=u.evening:m>=12?w=u.afternoon:m>=4?w=u.morning:w=u.night,y){case"B":case"BB":case"BBB":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(g,y,v){if(y==="ho"){var m=g.getUTCHours()%12;return m===0&&(m=12),v.ordinalNumber(m,{unit:"hour"})}return c.default.h(g,y)},H:function(g,y,v){return y==="Ho"?v.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,y)},K:function(g,y,v){var m=g.getUTCHours()%12;return y==="Ko"?v.ordinalNumber(m,{unit:"hour"}):(0,l.default)(m,y.length)},k:function(g,y,v){var m=g.getUTCHours();return m===0&&(m=24),y==="ko"?v.ordinalNumber(m,{unit:"hour"}):(0,l.default)(m,y.length)},m:function(g,y,v){return y==="mo"?v.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,y)},s:function(g,y,v){return y==="so"?v.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,y)},S:function(g,y){return c.default.S(g,y)},X:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();if(T===0)return"Z";switch(y){case"X":return p(T);case"XXXX":case"XX":return b(T);case"XXXXX":case"XXX":default:return b(T,":")}},x:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"x":return p(T);case"xxxx":case"xx":return b(T);case"xxxxx":case"xxx":default:return b(T,":")}},O:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+b(T,":")}},z:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+b(T,":")}},t:function(g,y,v,m){var w=m._originalDate||g,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,y.length)},T:function(g,y,v,m){var w=m._originalDate||g,T=w.getTime();return(0,l.default)(T,y.length)}};function f(g,y){var v=g>0?"-":"+",m=Math.abs(g),w=Math.floor(m/60),T=m%60;if(T===0)return v+String(w);var D=y||"";return v+String(w)+D+(0,l.default)(T,2)}function p(g,y){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,y)}function b(g,y){var v=y||"",m=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),D=(0,l.default)(w%60,2);return m+T+v+D}var x=d;t.default=x,n.exports=t.default})(zo,zo.exports);var P1=zo.exports,nl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},i=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},r=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",i(d,l))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(nl,nl.exports);var E1=nl.exports,il={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})(il,il.exports);var zf=il.exports;const Hf=Lo(zf);var sr={};Object.defineProperty(sr,"__esModule",{value:!0}),sr.isProtectedDayOfYearToken=L1,sr.isProtectedWeekYearToken=I1,sr.throwProtectedError=N1;var R1=["D","DD"],A1=["YY","YYYY"];function L1(n){return R1.indexOf(n)!==-1}function I1(n){return A1.indexOf(n)!==-1}function N1(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 rl={exports:{}},al={exports:{}},sl={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(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},r=i;t.default=r,n.exports=t.default})(sl,sl.exports);var F1=sl.exports,ol={exports:{}},ll={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})(ll,ll.exports);var U1=ll.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(U1),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})(ol,ol.exports);var B1=ol.exports,cl={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(a,s,o,l){return e[a]},r=i;t.default=r,n.exports=t.default})(cl,cl.exports);var Y1=cl.exports,ul={exports:{}},dl={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 f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(dl,dl.exports);var W1=dl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(W1),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(p,b){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-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"})},f=d;t.default=f,n.exports=t.default})(ul,ul.exports);var z1=ul.exports,fl={exports:{}},hl={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],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}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})(hl,hl.exports);var H1=hl.exports,pl={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})(pl,pl.exports);var $1=pl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(H1),r=e($1),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},f={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]},p={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},b={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]},x={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},g={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}},y={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(m){return parseInt(m,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(m){return m+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=y;t.default=v,n.exports=t.default})(fl,fl.exports);var j1=fl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(F1),r=e(B1),a=e(Y1),s=e(z1),o=e(j1),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})(al,al.exports);var V1=al.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(V1),r=i.default;t.default=r,n.exports=t.default})(rl,rl.exports);var q1=rl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var i=e(b1),r=e(w1),a=e($e),s=e(P1),o=e(E1),l=e(zf),c=sr,u=e(Hn),d=e(le),f=$n,p=e(q1),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,y=/''/g,v=/[a-zA-Z]/;function m(T,D,k){var M,C,O,P,R,F,q,$,z,I,rt,B,bt,dt,W,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(M=(C=k==null?void 0:k.locale)!==null&&C!==void 0?C:K.locale)!==null&&M!==void 0?M:p.default,A=(0,u.default)((O=(P=(R=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&R!==void 0?R:K.firstWeekContainsDate)!==null&&P!==void 0?P:(z=K.locale)===null||z===void 0||(I=z.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(bt=(dt=k==null?void 0:k.weekStartsOn)!==null&&dt!==void 0?dt:k==null||(W=k.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&bt!==void 0?bt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ut=(0,r.default)(X,vt),Pt={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var xt=et[0];if(xt==="p"||xt==="P"){var Ft=o.default[xt];return Ft(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var xt=et[0];if(xt==="'")return w(et);var Ft=s.default[xt];if(Ft)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Ft(ut,et,N.localize,Pt);if(xt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+xt+"`");return et}).join("");return _t}function w(T){var D=T.match(g);return D?D[1].replace(y,"'"):T}n.exports=t.default})(Lf,Lf.exports);function X1(n,t){var e=Z1(t);return e.formatToParts?K1(e,n):Q1(e,n)}var G1={year:0,month:1,day:2,hour:3,minute:4,second:5};function K1(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=G1[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 Q1(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 gl={};function Z1(n){if(!gl[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";gl[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 gl[n]}function ml(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 $f=36e5,J1=6e4,yl={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function ua(n,t,e){var i,r;if(!n||(i=yl.timezoneZ.exec(n),i))return 0;var a;if(i=yl.timezoneHH.exec(n),i)return a=parseInt(i[1],10),jf(a)?-(a*$f):NaN;if(i=yl.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return jf(a,s)?(r=Math.abs(a)*$f+s*J1,a>0?-r:r):NaN}if(nT(n)){t=new Date(t||Date.now());var o=e?t:tT(t),l=bl(o,n),c=e?l:eT(t,l,n);return-c}return NaN}function tT(n){return ml(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function bl(n,t){var e=X1(n,t),i=ml(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 eT(n,t,e){var i=n.getTime(),r=i-t,a=bl(new Date(r),e);if(t===a)return t;r-=a-t;var s=bl(new Date(r),e);return a===s?a:Math.max(a,s)}function jf(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var Vf={};function nT(n){if(Vf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Vf[n]=!0,!0}catch{return!1}}var iT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const qf=iT;var vl=36e5,Xf=6e4,rT=2,ce={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:qf};function xl(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?rT:v1(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=aT(n),a=sT(r.date,i),s=a.year,o=a.restDateString,l=oT(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=lT(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=ua(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Hf(new Date(c+u)),d=Hf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function aT(n){var t={},e=ce.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=ce.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=ce.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function sT(n,t){var e=ce.YYY[t],i=ce.YYYYY[t],r;if(r=ce.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=ce.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 oT(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=ce.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,Qf(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=ce.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return dT(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=ce.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Qf(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=ce.Www.exec(n),e)return a=parseInt(e[1],10)-1,Zf(t,a)?Gf(t,a):new Date(NaN);if(e=ce.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Zf(t,a,l)?Gf(t,a,l):new Date(NaN)}return null}function lT(n){var t,e,i;if(t=ce.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),wl(e)?e%24*vl:NaN;if(t=ce.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),wl(e,i)?e%24*vl+i*Xf:NaN;if(t=ce.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return wl(e,i,r)?e%24*vl+i*Xf+r*1e3:NaN}return null}function Gf(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 cT=[31,28,31,30,31,30,31,31,30,31,30,31],uT=[31,29,31,30,31,30,31,31,30,31,30,31];function Kf(n){return n%400===0||n%4===0&&n%100!==0}function Qf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=Kf(n);if(i&&e>uT[t]||!i&&e>cT[t])return!1}return!0}function dT(n,t){if(t<1)return!1;var e=Kf(n);return!(e&&t>366||!e&&t>365)}function Zf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function wl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var _l={exports:{}},Tl={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})(Tl,Tl.exports);var fT=Tl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(fT);function r(a){return(0,i.default)({},a)}n.exports=t.default})(_l,_l.exports);var hT=_l.exports;const pT=Lo(hT);function gT(n,t,e){var i=xl(n,e),r=ua(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 mT(n,t){return-ua(n,t)}function yT(n,t,e){if(typeof n=="string"&&!n.match(qf)){var i=pT(e);return i.timeZone=t,xl(n,i)}var r=xl(n,e),a=ml(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()).getTime(),s=ua(t,new Date(a));return new Date(a+s)}const bT={[lt.SECONDLY]:1e3,[lt.MINUTELY]:60*1e3,[lt.HOURLY]:60*60*1e3,[lt.DAILY]:60*60*24*1e3,[lt.WEEKLY]:60*60*24*7*1e3};function Ml(n){return n&&Object.values(lt).find(t=>n<=bT[t])||null}const hi=(n,t)=>new Date(n.getTime()-mT(t,n));class Re{constructor(t){ze(this,"timeframeText"),ze(this,"key"),ze(this,"display"),ze(this,"timeframeLength"),ze(this,"allowedTiers"),ze(this,"defaultResponseGranularity"),ze(this,"dataGranularity"),ze(this,"isRelative"),ze(this,"_startCustom"),ze(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(t){return this._endCustom||new Date}rawStart(t){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(lt.MINUTELY),e>=2&&e<=7*24&&t.add(lt.HOURLY),e>=2*24&&t.add(lt.DAILY),e>=2*24*14&&t.add(lt.WEEKLY),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=yT(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return gT(e,t)}}class vT extends Re{rawStart(t){let e=ca(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=hi(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class xT extends Re{rawStart(t){let e=fi(this.tzAdjustedDate(t));return t&&(e=hi(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class wT extends Re{rawEnd(t){let e=ca(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=hi(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let i=ca(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(i=hi(i,t)),i}}class _T extends Re{rawEnd(t){let e=fi(this.tzAdjustedDate(t));return t&&(e=hi(e,t)),e}rawStart(t){let e=fi(Af(this.tzAdjustedDate(t),1));return t&&(e=hi(e,t)),e}}Ht.FIFTEEN_MIN,new Re({key:Ht.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:lt.MINUTELY,dataGranularity:lt.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.ONE_HOUR,new Re({key:Ht.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:lt.MINUTELY,dataGranularity:lt.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.SIX_HOUR,new Re({key:Ht.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.TWELVE_HOUR,new Re({key:Ht.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.ONE_DAY,new Re({key:Ht.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.SEVEN_DAY,new Re({key:Ht.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Ht.THIRTY_DAY,new Re({key:Ht.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Ht.CURRENT_WEEK,new vT({key:Ht.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=ca(new Date,{weekStartsOn:1});return(Rf(Ef(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.CURRENT_MONTH,new xT({key:Ht.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=fi(new Date);return(Rf(Ef(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.PREVIOUS_WEEK,new wT({key:Ht.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.PREVIOUS_MONTH,new _T({key:Ht.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=fi(new Date),e=fi(Af(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=TT(t,e)),60*60*24*p1(new Date().setMonth(new Date().getMonth()-1))+g1(n)},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function TT(n,t){return m1(n.getTimezoneOffset()-t.getTimezoneOffset())}function MT(n){const t=h.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:!at((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!at((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};Vr.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,f=n.tooltipState.height||this.height,p=u.width/2,b=u.height/2,x=Us(c,d,p);let g=Rw(c,f,b);const y=c.y<b?"top":"bottom",v=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:v,yAlign:y}};const r=h.computed(()=>{switch(n.granularity.value){case lt.MINUTELY:return"minute";case lt.HOURLY:return"hour";case lt.DAILY:return"day";default:return"day"}}),a=h.computed(()=>dw(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>[lt.DAILY,lt.WEEKLY].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.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=>{Fs(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function CT(n){const{isMultiMetric:t,hasDimensions:e,metricNames:i,barSegmentLabels:r,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=Dt.useI18n();return t?i.map(c=>({label:l&&l.te(`chartLabels.${c}`)&&l.t(`chartLabels.${c}`)||c,backgroundColor:ui(i.indexOf(c),Se),data:s.map((u,d)=>e?a[`${u.id},${c}`]||0:a[`${d},${c}`]||null)})):Array.from(r).flatMap((c,u)=>{if(!c)return[];const d={},f=Array.isArray(o)?ui(u,o):o[c.name]||ui(u);return d[c.name]=f,{label:l&&l.te(`chartLabels.${c.name}`)&&l.t(`chartLabels.${c.name}`)||c.name,backgroundColor:f,data:s.map(p=>a[`${p.id},${c.id}`]||null)}})}function ST(n,t){const{i18n:e}=Dt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!r.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?r.flatMap(m=>s.map((w,T)=>{const D=m.event[d],k=c?`${D},${w}`:`${T},${w}`,M=m.event[w];return[k,M]})):r.map(m=>{const w=c?`${m.event[d]},${m.event[f]}`:`${d},${f}`,T=m.event[s[0]];return[w,T]})),b=a[d],x=a[f],g=c&&b&&Object.entries(b).map(([m,w])=>({id:m,name:w.name}))||s.map(m=>({id:m,name:m})),y=c&&x&&Object.entries(x).map(([m,w])=>({id:m,name:w.name}))||s.map(m=>({id:m,name:m}));return!g||!y?{labels:[],datasets:[]}:{labels:c?Object.entries(a[d]).map(([,m])=>e&&e.te(`chartLabels.${m.name}`)&&e.t(`chartLabels.${m.name}`)||m.name):s.map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m),datasets:CT({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:y,pivotRecords:p,rowLabels:g,colorPalette:n.colorPalette||Se})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const DT=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((i,r)=>i+r*e),kT=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Kd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},OT=(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 DT(o,l,e)};function PT(n,t){const{i18n:e}=Dt.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;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=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!r.length)return{datasets:[],labels:[]};const b=kT(o),x=OT(o,l,p,b,r),g=new Set,y=r!=null&&r.length?r.reduce((T,D)=>{const k=new Date(D.timestamp).valueOf(),M=D.event;for(const C of s)g.add(C),k in T||(T[k]={}),C in T[k]||(T[k][C]={});for(const C of s)f.forEach(O=>{M[u]===O.id||C===O.id?(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(M[C])*1e3)/1e3):c.length||(T[k][C]||(T[k][C]={}),T[k][C][O.name]=Math.round(Number(M[O.id])*1e3)/1e3)});return T},{}):{},v=s.length===1?s.flatMap(T=>f.map(D=>[T,D.name])):f.map(T=>[T.name,T.name]),m={},w=[...v].map(([T,D],k)=>{const M=x.map(F=>F in y&&T in y[F]?{x:F,y:y[F][T][D]||0}:{x:F,y:0});let{colorPalette:C,fill:O}=n;at(C)&&(C=Se);const P=Array.isArray(C)?ui(k,C):C[D]||ui(k),R=rr(P,50);return m[D]=P,{rawDimension:D,rawMetric:T,label:e&&e.te(`chartLabels.${D}`)&&e.t(`chartLabels.${D}`)||D,borderColor:R,backgroundColor:P,data:M,total:M.reduce((F,{y:q})=>F+Number(q),0),...G_,fill:O,borderWidth:O?Q_:K_}});return w.sort((T,D)=>Number(T.total)<Number(D.total)?-1:1),{datasets:w,colorMap:m}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const ET=(n,t)=>{h.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})};function RT(){const{i18n:n}=Dt.useI18n();return{translateUnit:(e,i)=>{const r=i===1,a=`chartUnits.${e}`;return n.te(a)?n.t(a,{plural:r?"":"s"}):e}}}const Dt={useBarChartOptions:t1,useChartJSCommon:n1,useChartLegendValues:r1,useChartSelectedRange:a1,useExploreResultToDatasets:ST,useExploreResultToTimeDataset:PT,useDoughnutChartOptions:s1,useLinechartOptions:MT,useI18n:_p,useReportChartDataForSynthetics:ET,useTranslatedUnits:RT};/*!
|
|
18
|
+
`):n}function Vy(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 ad(n,t){const e=n.chart.ctx,{body:i,footer:r,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=At(t.bodyFont),c=At(t.titleFont),u=At(t.footerFont),d=a.length,f=r.length,p=i.length,b=Kt(t.padding);let x=b.height,g=0,y=i.reduce((w,T)=>w+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*w+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const m=function(w){g=Math.max(g,e.measureText(w).width+v)};return e.save(),e.font=c.string,Dt(n.title,m),e.font=l.string,Dt(n.beforeBody.concat(n.afterBody),m),v=t.displayColors?s+2+t.boxPadding:0,Dt(i,w=>{Dt(w.before,m),Dt(w.lines,m),Dt(w.after,m)}),v=0,e.font=u.string,Dt(n.footer,m),e.restore(),g+=b.width,{width:g,height:x}}function qy(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Xy(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 Gy(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"),Xy(c,n,t,e)&&(c="center"),c}function sd(n,t,e){const i=e.yAlign||t.yAlign||qy(n,e);return{xAlign:e.xAlign||t.xAlign||Gy(n,t,e,i),yAlign:i}}function Ky(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Qy(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function od(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:f,bottomRight:p}=hn(s);let b=Ky(t,o);const x=Qy(t,l,c);return l==="center"?o==="left"?b+=c:o==="right"&&(b-=c):o==="left"?b-=Math.max(u,f)+r:o==="right"&&(b+=Math.max(d,p)+r),{x:Zt(b,0,i.width-t.width),y:Zt(x,0,i.height-t.height)}}function jr(n,t,e){const i=Kt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function ld(n){return Ue([],Qe(n))}function Zy(n,t,e){return pn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function cd(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ud={beforeTitle:Ve,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:Ve,beforeBody:Ve,beforeLabel:Ve,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 at(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:Ve,afterBody:Ve,beforeFooter:Ve,footer:Ve,afterFooter:Ve};function pe(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?ud[t].call(e,i):r}class xs extends ee{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 ts(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Zy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=pe(i,"beforeTitle",this,t),a=pe(i,"title",this,t),s=pe(i,"afterTitle",this,t);let o=[];return o=Ue(o,Qe(r)),o=Ue(o,Qe(a)),o=Ue(o,Qe(s)),o}getBeforeBody(t,e){return ld(pe(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return Dt(t,a=>{const s={before:[],lines:[],after:[]},o=cd(i,a);Ue(s.before,Qe(pe(o,"beforeLabel",this,a))),Ue(s.lines,pe(o,"label",this,a)),Ue(s.after,Qe(pe(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,e){return ld(pe(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=pe(i,"beforeFooter",this,t),a=pe(i,"footer",this,t),s=pe(i,"afterFooter",this,t);let o=[];return o=Ue(o,Qe(r)),o=Ue(o,Qe(a)),o=Ue(o,Qe(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(Vy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),Dt(o,u=>{const d=cd(t.callbacks,u);r.push(pe(d,"labelColor",this,u)),a.push(pe(d,"labelPointStyle",this,u)),s.push(pe(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=Vi[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=ad(this,i),c=Object.assign({},o,l),u=sd(this.chart,i,c),d=od(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}=hn(o),{x:f,y:p}=t,{width:b,height:x}=e;let g,y,v,m,w,T;return a==="center"?(w=p+x/2,r==="left"?(g=f,y=g-s,m=w+s,T=w-s):(g=f+b,y=g+s,m=w-s,T=w+s),v=g):(r==="left"?y=f+Math.max(l,u)+s:r==="right"?y=f+b-Math.max(c,d)-s:y=this.caretX,a==="top"?(m=p,w=m-s,g=y-s,v=y+s):(m=p+x,w=m+s,g=y+s,v=y-s),T=m),{x1:g,x2:y,x3:v,y1:m,y2:w,y3:T}}drawTitle(t,e,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=ri(i.rtl,this.x,this.width);for(t.x=jr(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",s=At(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=At(a.bodyFont),d=jr(this,"left",a),f=r.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,b=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=r.leftForLtr(f,c)+c/2,y=b+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,qa(t,x,g,y),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,qa(t,x,g,y)}else{t.lineWidth=ct(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 x=r.leftForLtr(f,c),g=r.leftForLtr(r.xPlus(f,1),c-2),y=hn(s.borderRadius);Object.values(y).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ei(t,{x,y:b,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ei(t,{x:g,y:b+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,b,c,l),t.strokeRect(x,b,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,b+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=At(i.bodyFont);let f=d.lineHeight,p=0;const b=ri(i.rtl,this.x,this.width),x=function(M){e.fillText(M,b.x(t.x+p),t.y+f/2),t.y+=f+a},g=b.textAlign(s);let y,v,m,w,T,S,k;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=jr(this,g,i),e.fillStyle=i.bodyColor,Dt(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,w=0,S=r.length;w<S;++w){for(y=r[w],v=this.labelTextColors[w],e.fillStyle=v,Dt(y.before,x),m=y.lines,o&&m.length&&(this._drawColorBox(e,t,w,b,i),f=Math.max(d.lineHeight,l)),T=0,k=m.length;T<k;++T)x(m[T]),f=d.lineHeight;Dt(y.after,x)}p=0,f=d.lineHeight,Dt(this.afterBody,x),t.y-=a}drawFooter(t,e,i){const r=this.footer,a=r.length;let s,o;if(a){const l=ri(i.rtl,this.x,this.width);for(t.x=jr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",s=At(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:f,bottomLeft:p,bottomRight:b}=hn(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-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,i,r),e.lineTo(o+c,l+u-b),e.quadraticCurveTo(o+c,l+u,o+c-b,l+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),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=Vi[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=ad(this,t),l=Object.assign({},s,this._size),c=sd(e,t,l),u=od(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=Kt(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),$c(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),jc(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=!br(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||!br(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.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);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=Vi[a.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}H(xs,"positioners",Vi);var Vr={id:"tooltip",_element:xs,positioners:Vi,afterInit(n,t,e){e&&(n.tooltip=new xs({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:ud},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"]},Jy=Object.freeze({__proto__:null,Colors:fy,Decimation:my,Filler:Ny,Legend:zy,SubTitle:jy,Title:$y,Tooltip:Vr});const tb=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function eb(n,t,e,i){const r=n.indexOf(t);if(r===-1)return tb(n,t,e,i);const a=n.lastIndexOf(t);return r!==a?e:r}const nb=(n,t)=>n===null?null:Zt(Math.round(n),0,t);function dd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class ws extends Nn{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(at(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:eb(i,t,it(e,t),this._addedLabels),nb(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 dd.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}}H(ws,"id","category"),H(ws,"defaults",{ticks:{callback:dd}});function ib(n,t){const e=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,b=u-1,{min:x,max:g}=t,y=!at(s),v=!at(o),m=!at(c),w=(g-x)/(d+1);let T=gc((g-x)/b/p)*p,S,k,M,D;if(T<1e-14&&!y&&!v)return[{value:x},{value:g}];D=Math.ceil(g/T)-Math.floor(x/T),D>b&&(T=gc(D*T/b/p)*p),at(l)||(S=Math.pow(10,l),T=Math.ceil(T*S)/S),r==="ticks"?(k=Math.floor(x/T)*T,M=Math.ceil(g/T)*T):(k=x,M=g),y&&v&&a&&tg((o-s)/a,T/1e3)?(D=Math.round(Math.min((o-s)/T,u)),T=(o-s)/D,k=s,M=o):m?(k=y?s:k,M=v?o:M,D=c-1,T=(M-k)/D):(D=(M-k)/T,Ci(D,Math.round(D),T/1e3)?D=Math.round(D):D=Math.ceil(D));const O=Math.max(yc(T),yc(k));S=Math.pow(10,at(l)?O:l),k=Math.round(k*S)/S,M=Math.round(M*S)/S;let P=0;for(y&&(f&&k!==s?(e.push({value:s}),k<s&&P++,Ci(Math.round((k+P*T)*S)/S,s,fd(s,w,n))&&P++):k<s&&P++);P<D;++P){const R=Math.round((k+P*T)*S)/S;if(v&&R>o)break;e.push({value:R})}return v&&f&&M!==o?e.length&&Ci(e[e.length-1].value,o,fd(o,w,n))?e[e.length-1].value=o:e.push({value:o}):(!v||M===o)&&e.push({value:M}),e}function fd(n,t,{horizontal:e,minRotation:i}){const r=Gt(i),a=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class qr extends Nn{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 at(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=Ne(r),c=Ne(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=ib(r,a);return t.bounds==="ticks"&&mc(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 Oi(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends qr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Nt(t)?t:0,this.max=Nt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Gt(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}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:Mr.formatters.numeric}});const qi=n=>Math.floor(dn(n)),Fn=(n,t)=>Math.pow(10,qi(n)+t);function hd(n){return n/Math.pow(10,qi(n))===1}function pd(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function rb(n,t){const e=t-n;let i=qi(e);for(;pd(n,t,i)>10;)i++;for(;pd(n,t,i)<10;)i--;return Math.min(i,qi(n))}function ab(n,{min:t,max:e}){t=xe(n.min,t);const i=[],r=qi(t);let a=rb(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)),f=xe(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)i.push({value:f,major:hd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=xe(n.max,f);return i.push({value:p,major:hd(p),significand:d}),i}class Ts extends Nn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=qr.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Nt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Nt(t)?Math.max(0,t):null,this.max=Nt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Nt(this._userMin)&&(this.min=t===Fn(this.min,0)?Fn(this.min,-1):Fn(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(Fn(i,-1)),s(Fn(r,1)))),i<=0&&a(Fn(r,-1)),r<=0&&s(Fn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=ab(e,this);return t.bounds==="ticks"&&mc(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":Oi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=dn(t),this._valueRange=dn(this.max)-dn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(dn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(Ts,"id","logarithmic"),H(Ts,"defaults",{ticks:{callback:Mr.formatters.logarithmic,major:{enabled:!0}}});function Ms(n){const t=n.ticks;if(t.display&&n.display){const e=Kt(t.backdropPadding);return it(t.font&&t.font.size,Bt.font.size)+e.height}return 0}function sb(n,t,e){return e=yt(e)?e:[e],{w:yg(n,t.string,e),h:e.length*t.lineHeight}}function gd(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 ob(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?ft/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=At(c.font),f=sb(n.ctx,d,n._pointLabels[l]);i[l]=f;const p=we(n.getIndexAngle(l)+o),b=Math.round(_r(p)),x=gd(b,u.x,f.w,0,180),g=gd(b,u.y,f.h,90,270);lb(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=db(n,i,r)}function lb(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 cb(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(_r(we(l.angle+Rt))),u=pb(l.y,o.h,c),d=fb(c),f=hb(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function ub(n,t){if(!t)return!0;const{left:e,top:i,right:r,bottom:a}=n;return!(Ge({x:e,y:i},t)||Ge({x:e,y:a},t)||Ge({x:r,y:i},t)||Ge({x:r,y:a},t))}function db(n,t,e){const i=[],r=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ms(a)/2,additionalAngle:s?ft/r:0};let c;for(let u=0;u<r;u++){l.padding=e[u],l.size=t[u];const d=cb(n,u,l);i.push(d),o==="auto"&&(d.visible=ub(d,c),d.visible&&(c=d))}return i}function fb(n){return n===0||n===180?"center":n<180?"left":"right"}function hb(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function pb(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gb(n,t,e){const{left:i,top:r,right:a,bottom:s}=e,{backdropColor:o}=t;if(!at(o)){const l=hn(t.borderRadius),c=Kt(t.backdropPadding);n.fillStyle=o;const u=i-c.left,d=r-c.top,f=a-i+c.width,p=s-r+c.height;Object.values(l).some(b=>b!==0)?(n.beginPath(),ei(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function mb(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));gb(e,s,a);const o=At(s.font),{x:l,y:c,textAlign:u}=a;Rn(e,n._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function md(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,Ot);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 yb(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(),md(n,e,s,i),a.closePath(),a.stroke(),a.restore())}function bb(n,t,e){return pn(n,{label:e,index:t,type:"pointLabel"})}class Xi extends qr{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=Kt(Ms(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=Nt(t)&&!isNaN(t)?t:0,this.max=Nt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ms(this.options))}generateTickLabels(t){qr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=Mt(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?ob(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=Ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return we(t*e+Gt(i))}getDistanceFromCenterForValue(t){if(at(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(at(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 bb(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-Rt+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(),md(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&&mb(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=r.setContext(f),b=a.setContext(f);yb(this,p,l,s,b)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,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=At(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=Kt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}Rn(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(Xi,"id","radialLinear"),H(Xi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(Xi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(Xi,"descriptors",{angleLines:{_fallback:"grid"}});const Xr={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}},ge=Object.keys(Xr);function yd(n,t){return n-t}function bd(n,t){if(at(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)),Nt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(fn(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,r)),+s)}function vd(n,t,e,i){const r=ge.length;for(let a=ge.indexOf(n);a<r-1;++a){const s=Xr[ge[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=i)return ge[a]}return ge[r-1]}function vb(n,t,e,i,r){for(let a=ge.length-1;a>=ge.indexOf(e);a--){const s=ge[a];if(Xr[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return ge[e?ge.indexOf(e):0]}function xb(n){for(let t=ge.indexOf(n)+1,e=ge.length;t<e;++t)if(Xr[ge[t]].common)return ge[t]}function xd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Wa(e,t),a=e[i]>=t?e[i]:e[r];n[a]=!0}}function wb(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 wd(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:wb(n,i,r,e)}class Gi extends Nn{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 uu._date(t.adapters.date);r.init(e),Di(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:bd(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=Nt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),a=Nt(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=rg(r,a,s);return this._unit=e.unit||(i.autoSkip?vd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):vb(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:xb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),wd(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=Zt(e,0,s),i=Zt(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||vd(a.minUnit,e,i,this._getLabelCapacity(e)),o=it(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=fn(l)||l===!0,u={};let d=e,f,p;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 b=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<i;f=+t.add(f,o,s),p++)xd(u,f,b);return(f===i||r.bounds==="ticks"||p===1)&&xd(u,f,b),Object.keys(u).sort(yd).map(x=>+x)}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 Mt(s,[t,e,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=i[e],p=c&&d&&f&&f.major;return this._adapter.format(t,r||(p?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=Gt(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,wd(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(bd(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return wc(t.sort(yd))}}H(Gi,"id","time"),H(Gi,"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 Gr(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}=Xe(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}=Xe(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 Ds extends Gi{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=Gr(e,this.min),this._tableRange=Gr(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(Gr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Gr(this._table,i*this._tableRange+this._minPos,!0)}}H(Ds,"id","timeseries"),H(Ds,"defaults",Gi.defaults);var _b=Object.freeze({__proto__:null,CategoryScale:ws,LinearScale:_s,LogarithmicScale:Ts,RadialLinearScale:Xi,TimeScale:Gi,TimeSeriesScale:Ds});const Tb=[Rm,sy,Jy,_b],Mb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Db=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Sb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_d=(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 Cs(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?Sb:Cb:t.binary?Db:Mb,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=_d(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=_d(Number(n),t.locale,s),c=e[o];return a+l+i+c}function Ze(n){"@babel/helpers - typeof";return Ze=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},Ze(n)}function Lt(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 J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ze(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 Td(n,t){J(2,arguments);var e=nt(n),i=Lt(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function Ss(n,t){J(2,arguments);var e=nt(n),i=Lt(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 Ki(n,t){J(2,arguments);var e=nt(n).getTime(),i=Lt(t);return new Date(e+i)}var kb=36e5;function Ob(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*kb)}var Pb={};function vn(){return Pb}function Md(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Kr(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 ks(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Eb=864e5;function Rb(n,t){J(2,arguments);var e=ks(n),i=ks(t),r=e.getTime()-Kr(e),a=i.getTime()-Kr(i);return Math.round((r-a)/Eb)}var Ab=6e4;function Lb(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*Ab)}function Ib(n,t){J(2,arguments);var e=Lt(t),i=e*3;return Ss(n,i)}function Nb(n,t){J(2,arguments);var e=Lt(t);return Ki(n,e*1e3)}function Fb(n,t){J(2,arguments);var e=Lt(t),i=e*7;return Td(n,i)}function Ub(n,t){J(2,arguments);var e=Lt(t);return Ss(n,e*12)}function Qi(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}var Qr=6e4,Zi=36e5,Bb=1e3;function Yb(n){return J(1,arguments),n instanceof Date||Ze(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Os(n){if(J(1,arguments),!Yb(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function Wb(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function zb(n,t){J(2,arguments);var e=nt(n),i=nt(t);return e.getFullYear()-i.getFullYear()}function Dd(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 Cd(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Dd(e,i),a=Math.abs(Rb(e,i));e.setDate(e.getDate()-r*a);var s=+(Dd(e,i)===-r),o=r*(a-s);return o===0?0:o}function Zr(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var Sd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Hb="trunc";function Ji(n){return n?Sd[n]:Sd[Hb]}function $b(n,t,e){J(2,arguments);var i=Zr(n,t)/Zi;return Ji(e==null?void 0:e.roundingMethod)(i)}function jb(n,t,e){J(2,arguments);var i=Zr(n,t)/Qr;return Ji(e==null?void 0:e.roundingMethod)(i)}function kd(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Od(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Vb(n){J(1,arguments);var t=nt(n);return kd(t).getTime()===Od(t).getTime()}function Pd(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Qi(e,i),a=Math.abs(Wb(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=Qi(e,i)===-r;Vb(nt(n))&&a===1&&Qi(n,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function qb(n,t,e){J(2,arguments);var i=Pd(n,t)/3;return Ji(e==null?void 0:e.roundingMethod)(i)}function Xb(n,t,e){J(2,arguments);var i=Zr(n,t)/1e3;return Ji(e==null?void 0:e.roundingMethod)(i)}function Gb(n,t,e){J(2,arguments);var i=Cd(n,t)/7;return Ji(e==null?void 0:e.roundingMethod)(i)}function Kb(n,t){J(2,arguments);var e=nt(n),i=nt(t),r=Qi(e,i),a=Math.abs(zb(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=Qi(e,i)===-r,o=r*(a-Number(s));return o===0?0:o}function Qb(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function Zb(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Jb(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function tv(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function ev(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nv(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function iv(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getDay(),b=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+b),f.setHours(23,59,59,999),f}function rv(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function av(n){J(1,arguments);var t=nt(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function sv(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Ed(n,t){J(2,arguments);var e=Lt(t);return Ki(n,-e)}var ov=864e5;function lv(n){J(1,arguments);var t=nt(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/ov)+1}function si(n){J(1,arguments);var t=1,e=nt(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 Rd(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=si(i),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=si(a);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function cv(n){J(1,arguments);var t=Rd(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=si(e);return i}var uv=6048e5;function Ad(n){J(1,arguments);var t=nt(n),e=si(t).getTime()-cv(t).getTime();return Math.round(e/uv)+1}function Un(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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 f=nt(n),p=f.getUTCDay(),b=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-b),f.setUTCHours(0,0,0,0),f}function Ps(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=vn(),p=Lt((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:f.firstWeekContainsDate)!==null&&i!==void 0?i:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(d+1,0,p),b.setUTCHours(0,0,0,0);var x=Un(b,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var y=Un(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function dv(n,t){var e,i,r,a,s,o,l,c;J(1,arguments);var u=vn(),d=Lt((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),f=Ps(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var b=Un(p,t);return b}var fv=6048e5;function Ld(n,t){J(1,arguments);var e=nt(n),i=Un(e,t).getTime()-dv(e,t).getTime();return Math.round(i/fv)+1}function Ct(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}var hv={y:function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return Ct(e==="yy"?r%100:r,e.length)},M:function(t,e){var i=t.getUTCMonth();return e==="M"?String(i+1):Ct(i+1,2)},d:function(t,e){return Ct(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 Ct(t.getUTCHours()%12||12,e.length)},H:function(t,e){return Ct(t.getUTCHours(),e.length)},m:function(t,e){return Ct(t.getUTCMinutes(),e.length)},s:function(t,e){return Ct(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 Ct(a,e.length)}};const xn=hv;var oi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pv={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 xn.y(t,e)},Y:function(t,e,i,r){var a=Ps(t,r),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return Ct(o,2)}return e==="Yo"?i.ordinalNumber(s,{unit:"year"}):Ct(s,e.length)},R:function(t,e){var i=Rd(t);return Ct(i,e.length)},u:function(t,e){var i=t.getUTCFullYear();return Ct(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 Ct(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 Ct(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 xn.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 Ct(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=Ld(t,r);return e==="wo"?i.ordinalNumber(a,{unit:"week"}):Ct(a,e.length)},I:function(t,e,i){var r=Ad(t);return e==="Io"?i.ordinalNumber(r,{unit:"week"}):Ct(r,e.length)},d:function(t,e,i){return e==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):xn.d(t,e)},D:function(t,e,i){var r=lv(t);return e==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):Ct(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 Ct(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 Ct(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 Ct(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=oi.noon:r===0?a=oi.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=oi.evening:r>=12?a=oi.afternoon:r>=4?a=oi.morning:a=oi.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 xn.h(t,e)},H:function(t,e,i){return e==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):xn.H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return e==="Ko"?i.ordinalNumber(r,{unit:"hour"}):Ct(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?i.ordinalNumber(r,{unit:"hour"}):Ct(r,e.length)},m:function(t,e,i){return e==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):xn.m(t,e)},s:function(t,e,i){return e==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):xn.s(t,e)},S:function(t,e){return xn.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 Nd(s);case"XXXX":case"XX":return Bn(s);case"XXXXX":case"XXX":default:return Bn(s,":")}},x:function(t,e,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Nd(s);case"xxxx":case"xx":return Bn(s);case"xxxxx":case"xxx":default:return Bn(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"+Id(s,":");case"OOOO":default:return"GMT"+Bn(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"+Id(s,":");case"zzzz":default:return"GMT"+Bn(s,":")}},t:function(t,e,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return Ct(s,e.length)},T:function(t,e,i,r){var a=r._originalDate||t,s=a.getTime();return Ct(s,e.length)}};function Id(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+Ct(a,2)}function Nd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Ct(Math.abs(n)/60,2)}return Bn(n,t)}function Bn(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=Ct(Math.floor(r/60),2),s=Ct(r%60,2);return i+a+e+s}const gv=pv;var Fd=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"})}},Ud=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"})}},mv=function(t,e){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Fd(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}}",Fd(r,e)).replace("{{time}}",Ud(a,e))},yv={p:Ud,P:mv};const Es=yv;var bv=["D","DD"],vv=["YY","YYYY"];function Bd(n){return bv.indexOf(n)!==-1}function Yd(n){return vv.indexOf(n)!==-1}function Jr(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 xv={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"}},wv=function(t,e,i){var r,a=xv[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 _v=wv;function Rs(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 Tv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Dv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cv={date:Rs({formats:Tv,defaultWidth:"full"}),time:Rs({formats:Mv,defaultWidth:"full"}),dateTime:Rs({formats:Dv,defaultWidth:"full"})};const Sv=Cv;var kv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ov=function(t,e,i,r){return kv[t]};const Pv=Ov;function tr(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 Ev={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Av={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"]},Lv={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"]},Iv={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"}},Nv={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"}},Fv=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"},Uv={ordinalNumber:Fv,era:tr({values:Ev,defaultWidth:"wide"}),quarter:tr({values:Rv,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:tr({values:Av,defaultWidth:"wide"}),day:tr({values:Lv,defaultWidth:"wide"}),dayPeriod:tr({values:Iv,defaultWidth:"wide",formattingValues:Nv,defaultFormattingWidth:"wide"})};const Bv=Uv;function er(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)?Wv(o,function(d){return d.test(s)}):Yv(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 Yv(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function Wv(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function zv(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 Hv=/^(\d+)(th|st|nd|rd)?/i,$v=/\d+/i,jv={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},Vv={any:[/^b/i,/^(a|c)/i]},qv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xv={any:[/1/i,/2/i,/3/i,/4/i]},Gv={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},Kv={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]},Qv={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},Zv={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]},Jv={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},tx={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}},ex={ordinalNumber:zv({matchPattern:Hv,parsePattern:$v,valueCallback:function(t){return parseInt(t,10)}}),era:er({matchPatterns:jv,defaultMatchWidth:"wide",parsePatterns:Vv,defaultParseWidth:"any"}),quarter:er({matchPatterns:qv,defaultMatchWidth:"wide",parsePatterns:Xv,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:er({matchPatterns:Gv,defaultMatchWidth:"wide",parsePatterns:Kv,defaultParseWidth:"any"}),day:er({matchPatterns:Qv,defaultMatchWidth:"wide",parsePatterns:Zv,defaultParseWidth:"any"}),dayPeriod:er({matchPatterns:Jv,defaultMatchWidth:"any",parsePatterns:tx,defaultParseWidth:"any"})},nx={code:"en-US",formatDistance:_v,formatLong:Sv,formatRelative:Pv,localize:Bv,match:ex,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Wd=nx;var ix=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ax=/^'([^]*?)'?$/,sx=/''/g,ox=/[a-zA-Z]/;function lx(n,t,e){var i,r,a,s,o,l,c,u,d,f,p,b,x,g,y,v,m,w;J(2,arguments);var T=String(t),S=vn(),k=(i=(r=e==null?void 0:e.locale)!==null&&r!==void 0?r:S.locale)!==null&&i!==void 0?i:Wd,M=Lt((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:S.firstWeekContainsDate)!==null&&s!==void 0?s:(d=S.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Lt((p=(b=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(y=e.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&x!==void 0?x:S.weekStartsOn)!==null&&b!==void 0?b:(m=S.locale)===null||m===void 0||(w=m.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(D>=0&&D<=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 O=nt(n);if(!Os(O))throw new RangeError("Invalid time value");var P=Kr(O),R=Ed(O,P),F={firstWeekContainsDate:M,weekStartsOn:D,locale:k,_originalDate:O},q=T.match(rx).map(function($){var z=$[0];if(z==="p"||z==="P"){var I=Es[z];return I($,k.formatLong)}return $}).join("").match(ix).map(function($){if($==="''")return"'";var z=$[0];if(z==="'")return cx($);var I=gv[z];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Yd($)&&Jr($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bd($)&&Jr($,t,String(n)),I(R,$,k.localize,F);if(z.match(ox))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");return $}).join("");return q}function cx(n){var t=n.match(ax);return t?t[1].replace(sx,"'"):n}function ux(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 zd(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 dx(n,t){if(n){if(typeof n=="string")return zd(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 zd(n,t)}}function Hd(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=dx(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 G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function As(n,t){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},As(n,t)}function gt(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&&As(n,t)}function ta(n){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ta(n)}function fx(){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 hx(n,t){if(t&&(Ze(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function mt(n){var t=fx();return function(){var i=ta(n),r;if(t){var a=ta(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return hx(this,r)}}function ht(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function px(n,t){if(Ze(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Ze(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $d(n){var t=px(n,"string");return Ze(t)==="symbol"?t:String(t)}function jd(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,$d(i.key),i)}}function pt(n,t,e){return t&&jd(n.prototype,t),e&&jd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=$d(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var gx=10,Vd=function(){function n(){ht(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return pt(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),mx=function(n){gt(e,n);var t=mt(e);function e(i,r,a,s,o){var l;return ht(this,e),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return pt(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}(Vd),yx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",gx),V(G(i),"subPriority",-1),i}return pt(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}(Vd),wt=function(){function n(){ht(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return pt(n,[{key:"run",value:function(e,i,r,a){var s=this.parse(e,i,r,a);return s?{setter:new mx(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}(),bx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",140),V(G(i),"incompatibleTokens",["R","u","t","T"]),i}return pt(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}(wt),qt={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}/},Be={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 Xt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Yt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ye(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*Zi+a*Qr+s*Bb),rest:t.slice(e[0].length)}}function qd(n){return Yt(qt.anyDigitsSigned,n)}function Vt(n,t){switch(n){case 1:return Yt(qt.singleDigit,t);case 2:return Yt(qt.twoDigits,t);case 3:return Yt(qt.threeDigits,t);case 4:return Yt(qt.fourDigits,t);default:return Yt(new RegExp("^\\d{1,"+n+"}"),t)}}function ea(n,t){switch(n){case 1:return Yt(qt.singleDigitSigned,t);case 2:return Yt(qt.twoDigitsSigned,t);case 3:return Yt(qt.threeDigitsSigned,t);case 4:return Yt(qt.fourDigitsSigned,t);default:return Yt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Ls(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 Xd(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 Gd(n){return n%400===0||n%4===0&&n%100!==0}var vx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Xt(Vt(4,r),o);case"yo":return Xt(s.ordinalNumber(r,{unit:"year"}),o);default:return Xt(Vt(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=Xd(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}(wt),xx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Xt(Vt(4,r),o);case"Yo":return Xt(s.ordinalNumber(r,{unit:"year"}),o);default:return Xt(Vt(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=Ps(r,o);if(s.isTwoDigitYear){var c=Xd(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Un(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),Un(r,o)}}]),e}(wt),wx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){return ea(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),si(o)}}]),e}(wt),_x=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",130),V(G(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){return ea(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}(wt),Tx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Vt(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}(wt),Mx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",120),V(G(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Vt(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}(wt),Dx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(i),"priority",110),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Xt(Yt(qt.month,r),o);case"MM":return Xt(Vt(2,r),o);case"Mo":return Xt(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}(wt),Cx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",110),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Xt(Yt(qt.month,r),o);case"LL":return Xt(Vt(2,r),o);case"Lo":return Xt(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}(wt);function Sx(n,t,e){J(2,arguments);var i=nt(n),r=Lt(t),a=Ld(i,e)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var kx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"w":return Yt(qt.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return Un(Sx(r,s,o),o)}}]),e}(wt);function Ox(n,t){J(2,arguments);var e=nt(n),i=Lt(t),r=Ad(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}var Px=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",100),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"I":return Yt(qt.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return si(Ox(r,s))}}]),e}(wt),Ex=[31,28,31,30,31,30,31,31,30,31,30,31],Rx=[31,29,31,30,31,30,31,31,30,31,30,31],Ax=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"subPriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"d":return Yt(qt.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(s),l=r.getUTCMonth();return o?a>=1&&a<=Rx[l]:a>=1&&a<=Ex[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Lx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"subpriority",1),V(G(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return Yt(qt.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Vt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Gd(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}(wt);function Is(n,t,e){var i,r,a,s,o,l,c,u;J(2,arguments);var d=vn(),f=Lt((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(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),b=Lt(t),x=p.getUTCDay(),g=b%7,y=(g+7)%7,v=(y<f?7:0)+b-x;return p.setUTCDate(p.getUTCDate()+v),p}var Ix=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return pt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Nx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return pt(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 Xt(Vt(a.length,r),l);case"eo":return Xt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Fx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return pt(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 Xt(Vt(a.length,r),l);case"co":return Xt(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=Is(r,s,o),r.setUTCHours(0,0,0,0),r}}]),e}(wt);function Ux(n,t){J(2,arguments);var e=Lt(t);e%7===0&&(e=e-7);var i=1,r=nt(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 Bx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",90),V(G(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Vt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Xt(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 Xt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Xt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Xt(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=Ux(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(wt),Yx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),Wx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),zx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",80),V(G(i),"incompatibleTokens",["a","b","t","T"]),i}return pt(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(Ls(s),0,0,0),r}}]),e}(wt),Hx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["H","K","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"h":return Yt(qt.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),$x=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"H":return Yt(qt.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),jx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["h","H","k","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"K":return Yt(qt.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),Vx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",70),V(G(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"k":return Yt(qt.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Vt(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}(wt),qx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",60),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"m":return Yt(qt.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Vt(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}(wt),Xx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",50),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a,s){switch(a){case"s":return Yt(qt.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Vt(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}(wt),Gx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",30),V(G(i),"incompatibleTokens",["t","T"]),i}return pt(e,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Xt(Vt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),e}(wt),Kx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","x"]),i}return pt(e,[{key:"parse",value:function(r,a){switch(a){case"X":return Ye(Be.basicOptionalMinutes,r);case"XX":return Ye(Be.basic,r);case"XXXX":return Ye(Be.basicOptionalSeconds,r);case"XXXXX":return Ye(Be.extendedOptionalSeconds,r);case"XXX":default:return Ye(Be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(wt),Qx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",10),V(G(i),"incompatibleTokens",["t","T","X"]),i}return pt(e,[{key:"parse",value:function(r,a){switch(a){case"x":return Ye(Be.basicOptionalMinutes,r);case"xx":return Ye(Be.basic,r);case"xxxx":return Ye(Be.basicOptionalSeconds,r);case"xxxxx":return Ye(Be.extendedOptionalSeconds,r);case"xxx":default:return Ye(Be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(wt),Zx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",40),V(G(i),"incompatibleTokens","*"),i}return pt(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(wt),Jx=function(n){gt(e,n);var t=mt(e);function e(){var i;ht(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)),V(G(i),"priority",20),V(G(i),"incompatibleTokens","*"),i}return pt(e,[{key:"parse",value:function(r){return qd(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(wt),tw={G:new bx,y:new vx,Y:new xx,R:new wx,u:new _x,Q:new Tx,q:new Mx,M:new Dx,L:new Cx,w:new kx,I:new Px,d:new Ax,D:new Lx,E:new Ix,e:new Nx,c:new Fx,i:new Bx,a:new Yx,b:new Wx,B:new zx,h:new Hx,H:new $x,K:new jx,k:new Vx,m:new qx,s:new Xx,S:new Gx,X:new Kx,x:new Qx,t:new Zx,T:new Jx},ew=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iw=/^'([^]*?)'?$/,rw=/''/g,aw=/\S/,sw=/[a-zA-Z]/;function ow(n,t,e,i){var r,a,s,o,l,c,u,d,f,p,b,x,g,y,v,m,w,T;J(3,arguments);var S=String(n),k=String(t),M=vn(),D=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:M.locale)!==null&&r!==void 0?r:Wd;if(!D.match)throw new RangeError("locale must contain match property");var O=Lt((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:M.firstWeekContainsDate)!==null&&o!==void 0?o:(f=M.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=Lt((b=(x=(g=(y=i==null?void 0:i.weekStartsOn)!==null&&y!==void 0?y:i==null||(v=i.locale)===null||v===void 0||(m=v.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&g!==void 0?g:M.weekStartsOn)!==null&&x!==void 0?x:(w=M.locale)===null||w===void 0||(T=w.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&b!==void 0?b:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(k==="")return S===""?nt(e):new Date(NaN);var R={firstWeekContainsDate:O,weekStartsOn:P,locale:D},F=[new yx],q=k.match(nw).map(function(N){var A=N[0];if(A in Es){var Q=Es[A];return Q(N,D.formatLong)}return N}).join("").match(ew),$=[],z=Hd(q),I;try{var rt=function(){var A=I.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Yd(A)&&Jr(A,k,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Bd(A)&&Jr(A,k,n);var Q=A[0],X=tw[Q];if(X){var vt=X.incompatibleTokens;if(Array.isArray(vt)){var ut=$.find(function(_t){return vt.includes(_t.token)||_t.token===Q});if(ut)throw new RangeError("The format string mustn't contain `".concat(ut.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Pt=X.run(S,A,D.match,R);if(!Pt)return{v:new Date(NaN)};F.push(Pt.setter),S=Pt.rest}else{if(Q.match(sw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=lw(A)),S.indexOf(A)===0)S=S.slice(A.length);else return{v:new Date(NaN)}}};for(z.s();!(I=z.n()).done;){var B=rt();if(Ze(B)==="object")return B.v}}catch(N){z.e(N)}finally{z.f()}if(S.length>0&&aw.test(S))return new Date(NaN);var bt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),dt=nt(e);if(isNaN(dt.getTime()))return new Date(NaN);var W=Ed(dt,Kr(dt)),L={},U=Hd(bt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(W,R))return new Date(NaN);var K=Z.set(W,L,R);Array.isArray(K)?(W=K[0],ux(L,K[1])):W=K}}catch(N){U.e(N)}finally{U.f()}return W}function lw(n){return n.match(iw)[1].replace(rw,"'")}function cw(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function uw(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function dw(n){J(1,arguments);var t=n/Zi;return Math.floor(t)}function Kd(n,t){var e;J(1,arguments);var i=Lt((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=gw(n),a;if(r.date){var s=mw(r.date,i);a=yw(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=bw(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=vw(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 na={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fw=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,hw=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pw=/^([+-])(\d{2})(?::?(\d{2}))?$/;function gw(n){var t={},e=n.split(na.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],na.timeZoneDelimiter.test(t.date)&&(t.date=n.split(na.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){var r=na.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function mw(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 yw(n,t){if(t===null)return new Date(NaN);var e=n.match(fw);if(!e)return new Date(NaN);var i=!!e[4],r=nr(e[1]),a=nr(e[2])-1,s=nr(e[3]),o=nr(e[4]),l=nr(e[5])-1;if(i)return Mw(t,o,l)?xw(t,o,l):new Date(NaN);var c=new Date(0);return!_w(t,a,s)||!Tw(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function nr(n){return n?parseInt(n):1}function bw(n){var t=n.match(hw);if(!t)return NaN;var e=Ns(t[1]),i=Ns(t[2]),r=Ns(t[3]);return Dw(e,i,r)?e*Zi+i*Qr+r*1e3:NaN}function Ns(n){return n&&parseFloat(n.replace(",","."))||0}function vw(n){if(n==="Z")return 0;var t=n.match(pw);if(!t)return 0;var e=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return Cw(i,r)?e*(i*Zi+r*Qr):NaN}function xw(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 ww=[31,null,31,30,31,30,31,31,30,31,30,31];function Qd(n){return n%400===0||n%4===0&&n%100!==0}function _w(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(ww[t]||(Qd(n)?29:28))}function Tw(n,t){return t>=1&&t<=(Qd(n)?366:365)}function Mw(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function Dw(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function Cw(n,t){return t>=0&&t<=59}var ne=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ne||{}),ia=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ia||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),li=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(li||{});const Fs=(n,t)=>{var r,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const i=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(r=t.chart.config)==null?void 0:r.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ne.HORIZONTAL_BAR,ne.VERTICAL_BAR].includes(n.chartType),c=[ia.GAUGE,ne.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Cs(f);else{const x=n.translateUnit(n.units,f);p=`${f%1===0?aa.format(f):aa.format(Number(f.toFixed(wf)))} ${x}`}const b=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:b,value:p,rawValue:f}}).sort(i),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},Sw=n=>n&&n.datasets&&n.datasets.length,kw=n=>Sw(n)&&n.datasets.some(t=>t.data.length),Ow=n=>kw(n)&&n.datasets.some(t=>t.data.length>1),Pw=n=>Ow(n)&&n.datasets.some(t=>t.data[0]&&Os(t.data[0].x)),Ew=n=>Pw(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Us=(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)},Rw=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zd(n,t){let e;return(...i)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...i)},t)}}var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bs={exports:{}},Jd={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})(Jd);var zt=Jd.exports,Ys={exports:{}},Ws={exports:{}},tf={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})(tf);var ef=tf.exports,zs={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})(zs,zs.exports);var se=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(se);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})(Ws,Ws.exports);var Aw=Ws.exports,Hs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(ef),r=e(se);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})(Hs,Hs.exports);var We=Hs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Aw),r=e(We),a=e(se);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})(Ys,Ys.exports);var Lw=Ys.exports,$s={exports:{}},js={exports:{}},Vs={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})(Vs,Vs.exports);var Wn=Vs.exports;const Iw=Yn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Wn),r=e(We),a=e(se);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})(js,js.exports);var Nw=js.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Nw),r=e(se),a=e(Wn);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})($s,$s.exports);var Fw=$s.exports,qs={exports:{}},Xs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(We),r=e(se),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})(Xs,Xs.exports);var Uw=Xs.exports,Gs={exports:{}},Ks={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(We),r=e(se);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})(Ks,Ks.exports);var Qs=Ks.exports,Zs={exports:{}},Js={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(We),r=e(se),a=e(Qs);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),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Js,Js.exports);var nf=Js.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(nf),r=e(Qs),a=e(se);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})(Zs,Zs.exports);var Bw=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(Qs),a=e(Bw),s=e(se),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})(Gs,Gs.exports);var Yw=Gs.exports,to={exports:{}},eo={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=Ww,zn.setDefaultOptions=zw;var rf={};function Ww(){return rf}function zw(n){rf=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e(We),r=e(se),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,b,x,g,y;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),m=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(y=g.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&u!==void 0?u:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),S=(T<m?7:0)+T-m;return w.setUTCDate(w.getUTCDate()-S),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(eo,eo.exports);var no=eo.exports,io={exports:{}},ro={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(se),a=e(no),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,i.default)(c),w=m.getUTCFullYear(),T=(0,o.getDefaultOptions)(),S=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(y=T.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,S),k.setUTCHours(0,0,0,0);var M=(0,a.default)(k,u),D=new Date(0);D.setUTCFullYear(w,0,S),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return m.getTime()>=M.getTime()?w+1:m.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(ro,ro.exports);var af=ro.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(af),r=e(se),a=e(no),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:m.firstWeekContainsDate)!==null&&f!==void 0?f:(y=m.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),S=new Date(0);S.setUTCFullYear(T,0,w),S.setUTCHours(0,0,0,0);var k=(0,a.default)(S,u);return k}n.exports=t.default})(io,io.exports);var Hw=io.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(We),r=e(no),a=e(Hw),s=e(se),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(to,to.exports);var $w=to.exports,ao={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})(ao,ao.exports);var sf=ao.exports,so={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(sf),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})(so,so.exports);var jw=so.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Uw),r=e(Yw),a=e(nf),s=e($w),o=e(af),l=e(sf),c=e(jw),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(y,v,m){var w=y.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return m.era(w,{width:"abbreviated"});case"GGGGG":return m.era(w,{width:"narrow"});case"GGGG":default:return m.era(w,{width:"wide"})}},y:function(y,v,m){if(v==="yo"){var w=y.getUTCFullYear(),T=w>0?w:1-w;return m.ordinalNumber(T,{unit:"year"})}return c.default.y(y,v)},Y:function(y,v,m,w){var T=(0,o.default)(y,w),S=T>0?T:1-T;if(v==="YY"){var k=S%100;return(0,l.default)(k,2)}return v==="Yo"?m.ordinalNumber(S,{unit:"year"}):(0,l.default)(S,v.length)},R:function(y,v){var m=(0,a.default)(y);return(0,l.default)(m,v.length)},u:function(y,v){var m=y.getUTCFullYear();return(0,l.default)(m,v.length)},Q:function(y,v,m){var w=Math.ceil((y.getUTCMonth()+1)/3);switch(v){case"Q":return String(w);case"QQ":return(0,l.default)(w,2);case"Qo":return m.ordinalNumber(w,{unit:"quarter"});case"QQQ":return m.quarter(w,{width:"abbreviated",context:"formatting"});case"QQQQQ":return m.quarter(w,{width:"narrow",context:"formatting"});case"QQQQ":default:return m.quarter(w,{width:"wide",context:"formatting"})}},q:function(y,v,m){var w=Math.ceil((y.getUTCMonth()+1)/3);switch(v){case"q":return String(w);case"qq":return(0,l.default)(w,2);case"qo":return m.ordinalNumber(w,{unit:"quarter"});case"qqq":return m.quarter(w,{width:"abbreviated",context:"standalone"});case"qqqqq":return m.quarter(w,{width:"narrow",context:"standalone"});case"qqqq":default:return m.quarter(w,{width:"wide",context:"standalone"})}},M:function(y,v,m){var w=y.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(y,v);case"Mo":return m.ordinalNumber(w+1,{unit:"month"});case"MMM":return m.month(w,{width:"abbreviated",context:"formatting"});case"MMMMM":return m.month(w,{width:"narrow",context:"formatting"});case"MMMM":default:return m.month(w,{width:"wide",context:"formatting"})}},L:function(y,v,m){var w=y.getUTCMonth();switch(v){case"L":return String(w+1);case"LL":return(0,l.default)(w+1,2);case"Lo":return m.ordinalNumber(w+1,{unit:"month"});case"LLL":return m.month(w,{width:"abbreviated",context:"standalone"});case"LLLLL":return m.month(w,{width:"narrow",context:"standalone"});case"LLLL":default:return m.month(w,{width:"wide",context:"standalone"})}},w:function(y,v,m,w){var T=(0,s.default)(y,w);return v==="wo"?m.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,v.length)},I:function(y,v,m){var w=(0,r.default)(y);return v==="Io"?m.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,v.length)},d:function(y,v,m){return v==="do"?m.ordinalNumber(y.getUTCDate(),{unit:"date"}):c.default.d(y,v)},D:function(y,v,m){var w=(0,i.default)(y);return v==="Do"?m.ordinalNumber(w,{unit:"dayOfYear"}):(0,l.default)(w,v.length)},E:function(y,v,m){var w=y.getUTCDay();switch(v){case"E":case"EE":case"EEE":return m.day(w,{width:"abbreviated",context:"formatting"});case"EEEEE":return m.day(w,{width:"narrow",context:"formatting"});case"EEEEEE":return m.day(w,{width:"short",context:"formatting"});case"EEEE":default:return m.day(w,{width:"wide",context:"formatting"})}},e:function(y,v,m,w){var T=y.getUTCDay(),S=(T-w.weekStartsOn+8)%7||7;switch(v){case"e":return String(S);case"ee":return(0,l.default)(S,2);case"eo":return m.ordinalNumber(S,{unit:"day"});case"eee":return m.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return m.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return m.day(T,{width:"short",context:"formatting"});case"eeee":default:return m.day(T,{width:"wide",context:"formatting"})}},c:function(y,v,m,w){var T=y.getUTCDay(),S=(T-w.weekStartsOn+8)%7||7;switch(v){case"c":return String(S);case"cc":return(0,l.default)(S,v.length);case"co":return m.ordinalNumber(S,{unit:"day"});case"ccc":return m.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return m.day(T,{width:"narrow",context:"standalone"});case"cccccc":return m.day(T,{width:"short",context:"standalone"});case"cccc":default:return m.day(T,{width:"wide",context:"standalone"})}},i:function(y,v,m){var w=y.getUTCDay(),T=w===0?7:w;switch(v){case"i":return String(T);case"ii":return(0,l.default)(T,v.length);case"io":return m.ordinalNumber(T,{unit:"day"});case"iii":return m.day(w,{width:"abbreviated",context:"formatting"});case"iiiii":return m.day(w,{width:"narrow",context:"formatting"});case"iiiiii":return m.day(w,{width:"short",context:"formatting"});case"iiii":default:return m.day(w,{width:"wide",context:"formatting"})}},a:function(y,v,m){var w=y.getUTCHours(),T=w/12>=1?"pm":"am";switch(v){case"a":case"aa":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(y,v,m){var w=y.getUTCHours(),T;switch(w===12?T=u.noon:w===0?T=u.midnight:T=w/12>=1?"pm":"am",v){case"b":case"bb":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(y,v,m){var w=y.getUTCHours(),T;switch(w>=17?T=u.evening:w>=12?T=u.afternoon:w>=4?T=u.morning:T=u.night,v){case"B":case"BB":case"BBB":return m.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return m.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return m.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(y,v,m){if(v==="ho"){var w=y.getUTCHours()%12;return w===0&&(w=12),m.ordinalNumber(w,{unit:"hour"})}return c.default.h(y,v)},H:function(y,v,m){return v==="Ho"?m.ordinalNumber(y.getUTCHours(),{unit:"hour"}):c.default.H(y,v)},K:function(y,v,m){var w=y.getUTCHours()%12;return v==="Ko"?m.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},k:function(y,v,m){var w=y.getUTCHours();return w===0&&(w=24),v==="ko"?m.ordinalNumber(w,{unit:"hour"}):(0,l.default)(w,v.length)},m:function(y,v,m){return v==="mo"?m.ordinalNumber(y.getUTCMinutes(),{unit:"minute"}):c.default.m(y,v)},s:function(y,v,m){return v==="so"?m.ordinalNumber(y.getUTCSeconds(),{unit:"second"}):c.default.s(y,v)},S:function(y,v){return c.default.S(y,v)},X:function(y,v,m,w){var T=w._originalDate||y,S=T.getTimezoneOffset();if(S===0)return"Z";switch(v){case"X":return p(S);case"XXXX":case"XX":return b(S);case"XXXXX":case"XXX":default:return b(S,":")}},x:function(y,v,m,w){var T=w._originalDate||y,S=T.getTimezoneOffset();switch(v){case"x":return p(S);case"xxxx":case"xx":return b(S);case"xxxxx":case"xxx":default:return b(S,":")}},O:function(y,v,m,w){var T=w._originalDate||y,S=T.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+f(S,":");case"OOOO":default:return"GMT"+b(S,":")}},z:function(y,v,m,w){var T=w._originalDate||y,S=T.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+f(S,":");case"zzzz":default:return"GMT"+b(S,":")}},t:function(y,v,m,w){var T=w._originalDate||y,S=Math.floor(T.getTime()/1e3);return(0,l.default)(S,v.length)},T:function(y,v,m,w){var T=w._originalDate||y,S=T.getTime();return(0,l.default)(S,v.length)}};function f(g,y){var v=g>0?"-":"+",m=Math.abs(g),w=Math.floor(m/60),T=m%60;if(T===0)return v+String(w);var S=y||"";return v+String(w)+S+(0,l.default)(T,2)}function p(g,y){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,y)}function b(g,y){var v=y||"",m=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),S=(0,l.default)(w%60,2);return m+T+v+S}var x=d;t.default=x,n.exports=t.default})(qs,qs.exports);var Vw=qs.exports,oo={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],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",i(f,c))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(oo,oo.exports);var qw=oo.exports,lo={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})(lo,lo.exports);var of=lo.exports;const lf=Yn(of);var ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.isProtectedDayOfYearToken=Kw,ir.isProtectedWeekYearToken=Qw,ir.throwProtectedError=Zw;var Xw=["D","DD"],Gw=["YY","YYYY"];function Kw(n){return Xw.indexOf(n)!==-1}function Qw(n){return Gw.indexOf(n)!==-1}function Zw(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 co={exports:{}},uo={exports:{}},fo={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})(fo,fo.exports);var Jw=fo.exports,ho={exports:{}},po={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})(po,po.exports);var t_=po.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(t_),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})(ho,ho.exports);var e_=ho.exports,go={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})(go,go.exports);var n_=go.exports,mo={exports:{}},yo={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 f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(yo,yo.exports);var i_=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(i_),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(b,x){var g=Number(b),y=g%100;if(y>20||y<10)switch(y%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(b){return b-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"})},f=d;t.default=f,n.exports=t.default})(mo,mo.exports);var r_=mo.exports,bo={exports:{}},vo={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],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}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})(vo,vo.exports);var a_=vo.exports,xo={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})(xo,xo.exports);var s_=xo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(a_),r=e(s_),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},f={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]},p={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},b={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]},x={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},g={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}},y={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(w){return parseInt(w,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(w){return w+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=y;t.default=v,n.exports=t.default})(bo,bo.exports);var o_=bo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Jw),r=e(e_),a=e(n_),s=e(r_),o=e(o_),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})(uo,uo.exports);var l_=uo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(l_),r=i.default;t.default=r,n.exports=t.default})(co,co.exports);var c_=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var i=e(Lw),r=e(Fw),a=e(We),s=e(Vw),o=e(qw),l=e(of),c=ir,u=e(Wn),d=e(se),f=zn,p=e(c_),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,y=/''/g,v=/[a-zA-Z]/;function m(T,S,k){var M,D,O,P,R,F,q,$,z,I,rt,B,bt,dt,W,L,U,j;(0,d.default)(2,arguments);var Z=String(S),K=(0,f.getDefaultOptions)(),N=(M=(D=k==null?void 0:k.locale)!==null&&D!==void 0?D:K.locale)!==null&&M!==void 0?M:p.default,A=(0,u.default)((O=(P=(R=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&R!==void 0?R:K.firstWeekContainsDate)!==null&&P!==void 0?P:(z=K.locale)===null||z===void 0||(I=z.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(bt=(dt=k==null?void 0:k.weekStartsOn)!==null&&dt!==void 0?dt:k==null||(W=k.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&bt!==void 0?bt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ut=(0,r.default)(X,vt),Pt={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var xt=et[0];if(xt==="p"||xt==="P"){var Ft=o.default[xt];return Ft(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var xt=et[0];if(xt==="'")return w(et);var Ft=s.default[xt];if(Ft)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,S,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,S,String(T)),Ft(ut,et,N.localize,Pt);if(xt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+xt+"`");return et}).join("");return _t}function w(T){var S=T.match(g);return S?S[1].replace(y,"'"):T}n.exports=t.default})(Bs,Bs.exports);var u_=Bs.exports;const d_=Yn(u_);function cf(n,t,e){var i=p_(n,e.timeZone,e.locale);return i.formatToParts?f_(i,t):h_(i,t)}function f_(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 h_(n,t){var e=n.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(e);return i?i[0].substr(1):""}function p_(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 g_(n,t){var e=v_(t);return e.formatToParts?y_(e,n):b_(e,n)}var m_={year:0,month:1,day:2,hour:3,minute:4,second:5};function y_(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=m_[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 b_(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 wo={};function v_(n){if(!wo[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";wo[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 wo[n]}function uf(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 df=36e5,x_=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function To(n,t,e){var i,r;if(!n||(i=_o.timezoneZ.exec(n),i))return 0;var a;if(i=_o.timezoneHH.exec(n),i)return a=parseInt(i[1],10),ff(a)?-(a*df):NaN;if(i=_o.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return ff(a,s)?(r=Math.abs(a)*df+s*x_,a>0?-r:r):NaN}if(T_(n)){t=new Date(t||Date.now());var o=e?t:w_(t),l=Mo(o,n),c=e?l:__(t,l,n);return-c}return NaN}function w_(n){return uf(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Mo(n,t){var e=g_(n,t),i=uf(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 __(n,t,e){var i=n.getTime(),r=i-t,a=Mo(new Date(r),e);if(t===a)return t;r-=a-t;var s=Mo(new Date(r),e);return a===s?a:Math.max(a,s)}function ff(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var hf={};function T_(n){if(hf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),hf[n]=!0,!0}catch{return!1}}var M_=60*1e3,D_={X:function(n,t,e,i){var r=Do(i.timeZone,i._originalDate||n);if(r===0)return"Z";switch(t){case"X":return pf(r);case"XXXX":case"XX":return ci(r);case"XXXXX":case"XXX":default:return ci(r,":")}},x:function(n,t,e,i){var r=Do(i.timeZone,i._originalDate||n);switch(t){case"x":return pf(r);case"xxxx":case"xx":return ci(r);case"xxxxx":case"xxx":default:return ci(r,":")}},O:function(n,t,e,i){var r=Do(i.timeZone,i._originalDate||n);switch(t){case"O":case"OO":case"OOO":return"GMT"+C_(r,":");case"OOOO":default:return"GMT"+ci(r,":")}},z:function(n,t,e,i){var r=i._originalDate||n;switch(t){case"z":case"zz":case"zzz":return cf("short",r,i);case"zzzz":default:return cf("long",r,i)}}};function Do(n,t){var e=n?To(n,t,!0)/M_:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ra(n,t){for(var e=n<0?"-":"",i=Math.abs(n).toString();i.length<t;)i="0"+i;return e+i}function ci(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n),a=ra(Math.floor(r/60),2),s=ra(Math.floor(r%60),2);return i+a+e+s}function pf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+ra(Math.abs(n)/60,2)}return ci(n,t)}function C_(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+ra(a,2)}const S_=D_;var k_=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Co=36e5,gf=6e4,O_=2,oe={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:k_};function mf(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?O_:Iw(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=P_(n),a=E_(r.date,i),s=a.year,o=a.restDateString,l=R_(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=A_(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=To(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=lf(new Date(c+u)),d=lf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function P_(n){var t={},e=oe.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=oe.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=oe.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function E_(n,t){var e=oe.YYY[t],i=oe.YYYYY[t],r;if(r=oe.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=oe.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 R_(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=oe.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,vf(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=oe.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return N_(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=oe.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return vf(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=oe.Www.exec(n),e)return a=parseInt(e[1],10)-1,xf(t,a)?yf(t,a):new Date(NaN);if(e=oe.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return xf(t,a,l)?yf(t,a,l):new Date(NaN)}return null}function A_(n){var t,e,i;if(t=oe.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),So(e)?e%24*Co:NaN;if(t=oe.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),So(e,i)?e%24*Co+i*gf:NaN;if(t=oe.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return So(e,i,r)?e%24*Co+i*gf+r*1e3:NaN}return null}function yf(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 L_=[31,28,31,30,31,30,31,31,30,31,30,31],I_=[31,29,31,30,31,30,31,31,30,31,30,31];function bf(n){return n%400===0||n%4===0&&n%100!==0}function vf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=bf(n);if(i&&e>I_[t]||!i&&e>L_[t])return!1}return!0}function N_(n,t){if(t<1)return!1;var e=bf(n);return!(e&&t>366||!e&&t>365)}function xf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function So(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var F_=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ko(n,t,e){var i=String(t),r=e||{},a=i.match(F_);if(a){var s=mf(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,"'"+S_[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return d_(n,i,r)}var Oo={exports:{}},Po={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})(Po,Po.exports);var U_=Po.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(U_);function r(a){return(0,i.default)({},a)}n.exports=t.default})(Oo,Oo.exports);var B_=Oo.exports;const Y_=Yn(B_);function W_(n,t,e){var i=mf(n,e),r=To(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 z_(n,t,e,i){var r=Y_(i);return r.timeZone=t,ko(W_(n,t),e,r)}const wf=2,_f=10,Tf=12,aa=new Intl.NumberFormat(((op=document==null?void 0:document.documentElement)==null?void 0:op.lang)||"en-US");function sa(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 z_(r,e,i)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const oa=10,Mf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Ce=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],ui=(n,t)=>(t||Ce)[n%Ce.length],rr=(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}`},Df="#6f7787",Cf={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},H_=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=Cf[t])==null?void 0:e.background)||"#fafafa"},$_={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},j_={"4XX":"#FFBA81","5XX":"#FF8484"},V_={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},q_="#dad4c7",X_=n=>{const t=Object.entries(Mf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Mf.standard},G_={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},K_=2,Q_=0,Eo=new Map,Ro=(n,t)=>t==="bytes"?Cs(n):t==="count/minute"?n.toFixed(2):aa.format(n),Sf=n=>{const e=document.createElement("canvas").getContext("2d"),i=At({});return e.font=i.string,e.measureText(n).width},Z_=()=>{const n="label_height";if(!Eo.has(n)){const t=At({});Eo.set(n,t.lineHeight)}return Eo.get(n)},J_=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),kf=(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),Of=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`;function t1(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};Vr.positioners.barChartTooltipPosition=function(r,a){if(!r.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Us(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},ls.modes.customInteractionMode=function(r,a){const s=gn(a,r),o=[];return ls.evaluateInteractionItems(r,r.options.indexAxis||"x",s,(l,c,u)=>{r.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),r.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&r.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?_f:Tf;return h.computed(()=>{var r,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const b=this;if(b.chart.options.indexAxis===b.axis){f=b.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!at((r=n.metricAxesTitle)==null?void 0:r.value):!at((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const b=this;return b.chart.options.indexAxis===b.axis?(f=b.getLabelForValue(p),f&&f.length>oa?f.slice(0,oa)+"...":f):b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!at((l=n.metricAxesTitle)==null?void 0:l.value):!at((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Fs(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}De.register(...Tb);const e1=(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 n1(n,t,e,i,r){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new De(t.value,{type:n,data:o,plugins:i,options:l})};return h.onMounted(()=>{a.value=s(e.value,r.value)}),h.onBeforeUnmount(()=>{at(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(e1(l,o)&&!at(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 at(a.value)||a.value.destroy(),a.value=s(o,r.value)}),h.watch(t,()=>{at(a.value)||a.value.destroy(),a.value=s(e.value,r.value)}),h.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))&&(at(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Pf={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:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(b,x){x&&x%3===0&&f.push(d),f.push(b)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),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 f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?r:i;return c<p||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",f&&(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})()})(Pf);var i1=Pf.exports;const ar=Yn(i1);function r1(n,t,e){const{i18n:i}=St.useI18n(),{translateUnit:r}=St.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Cs(l);else{const u=r(e.value,l);c=i&&i.t("legend.datapointValueDisplay",{value:ar(l,{capital:!0}),unit:u})||`${ar(l,{capital:!0})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function a1(n){return h.computed(()=>{var r;if(!((r=n.value)!=null&&r.meta))return"";const e=n.value.meta.start_ms,i=n.value.meta.end_ms;return e&&i?`${sa(e)} - ${sa(i,{includeTZ:!0})}`:""})}function s1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return Vr.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=Us(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Fs(n.tooltipState,i)}}}}))}}var o1=Object.defineProperty,l1=(n,t,e)=>t in n?o1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ze=(n,t,e)=>(l1(n,typeof t!="symbol"?t+"":t,e),e),lt=(n=>(n.SECONDLY="Secondly",n.MINUTELY="Minutely",n.HOURLY="Hourly",n.DAILY="Daily",n.WEEKLY="Weekly",n))(lt||{}),Ht=(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))(Ht||{});function Ao(n){"@babel/helpers - typeof";return Ao=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},Ao(n)}function la(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 He(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function di(n){He(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ao(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 Ef(n,t){He(2,arguments);var e=di(n),i=la(t);return isNaN(i)?new Date(NaN):(i&&e.setDate(e.getDate()+i),e)}function c1(n,t){He(2,arguments);var e=di(n),i=la(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 u1={};function d1(){return u1}function ca(n,t){var e,i,r,a,s,o,l,c;He(1,arguments);var u=d1(),d=la((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 f=di(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Rf(n){He(1,arguments);var t=di(n);return t.setHours(0,0,0,0),t}var f1=60,h1=3600;function fi(n){He(1,arguments);var t=di(n);return t.setDate(1),t.setHours(0,0,0,0),t}function p1(n){He(1,arguments);var t=di(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 g1(n){return He(1,arguments),Math.floor(n*h1)}function m1(n){He(1,arguments);var t=n/f1;return Math.floor(t)}function Af(n,t){He(2,arguments);var e=la(t);return c1(n,-e)}function Lo(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lf={exports:{}},If={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})(If);var $t=If.exports,Io={exports:{}},No={exports:{}},Nf={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})(Nf);var Ff=Nf.exports,Fo={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})(Fo,Fo.exports);var le=Fo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Ff),r=e(le);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})(No,No.exports);var y1=No.exports,Uo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e(Ff),r=e(le);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})(Uo,Uo.exports);var $e=Uo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(y1),r=e($e),a=e(le);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})(Io,Io.exports);var b1=Io.exports,Bo={exports:{}},Yo={exports:{}},Wo={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})(Wo,Wo.exports);var Hn=Wo.exports;const v1=Lo(Hn);(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Hn),r=e($e),a=e(le);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})(Yo,Yo.exports);var x1=Yo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(x1),r=e(le),a=e(Hn);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})(Bo,Bo.exports);var w1=Bo.exports,zo={exports:{}},Ho={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e($e),r=e(le),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})(Ho,Ho.exports);var _1=Ho.exports,$o={exports:{}},jo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=e($e),r=e(le);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})(jo,jo.exports);var Vo=jo.exports,qo={exports:{}},Xo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e($e),r=e(le),a=e(Vo);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),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Xo,Xo.exports);var Uf=Xo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=e(Uf),r=e(Vo),a=e(le);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})(qo,qo.exports);var T1=qo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(Vo),a=e(T1),s=e(le),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})($o,$o.exports);var M1=$o.exports,Go={exports:{}},Ko={exports:{}},$n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.getDefaultOptions=D1,$n.setDefaultOptions=C1;var Bf={};function D1(){return Bf}function C1(n){Bf=n}(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=e($e),r=e(le),a=e(Hn),s=$n;function o(l,c){var u,d,f,p,b,x,g,y;(0,r.default)(1,arguments);var v=(0,s.getDefaultOptions)(),m=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(y=g.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&u!==void 0?u:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=(0,i.default)(l),T=w.getUTCDay(),S=(T<m?7:0)+T-m;return w.setUTCDate(w.getUTCDate()-S),w.setUTCHours(0,0,0,0),w}n.exports=t.default})(Ko,Ko.exports);var Qo=Ko.exports,Zo={exports:{}},Jo={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(le),a=e(Qo),s=e(Hn),o=$n;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,i.default)(c),w=m.getUTCFullYear(),T=(0,o.getDefaultOptions)(),S=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(y=T.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=new Date(0);k.setUTCFullYear(w+1,0,S),k.setUTCHours(0,0,0,0);var M=(0,a.default)(k,u),D=new Date(0);D.setUTCFullYear(w,0,S),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return m.getTime()>=M.getTime()?w+1:m.getTime()>=O.getTime()?w:w-1}n.exports=t.default})(Jo,Jo.exports);var Yf=Jo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e(Yf),r=e(le),a=e(Qo),s=e(Hn),o=$n;function l(c,u){var d,f,p,b,x,g,y,v;(0,r.default)(1,arguments);var m=(0,o.getDefaultOptions)(),w=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:m.firstWeekContainsDate)!==null&&f!==void 0?f:(y=m.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,i.default)(c,u),S=new Date(0);S.setUTCFullYear(T,0,w),S.setUTCHours(0,0,0,0);var k=(0,a.default)(S,u);return k}n.exports=t.default})(Zo,Zo.exports);var S1=Zo.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=e($e),r=e(Qo),a=e(S1),s=e(le),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),f=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Go,Go.exports);var k1=Go.exports,tl={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})(tl,tl.exports);var Wf=tl.exports,el={exports:{}};(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(Wf),r={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,i.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,i.default)(l+1,2)},d:function(s,o){return(0,i.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,i.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,i.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,i.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,i.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,i.default)(u,o.length)}},a=r;t.default=a,n.exports=t.default})(el,el.exports);var O1=el.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(_1),r=e(M1),a=e(Uf),s=e(k1),o=e(Yf),l=e(Wf),c=e(O1),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,y,v){var m=g.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return v.era(m,{width:"abbreviated"});case"GGGGG":return v.era(m,{width:"narrow"});case"GGGG":default:return v.era(m,{width:"wide"})}},y:function(g,y,v){if(y==="yo"){var m=g.getUTCFullYear(),w=m>0?m:1-m;return v.ordinalNumber(w,{unit:"year"})}return c.default.y(g,y)},Y:function(g,y,v,m){var w=(0,o.default)(g,m),T=w>0?w:1-w;if(y==="YY"){var S=T%100;return(0,l.default)(S,2)}return y==="Yo"?v.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,y.length)},R:function(g,y){var v=(0,a.default)(g);return(0,l.default)(v,y.length)},u:function(g,y){var v=g.getUTCFullYear();return(0,l.default)(v,y.length)},Q:function(g,y,v){var m=Math.ceil((g.getUTCMonth()+1)/3);switch(y){case"Q":return String(m);case"QQ":return(0,l.default)(m,2);case"Qo":return v.ordinalNumber(m,{unit:"quarter"});case"QQQ":return v.quarter(m,{width:"abbreviated",context:"formatting"});case"QQQQQ":return v.quarter(m,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(m,{width:"wide",context:"formatting"})}},q:function(g,y,v){var m=Math.ceil((g.getUTCMonth()+1)/3);switch(y){case"q":return String(m);case"qq":return(0,l.default)(m,2);case"qo":return v.ordinalNumber(m,{unit:"quarter"});case"qqq":return v.quarter(m,{width:"abbreviated",context:"standalone"});case"qqqqq":return v.quarter(m,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(m,{width:"wide",context:"standalone"})}},M:function(g,y,v){var m=g.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(g,y);case"Mo":return v.ordinalNumber(m+1,{unit:"month"});case"MMM":return v.month(m,{width:"abbreviated",context:"formatting"});case"MMMMM":return v.month(m,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(m,{width:"wide",context:"formatting"})}},L:function(g,y,v){var m=g.getUTCMonth();switch(y){case"L":return String(m+1);case"LL":return(0,l.default)(m+1,2);case"Lo":return v.ordinalNumber(m+1,{unit:"month"});case"LLL":return v.month(m,{width:"abbreviated",context:"standalone"});case"LLLLL":return v.month(m,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(m,{width:"wide",context:"standalone"})}},w:function(g,y,v,m){var w=(0,s.default)(g,m);return y==="wo"?v.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,y.length)},I:function(g,y,v){var m=(0,r.default)(g);return y==="Io"?v.ordinalNumber(m,{unit:"week"}):(0,l.default)(m,y.length)},d:function(g,y,v){return y==="do"?v.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,y)},D:function(g,y,v){var m=(0,i.default)(g);return y==="Do"?v.ordinalNumber(m,{unit:"dayOfYear"}):(0,l.default)(m,y.length)},E:function(g,y,v){var m=g.getUTCDay();switch(y){case"E":case"EE":case"EEE":return v.day(m,{width:"abbreviated",context:"formatting"});case"EEEEE":return v.day(m,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(m,{width:"short",context:"formatting"});case"EEEE":default:return v.day(m,{width:"wide",context:"formatting"})}},e:function(g,y,v,m){var w=g.getUTCDay(),T=(w-m.weekStartsOn+8)%7||7;switch(y){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return v.ordinalNumber(T,{unit:"day"});case"eee":return v.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return v.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(w,{width:"short",context:"formatting"});case"eeee":default:return v.day(w,{width:"wide",context:"formatting"})}},c:function(g,y,v,m){var w=g.getUTCDay(),T=(w-m.weekStartsOn+8)%7||7;switch(y){case"c":return String(T);case"cc":return(0,l.default)(T,y.length);case"co":return v.ordinalNumber(T,{unit:"day"});case"ccc":return v.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return v.day(w,{width:"narrow",context:"standalone"});case"cccccc":return v.day(w,{width:"short",context:"standalone"});case"cccc":default:return v.day(w,{width:"wide",context:"standalone"})}},i:function(g,y,v){var m=g.getUTCDay(),w=m===0?7:m;switch(y){case"i":return String(w);case"ii":return(0,l.default)(w,y.length);case"io":return v.ordinalNumber(w,{unit:"day"});case"iii":return v.day(m,{width:"abbreviated",context:"formatting"});case"iiiii":return v.day(m,{width:"narrow",context:"formatting"});case"iiiiii":return v.day(m,{width:"short",context:"formatting"});case"iiii":default:return v.day(m,{width:"wide",context:"formatting"})}},a:function(g,y,v){var m=g.getUTCHours(),w=m/12>=1?"pm":"am";switch(y){case"a":case"aa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(g,y,v){var m=g.getUTCHours(),w;switch(m===12?w=u.noon:m===0?w=u.midnight:w=m/12>=1?"pm":"am",y){case"b":case"bb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(g,y,v){var m=g.getUTCHours(),w;switch(m>=17?w=u.evening:m>=12?w=u.afternoon:m>=4?w=u.morning:w=u.night,y){case"B":case"BB":case"BBB":return v.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return v.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(g,y,v){if(y==="ho"){var m=g.getUTCHours()%12;return m===0&&(m=12),v.ordinalNumber(m,{unit:"hour"})}return c.default.h(g,y)},H:function(g,y,v){return y==="Ho"?v.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,y)},K:function(g,y,v){var m=g.getUTCHours()%12;return y==="Ko"?v.ordinalNumber(m,{unit:"hour"}):(0,l.default)(m,y.length)},k:function(g,y,v){var m=g.getUTCHours();return m===0&&(m=24),y==="ko"?v.ordinalNumber(m,{unit:"hour"}):(0,l.default)(m,y.length)},m:function(g,y,v){return y==="mo"?v.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,y)},s:function(g,y,v){return y==="so"?v.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,y)},S:function(g,y){return c.default.S(g,y)},X:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();if(T===0)return"Z";switch(y){case"X":return p(T);case"XXXX":case"XX":return b(T);case"XXXXX":case"XXX":default:return b(T,":")}},x:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"x":return p(T);case"xxxx":case"xx":return b(T);case"xxxxx":case"xxx":default:return b(T,":")}},O:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+b(T,":")}},z:function(g,y,v,m){var w=m._originalDate||g,T=w.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+b(T,":")}},t:function(g,y,v,m){var w=m._originalDate||g,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,y.length)},T:function(g,y,v,m){var w=m._originalDate||g,T=w.getTime();return(0,l.default)(T,y.length)}};function f(g,y){var v=g>0?"-":"+",m=Math.abs(g),w=Math.floor(m/60),T=m%60;if(T===0)return v+String(w);var S=y||"";return v+String(w)+S+(0,l.default)(T,2)}function p(g,y){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,y)}function b(g,y){var v=y||"",m=g>0?"-":"+",w=Math.abs(g),T=(0,l.default)(Math.floor(w/60),2),S=(0,l.default)(w%60,2);return m+T+v+S}var x=d;t.default=x,n.exports=t.default})(zo,zo.exports);var P1=zo.exports,nl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},i=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},r=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",i(d,l))},a={p:i,P:r},s=a;t.default=s,n.exports=t.default})(nl,nl.exports);var E1=nl.exports,il={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})(il,il.exports);var zf=il.exports;const Hf=Lo(zf);var sr={};Object.defineProperty(sr,"__esModule",{value:!0}),sr.isProtectedDayOfYearToken=L1,sr.isProtectedWeekYearToken=I1,sr.throwProtectedError=N1;var R1=["D","DD"],A1=["YY","YYYY"];function L1(n){return R1.indexOf(n)!==-1}function I1(n){return A1.indexOf(n)!==-1}function N1(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 rl={exports:{}},al={exports:{}},sl={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(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},r=i;t.default=r,n.exports=t.default})(sl,sl.exports);var F1=sl.exports,ol={exports:{}},ll={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})(ll,ll.exports);var U1=ll.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(U1),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})(ol,ol.exports);var B1=ol.exports,cl={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(a,s,o,l){return e[a]},r=i;t.default=r,n.exports=t.default})(cl,cl.exports);var Y1=cl.exports,ul={exports:{}},dl={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 f=i.argumentCallback?i.argumentCallback(r):r;return o[f]}}n.exports=t.default})(dl,dl.exports);var W1=dl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(W1),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(p,b){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-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"})},f=d;t.default=f,n.exports=t.default})(ul,ul.exports);var z1=ul.exports,fl={exports:{}},hl={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],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?r(f,function(g){return g.test(d)}):i(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}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})(hl,hl.exports);var H1=hl.exports,pl={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})(pl,pl.exports);var $1=pl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(H1),r=e($1),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},f={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]},p={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},b={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]},x={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},g={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}},y={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(m){return parseInt(m,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(m){return m+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=y;t.default=v,n.exports=t.default})(fl,fl.exports);var j1=fl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(F1),r=e(B1),a=e(Y1),s=e(z1),o=e(j1),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})(al,al.exports);var V1=al.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=e(V1),r=i.default;t.default=r,n.exports=t.default})(rl,rl.exports);var q1=rl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var i=e(b1),r=e(w1),a=e($e),s=e(P1),o=e(E1),l=e(zf),c=sr,u=e(Hn),d=e(le),f=$n,p=e(q1),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,y=/''/g,v=/[a-zA-Z]/;function m(T,S,k){var M,D,O,P,R,F,q,$,z,I,rt,B,bt,dt,W,L,U,j;(0,d.default)(2,arguments);var Z=String(S),K=(0,f.getDefaultOptions)(),N=(M=(D=k==null?void 0:k.locale)!==null&&D!==void 0?D:K.locale)!==null&&M!==void 0?M:p.default,A=(0,u.default)((O=(P=(R=(F=k==null?void 0:k.firstWeekContainsDate)!==null&&F!==void 0?F:k==null||(q=k.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&R!==void 0?R:K.firstWeekContainsDate)!==null&&P!==void 0?P:(z=K.locale)===null||z===void 0||(I=z.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&O!==void 0?O:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((rt=(B=(bt=(dt=k==null?void 0:k.weekStartsOn)!==null&&dt!==void 0?dt:k==null||(W=k.locale)===null||W===void 0||(L=W.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&bt!==void 0?bt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&rt!==void 0?rt:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,i.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ut=(0,r.default)(X,vt),Pt={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var xt=et[0];if(xt==="p"||xt==="P"){var Ft=o.default[xt];return Ft(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var xt=et[0];if(xt==="'")return w(et);var Ft=s.default[xt];if(Ft)return!(k!=null&&k.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,S,String(T)),!(k!=null&&k.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,S,String(T)),Ft(ut,et,N.localize,Pt);if(xt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+xt+"`");return et}).join("");return _t}function w(T){var S=T.match(g);return S?S[1].replace(y,"'"):T}n.exports=t.default})(Lf,Lf.exports);function X1(n,t){var e=Z1(t);return e.formatToParts?K1(e,n):Q1(e,n)}var G1={year:0,month:1,day:2,hour:3,minute:4,second:5};function K1(n,t){try{for(var e=n.formatToParts(t),i=[],r=0;r<e.length;r++){var a=G1[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 Q1(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 gl={};function Z1(n){if(!gl[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";gl[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 gl[n]}function ml(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 $f=36e5,J1=6e4,yl={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function ua(n,t,e){var i,r;if(!n||(i=yl.timezoneZ.exec(n),i))return 0;var a;if(i=yl.timezoneHH.exec(n),i)return a=parseInt(i[1],10),jf(a)?-(a*$f):NaN;if(i=yl.timezoneHHMM.exec(n),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return jf(a,s)?(r=Math.abs(a)*$f+s*J1,a>0?-r:r):NaN}if(nT(n)){t=new Date(t||Date.now());var o=e?t:tT(t),l=bl(o,n),c=e?l:eT(t,l,n);return-c}return NaN}function tT(n){return ml(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function bl(n,t){var e=X1(n,t),i=ml(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 eT(n,t,e){var i=n.getTime(),r=i-t,a=bl(new Date(r),e);if(t===a)return t;r-=a-t;var s=bl(new Date(r),e);return a===s?a:Math.max(a,s)}function jf(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var Vf={};function nT(n){if(Vf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Vf[n]=!0,!0}catch{return!1}}var iT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const qf=iT;var vl=36e5,Xf=6e4,rT=2,ce={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:qf};function xl(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?rT:v1(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=aT(n),a=sT(r.date,i),s=a.year,o=a.restDateString,l=oT(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=lT(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||e.timeZone){if(d=ua(r.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Hf(new Date(c+u)),d=Hf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function aT(n){var t={},e=ce.dateTimePattern.exec(n),i;if(e?(t.date=e[1],i=e[3]):(e=ce.datePattern.exec(n),e?(t.date=e[1],i=e[2]):(t.date=null,i=n)),i){var r=ce.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function sT(n,t){var e=ce.YYY[t],i=ce.YYYYY[t],r;if(r=ce.YYYY.exec(n)||i.exec(n),r){var a=r[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(r=ce.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 oT(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=ce.MM.exec(n),e)return i=new Date(0),r=parseInt(e[1],10)-1,Qf(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(e=ce.DDD.exec(n),e){i=new Date(0);var s=parseInt(e[1],10);return dT(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(e=ce.MMDD.exec(n),e){i=new Date(0),r=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Qf(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(e=ce.Www.exec(n),e)return a=parseInt(e[1],10)-1,Zf(t,a)?Gf(t,a):new Date(NaN);if(e=ce.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Zf(t,a,l)?Gf(t,a,l):new Date(NaN)}return null}function lT(n){var t,e,i;if(t=ce.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),wl(e)?e%24*vl:NaN;if(t=ce.HHMM.exec(n),t)return e=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),wl(e,i)?e%24*vl+i*Xf:NaN;if(t=ce.HHMMSS.exec(n),t){e=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return wl(e,i,r)?e%24*vl+i*Xf+r*1e3:NaN}return null}function Gf(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 cT=[31,28,31,30,31,30,31,31,30,31,30,31],uT=[31,29,31,30,31,30,31,31,30,31,30,31];function Kf(n){return n%400===0||n%4===0&&n%100!==0}function Qf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var i=Kf(n);if(i&&e>uT[t]||!i&&e>cT[t])return!1}return!0}function dT(n,t){if(t<1)return!1;var e=Kf(n);return!(e&&t>366||!e&&t>365)}function Zf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function wl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var _l={exports:{}},Tl={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})(Tl,Tl.exports);var fT=Tl.exports;(function(n,t){var e=$t.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=e(fT);function r(a){return(0,i.default)({},a)}n.exports=t.default})(_l,_l.exports);var hT=_l.exports;const pT=Lo(hT);function gT(n,t,e){var i=xl(n,e),r=ua(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 mT(n,t){return-ua(n,t)}function yT(n,t,e){if(typeof n=="string"&&!n.match(qf)){var i=pT(e);return i.timeZone=t,xl(n,i)}var r=xl(n,e),a=ml(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()).getTime(),s=ua(t,new Date(a));return new Date(a+s)}const bT={[lt.SECONDLY]:1e3,[lt.MINUTELY]:60*1e3,[lt.HOURLY]:60*60*1e3,[lt.DAILY]:60*60*24*1e3,[lt.WEEKLY]:60*60*24*7*1e3};function Ml(n){return n&&Object.values(lt).find(t=>n<=bT[t])||null}const hi=(n,t)=>new Date(n.getTime()-mT(t,n));class Re{constructor(t){ze(this,"timeframeText"),ze(this,"key"),ze(this,"display"),ze(this,"timeframeLength"),ze(this,"allowedTiers"),ze(this,"defaultResponseGranularity"),ze(this,"dataGranularity"),ze(this,"isRelative"),ze(this,"_startCustom"),ze(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(t){return this._endCustom||new Date}rawStart(t){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(lt.MINUTELY),e>=2&&e<=7*24&&t.add(lt.HOURLY),e>=2*24&&t.add(lt.DAILY),e>=2*24*14&&t.add(lt.WEEKLY),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=yT(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return gT(e,t)}}class vT extends Re{rawStart(t){let e=ca(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=hi(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class xT extends Re{rawStart(t){let e=fi(this.tzAdjustedDate(t));return t&&(e=hi(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class wT extends Re{rawEnd(t){let e=ca(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=hi(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let i=ca(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(i=hi(i,t)),i}}class _T extends Re{rawEnd(t){let e=fi(this.tzAdjustedDate(t));return t&&(e=hi(e,t)),e}rawStart(t){let e=fi(Af(this.tzAdjustedDate(t),1));return t&&(e=hi(e,t)),e}}Ht.FIFTEEN_MIN,new Re({key:Ht.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:lt.MINUTELY,dataGranularity:lt.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.ONE_HOUR,new Re({key:Ht.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:lt.MINUTELY,dataGranularity:lt.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.SIX_HOUR,new Re({key:Ht.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.TWELVE_HOUR,new Re({key:Ht.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.ONE_DAY,new Re({key:Ht.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:lt.HOURLY,dataGranularity:lt.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Ht.SEVEN_DAY,new Re({key:Ht.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Ht.THIRTY_DAY,new Re({key:Ht.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Ht.CURRENT_WEEK,new vT({key:Ht.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=ca(new Date,{weekStartsOn:1});return(Rf(Ef(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.CURRENT_MONTH,new xT({key:Ht.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=fi(new Date);return(Rf(Ef(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.PREVIOUS_WEEK,new wT({key:Ht.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Ht.PREVIOUS_MONTH,new _T({key:Ht.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=fi(new Date),e=fi(Af(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=TT(t,e)),60*60*24*p1(new Date().setMonth(new Date().getMonth()-1))+g1(n)},defaultResponseGranularity:lt.DAILY,dataGranularity:lt.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function TT(n,t){return m1(n.getTimezoneOffset()-t.getTimezoneOffset())}function MT(n){const t=h.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:!at((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!at((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};Vr.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,f=n.tooltipState.height||this.height,p=u.width/2,b=u.height/2,x=Us(c,d,p);let g=Rw(c,f,b);const y=c.y<b?"top":"bottom",v=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:v,yAlign:y}};const r=h.computed(()=>{switch(n.granularity.value){case lt.MINUTELY:return"minute";case lt.HOURLY:return"hour";case lt.DAILY:return"day";default:return"day"}}),a=h.computed(()=>dw(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>[lt.DAILY,lt.WEEKLY].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.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=>{Fs(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function DT(n){const{isMultiMetric:t,hasDimensions:e,metricNames:i,barSegmentLabels:r,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=St.useI18n();return t?i.map(c=>({label:l&&l.te(`chartLabels.${c}`)&&l.t(`chartLabels.${c}`)||c,backgroundColor:ui(i.indexOf(c),Ce),data:s.map((u,d)=>e?a[`${u.id},${c}`]||0:a[`${d},${c}`]||null)})):Array.from(r).flatMap((c,u)=>{if(!c)return[];const d={},f=Array.isArray(o)?ui(u,o):o[c.name]||ui(u);return d[c.name]=f,{label:l&&l.te(`chartLabels.${c.name}`)&&l.t(`chartLabels.${c.name}`)||c.name,backgroundColor:f,data:s.map(p=>a[`${p.id},${c.id}`]||null)}})}function CT(n,t){const{i18n:e}=St.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!r.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?r.flatMap(m=>s.map((w,T)=>{const S=m.event[d],k=c?`${S},${w}`:`${T},${w}`,M=m.event[w];return[k,M]})):r.map(m=>{const w=c?`${m.event[d]},${m.event[f]}`:`${d},${f}`,T=m.event[s[0]];return[w,T]})),b=a[d],x=a[f],g=c&&b&&Object.entries(b).map(([m,w])=>({id:m,name:w.name}))||s.map(m=>({id:m,name:m})),y=c&&x&&Object.entries(x).map(([m,w])=>({id:m,name:w.name}))||s.map(m=>({id:m,name:m}));return!g||!y?{labels:[],datasets:[]}:{labels:c?Object.entries(a[d]).map(([,m])=>e&&e.te(`chartLabels.${m.name}`)&&e.t(`chartLabels.${m.name}`)||m.name):s.map(m=>e&&e.te(`chartLabels.${m}`)&&e.t(`chartLabels.${m}`)||m),datasets:DT({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:y,pivotRecords:p,rowLabels:g,colorPalette:n.colorPalette||Ce})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const ST=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((i,r)=>i+r*e),kT=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Kd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},OT=(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 ST(o,l,e)};function PT(n,t){const{i18n:e}=St.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const r=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;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=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!r.length)return{datasets:[],labels:[]};const b=kT(o),x=OT(o,l,p,b,r),g=new Set,y=r!=null&&r.length?r.reduce((T,S)=>{const k=new Date(S.timestamp).valueOf(),M=S.event;for(const D of s)g.add(D),k in T||(T[k]={}),D in T[k]||(T[k][D]={});for(const D of s)f.forEach(O=>{M[u]===O.id||D===O.id?(T[k][D]||(T[k][D]={}),T[k][D][O.name]=Math.round(Number(M[D])*1e3)/1e3):c.length||(T[k][D]||(T[k][D]={}),T[k][D][O.name]=Math.round(Number(M[O.id])*1e3)/1e3)});return T},{}):{},v=s.length===1?s.flatMap(T=>f.map(S=>[T,S.name])):f.map(T=>[T.name,T.name]),m={},w=[...v].map(([T,S],k)=>{const M=x.map(F=>F in y&&T in y[F]?{x:F,y:y[F][T][S]||0}:{x:F,y:0});let{colorPalette:D,fill:O}=n;at(D)&&(D=Ce);const P=Array.isArray(D)?ui(k,D):D[S]||ui(k),R=rr(P,50);return m[S]=P,{rawDimension:S,rawMetric:T,label:e&&e.te(`chartLabels.${S}`)&&e.t(`chartLabels.${S}`)||S,borderColor:R,backgroundColor:P,data:M,total:M.reduce((F,{y:q})=>F+Number(q),0),...G_,fill:O,borderWidth:O?Q_:K_}});return w.sort((T,S)=>Number(T.total)<Number(S.total)?-1:1),{datasets:w,colorMap:m}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const ET=(n,t)=>{h.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})};function RT(){const{i18n:n}=St.useI18n();return{translateUnit:(e,i)=>{const r=i===1,a=`chartUnits.${e}`;return n.te(a)?n.t(a,{plural:r?"":"s"}):e}}}const St={useBarChartOptions:t1,useChartJSCommon:n1,useChartLegendValues:r1,useChartSelectedRange:a1,useExploreResultToDatasets:CT,useExploreResultToTimeDataset:PT,useDoughnutChartOptions:s1,useLinechartOptions:MT,useI18n:_p,useReportChartDataForSynthetics:ET,useTranslatedUnits:RT};/*!
|
|
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 Jf={modes:{point(n,t){return da(n,t,{intersect:!0})},nearest(n,t,e){return IT(n,t,e)},x(n,t,e){return da(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return da(n,t,{intersect:e.intersect,axis:"y"})}}};function Cl(n,t,e){return(Jf.modes[e.mode]||Jf.modes.nearest)(n,t,e)}function AT(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 LT(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function da(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):AT(i,t,e.axis))}function IT(n,t,e){let i=Number.POSITIVE_INFINITY;return da(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=LT(t,s,e.axis),l=ti(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 NT=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,jn=.001,fa=(n,t,e)=>Math.min(e,Math.max(t,n));function FT(n,t,e){for(const i of Object.keys(n))n[i]=fa(n[i],t,e);return n}function UT(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 th(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-jn&&n.x<=i+o+jn,c=n.y>=e-o-jn&&n.y<=r+o+jn;return a==="x"?l:(a==="y"||l)&&c}function pi(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function BT(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(NT(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const eh=n=>typeof n=="string"&&n.endsWith("%"),nh=n=>parseFloat(n)/100,ih=n=>fa(nh(n),0,1),ha=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),YT={box:n=>ha(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ha(n.centerX,n.centerY),line:n=>ha(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ha(n.centerX,n.centerY)};function Sl(n,t){return t==="start"?0:t==="end"?n:eh(t)?ih(t)*n:n/2}function wn(n,t,e=!0){return typeof t=="number"?t:eh(t)?(e?ih(t):nh(t))*n:n}function WT(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 Dl(n,t="center"){return ct(n)?{x:it(n.x,t),y:it(n.y,t)}:(n=it(n,t),{x:n,y:n})}function rh(n){return n&&(fe(n.xValue)||fe(n.yValue))}function or(n,t,e){const i=e.init;if(i){if(i===!0)return sh(t,e)}else return;return zT(n,t,e)}function ah(n,t,e){let i=!1;return t.forEach(r=>{he(n[r])?(i=!0,e[r]=n[r]):fe(e[r])&&delete e[r]}),i}function sh(n,t){const e=t.type||"line";return YT[e](n)}function zT(n,t,e){const i=Mt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return sh(t,e);if(ct(i))return i}const kl=new Map,HT=n=>isNaN(n)||n<=0,$T=n=>n.reduce(function(t,e){return t+=e.string,t},"");function pa(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Ol(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Gt(i)),n.translate(-t,-e))}function _n(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 gi(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Pl(n,t){const e=t.content;if(pa(e))return{width:wn(e.width,t.width),height:wn(e.height,t.height)};const i=t.font,r=yt(i)?i.map(l=>At(l)):[At(i)],a=t.textStrokeWidth,s=yt(e)?e:[e],o=s.join()+$T(r)+a+(n._measureText?"-spriting":"");return kl.has(o)||kl.set(o,GT(n,s,r,a)),kl.get(o)}function oh(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),gi(n,e);const o=_n(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),ei(n,{x:i,y:r,w:a,h:s,radius:FT(hn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function jT(n,t,e){const i=e.content;if(pa(i)){n.save(),n.globalAlpha=ZT(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=yt(i)?i:[i],a=e.font,s=yt(a)?a.map(d=>At(d)):[At(a)],o=e.color,l=yt(o)?o:[o],c=WT(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,VT(n,e)&&KT(n,{x:c,y:u},r,s),QT(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function VT(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function qT(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ya;if(pa(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}HT(r)||XT(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function XT(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,Ot),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=wr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=wr,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+Me)*c,l=Math.sin(s+Me)*c,n.arc(t-o,e-l,u,s-ft,s-Rt),n.arc(t+l,e-o,u,s-Rt,s),n.arc(t+o,e+l,u,s,s+Rt),n.arc(t-l,e+o,u,s+Rt,s+ft),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=Me;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+=Me;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+=Me,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 GT(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 KT(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 QT(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 ZT(n,t){const e=fn(n)?n:t;return fn(e)?fa(e,0,1):1}const lh={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 mi(n,t,e){return t=typeof t=="number"?t:n.parse(t),Nt(t)?n.getPixelForValue(t):e}function Vn(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 ch(n,t){if(n){const e=n.options.reverse,i=mi(n,t.min,e?t.end:t.start),r=mi(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function uh(n,t){const{chartArea:e,scales:i}=n,r=i[Vn(i,t,"xScaleID")],a=i[Vn(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=mi(r,t.xValue,r.left+r.width/2)),a&&(o=mi(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function El(n,t){const e=n.scales,i=e[Vn(e,t,"xScaleID")],r=e[Vn(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=hh(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=hh(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 dh(n,t){if(!rh(t)){const e=El(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 tM(n,t)}function JT(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?eM(r,a,t):nM(e,a,t),a}function fh(n,t){const e=El(n,t);return e.initProperties=or(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:aM(n,e,t),initProperties:e.initProperties}],e}function tM(n,t){const e=uh(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 hh(n,t){const e=ch(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function eM(n,t,e){const i=mi(n,e.value,NaN),r=mi(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function nM(n,t,e){for(const i of Object.keys(lh)){const r=n[Vn(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=lh[i],d=ch(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function iM({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return ph({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 rM({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return ph({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 ph(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+Sl(c,a)}function aM(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Dl(i.position),a=Kt(i.padding),s=Pl(n.ctx,i),o=iM({properties:t,options:e},s,r,a),l=rM({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 qn(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 Rl=["enter","leave"],Al=Rl.concat("click");function sM(n,t,e){t.listened=ah(e,Al,t.listeners),t.moveListened=!1,t._getElements=Cl,Rl.forEach(i=>{he(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&he(i.click)&&(t.listened=!0),t.moveListened||Rl.forEach(r=>{he(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function oM(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return lM(n,t,e);case"click":return cM(n,t,e)}}function lM(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Cl(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=gh(a,"leave",r,i);return gh(a,"enter",i,r)||s}function gh({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=mh(s.options[e]||n.listeners[e],s,t)||a);return a}function cM(n,t,e){const i=n.listeners,r=Cl(n,t,e.interaction);let a;for(const s of r)a=mh(s.options.click||i.click,s,t)||a;return a}function mh(n,t,e){return Mt(n,[t.$context,e])===!0}const ga=["afterDraw","beforeDraw"];function uM(n,t,e){const i=t.visibleElements;t.hooked=ah(e,ga,t.hooks),t.hooked||i.forEach(r=>{t.hooked||ga.forEach(a=>{he(r.options[a])&&(t.hooked=!0)})})}function yh(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return Mt(i,[t.$context])}}function dM(n,t,e){const i=mM(n.scales,t,e);let r=bh(t,i,"min","suggestedMin");r=bh(t,i,"max","suggestedMax")||r,r&&he(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function fM(n,t){for(const e of n)pM(e,t)}function bh(n,t,e,i){if(Nt(t[e])&&!hM(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function hM(n,t,e){return fe(n[t])||fe(n[e])}function pM(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Vn(t,n,e);i&&!t[i]&&gM(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function gM(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(fe(n[e+i]))return!0;return!1}function mM(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:it(t.min,Number.NEGATIVE_INFINITY),max:it(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?vh(o,t,["value","endValue"],s):Vn(n,o,a)===r&&vh(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function vh(n,t,e,i){for(const r of e){const a=n[r];if(fe(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class yi extends ee{inRange(t,e,i,r){const{x:a,y:s}=qn({x:t,y:e},this.getCenterPoint(r),Gt(-this.options.rotation));return th({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return pi(this,t)}draw(t){t.save(),Ol(t,this.getCenterPoint(),this.options.rotation),oh(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return fh(t,e)}}yi.id="boxAnnotation",yi.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},yi.defaultRoutes={borderColor:"color",backgroundColor:"color"},yi.descriptors={label:{_fallback:!0}};const xh=["left","bottom","top","right"];class lr extends ee{inRange(t,e,i,r){const{x:a,y:s}=qn({x:t,y:e},this.getCenterPoint(r),Gt(-this.rotation));return th({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return pi(this,t)}draw(t){const e=this.options,i=!fe(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),Ol(t,this.getCenterPoint(),this.rotation),bM(t,this),oh(t,this,e),jT(t,CM(this),e),t.restore())}resolveElementProperties(t,e){let i;if(rh(e))i=uh(t,e);else{const{centerX:o,centerY:l}=El(t,e);i={x:o,y:l}}const r=Kt(e.padding),a=Pl(t.ctx,e),s=yM(i,a,e,r);return{initProperties:or(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}lr.id="labelAnnotation",lr.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},lr.defaultRoutes={borderColor:"color"};function yM(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=Dl(e.position,"center"),o=wh(n.x,r,e.xAdjust,s.x),l=wh(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 wh(n,t,e=0,i){return n-Sl(t,i)+e}function bM(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&TM(t,a);if(!s||SM(t,a,s))return;if(n.save(),n.beginPath(),!_n(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=vM(t,s),{sideStart:u,sideEnd:d}=wM(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 f=qn({x:e,y:i},t.getCenterPoint(),Gt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function vM(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=xM(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 xM(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 wM(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=_M(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+wn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+wn(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function _M(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function TM(n,t){const e=t.position;return xh.includes(e)?e:MM(n,t)}function MM(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},b=t.start,x=wn(s,b),g=wn(o,b),y=[e,e+x,e+x,r],v=[i+g,a,i,a],m=[];for(let w=0;w<4;w++){const T=qn({x:y[w],y:v[w]},p,Gt(f));m.push({position:xh[w],distance:ti(T,{x:l,y:c})})}return m.sort((w,T)=>w.distance-T.distance)[0].position}function CM({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=Kt(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 SM(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 Ll=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Il=(n,t,e)=>Ll(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,_h=(n,t,e)=>Ll(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,cr=n=>n*n,DM=(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},Th=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Nl=(n,t,e,i)=>({x:Th(n.x,t.x,e.x,i),y:Th(n.y,t.y,e.y,i)}),Mh=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Ch=(n,t,e,i)=>-Math.atan2(Mh(n.x,t.x,e.x,i),Mh(n.y,t.y,e.y,i))+.5*ft;class ur extends ee{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){_n(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Fl(this,s,r);return l.restore(),p}const c=cr(a);return EM(this,s,c,r)||Fl(this,s,r)}return kM(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return pi(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!_n(t,o))return t.restore();gi(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return BM(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Ph(this),p=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),Ul(t,0,d,c),Ul(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=JT(t,e),{x:r,y:a,x2:s,y2:o}=i,l=OM(i,t.chartArea),c=l?PM({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=or(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=UM(c,e,ti(d,f))}const u=RM(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}ur.id="lineAnnotation";const Sh={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};ur.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Sh),fill:!1,length:12,start:Object.assign({},Sh),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({},lr.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},ur.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},ur.defaultRoutes={borderColor:"color"};function kM(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=DM(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||Fl(n,{mouseX:t,mouseY:e},a,i)}function OM({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 Dh({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=_h(s,{x:n,y:t},e),n=s),n>r&&(t=_h(r,{x:n,y:t},e),n=r),t<i&&(n=Il(i,{x:n,y:t},e),t=i),t>a&&(n=Il(a,{x:n,y:t},e),t=a),{x:n,y:t}}function PM(n,t,e){const{x:i,y:r}=Dh(n,t,e),{x:a,y:s}=Dh(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function EM(n,{mouseX:t,mouseY:e},i=jn,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=cr(c)+cr(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,b;return f<0?(p=a,b=s):f>1?(p=o,b=l):(p=a+f*c,b=s+f*u),cr(t-p)+cr(e-b)<=i}function Fl(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function RM(n,t,e){const i=e.borderWidth,r=Kt(e.padding),a=Pl(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return LM(t,e,{width:s,height:o,padding:r},n.chartArea)}function AM(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>ft/2?a-ft:a<ft/-2?a+ft:a}function LM(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"?AM(n):Gt(t.rotation),f=IM(r,a,d),p=NM(n,t,{labelSize:f,padding:s},i),b=n.cp?Nl(c,n.cp,u,p):Ll(c,u,p),x={size:f.w,min:i.left,max:i.right,padding:s.left},g={size:f.h,min:i.top,max:i.bottom,padding:s.top},y=Oh(b.x,x)+o,v=Oh(b.y,g)+l;return{x:y-r/2,y:v-a/2,x2:y+r/2,y2:v+a/2,centerX:y,centerY:v,pointX:b.x,pointY:b.y,width:r,height:a,rotation:_r(d)}}function IM(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 NM(n,t,e,i){let r;const a=FM(n,i);return t.position==="start"?r=kh({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-kh({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=Sl(1,t.position),r}function kh(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 fa(Math.max(l,c),0,.25)}function FM(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 Oh(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 Ph(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Eh(n,e),endAdjust:Eh(n,i)}}function Eh(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(Il(0,a,{x:0,y:r}))}function Ul(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(),gi(n,i),_n(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 UM(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=Dl(t.controlPoint,0),d={x:o+wn(e,u.x,!1),y:l+wn(e,u.y,!1)};return qn(d,{x:o,y:l},c)}function Rh(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),Ul(n,0,-r,a),n.restore())}function BM(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Ph(t),p={x:r,y:a},b={x:s,y:o},x=Ch(p,e,b,0),g=Ch(p,e,b,1)-ft,y=Nl(p,e,b,d/i),v=Nl(p,e,b,1-f/i),m=new Path2D;n.beginPath(),m.moveTo(y.x,y.y),m.quadraticCurveTo(e.x,e.y,v.x,v.y),n.shadowColor=l.borderShadowColor,n.stroke(m),t.path=m,t.ctx=n,Rh(n,y,{angle:x,adjust:d},c),Rh(n,v,{angle:g,adjust:f},u)}class dr extends ee{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return YM({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,f=i==="y"?{start:l,end:u}:{start:o,end:c},p=qn({x:t,y:e},this.getCenterPoint(r),Gt(-a));return p[i]>=f.start-d-jn&&p[i]<=f.end+d+jn}getCenterPoint(t){return pi(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Ol(t,this.getCenterPoint(),s.rotation),gi(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=_n(t,s);t.ellipse(r,a,i/2,e/2,ft/2,0,2*ft),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return fh(t,e)}}dr.id="ellipseAnnotation",dr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},yi.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},dr.defaultRoutes={borderColor:"color",backgroundColor:"color"},dr.descriptors={label:{_fallback:!0}};function YM(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=Gt(e||0),d=i/2||0,f=Math.cos(u),p=Math.sin(u),b=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return b/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class ma extends ee{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 UT({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,f=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return pi(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,gi(t,e);const r=_n(t,e);qT(t,this,this.centerX,this.centerY),r&&!pa(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=dh(t,e);return i.initProperties=or(t,i,e),i}}ma.id="pointAnnotation",ma.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},ma.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ya extends ee{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&zM(this.elements,t,e,r);const a=qn({x:t,y:e},this.getCenterPoint(r),Gt(-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 pi(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,gi(t,i);const r=_n(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=dh(t,e),{sides:r,rotation:a}=e,s=[],o=2*ft/r;let l=a*Ya;for(let c=0;c<r;c++,l+=o){const u=WM(i,e,l);u.initProperties=or(t,i,e),s.push(u)}return i.elements=s,i}}ya.id="polygonAnnotation",ya.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},ya.defaultRoutes={borderColor:"color",backgroundColor:"color"};function WM({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 zM(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 Tn={box:yi,ellipse:dr,label:lr,line:ur,point:ma,polygon:ya};Object.keys(Tn).forEach(n=>{Bt.describe(`elements.${Tn[n].id}`,{_fallback:"plugins.annotation.common"})});const HM={update:Object.assign},$M=Al.concat(ga),Ah=(n,t)=>ct(t)?Wl(n,t):n,Bl=n=>n==="color"||n==="font";function Yl(n="line"){return Tn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function jM(n,t,e,i){const r=qM(n,e.animations,i),a=t.annotations,s=KM(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Lh(s,o,l.type),u=l.setContext(GM(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=VM(d),"elements"in d&&(XM(c,d.elements,u,r),delete d.elements),fe(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Ih(u),r.update(c,d)}}function VM(n){return isNaN(n.x)||isNaN(n.y)}function qM(n,t,e){return e==="reset"||e==="none"||e==="resize"?HM:new ts(n,t)}function XM(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=Lh(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=Ih(c),i.update(l,o)}}function Lh(n,t,e,i){const r=Tn[Yl(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function Ih(n){const t=Tn[Yl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Wl(n,t.defaults),Wl(n,t.defaultRoutes));for(const i of $M)e[i]=n[i];return e}function Wl(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];Bl(i)&&yt(a)?e[i]=a.map(s=>Ah(s,r)):e[i]=Ah(a,r)}return e}function GM(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function KM(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 QM="3.0.1";const Mn=new Map,ZM=Al.concat(ga);var Nh={id:"annotation",version:QM,beforeRegister(){BT("chart.js","4.0",Ce.version)},afterRegister(){Ce.register(Tn)},afterUnregister(){Ce.unregister(Tn)},beforeInit(n){Mn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=Mn.get(n),r=i.annotations=[];let a=e.annotations;ct(a)?Object.keys(a).forEach(s=>{const o=a[s];ct(o)&&(o.id=s,r.push(o))}):yt(a)&&r.push(...a),fM(r,n.scales)},afterDataLimits(n,t){const e=Mn.get(n);dM(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=Mn.get(n);sM(n,i,e),jM(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),uM(n,i,e)},beforeDatasetsDraw(n,t,e){ba(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ba(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ba(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ba(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=Mn.get(n);oM(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){Mn.delete(n)},_getState(n){return Mn.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=>!ZM.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Tn[Yl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Bl,_fallback:!0},_indexable:Bl}},additionalOptionScopes:[""]};function ba(n,t,e){const{ctx:i,chartArea:r}=n,a=Mn.get(n);e&&Ei(i,r);const s=JM(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)tC(i,r,a,o);e&&Ri(i)}function JM(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 tC(n,t,e,i){const r=i.element;i.main?(yh(e,r,"beforeDraw"),r.draw(n,t),yh(e,r,"afterDraw")):r.draw(n,t)}const va="24px",Fh=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},eC=n=>(h.pushScopeId("data-v-195368ff"),n=n(),h.popScopeId(),n),nC=["aria-hidden"],iC={key:0,"data-testid":"kui-icon-svg-title"},rC=eC(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),aC=h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:va,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return va}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",iC,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),rC],8,nC))]),_:1},8,["aria-hidden","style"]))}}),sC=Fh(aC,[["__scopeId","data-v-195368ff"]]),oC=n=>(h.pushScopeId("data-v-d7b122fd"),n=n(),h.popScopeId(),n),lC=["aria-hidden"],cC={key:0,"data-testid":"kui-icon-svg-title"},uC=oC(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),dC=h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:va,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return va}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",cC,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),uC],8,lC))]),_:1},8,["aria-hidden","style"]))}}),fC=Fh(dC,[["__scopeId","data-v-d7b122fd"]]),hC="#6c7489",pC="#995c00",gC="20px",Uh="24px",mC="40px",yC="48px",bC={class:"tooltip-title"},vC={class:"title font-bold"},xC={key:1,class:"subtitle"},wC={class:"tooltip"},_C={key:0},TC={class:"display-label"},MC={class:"display-value"},CC=h.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=t,i=n,r=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(r,p=>{if(p){const{width:b,height:x}=p.getBoundingClientRect();e("dimensions",{width:b,height:x})}}),h.watch(()=>i.locked,p=>{p?(l.value.left=i.left,l.value.top=i.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(r.value){a.value=!0;const b=window.getComputedStyle(r.value),x=b.transform||b.webkitTransform||b.mozTransform,g=new DOMMatrix(x),y=g.m41,v=g.m42;s.value={x:y,y:v},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const b=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+b}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,b)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:r,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",bC,[h.createElementVNode("span",vC,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(sC),{key:0,class:"drag-icon",color:h.unref(hC)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",xC,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",wC,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:y,value:v})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:y},[n.series.length?(h.openBlock(),h.createElementBlock("li",_C,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",TC,h.toDisplayString(y),1),h.createElementVNode("span",MC,h.toDisplayString(v),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Je=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},zl=Je(CC,[["__scopeId","data-v-d8d2d0cd"]]),SC=["onClick"],DC=["title"],kC={key:0,class:"sub-label"},Hl=Je(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(m=>({"1c6c065c":o.value}));const t=n,e=h.ref(),i=h.ref([]),r=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(Uh),l=()=>{const m=e.value;if(!m||!i.value||m.children.length===0)return 0;const w=m.children[0].getBoundingClientRect().top;for(const T of i.value)if(T.getBoundingClientRect().top>w)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=yC:o.value=Uh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let m=0;i.value.forEach(T=>{const D=Array.from(T.children).reduce((k,M)=>k+M.offsetWidth,0);D>m&&(m=D)});const w=parseInt(mC,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${m+w}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let m=0;m<t.items.length;m++)if(t.items[m].text!==s.value[m].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),b=h.ref(0),x=new ResizeObserver(Zd(m=>{const w=m[0],T=w.contentRect.width,D=w.contentRect.height;T!==p.value&&D===b.value&&d(),p.value=T,b.value=D},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(m=0,w)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof Ce?t.chartInstance:t.chartInstance.chart;y(m,w)?T.hide(m,w):T.show(m,w),T.update()},y=(m=0,w)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof Ce?t.chartInstance:t.chartInstance.chart,D=T.getDatasetMeta(m);return D.dataset||w===void 0?T.isDatasetVisible(m):!(D.data.length&&D.data[w].hidden)},v=m=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[m];return(m,w)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",v(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:D,text:k,datasetIndex:M,index:C,value:O})=>(h.openBlock(),h.createElementBlock("li",{key:k,ref_for:!0,ref_key:"legendItemsRef",ref:i,onClick:P=>g(M,C)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:T,"border-color":D})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!y(M,C)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:k},h.toDisplayString(k),11,DC),O&&h.unref(r)?(h.openBlock(),h.createElementBlock("div",kC,h.toDisplayString(O.formatted),1)):h.createCommentVNode("",!0)],2)],8,SC))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-554b4d9c"]]);let xa;const OC=new Uint8Array(16);function PC(){if(!xa&&(xa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xa(OC)}const ie=[];for(let n=0;n<256;++n)ie.push((n+256).toString(16).slice(1));function EC(n,t=0){return ie[n[t+0]]+ie[n[t+1]]+ie[n[t+2]]+ie[n[t+3]]+"-"+ie[n[t+4]]+ie[n[t+5]]+"-"+ie[n[t+6]]+ie[n[t+7]]+"-"+ie[n[t+8]]+ie[n[t+9]]+"-"+ie[n[t+10]]+ie[n[t+11]]+ie[n[t+12]]+ie[n[t+13]]+ie[n[t+14]]+ie[n[t+15]]}const Bh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Cn(n,t,e){if(Bh.randomUUID&&!t&&!n)return Bh.randomUUID();n=n||{};const i=n.random||(n.rng||PC)();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 EC(i)}const Yh=(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()},Wh={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&Yh(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,Yh(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)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},zh=6,RC="100%",AC="100%",LC=20,IC=20,Hh=6,NC=0,FC=10,UC=10,BC=1,YC=Je(h.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:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=Dt.useI18n(),{translateUnit:i}=Dt.useTranslatedUnits(),r=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Z_()),content:X=>Ro(a(X,U),j)},Q={...N,content:X=>Of(a(X,U),kf(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?Df(Ro(a(X,U),j)):0,color:Cf};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Cn()),u=Cn(),d=Cn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),b=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),y=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:i,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ne.HORIZONTAL_BAR:ne.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),v=h.ref(0),m=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},w={id:c.value,afterUpdate(L){v.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?m():{}}},M=[w,{id:"axisHover",afterEvent(L,U){if(b.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(y.locked||(y.showTooltip=!1),N.length>oa){const X=L.canvas.getContext("2d").measureText(N).width,vt=Math.abs(Math.round(j.x-X*.5)),ut=Math.round(j.x+X*.5);b.value.left=Z==="x"?`${(vt>0?vt:ut)-b.value.offset}px`:`${j.x-X*.5-b.value.offset}px`,b.value.top=`${j.y-50}px`,b.value.show=!0,b.value.text=N}else b.value.show=!1;else b.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},Wh,...t.annotations?[T]:[]],C=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),O=h.ref(0),P=h.ref(0),R=new ResizeObserver(Zd(L=>{O.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(LC+Hh),O.value)}px`:RC}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(IC+Hh),P.value)}px`:AC});Dt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Ce.register(Nh),r.value&&(O.value=r.value.offsetWidth,P.value=r.value.offsetHeight,R.observe(r.value))}),h.onUnmounted(()=>{r.value&&R.unobserve(r.value)});const $=h.computed(()=>{const L=Dt.useBarChartOptions({tooltipState:y,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:C});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:m(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*zh}}}}),z=Dt.useChartJSCommon("bar",o,h.toRef(t,"chartData"),M,$),I=h.computed(()=>{v.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=z.value?kf(z.value,t.chartData):J_(t.chartData);return j.map(N=>Df(Ro(N,x.value)+Of(N,Z))).reduce((N,A)=>Math.max(N,A),0)+zh});h.onBeforeUnmount(()=>{Ce.unregister(Nh)});const rt={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&z.value){const L=window.devicePixelRatio,U=z.value,j=U.scales.y.width*L+BC,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),bt=L=>{const U=L.target;if(B.value&&z.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=z.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=NC&&U.scrollLeft<=FC?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+UC)*j,K,A.scales.x.height*j))}y.offsetY=U.scrollTop,y.offsetX=U.scrollLeft,b.value.offset=U.scrollLeft},dt=({width:L,height:U})=>{y.width=L,y.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}y.showTooltip=!1,y.locked=!1}),h.watch(()=>t.annotations,L=>{z.value&&(L?z.value.options.plugins.annotation.annotations=m(t.chartData):delete z.value.options.plugins.annotation.annotations)});const W=()=>{y.showTooltip&&(y.locked=!y.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",rt[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:r,class:"chart-container","on:scroll":bt,onClick:U[0]||(U[0]=j=>W())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),b.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:b.value.top,left:b.value.left})},h.toDisplayString(b.value.text),5)):h.createCommentVNode("",!0),h.createVNode(zl,{context:y.tooltipContext,left:y.left,locked:y.locked,series:y.tooltipSeries,"show-tooltip":y.showTooltip,"tooltip-title":n.tooltipTitle,top:y.top,onDimensions:dt},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Hl,{id:c.value,"chart-instance":h.unref(z),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-fdeee739"]]);/*!
|
|
24
|
+
*/const Jf={modes:{point(n,t){return da(n,t,{intersect:!0})},nearest(n,t,e){return IT(n,t,e)},x(n,t,e){return da(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return da(n,t,{intersect:e.intersect,axis:"y"})}}};function Dl(n,t,e){return(Jf.modes[e.mode]||Jf.modes.nearest)(n,t,e)}function AT(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 LT(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function da(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):AT(i,t,e.axis))}function IT(n,t,e){let i=Number.POSITIVE_INFINITY;return da(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=LT(t,s,e.axis),l=ti(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 NT=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,jn=.001,fa=(n,t,e)=>Math.min(e,Math.max(t,n));function FT(n,t,e){for(const i of Object.keys(n))n[i]=fa(n[i],t,e);return n}function UT(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 th(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-jn&&n.x<=i+o+jn,c=n.y>=e-o-jn&&n.y<=r+o+jn;return a==="x"?l:(a==="y"||l)&&c}function pi(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function BT(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(NT(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const eh=n=>typeof n=="string"&&n.endsWith("%"),nh=n=>parseFloat(n)/100,ih=n=>fa(nh(n),0,1),ha=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),YT={box:n=>ha(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ha(n.centerX,n.centerY),line:n=>ha(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ha(n.centerX,n.centerY)};function Cl(n,t){return t==="start"?0:t==="end"?n:eh(t)?ih(t)*n:n/2}function wn(n,t,e=!0){return typeof t=="number"?t:eh(t)?(e?ih(t):nh(t))*n:n}function WT(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 Sl(n,t="center"){return ct(n)?{x:it(n.x,t),y:it(n.y,t)}:(n=it(n,t),{x:n,y:n})}function rh(n){return n&&(fe(n.xValue)||fe(n.yValue))}function or(n,t,e){const i=e.init;if(i){if(i===!0)return sh(t,e)}else return;return zT(n,t,e)}function ah(n,t,e){let i=!1;return t.forEach(r=>{he(n[r])?(i=!0,e[r]=n[r]):fe(e[r])&&delete e[r]}),i}function sh(n,t){const e=t.type||"line";return YT[e](n)}function zT(n,t,e){const i=Mt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return sh(t,e);if(ct(i))return i}const kl=new Map,HT=n=>isNaN(n)||n<=0,$T=n=>n.reduce(function(t,e){return t+=e.string,t},"");function pa(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Ol(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Gt(i)),n.translate(-t,-e))}function _n(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 gi(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Pl(n,t){const e=t.content;if(pa(e))return{width:wn(e.width,t.width),height:wn(e.height,t.height)};const i=t.font,r=yt(i)?i.map(l=>At(l)):[At(i)],a=t.textStrokeWidth,s=yt(e)?e:[e],o=s.join()+$T(r)+a+(n._measureText?"-spriting":"");return kl.has(o)||kl.set(o,GT(n,s,r,a)),kl.get(o)}function oh(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),gi(n,e);const o=_n(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),ei(n,{x:i,y:r,w:a,h:s,radius:FT(hn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function jT(n,t,e){const i=e.content;if(pa(i)){n.save(),n.globalAlpha=ZT(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=yt(i)?i:[i],a=e.font,s=yt(a)?a.map(d=>At(d)):[At(a)],o=e.color,l=yt(o)?o:[o],c=WT(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,VT(n,e)&&KT(n,{x:c,y:u},r,s),QT(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function VT(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function qT(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ya;if(pa(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}HT(r)||XT(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function XT(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,Ot),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=wr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=wr,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+Me)*c,l=Math.sin(s+Me)*c,n.arc(t-o,e-l,u,s-ft,s-Rt),n.arc(t+l,e-o,u,s-Rt,s),n.arc(t+o,e+l,u,s,s+Rt),n.arc(t-l,e+o,u,s+Rt,s+ft),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=Me;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+=Me;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+=Me,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 GT(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 KT(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 QT(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 ZT(n,t){const e=fn(n)?n:t;return fn(e)?fa(e,0,1):1}const lh={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 mi(n,t,e){return t=typeof t=="number"?t:n.parse(t),Nt(t)?n.getPixelForValue(t):e}function Vn(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 ch(n,t){if(n){const e=n.options.reverse,i=mi(n,t.min,e?t.end:t.start),r=mi(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function uh(n,t){const{chartArea:e,scales:i}=n,r=i[Vn(i,t,"xScaleID")],a=i[Vn(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=mi(r,t.xValue,r.left+r.width/2)),a&&(o=mi(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function El(n,t){const e=n.scales,i=e[Vn(e,t,"xScaleID")],r=e[Vn(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=hh(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=hh(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 dh(n,t){if(!rh(t)){const e=El(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 tM(n,t)}function JT(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?eM(r,a,t):nM(e,a,t),a}function fh(n,t){const e=El(n,t);return e.initProperties=or(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:aM(n,e,t),initProperties:e.initProperties}],e}function tM(n,t){const e=uh(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 hh(n,t){const e=ch(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function eM(n,t,e){const i=mi(n,e.value,NaN),r=mi(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function nM(n,t,e){for(const i of Object.keys(lh)){const r=n[Vn(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=lh[i],d=ch(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function iM({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return ph({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 rM({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return ph({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 ph(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+Cl(c,a)}function aM(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Sl(i.position),a=Kt(i.padding),s=Pl(n.ctx,i),o=iM({properties:t,options:e},s,r,a),l=rM({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 qn(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 Rl=["enter","leave"],Al=Rl.concat("click");function sM(n,t,e){t.listened=ah(e,Al,t.listeners),t.moveListened=!1,t._getElements=Dl,Rl.forEach(i=>{he(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&he(i.click)&&(t.listened=!0),t.moveListened||Rl.forEach(r=>{he(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function oM(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return lM(n,t,e);case"click":return cM(n,t,e)}}function lM(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Dl(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=gh(a,"leave",r,i);return gh(a,"enter",i,r)||s}function gh({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=mh(s.options[e]||n.listeners[e],s,t)||a);return a}function cM(n,t,e){const i=n.listeners,r=Dl(n,t,e.interaction);let a;for(const s of r)a=mh(s.options.click||i.click,s,t)||a;return a}function mh(n,t,e){return Mt(n,[t.$context,e])===!0}const ga=["afterDraw","beforeDraw"];function uM(n,t,e){const i=t.visibleElements;t.hooked=ah(e,ga,t.hooks),t.hooked||i.forEach(r=>{t.hooked||ga.forEach(a=>{he(r.options[a])&&(t.hooked=!0)})})}function yh(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return Mt(i,[t.$context])}}function dM(n,t,e){const i=mM(n.scales,t,e);let r=bh(t,i,"min","suggestedMin");r=bh(t,i,"max","suggestedMax")||r,r&&he(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function fM(n,t){for(const e of n)pM(e,t)}function bh(n,t,e,i){if(Nt(t[e])&&!hM(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function hM(n,t,e){return fe(n[t])||fe(n[e])}function pM(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Vn(t,n,e);i&&!t[i]&&gM(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function gM(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(fe(n[e+i]))return!0;return!1}function mM(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:it(t.min,Number.NEGATIVE_INFINITY),max:it(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?vh(o,t,["value","endValue"],s):Vn(n,o,a)===r&&vh(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function vh(n,t,e,i){for(const r of e){const a=n[r];if(fe(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class yi extends ee{inRange(t,e,i,r){const{x:a,y:s}=qn({x:t,y:e},this.getCenterPoint(r),Gt(-this.options.rotation));return th({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return pi(this,t)}draw(t){t.save(),Ol(t,this.getCenterPoint(),this.options.rotation),oh(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return fh(t,e)}}yi.id="boxAnnotation",yi.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},yi.defaultRoutes={borderColor:"color",backgroundColor:"color"},yi.descriptors={label:{_fallback:!0}};const xh=["left","bottom","top","right"];class lr extends ee{inRange(t,e,i,r){const{x:a,y:s}=qn({x:t,y:e},this.getCenterPoint(r),Gt(-this.rotation));return th({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return pi(this,t)}draw(t){const e=this.options,i=!fe(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),Ol(t,this.getCenterPoint(),this.rotation),bM(t,this),oh(t,this,e),jT(t,DM(this),e),t.restore())}resolveElementProperties(t,e){let i;if(rh(e))i=uh(t,e);else{const{centerX:o,centerY:l}=El(t,e);i={x:o,y:l}}const r=Kt(e.padding),a=Pl(t.ctx,e),s=yM(i,a,e,r);return{initProperties:or(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}lr.id="labelAnnotation",lr.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},lr.defaultRoutes={borderColor:"color"};function yM(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=Sl(e.position,"center"),o=wh(n.x,r,e.xAdjust,s.x),l=wh(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 wh(n,t,e=0,i){return n-Cl(t,i)+e}function bM(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&TM(t,a);if(!s||CM(t,a,s))return;if(n.save(),n.beginPath(),!_n(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=vM(t,s),{sideStart:u,sideEnd:d}=wM(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 f=qn({x:e,y:i},t.getCenterPoint(),Gt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function vM(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=xM(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 xM(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 wM(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=_M(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+wn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+wn(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function _M(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function TM(n,t){const e=t.position;return xh.includes(e)?e:MM(n,t)}function MM(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},b=t.start,x=wn(s,b),g=wn(o,b),y=[e,e+x,e+x,r],v=[i+g,a,i,a],m=[];for(let w=0;w<4;w++){const T=qn({x:y[w],y:v[w]},p,Gt(f));m.push({position:xh[w],distance:ti(T,{x:l,y:c})})}return m.sort((w,T)=>w.distance-T.distance)[0].position}function DM({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=Kt(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 CM(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 Ll=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Il=(n,t,e)=>Ll(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,_h=(n,t,e)=>Ll(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,cr=n=>n*n,SM=(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},Th=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Nl=(n,t,e,i)=>({x:Th(n.x,t.x,e.x,i),y:Th(n.y,t.y,e.y,i)}),Mh=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Dh=(n,t,e,i)=>-Math.atan2(Mh(n.x,t.x,e.x,i),Mh(n.y,t.y,e.y,i))+.5*ft;class ur extends ee{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){_n(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Fl(this,s,r);return l.restore(),p}const c=cr(a);return EM(this,s,c,r)||Fl(this,s,r)}return kM(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return pi(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!_n(t,o))return t.restore();gi(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return BM(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Ph(this),p=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),Ul(t,0,d,c),Ul(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=JT(t,e),{x:r,y:a,x2:s,y2:o}=i,l=OM(i,t.chartArea),c=l?PM({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=or(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=UM(c,e,ti(d,f))}const u=RM(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}ur.id="lineAnnotation";const Ch={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};ur.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Ch),fill:!1,length:12,start:Object.assign({},Ch),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({},lr.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},ur.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},ur.defaultRoutes={borderColor:"color"};function kM(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=SM(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||Fl(n,{mouseX:t,mouseY:e},a,i)}function OM({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 Sh({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=_h(s,{x:n,y:t},e),n=s),n>r&&(t=_h(r,{x:n,y:t},e),n=r),t<i&&(n=Il(i,{x:n,y:t},e),t=i),t>a&&(n=Il(a,{x:n,y:t},e),t=a),{x:n,y:t}}function PM(n,t,e){const{x:i,y:r}=Sh(n,t,e),{x:a,y:s}=Sh(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function EM(n,{mouseX:t,mouseY:e},i=jn,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=cr(c)+cr(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,b;return f<0?(p=a,b=s):f>1?(p=o,b=l):(p=a+f*c,b=s+f*u),cr(t-p)+cr(e-b)<=i}function Fl(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function RM(n,t,e){const i=e.borderWidth,r=Kt(e.padding),a=Pl(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return LM(t,e,{width:s,height:o,padding:r},n.chartArea)}function AM(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>ft/2?a-ft:a<ft/-2?a+ft:a}function LM(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"?AM(n):Gt(t.rotation),f=IM(r,a,d),p=NM(n,t,{labelSize:f,padding:s},i),b=n.cp?Nl(c,n.cp,u,p):Ll(c,u,p),x={size:f.w,min:i.left,max:i.right,padding:s.left},g={size:f.h,min:i.top,max:i.bottom,padding:s.top},y=Oh(b.x,x)+o,v=Oh(b.y,g)+l;return{x:y-r/2,y:v-a/2,x2:y+r/2,y2:v+a/2,centerX:y,centerY:v,pointX:b.x,pointY:b.y,width:r,height:a,rotation:_r(d)}}function IM(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 NM(n,t,e,i){let r;const a=FM(n,i);return t.position==="start"?r=kh({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-kh({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=Cl(1,t.position),r}function kh(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 fa(Math.max(l,c),0,.25)}function FM(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 Oh(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 Ph(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Eh(n,e),endAdjust:Eh(n,i)}}function Eh(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(Il(0,a,{x:0,y:r}))}function Ul(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(),gi(n,i),_n(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 UM(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=Sl(t.controlPoint,0),d={x:o+wn(e,u.x,!1),y:l+wn(e,u.y,!1)};return qn(d,{x:o,y:l},c)}function Rh(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),Ul(n,0,-r,a),n.restore())}function BM(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Ph(t),p={x:r,y:a},b={x:s,y:o},x=Dh(p,e,b,0),g=Dh(p,e,b,1)-ft,y=Nl(p,e,b,d/i),v=Nl(p,e,b,1-f/i),m=new Path2D;n.beginPath(),m.moveTo(y.x,y.y),m.quadraticCurveTo(e.x,e.y,v.x,v.y),n.shadowColor=l.borderShadowColor,n.stroke(m),t.path=m,t.ctx=n,Rh(n,y,{angle:x,adjust:d},c),Rh(n,v,{angle:g,adjust:f},u)}class dr extends ee{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return YM({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,f=i==="y"?{start:l,end:u}:{start:o,end:c},p=qn({x:t,y:e},this.getCenterPoint(r),Gt(-a));return p[i]>=f.start-d-jn&&p[i]<=f.end+d+jn}getCenterPoint(t){return pi(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Ol(t,this.getCenterPoint(),s.rotation),gi(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=_n(t,s);t.ellipse(r,a,i/2,e/2,ft/2,0,2*ft),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return fh(t,e)}}dr.id="ellipseAnnotation",dr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},yi.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},dr.defaultRoutes={borderColor:"color",backgroundColor:"color"},dr.descriptors={label:{_fallback:!0}};function YM(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=Gt(e||0),d=i/2||0,f=Math.cos(u),p=Math.sin(u),b=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return b/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class ma extends ee{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 UT({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,f=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return pi(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,gi(t,e);const r=_n(t,e);qT(t,this,this.centerX,this.centerY),r&&!pa(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=dh(t,e);return i.initProperties=or(t,i,e),i}}ma.id="pointAnnotation",ma.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},ma.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ya extends ee{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&zM(this.elements,t,e,r);const a=qn({x:t,y:e},this.getCenterPoint(r),Gt(-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 pi(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,gi(t,i);const r=_n(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=dh(t,e),{sides:r,rotation:a}=e,s=[],o=2*ft/r;let l=a*Ya;for(let c=0;c<r;c++,l+=o){const u=WM(i,e,l);u.initProperties=or(t,i,e),s.push(u)}return i.elements=s,i}}ya.id="polygonAnnotation",ya.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},ya.defaultRoutes={borderColor:"color",backgroundColor:"color"};function WM({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 zM(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 Tn={box:yi,ellipse:dr,label:lr,line:ur,point:ma,polygon:ya};Object.keys(Tn).forEach(n=>{Bt.describe(`elements.${Tn[n].id}`,{_fallback:"plugins.annotation.common"})});const HM={update:Object.assign},$M=Al.concat(ga),Ah=(n,t)=>ct(t)?Wl(n,t):n,Bl=n=>n==="color"||n==="font";function Yl(n="line"){return Tn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function jM(n,t,e,i){const r=qM(n,e.animations,i),a=t.annotations,s=KM(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Lh(s,o,l.type),u=l.setContext(GM(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=VM(d),"elements"in d&&(XM(c,d.elements,u,r),delete d.elements),fe(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Ih(u),r.update(c,d)}}function VM(n){return isNaN(n.x)||isNaN(n.y)}function qM(n,t,e){return e==="reset"||e==="none"||e==="resize"?HM:new ts(n,t)}function XM(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=Lh(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=Ih(c),i.update(l,o)}}function Lh(n,t,e,i){const r=Tn[Yl(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function Ih(n){const t=Tn[Yl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Wl(n,t.defaults),Wl(n,t.defaultRoutes));for(const i of $M)e[i]=n[i];return e}function Wl(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];Bl(i)&&yt(a)?e[i]=a.map(s=>Ah(s,r)):e[i]=Ah(a,r)}return e}function GM(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function KM(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 QM="3.0.1";const Mn=new Map,ZM=Al.concat(ga);var Nh={id:"annotation",version:QM,beforeRegister(){BT("chart.js","4.0",De.version)},afterRegister(){De.register(Tn)},afterUnregister(){De.unregister(Tn)},beforeInit(n){Mn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=Mn.get(n),r=i.annotations=[];let a=e.annotations;ct(a)?Object.keys(a).forEach(s=>{const o=a[s];ct(o)&&(o.id=s,r.push(o))}):yt(a)&&r.push(...a),fM(r,n.scales)},afterDataLimits(n,t){const e=Mn.get(n);dM(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=Mn.get(n);sM(n,i,e),jM(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),uM(n,i,e)},beforeDatasetsDraw(n,t,e){ba(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ba(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ba(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ba(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=Mn.get(n);oM(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){Mn.delete(n)},_getState(n){return Mn.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=>!ZM.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Tn[Yl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Bl,_fallback:!0},_indexable:Bl}},additionalOptionScopes:[""]};function ba(n,t,e){const{ctx:i,chartArea:r}=n,a=Mn.get(n);e&&Ei(i,r);const s=JM(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)tD(i,r,a,o);e&&Ri(i)}function JM(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 tD(n,t,e,i){const r=i.element;i.main?(yh(e,r,"beforeDraw"),r.draw(n,t),yh(e,r,"afterDraw")):r.draw(n,t)}const va="24px",Fh=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},eD=n=>(h.pushScopeId("data-v-195368ff"),n=n(),h.popScopeId(),n),nD=["aria-hidden"],iD={key:0,"data-testid":"kui-icon-svg-title"},rD=eD(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),aD=h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:va,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return va}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",iD,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),rD],8,nD))]),_:1},8,["aria-hidden","style"]))}}),sD=Fh(aD,[["__scopeId","data-v-195368ff"]]),oD=n=>(h.pushScopeId("data-v-d7b122fd"),n=n(),h.popScopeId(),n),lD=["aria-hidden"],cD={key:0,"data-testid":"kui-icon-svg-title"},uD=oD(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),dD=h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:va,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return va}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",cD,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),uD],8,lD))]),_:1},8,["aria-hidden","style"]))}}),fD=Fh(dD,[["__scopeId","data-v-d7b122fd"]]),hD="#6c7489",pD="#995c00",gD="20px",Uh="24px",mD="40px",yD="48px",bD={class:"tooltip-title"},vD={class:"title font-bold"},xD={key:1,class:"subtitle"},wD={class:"tooltip"},_D={key:0},TD={class:"display-label"},MD={class:"display-value"},DD=h.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=t,i=n,r=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(r,p=>{if(p){const{width:b,height:x}=p.getBoundingClientRect();e("dimensions",{width:b,height:x})}}),h.watch(()=>i.locked,p=>{p?(l.value.left=i.left,l.value.top=i.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(r.value){a.value=!0;const b=window.getComputedStyle(r.value),x=b.transform||b.webkitTransform||b.mozTransform,g=new DOMMatrix(x),y=g.m41,v=g.m42;s.value={x:y,y:v},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const b=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+b}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,b)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:r,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",bD,[h.createElementVNode("span",vD,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(sD),{key:0,class:"drag-icon",color:h.unref(hD)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",xD,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",wD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:y,value:v})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:y},[n.series.length?(h.openBlock(),h.createElementBlock("li",_D,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",TD,h.toDisplayString(y),1),h.createElementVNode("span",MD,h.toDisplayString(v),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Je=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},zl=Je(DD,[["__scopeId","data-v-d8d2d0cd"]]),CD=["onClick"],SD=["title"],kD={key:0,class:"sub-label"},Hl=Je(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(m=>({"1c6c065c":o.value}));const t=n,e=h.ref(),i=h.ref([]),r=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(Uh),l=()=>{const m=e.value;if(!m||!i.value||m.children.length===0)return 0;const w=m.children[0].getBoundingClientRect().top;for(const T of i.value)if(T.getBoundingClientRect().top>w)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=yD:o.value=Uh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let m=0;i.value.forEach(T=>{const S=Array.from(T.children).reduce((k,M)=>k+M.offsetWidth,0);S>m&&(m=S)});const w=parseInt(mD,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${m+w}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let m=0;m<t.items.length;m++)if(t.items[m].text!==s.value[m].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),b=h.ref(0),x=new ResizeObserver(Zd(m=>{const w=m[0],T=w.contentRect.width,S=w.contentRect.height;T!==p.value&&S===b.value&&d(),p.value=T,b.value=S},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(m=0,w)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof De?t.chartInstance:t.chartInstance.chart;y(m,w)?T.hide(m,w):T.show(m,w),T.update()},y=(m=0,w)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof De?t.chartInstance:t.chartInstance.chart,S=T.getDatasetMeta(m);return S.dataset||w===void 0?T.isDatasetVisible(m):!(S.data.length&&S.data[w].hidden)},v=m=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[m];return(m,w)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",v(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:S,text:k,datasetIndex:M,index:D,value:O})=>(h.openBlock(),h.createElementBlock("li",{key:k,ref_for:!0,ref_key:"legendItemsRef",ref:i,onClick:P=>g(M,D)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:T,"border-color":S})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!y(M,D)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:k},h.toDisplayString(k),11,SD),O&&h.unref(r)?(h.openBlock(),h.createElementBlock("div",kD,h.toDisplayString(O.formatted),1)):h.createCommentVNode("",!0)],2)],8,CD))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-554b4d9c"]]);let xa;const OD=new Uint8Array(16);function PD(){if(!xa&&(xa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xa(OD)}const ie=[];for(let n=0;n<256;++n)ie.push((n+256).toString(16).slice(1));function ED(n,t=0){return ie[n[t+0]]+ie[n[t+1]]+ie[n[t+2]]+ie[n[t+3]]+"-"+ie[n[t+4]]+ie[n[t+5]]+"-"+ie[n[t+6]]+ie[n[t+7]]+"-"+ie[n[t+8]]+ie[n[t+9]]+"-"+ie[n[t+10]]+ie[n[t+11]]+ie[n[t+12]]+ie[n[t+13]]+ie[n[t+14]]+ie[n[t+15]]}const Bh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Dn(n,t,e){if(Bh.randomUUID&&!t&&!n)return Bh.randomUUID();n=n||{};const i=n.random||(n.rng||PD)();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 ED(i)}const Yh=(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()},Wh={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&Yh(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,Yh(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)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},zh=6,RD="100%",AD="100%",LD=20,ID=20,Hh=6,ND=0,FD=10,UD=10,BD=1,YD=Je(h.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:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=St.useI18n(),{translateUnit:i}=St.useTranslatedUnits(),r=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Z_()),content:X=>Ro(a(X,U),j)},Q={...N,content:X=>Of(a(X,U),kf(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?Sf(Ro(a(X,U),j)):0,color:Df};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Dn()),u=Dn(),d=Dn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),b=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),y=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:i,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ne.HORIZONTAL_BAR:ne.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),v=h.ref(0),m=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},w={id:c.value,afterUpdate(L){v.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?m():{}}},M=[w,{id:"axisHover",afterEvent(L,U){if(b.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(y.locked||(y.showTooltip=!1),N.length>oa){const X=L.canvas.getContext("2d").measureText(N).width,vt=Math.abs(Math.round(j.x-X*.5)),ut=Math.round(j.x+X*.5);b.value.left=Z==="x"?`${(vt>0?vt:ut)-b.value.offset}px`:`${j.x-X*.5-b.value.offset}px`,b.value.top=`${j.y-50}px`,b.value.show=!0,b.value.text=N}else b.value.show=!1;else b.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},Wh,...t.annotations?[T]:[]],D=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),O=h.ref(0),P=h.ref(0),R=new ResizeObserver(Zd(L=>{O.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(LD+Hh),O.value)}px`:RD}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(ID+Hh),P.value)}px`:AD});St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&De.register(Nh),r.value&&(O.value=r.value.offsetWidth,P.value=r.value.offsetHeight,R.observe(r.value))}),h.onUnmounted(()=>{r.value&&R.unobserve(r.value)});const $=h.computed(()=>{const L=St.useBarChartOptions({tooltipState:y,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:D});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:m(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*zh}}}}),z=St.useChartJSCommon("bar",o,h.toRef(t,"chartData"),M,$),I=h.computed(()=>{v.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=z.value?kf(z.value,t.chartData):J_(t.chartData);return j.map(N=>Sf(Ro(N,x.value)+Of(N,Z))).reduce((N,A)=>Math.max(N,A),0)+zh});h.onBeforeUnmount(()=>{De.unregister(Nh)});const rt={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&z.value){const L=window.devicePixelRatio,U=z.value,j=U.scales.y.width*L+BD,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),bt=L=>{const U=L.target;if(B.value&&z.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=z.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=ND&&U.scrollLeft<=FD?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+UD)*j,K,A.scales.x.height*j))}y.offsetY=U.scrollTop,y.offsetX=U.scrollLeft,b.value.offset=U.scrollLeft},dt=({width:L,height:U})=>{y.width=L,y.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}y.showTooltip=!1,y.locked=!1}),h.watch(()=>t.annotations,L=>{z.value&&(L?z.value.options.plugins.annotation.annotations=m(t.chartData):delete z.value.options.plugins.annotation.annotations)});const W=()=>{y.showTooltip&&(y.locked=!y.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",rt[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:r,class:"chart-container","on:scroll":bt,onClick:U[0]||(U[0]=j=>W())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),b.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:b.value.top,left:b.value.left})},h.toDisplayString(b.value.text),5)):h.createCommentVNode("",!0),h.createVNode(zl,{context:y.tooltipContext,left:y.left,locked:y.locked,series:y.tooltipSeries,"show-tooltip":y.showTooltip,"tooltip-title":n.tooltipTitle,top:y.top,onDimensions:dt},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Hl,{id:c.value,"chart-instance":h.unref(z),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-fdeee739"]]);/*!
|
|
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 WC={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"};uu._date.override({_id:"date-fns",formats:function(){return WC},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=ow(n,t,new Date,this.options):n=Kd(n,this.options)),Os(n)?n.getTime():null},format:function(n,t){return lx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Ki(n,t);case"second":return Nb(n,t);case"minute":return Lb(n,t);case"hour":return Ob(n,t);case"day":return Td(n,t);case"week":return Fb(n,t);case"month":return Ds(n,t);case"quarter":return Ib(n,t);case"year":return Ub(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Zr(n,t);case"second":return Xb(n,t);case"minute":return jb(n,t);case"hour":return $b(n,t);case"day":return Sd(n,t);case"week":return Gb(n,t);case"month":return Pd(n,t);case"quarter":return qb(n,t);case"year":return Kb(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return uw(n);case"minute":return Qb(n);case"hour":return cw(n);case"day":return ks(n);case"week":return Md(n);case"isoWeek":return Md(n,{weekStartsOn:+e});case"month":return Jb(n);case"quarter":return Zb(n);case"year":return ev(n);default:return n}},endOf:function(n,t){switch(t){case"second":return sv(n);case"minute":return rv(n);case"hour":return nv(n);case"day":return kd(n);case"week":return iv(n);case"month":return Od(n);case"quarter":return av(n);case"year":return tv(n);default:return n}}});const $h={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},zC={type:{type:String,required:!0},...$h,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},HC=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function bi(n){return h.isProxy(n)?h.toRaw(n):n}function $C(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function jC(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function jh(n,t){n.labels=t}function Vh(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 VC(n,t){const e={labels:[],datasets:[]};return jh(e,n.labels),Vh(e,n.datasets,t),e}const qC=h.defineComponent({props:zC,setup(n,t){let{expose:e,slots:i}=t;const r=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!r.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,b=VC(u,p),x=$C(b,u);a.value=new Ce(r.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(c.destroy(),a.value=null)},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onBeforeUnmount(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,b]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const y=bi(d),v=bi(p);y&&y!==v&&(jC(x,y),g=!0)}if(f){const y=bi(f.labels),v=bi(b.labels),m=bi(f.datasets),w=bi(b.datasets);y!==v&&(jh(x.config.data,y),g=!0),m&&m!==w&&(Vh(x.config.data,m,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:r},[h.h("p",{},[i.default?i.default():""])])}});function $l(n,t){return Ce.register(t),h.defineComponent({props:$h,setup(e,i){let{expose:r}=i;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>h.h(qC,HC({ref:s},{type:n,...e}))}})}const XC=$l("bar",Ii),qh=$l("doughnut",mn),GC=$l("line",Ni),KC={class:"chart-container"},QC=h.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:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Se}},setup(n){const t=n,{translateUnit:e}=Dt.useTranslatedUnits(),i=h.ref(Cn()),r=h.ref(Cn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ne.DOUGHNUT}),o={id:i.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,y)=>(g.labels.push(y.label),g.backgroundColor.push(y.backgroundColor),g.borderColor.push(rr(y.backgroundColor,50)),g.data.push(y.data.reduce((v,m)=>v+m,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));Dt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=Dt.useDoughnutChartOptions({tooltipState:s,legendID:i.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],b=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",KC,[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(zl,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:b},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Hl,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),ZC=Je(QC,[["__scopeId","data-v-b3095003"]]),Xh=(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()},jl={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;Xh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Xh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},JC=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ne.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},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:Se},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=Dt.useTranslatedUnits(),i=h.ref(),r=h.ref(Cn()),a=h.ref(Cn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:r.value,afterUpdate(v){s.value=v.options.plugins.legend.labels.generateLabels(v).map(m=>({...m,value:t.legendValues&&t.legendValues[m.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,Wh,...t.type===ne.TIMESERIES_LINE?[jl]:[]]),{options:f}=Dt.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:r.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")}),p=h.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((v,m)=>(Array.isArray(t.datasetColors)?(v.backgroundColor=t.datasetColors[m%t.datasetColors.length],v.borderColor=rr(v.backgroundColor,50)):v.rawDimension in t.datasetColors&&(v.backgroundColor=t.datasetColors[v.rawDimension],v.borderColor=rr(v.backgroundColor,50)),v.fill=t.fill,v))}));Dt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const b=v=>sa(v,{short:[lt.DAILY,lt.WEEKLY].includes(t.granularity)}),x=v=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[v],g=({width:v,height:m})=>{c.width=v,c.height=m},y=()=>{var v,m,w;c.locked=!c.locked,i.value&&((m=(v=i.value.chart.tooltip)==null?void 0:v.dataPoints)!=null&&m.length)&&(jl.clickedSegment=c.locked?(w=i.value.chart.tooltip)==null?void 0:w.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete jl.clickedSegment}),(v,m)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",x(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:m[0]||(m[0]=w=>y())},[n.type===h.unref(ne).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(GC),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:p.value,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ne).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(XC),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:p.value,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(zl,{ref_key:"tooltipElement",ref:o,context:b(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:g,onLeft:m[1]||(m[1]=w=>c.left=w),onTop:m[2]||(m[2]=w=>c.top=w)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Hl,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),tS=Je(JC,[["__scopeId","data-v-3abbf084"]]);var Xn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(Xn||{}),wa={exports:{}};wa.exports,function(n,t){var e=200,i="Expected a function",r="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",b="[object Function]",x="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Object]",m="[object Promise]",w="[object RegExp]",T="[object Set]",D="[object String]",k="[object Symbol]",M="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",R="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",z="[object Uint8Array]",I="[object Uint8ClampedArray]",rt="[object Uint16Array]",B="[object Uint32Array]",bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,W=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[R]=N[F]=N[q]=N[$]=N[z]=N[I]=N[rt]=N[B]=!0,N[c]=N[u]=N[C]=N[d]=N[O]=N[f]=N[p]=N[b]=N[g]=N[y]=N[v]=N[w]=N[T]=N[D]=N[M]=!1;var A=typeof me=="object"&&me&&me.Object===Object&&me,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),vt=t&&!t.nodeType&&t,ut=vt&&!0&&n&&!n.nodeType&&n,Pt=ut&&ut.exports===vt,_t=Pt&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),xt=et&&et.isTypedArray;function Ft(_,S){for(var E=-1,Y=_?_.length:0;++E<Y;)if(S(_[E],E,_))return!0;return!1}function De(_){return function(S){return S==null?void 0:S[_]}}function Ae(_,S){for(var E=-1,Y=Array(_);++E<_;)Y[E]=S(E);return Y}function ye(_){return function(S){return _(S)}}function It(_,S){return _==null?void 0:_[S]}function Ut(_){var S=!1;if(_!=null&&typeof _.toString!="function")try{S=!!(_+"")}catch{}return S}function tn(_){var S=-1,E=Array(_.size);return _.forEach(function(Y,ot){E[++S]=[ot,Y]}),E}function kt(_,S){return function(E){return _(S(E))}}function Dn(_){var S=-1,E=Array(_.size);return _.forEach(function(Y){E[++S]=Y}),E}var Le=Array.prototype,en=Function.prototype,_e=Object.prototype,ke=X["__core-js_shared__"],Ie=function(){var _=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),ue=en.toString,be=_e.hasOwnProperty,Qt=_e.toString,_a=RegExp("^"+ue.call(be).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=X.Symbol,lp=X.Uint8Array,yD=_e.propertyIsEnumerable,bD=Le.splice,vD=kt(Object.keys,Object),Gl=xi(X,"DataView"),hr=xi(X,"Map"),Kl=xi(X,"Promise"),Ql=xi(X,"Set"),Zl=xi(X,"WeakMap"),pr=xi(Object,"create"),xD=Kn(Gl),wD=Kn(hr),_D=Kn(Kl),TD=Kn(Ql),MD=Kn(Zl),Ta=vi?vi.prototype:void 0,Jl=Ta?Ta.valueOf:void 0,cp=Ta?Ta.toString:void 0;function Gn(_){var S=-1,E=_?_.length:0;for(this.clear();++S<E;){var Y=_[S];this.set(Y[0],Y[1])}}function CD(){this.__data__=pr?pr(null):{}}function SD(_){return this.has(_)&&delete this.__data__[_]}function DD(_){var S=this.__data__;if(pr){var E=S[_];return E===r?void 0:E}return be.call(S,_)?S[_]:void 0}function kD(_){var S=this.__data__;return pr?S[_]!==void 0:be.call(S,_)}function OD(_,S){var E=this.__data__;return E[_]=pr&&S===void 0?r:S,this}Gn.prototype.clear=CD,Gn.prototype.delete=SD,Gn.prototype.get=DD,Gn.prototype.has=kD,Gn.prototype.set=OD;function nn(_){var S=-1,E=_?_.length:0;for(this.clear();++S<E;){var Y=_[S];this.set(Y[0],Y[1])}}function PD(){this.__data__=[]}function ED(_){var S=this.__data__,E=Ca(S,_);if(E<0)return!1;var Y=S.length-1;return E==Y?S.pop():bD.call(S,E,1),!0}function RD(_){var S=this.__data__,E=Ca(S,_);return E<0?void 0:S[E][1]}function AD(_){return Ca(this.__data__,_)>-1}function LD(_,S){var E=this.__data__,Y=Ca(E,_);return Y<0?E.push([_,S]):E[Y][1]=S,this}nn.prototype.clear=PD,nn.prototype.delete=ED,nn.prototype.get=RD,nn.prototype.has=AD,nn.prototype.set=LD;function rn(_){var S=-1,E=_?_.length:0;for(this.clear();++S<E;){var Y=_[S];this.set(Y[0],Y[1])}}function ID(){this.__data__={hash:new Gn,map:new(hr||nn),string:new Gn}}function ND(_){return Sa(this,_).delete(_)}function FD(_){return Sa(this,_).get(_)}function UD(_){return Sa(this,_).has(_)}function BD(_,S){return Sa(this,_).set(_,S),this}rn.prototype.clear=ID,rn.prototype.delete=ND,rn.prototype.get=FD,rn.prototype.has=UD,rn.prototype.set=BD;function Ma(_){var S=-1,E=_?_.length:0;for(this.__data__=new rn;++S<E;)this.add(_[S])}function YD(_){return this.__data__.set(_,r),this}function WD(_){return this.__data__.has(_)}Ma.prototype.add=Ma.prototype.push=YD,Ma.prototype.has=WD;function an(_){this.__data__=new nn(_)}function zD(){this.__data__=new nn}function HD(_){return this.__data__.delete(_)}function $D(_){return this.__data__.get(_)}function jD(_){return this.__data__.has(_)}function VD(_,S){var E=this.__data__;if(E instanceof nn){var Y=E.__data__;if(!hr||Y.length<e-1)return Y.push([_,S]),this;E=this.__data__=new rn(Y)}return E.set(_,S),this}an.prototype.clear=zD,an.prototype.delete=HD,an.prototype.get=$D,an.prototype.has=jD,an.prototype.set=VD;function qD(_,S){var E=Qn(_)||yp(_)?Ae(_.length,String):[],Y=E.length,ot=!!Y;for(var tt in _)(S||be.call(_,tt))&&!(ot&&(tt=="length"||hp(tt,Y)))&&E.push(tt);return E}function Ca(_,S){for(var E=_.length;E--;)if(mp(_[E][0],S))return E;return-1}var XD=lk();function GD(_,S){return _&&XD(_,S,Ea)}function up(_,S){S=Da(S,_)?[S]:dp(S);for(var E=0,Y=S.length;_!=null&&E<Y;)_=_[ka(S[E++])];return E&&E==Y?_:void 0}function KD(_){return Qt.call(_)}function QD(_,S){return _!=null&&S in Object(_)}function tc(_,S,E,Y,ot){return _===S?!0:_==null||S==null||!Oa(_)&&!Pa(S)?_!==_&&S!==S:ZD(_,S,tc,E,Y,ot)}function ZD(_,S,E,Y,ot,tt){var Tt=Qn(_),Et=Qn(S),jt=u,Jt=u;Tt||(jt=kn(_),jt=jt==c?v:jt),Et||(Jt=kn(S),Jt=Jt==c?v:Jt);var de=jt==v&&!Ut(_),ve=Jt==v&&!Ut(S),te=jt==Jt;if(te&&!de)return tt||(tt=new an),Tt||bk(_)?fp(_,S,E,Y,ot,tt):ck(_,S,jt,E,Y,ot,tt);if(!(ot&s)){var Oe=de&&be.call(_,"__wrapped__"),Pe=ve&&be.call(S,"__wrapped__");if(Oe||Pe){var On=Oe?_.value():_,sn=Pe?S.value():S;return tt||(tt=new an),E(On,sn,Y,ot,tt)}}return te?(tt||(tt=new an),uk(_,S,E,Y,ot,tt)):!1}function JD(_,S,E,Y){var ot=E.length,tt=ot,Tt=!Y;if(_==null)return!tt;for(_=Object(_);ot--;){var Et=E[ot];if(Tt&&Et[2]?Et[1]!==_[Et[0]]:!(Et[0]in _))return!1}for(;++ot<tt;){Et=E[ot];var jt=Et[0],Jt=_[jt],de=Et[1];if(Tt&&Et[2]){if(Jt===void 0&&!(jt in _))return!1}else{var ve=new an;if(Y)var te=Y(Jt,de,jt,_,S,ve);if(!(te===void 0?tc(de,Jt,Y,a|s,ve):te))return!1}}return!0}function tk(_){if(!Oa(_)||pk(_))return!1;var S=vp(_)||Ut(_)?_a:Z;return S.test(Kn(_))}function ek(_){return Pa(_)&&nc(_.length)&&!!N[Qt.call(_)]}function nk(_){return typeof _=="function"?_:_==null?Tk:typeof _=="object"?Qn(_)?ak(_[0],_[1]):rk(_):Mk(_)}function ik(_){if(!gk(_))return vD(_);var S=[];for(var E in Object(_))be.call(_,E)&&E!="constructor"&&S.push(E);return S}function rk(_){var S=dk(_);return S.length==1&&S[0][2]?gp(S[0][0],S[0][1]):function(E){return E===_||JD(E,_,S)}}function ak(_,S){return Da(_)&&pp(S)?gp(ka(_),S):function(E){var Y=xk(E,_);return Y===void 0&&Y===S?wk(E,_):tc(S,Y,void 0,a|s)}}function sk(_){return function(S){return up(S,_)}}function ok(_){if(typeof _=="string")return _;if(ic(_))return cp?cp.call(_):"";var S=_+"";return S=="0"&&1/_==-o?"-0":S}function dp(_){return Qn(_)?_:mk(_)}function lk(_){return function(S,E,Y){for(var ot=-1,tt=Object(S),Tt=Y(S),Et=Tt.length;Et--;){var jt=Tt[_?Et:++ot];if(E(tt[jt],jt,tt)===!1)break}return S}}function fp(_,S,E,Y,ot,tt){var Tt=ot&s,Et=_.length,jt=S.length;if(Et!=jt&&!(Tt&&jt>Et))return!1;var Jt=tt.get(_);if(Jt&&tt.get(S))return Jt==S;var de=-1,ve=!0,te=ot&a?new Ma:void 0;for(tt.set(_,S),tt.set(S,_);++de<Et;){var Oe=_[de],Pe=S[de];if(Y)var On=Tt?Y(Pe,Oe,de,S,_,tt):Y(Oe,Pe,de,_,S,tt);if(On!==void 0){if(On)continue;ve=!1;break}if(te){if(!Ft(S,function(sn,Zn){if(!te.has(Zn)&&(Oe===sn||E(Oe,sn,Y,ot,tt)))return te.add(Zn)})){ve=!1;break}}else if(!(Oe===Pe||E(Oe,Pe,Y,ot,tt))){ve=!1;break}}return tt.delete(_),tt.delete(S),ve}function ck(_,S,E,Y,ot,tt,Tt){switch(E){case O:if(_.byteLength!=S.byteLength||_.byteOffset!=S.byteOffset)return!1;_=_.buffer,S=S.buffer;case C:return!(_.byteLength!=S.byteLength||!Y(new lp(_),new lp(S)));case d:case f:case y:return mp(+_,+S);case p:return _.name==S.name&&_.message==S.message;case w:case D:return _==S+"";case g:var Et=tn;case T:var jt=tt&s;if(Et||(Et=Dn),_.size!=S.size&&!jt)return!1;var Jt=Tt.get(_);if(Jt)return Jt==S;tt|=a,Tt.set(_,S);var de=fp(Et(_),Et(S),Y,ot,tt,Tt);return Tt.delete(_),de;case k:if(Jl)return Jl.call(_)==Jl.call(S)}return!1}function uk(_,S,E,Y,ot,tt){var Tt=ot&s,Et=Ea(_),jt=Et.length,Jt=Ea(S),de=Jt.length;if(jt!=de&&!Tt)return!1;for(var ve=jt;ve--;){var te=Et[ve];if(!(Tt?te in S:be.call(S,te)))return!1}var Oe=tt.get(_);if(Oe&&tt.get(S))return Oe==S;var Pe=!0;tt.set(_,S),tt.set(S,_);for(var On=Tt;++ve<jt;){te=Et[ve];var sn=_[te],Zn=S[te];if(Y)var xp=Tt?Y(Zn,sn,te,S,_,tt):Y(sn,Zn,te,_,S,tt);if(!(xp===void 0?sn===Zn||E(sn,Zn,Y,ot,tt):xp)){Pe=!1;break}On||(On=te=="constructor")}if(Pe&&!On){var Ra=_.constructor,Aa=S.constructor;Ra!=Aa&&"constructor"in _&&"constructor"in S&&!(typeof Ra=="function"&&Ra instanceof Ra&&typeof Aa=="function"&&Aa instanceof Aa)&&(Pe=!1)}return tt.delete(_),tt.delete(S),Pe}function Sa(_,S){var E=_.__data__;return hk(S)?E[typeof S=="string"?"string":"hash"]:E.map}function dk(_){for(var S=Ea(_),E=S.length;E--;){var Y=S[E],ot=_[Y];S[E]=[Y,ot,pp(ot)]}return S}function xi(_,S){var E=It(_,S);return tk(E)?E:void 0}var kn=KD;(Gl&&kn(new Gl(new ArrayBuffer(1)))!=O||hr&&kn(new hr)!=g||Kl&&kn(Kl.resolve())!=m||Ql&&kn(new Ql)!=T||Zl&&kn(new Zl)!=M)&&(kn=function(_){var S=Qt.call(_),E=S==v?_.constructor:void 0,Y=E?Kn(E):void 0;if(Y)switch(Y){case xD:return O;case wD:return g;case _D:return m;case TD:return T;case MD:return M}return S});function fk(_,S,E){S=Da(S,_)?[S]:dp(S);for(var Y,ot=-1,Tt=S.length;++ot<Tt;){var tt=ka(S[ot]);if(!(Y=_!=null&&E(_,tt)))break;_=_[tt]}if(Y)return Y;var Tt=_?_.length:0;return!!Tt&&nc(Tt)&&hp(tt,Tt)&&(Qn(_)||yp(_))}function hp(_,S){return S=S??l,!!S&&(typeof _=="number"||K.test(_))&&_>-1&&_%1==0&&_<S}function Da(_,S){if(Qn(_))return!1;var E=typeof _;return E=="number"||E=="symbol"||E=="boolean"||_==null||ic(_)?!0:dt.test(_)||!bt.test(_)||S!=null&&_ in Object(S)}function hk(_){var S=typeof _;return S=="string"||S=="number"||S=="symbol"||S=="boolean"?_!=="__proto__":_===null}function pk(_){return!!Ie&&Ie in _}function gk(_){var S=_&&_.constructor,E=typeof S=="function"&&S.prototype||_e;return _===E}function pp(_){return _===_&&!Oa(_)}function gp(_,S){return function(E){return E==null?!1:E[_]===S&&(S!==void 0||_ in Object(E))}}var mk=ec(function(_){_=vk(_);var S=[];return W.test(_)&&S.push(""),_.replace(L,function(E,Y,ot,tt){S.push(ot?tt.replace(j,"$1"):Y||E)}),S});function ka(_){if(typeof _=="string"||ic(_))return _;var S=_+"";return S=="0"&&1/_==-o?"-0":S}function Kn(_){if(_!=null){try{return ue.call(_)}catch{}try{return _+""}catch{}}return""}function ec(_,S){if(typeof _!="function"||S&&typeof S!="function")throw new TypeError(i);var E=function(){var Y=arguments,ot=S?S.apply(this,Y):Y[0],tt=E.cache;if(tt.has(ot))return tt.get(ot);var Tt=_.apply(this,Y);return E.cache=tt.set(ot,Tt),Tt};return E.cache=new(ec.Cache||rn),E}ec.Cache=rn;function mp(_,S){return _===S||_!==_&&S!==S}function yp(_){return yk(_)&&be.call(_,"callee")&&(!yD.call(_,"callee")||Qt.call(_)==c)}var Qn=Array.isArray;function bp(_){return _!=null&&nc(_.length)&&!vp(_)}function yk(_){return Pa(_)&&bp(_)}function vp(_){var S=Oa(_)?Qt.call(_):"";return S==b||S==x}function nc(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=l}function Oa(_){var S=typeof _;return!!_&&(S=="object"||S=="function")}function Pa(_){return!!_&&typeof _=="object"}function ic(_){return typeof _=="symbol"||Pa(_)&&Qt.call(_)==k}var bk=xt?ye(xt):ek;function vk(_){return _==null?"":ok(_)}function xk(_,S,E){var Y=_==null?void 0:up(_,S);return Y===void 0?E:Y}function wk(_,S){return _!=null&&fk(_,S,QD)}function Ea(_){return bp(_)?qD(_):ik(_)}function _k(_,S){var E={};return S=nk(S),GD(_,function(Y,ot,tt){E[S(Y,ot,tt)]=Y}),E}function Tk(_){return _}function Mk(_){return Da(_)?De(ka(_)):sk(_)}n.exports=_k}(wa,wa.exports);var eS=wa.exports;const nS=Yn(eS);var iS=1/0,rS=9007199254740991,aS="[object Arguments]",sS="[object Function]",oS="[object GeneratorFunction]",lS="[object Symbol]",cS=typeof me=="object"&&me&&me.Object===Object&&me,uS=typeof self=="object"&&self&&self.Object===Object&&self,dS=cS||uS||Function("return this")();function fS(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function hS(n,t){for(var e=-1,i=n?n.length:0,r=Array(i);++e<i;)r[e]=t(n[e],e,n);return r}function pS(n,t){for(var e=-1,i=t.length,r=n.length;++e<i;)n[r+e]=t[e];return n}var Vl=Object.prototype,gS=Vl.hasOwnProperty,ql=Vl.toString,Gh=dS.Symbol,mS=Vl.propertyIsEnumerable,Kh=Gh?Gh.isConcatSpreadable:void 0,Qh=Math.max;function Zh(n,t,e,i,r){var a=-1,s=n.length;for(e||(e=xS),r||(r=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?Zh(o,t-1,e,i,r):pS(r,o):i||(r[r.length]=o)}return r}function yS(n,t){return n=Object(n),bS(n,t,function(e,i){return i in n})}function bS(n,t,e){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],o=n[s];e(o,s)&&(a[s]=o)}return a}function vS(n,t){return t=Qh(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,r=Qh(e.length-t,0),a=Array(r);++i<r;)a[i]=e[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=e[i];return s[t]=a,fS(n,this,s)}}function xS(n){return TS(n)||_S(n)||!!(Kh&&n&&n[Kh])}function wS(n){if(typeof n=="string"||OS(n))return n;var t=n+"";return t=="0"&&1/n==-iS?"-0":t}function _S(n){return CS(n)&&gS.call(n,"callee")&&(!mS.call(n,"callee")||ql.call(n)==aS)}var TS=Array.isArray;function MS(n){return n!=null&&DS(n.length)&&!SS(n)}function CS(n){return Jh(n)&&MS(n)}function SS(n){var t=kS(n)?ql.call(n):"";return t==sS||t==oS}function DS(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=rS}function kS(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Jh(n){return!!n&&typeof n=="object"}function OS(n){return typeof n=="symbol"||Jh(n)&&ql.call(n)==lS}var PS=vS(function(n,t){return n==null?{}:yS(n,hS(Zh(t,1),wS))}),ES=PS;const RS=Yn(ES);var tp={exports:{}};(function(n,t){(function(e,i){i()})(me,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof me=="object"&&me.global===me?me:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):r(p.href)?i(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(r(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,d);var p=c.type==="application/octet-stream",b=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&b||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var m=g.result;m=x?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=m:location=m,f=null},g.readAsDataURL(c)}else{var y=s.URL||s.webkitURL,v=y.createObjectURL(c);f?f.location=v:location.href=v,f=null,setTimeout(function(){y.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(tp);var AS=tp.exports,ep={exports:{}};/* @license
|
|
29
|
+
*/const WD={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"};uu._date.override({_id:"date-fns",formats:function(){return WD},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=ow(n,t,new Date,this.options):n=Kd(n,this.options)),Os(n)?n.getTime():null},format:function(n,t){return lx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Ki(n,t);case"second":return Nb(n,t);case"minute":return Lb(n,t);case"hour":return Ob(n,t);case"day":return Td(n,t);case"week":return Fb(n,t);case"month":return Ss(n,t);case"quarter":return Ib(n,t);case"year":return Ub(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Zr(n,t);case"second":return Xb(n,t);case"minute":return jb(n,t);case"hour":return $b(n,t);case"day":return Cd(n,t);case"week":return Gb(n,t);case"month":return Pd(n,t);case"quarter":return qb(n,t);case"year":return Kb(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return uw(n);case"minute":return Qb(n);case"hour":return cw(n);case"day":return ks(n);case"week":return Md(n);case"isoWeek":return Md(n,{weekStartsOn:+e});case"month":return Jb(n);case"quarter":return Zb(n);case"year":return ev(n);default:return n}},endOf:function(n,t){switch(t){case"second":return sv(n);case"minute":return rv(n);case"hour":return nv(n);case"day":return kd(n);case"week":return iv(n);case"month":return Od(n);case"quarter":return av(n);case"year":return tv(n);default:return n}}});const $h={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},zD={type:{type:String,required:!0},...$h,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},HD=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function bi(n){return h.isProxy(n)?h.toRaw(n):n}function $D(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function jD(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function jh(n,t){n.labels=t}function Vh(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 VD(n,t){const e={labels:[],datasets:[]};return jh(e,n.labels),Vh(e,n.datasets,t),e}const qD=h.defineComponent({props:zD,setup(n,t){let{expose:e,slots:i}=t;const r=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!r.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,b=VD(u,p),x=$D(b,u);a.value=new De(r.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(c.destroy(),a.value=null)},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onBeforeUnmount(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,b]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const y=bi(d),v=bi(p);y&&y!==v&&(jD(x,y),g=!0)}if(f){const y=bi(f.labels),v=bi(b.labels),m=bi(f.datasets),w=bi(b.datasets);y!==v&&(jh(x.config.data,y),g=!0),m&&m!==w&&(Vh(x.config.data,m,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:r},[h.h("p",{},[i.default?i.default():""])])}});function $l(n,t){return De.register(t),h.defineComponent({props:$h,setup(e,i){let{expose:r}=i;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>h.h(qD,HD({ref:s},{type:n,...e}))}})}const XD=$l("bar",Ii),qh=$l("doughnut",mn),GD=$l("line",Ni),KD={class:"chart-container"},QD=h.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:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ce}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(Dn()),r=h.ref(Dn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ne.DOUGHNUT}),o={id:i.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,y)=>(g.labels.push(y.label),g.backgroundColor.push(y.backgroundColor),g.borderColor.push(rr(y.backgroundColor,50)),g.data.push(y.data.reduce((v,m)=>v+m,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=St.useDoughnutChartOptions({tooltipState:s,legendID:i.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],b=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",KD,[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(zl,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:b},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Hl,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),ZD=Je(QD,[["__scopeId","data-v-b3095003"]]),Xh=(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()},jl={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;Xh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Xh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},JD=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ne.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},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:Ce},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(),r=h.ref(Dn()),a=h.ref(Dn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:r.value,afterUpdate(v){s.value=v.options.plugins.legend.labels.generateLabels(v).map(m=>({...m,value:t.legendValues&&t.legendValues[m.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,Wh,...t.type===ne.TIMESERIES_LINE?[jl]:[]]),{options:f}=St.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:r.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")}),p=h.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((v,m)=>(Array.isArray(t.datasetColors)?(v.backgroundColor=t.datasetColors[m%t.datasetColors.length],v.borderColor=rr(v.backgroundColor,50)):v.rawDimension in t.datasetColors&&(v.backgroundColor=t.datasetColors[v.rawDimension],v.borderColor=rr(v.backgroundColor,50)),v.fill=t.fill,v))}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const b=v=>sa(v,{short:[lt.DAILY,lt.WEEKLY].includes(t.granularity)}),x=v=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[v],g=({width:v,height:m})=>{c.width=v,c.height=m},y=()=>{var v,m,w;c.locked=!c.locked,i.value&&((m=(v=i.value.chart.tooltip)==null?void 0:v.dataPoints)!=null&&m.length)&&(jl.clickedSegment=c.locked?(w=i.value.chart.tooltip)==null?void 0:w.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete jl.clickedSegment}),(v,m)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",x(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:m[0]||(m[0]=w=>y())},[n.type===h.unref(ne).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(GD),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:p.value,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ne).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(XD),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:p.value,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(zl,{ref_key:"tooltipElement",ref:o,context:b(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:g,onLeft:m[1]||(m[1]=w=>c.left=w),onTop:m[2]||(m[2]=w=>c.top=w)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Hl,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),tC=Je(JD,[["__scopeId","data-v-3abbf084"]]);var Xn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(Xn||{}),wa={exports:{}};wa.exports,function(n,t){var e=200,i="Expected a function",r="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",b="[object Function]",x="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Object]",m="[object Promise]",w="[object RegExp]",T="[object Set]",S="[object String]",k="[object Symbol]",M="[object WeakMap]",D="[object ArrayBuffer]",O="[object DataView]",P="[object Float32Array]",R="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",z="[object Uint8Array]",I="[object Uint8ClampedArray]",rt="[object Uint16Array]",B="[object Uint32Array]",bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,W=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[R]=N[F]=N[q]=N[$]=N[z]=N[I]=N[rt]=N[B]=!0,N[c]=N[u]=N[D]=N[d]=N[O]=N[f]=N[p]=N[b]=N[g]=N[y]=N[v]=N[w]=N[T]=N[S]=N[M]=!1;var A=typeof me=="object"&&me&&me.Object===Object&&me,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),vt=t&&!t.nodeType&&t,ut=vt&&!0&&n&&!n.nodeType&&n,Pt=ut&&ut.exports===vt,_t=Pt&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),xt=et&&et.isTypedArray;function Ft(_,C){for(var E=-1,Y=_?_.length:0;++E<Y;)if(C(_[E],E,_))return!0;return!1}function Se(_){return function(C){return C==null?void 0:C[_]}}function Ae(_,C){for(var E=-1,Y=Array(_);++E<_;)Y[E]=C(E);return Y}function ye(_){return function(C){return _(C)}}function It(_,C){return _==null?void 0:_[C]}function Ut(_){var C=!1;if(_!=null&&typeof _.toString!="function")try{C=!!(_+"")}catch{}return C}function tn(_){var C=-1,E=Array(_.size);return _.forEach(function(Y,ot){E[++C]=[ot,Y]}),E}function kt(_,C){return function(E){return _(C(E))}}function Sn(_){var C=-1,E=Array(_.size);return _.forEach(function(Y){E[++C]=Y}),E}var Le=Array.prototype,en=Function.prototype,_e=Object.prototype,ke=X["__core-js_shared__"],Ie=function(){var _=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),ue=en.toString,be=_e.hasOwnProperty,Qt=_e.toString,_a=RegExp("^"+ue.call(be).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=X.Symbol,lp=X.Uint8Array,yS=_e.propertyIsEnumerable,bS=Le.splice,vS=kt(Object.keys,Object),Gl=xi(X,"DataView"),hr=xi(X,"Map"),Kl=xi(X,"Promise"),Ql=xi(X,"Set"),Zl=xi(X,"WeakMap"),pr=xi(Object,"create"),xS=Kn(Gl),wS=Kn(hr),_S=Kn(Kl),TS=Kn(Ql),MS=Kn(Zl),Ta=vi?vi.prototype:void 0,Jl=Ta?Ta.valueOf:void 0,cp=Ta?Ta.toString:void 0;function Gn(_){var C=-1,E=_?_.length:0;for(this.clear();++C<E;){var Y=_[C];this.set(Y[0],Y[1])}}function DS(){this.__data__=pr?pr(null):{}}function CS(_){return this.has(_)&&delete this.__data__[_]}function SS(_){var C=this.__data__;if(pr){var E=C[_];return E===r?void 0:E}return be.call(C,_)?C[_]:void 0}function kS(_){var C=this.__data__;return pr?C[_]!==void 0:be.call(C,_)}function OS(_,C){var E=this.__data__;return E[_]=pr&&C===void 0?r:C,this}Gn.prototype.clear=DS,Gn.prototype.delete=CS,Gn.prototype.get=SS,Gn.prototype.has=kS,Gn.prototype.set=OS;function nn(_){var C=-1,E=_?_.length:0;for(this.clear();++C<E;){var Y=_[C];this.set(Y[0],Y[1])}}function PS(){this.__data__=[]}function ES(_){var C=this.__data__,E=Da(C,_);if(E<0)return!1;var Y=C.length-1;return E==Y?C.pop():bS.call(C,E,1),!0}function RS(_){var C=this.__data__,E=Da(C,_);return E<0?void 0:C[E][1]}function AS(_){return Da(this.__data__,_)>-1}function LS(_,C){var E=this.__data__,Y=Da(E,_);return Y<0?E.push([_,C]):E[Y][1]=C,this}nn.prototype.clear=PS,nn.prototype.delete=ES,nn.prototype.get=RS,nn.prototype.has=AS,nn.prototype.set=LS;function rn(_){var C=-1,E=_?_.length:0;for(this.clear();++C<E;){var Y=_[C];this.set(Y[0],Y[1])}}function IS(){this.__data__={hash:new Gn,map:new(hr||nn),string:new Gn}}function NS(_){return Ca(this,_).delete(_)}function FS(_){return Ca(this,_).get(_)}function US(_){return Ca(this,_).has(_)}function BS(_,C){return Ca(this,_).set(_,C),this}rn.prototype.clear=IS,rn.prototype.delete=NS,rn.prototype.get=FS,rn.prototype.has=US,rn.prototype.set=BS;function Ma(_){var C=-1,E=_?_.length:0;for(this.__data__=new rn;++C<E;)this.add(_[C])}function YS(_){return this.__data__.set(_,r),this}function WS(_){return this.__data__.has(_)}Ma.prototype.add=Ma.prototype.push=YS,Ma.prototype.has=WS;function an(_){this.__data__=new nn(_)}function zS(){this.__data__=new nn}function HS(_){return this.__data__.delete(_)}function $S(_){return this.__data__.get(_)}function jS(_){return this.__data__.has(_)}function VS(_,C){var E=this.__data__;if(E instanceof nn){var Y=E.__data__;if(!hr||Y.length<e-1)return Y.push([_,C]),this;E=this.__data__=new rn(Y)}return E.set(_,C),this}an.prototype.clear=zS,an.prototype.delete=HS,an.prototype.get=$S,an.prototype.has=jS,an.prototype.set=VS;function qS(_,C){var E=Qn(_)||yp(_)?Ae(_.length,String):[],Y=E.length,ot=!!Y;for(var tt in _)(C||be.call(_,tt))&&!(ot&&(tt=="length"||hp(tt,Y)))&&E.push(tt);return E}function Da(_,C){for(var E=_.length;E--;)if(mp(_[E][0],C))return E;return-1}var XS=lk();function GS(_,C){return _&&XS(_,C,Ea)}function up(_,C){C=Sa(C,_)?[C]:dp(C);for(var E=0,Y=C.length;_!=null&&E<Y;)_=_[ka(C[E++])];return E&&E==Y?_:void 0}function KS(_){return Qt.call(_)}function QS(_,C){return _!=null&&C in Object(_)}function tc(_,C,E,Y,ot){return _===C?!0:_==null||C==null||!Oa(_)&&!Pa(C)?_!==_&&C!==C:ZS(_,C,tc,E,Y,ot)}function ZS(_,C,E,Y,ot,tt){var Tt=Qn(_),Et=Qn(C),jt=u,Jt=u;Tt||(jt=kn(_),jt=jt==c?v:jt),Et||(Jt=kn(C),Jt=Jt==c?v:Jt);var de=jt==v&&!Ut(_),ve=Jt==v&&!Ut(C),te=jt==Jt;if(te&&!de)return tt||(tt=new an),Tt||bk(_)?fp(_,C,E,Y,ot,tt):ck(_,C,jt,E,Y,ot,tt);if(!(ot&s)){var Oe=de&&be.call(_,"__wrapped__"),Pe=ve&&be.call(C,"__wrapped__");if(Oe||Pe){var On=Oe?_.value():_,sn=Pe?C.value():C;return tt||(tt=new an),E(On,sn,Y,ot,tt)}}return te?(tt||(tt=new an),uk(_,C,E,Y,ot,tt)):!1}function JS(_,C,E,Y){var ot=E.length,tt=ot,Tt=!Y;if(_==null)return!tt;for(_=Object(_);ot--;){var Et=E[ot];if(Tt&&Et[2]?Et[1]!==_[Et[0]]:!(Et[0]in _))return!1}for(;++ot<tt;){Et=E[ot];var jt=Et[0],Jt=_[jt],de=Et[1];if(Tt&&Et[2]){if(Jt===void 0&&!(jt in _))return!1}else{var ve=new an;if(Y)var te=Y(Jt,de,jt,_,C,ve);if(!(te===void 0?tc(de,Jt,Y,a|s,ve):te))return!1}}return!0}function tk(_){if(!Oa(_)||pk(_))return!1;var C=vp(_)||Ut(_)?_a:Z;return C.test(Kn(_))}function ek(_){return Pa(_)&&nc(_.length)&&!!N[Qt.call(_)]}function nk(_){return typeof _=="function"?_:_==null?Tk:typeof _=="object"?Qn(_)?ak(_[0],_[1]):rk(_):Mk(_)}function ik(_){if(!gk(_))return vS(_);var C=[];for(var E in Object(_))be.call(_,E)&&E!="constructor"&&C.push(E);return C}function rk(_){var C=dk(_);return C.length==1&&C[0][2]?gp(C[0][0],C[0][1]):function(E){return E===_||JS(E,_,C)}}function ak(_,C){return Sa(_)&&pp(C)?gp(ka(_),C):function(E){var Y=xk(E,_);return Y===void 0&&Y===C?wk(E,_):tc(C,Y,void 0,a|s)}}function sk(_){return function(C){return up(C,_)}}function ok(_){if(typeof _=="string")return _;if(ic(_))return cp?cp.call(_):"";var C=_+"";return C=="0"&&1/_==-o?"-0":C}function dp(_){return Qn(_)?_:mk(_)}function lk(_){return function(C,E,Y){for(var ot=-1,tt=Object(C),Tt=Y(C),Et=Tt.length;Et--;){var jt=Tt[_?Et:++ot];if(E(tt[jt],jt,tt)===!1)break}return C}}function fp(_,C,E,Y,ot,tt){var Tt=ot&s,Et=_.length,jt=C.length;if(Et!=jt&&!(Tt&&jt>Et))return!1;var Jt=tt.get(_);if(Jt&&tt.get(C))return Jt==C;var de=-1,ve=!0,te=ot&a?new Ma:void 0;for(tt.set(_,C),tt.set(C,_);++de<Et;){var Oe=_[de],Pe=C[de];if(Y)var On=Tt?Y(Pe,Oe,de,C,_,tt):Y(Oe,Pe,de,_,C,tt);if(On!==void 0){if(On)continue;ve=!1;break}if(te){if(!Ft(C,function(sn,Zn){if(!te.has(Zn)&&(Oe===sn||E(Oe,sn,Y,ot,tt)))return te.add(Zn)})){ve=!1;break}}else if(!(Oe===Pe||E(Oe,Pe,Y,ot,tt))){ve=!1;break}}return tt.delete(_),tt.delete(C),ve}function ck(_,C,E,Y,ot,tt,Tt){switch(E){case O:if(_.byteLength!=C.byteLength||_.byteOffset!=C.byteOffset)return!1;_=_.buffer,C=C.buffer;case D:return!(_.byteLength!=C.byteLength||!Y(new lp(_),new lp(C)));case d:case f:case y:return mp(+_,+C);case p:return _.name==C.name&&_.message==C.message;case w:case S:return _==C+"";case g:var Et=tn;case T:var jt=tt&s;if(Et||(Et=Sn),_.size!=C.size&&!jt)return!1;var Jt=Tt.get(_);if(Jt)return Jt==C;tt|=a,Tt.set(_,C);var de=fp(Et(_),Et(C),Y,ot,tt,Tt);return Tt.delete(_),de;case k:if(Jl)return Jl.call(_)==Jl.call(C)}return!1}function uk(_,C,E,Y,ot,tt){var Tt=ot&s,Et=Ea(_),jt=Et.length,Jt=Ea(C),de=Jt.length;if(jt!=de&&!Tt)return!1;for(var ve=jt;ve--;){var te=Et[ve];if(!(Tt?te in C:be.call(C,te)))return!1}var Oe=tt.get(_);if(Oe&&tt.get(C))return Oe==C;var Pe=!0;tt.set(_,C),tt.set(C,_);for(var On=Tt;++ve<jt;){te=Et[ve];var sn=_[te],Zn=C[te];if(Y)var xp=Tt?Y(Zn,sn,te,C,_,tt):Y(sn,Zn,te,_,C,tt);if(!(xp===void 0?sn===Zn||E(sn,Zn,Y,ot,tt):xp)){Pe=!1;break}On||(On=te=="constructor")}if(Pe&&!On){var Ra=_.constructor,Aa=C.constructor;Ra!=Aa&&"constructor"in _&&"constructor"in C&&!(typeof Ra=="function"&&Ra instanceof Ra&&typeof Aa=="function"&&Aa instanceof Aa)&&(Pe=!1)}return tt.delete(_),tt.delete(C),Pe}function Ca(_,C){var E=_.__data__;return hk(C)?E[typeof C=="string"?"string":"hash"]:E.map}function dk(_){for(var C=Ea(_),E=C.length;E--;){var Y=C[E],ot=_[Y];C[E]=[Y,ot,pp(ot)]}return C}function xi(_,C){var E=It(_,C);return tk(E)?E:void 0}var kn=KS;(Gl&&kn(new Gl(new ArrayBuffer(1)))!=O||hr&&kn(new hr)!=g||Kl&&kn(Kl.resolve())!=m||Ql&&kn(new Ql)!=T||Zl&&kn(new Zl)!=M)&&(kn=function(_){var C=Qt.call(_),E=C==v?_.constructor:void 0,Y=E?Kn(E):void 0;if(Y)switch(Y){case xS:return O;case wS:return g;case _S:return m;case TS:return T;case MS:return M}return C});function fk(_,C,E){C=Sa(C,_)?[C]:dp(C);for(var Y,ot=-1,Tt=C.length;++ot<Tt;){var tt=ka(C[ot]);if(!(Y=_!=null&&E(_,tt)))break;_=_[tt]}if(Y)return Y;var Tt=_?_.length:0;return!!Tt&&nc(Tt)&&hp(tt,Tt)&&(Qn(_)||yp(_))}function hp(_,C){return C=C??l,!!C&&(typeof _=="number"||K.test(_))&&_>-1&&_%1==0&&_<C}function Sa(_,C){if(Qn(_))return!1;var E=typeof _;return E=="number"||E=="symbol"||E=="boolean"||_==null||ic(_)?!0:dt.test(_)||!bt.test(_)||C!=null&&_ in Object(C)}function hk(_){var C=typeof _;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?_!=="__proto__":_===null}function pk(_){return!!Ie&&Ie in _}function gk(_){var C=_&&_.constructor,E=typeof C=="function"&&C.prototype||_e;return _===E}function pp(_){return _===_&&!Oa(_)}function gp(_,C){return function(E){return E==null?!1:E[_]===C&&(C!==void 0||_ in Object(E))}}var mk=ec(function(_){_=vk(_);var C=[];return W.test(_)&&C.push(""),_.replace(L,function(E,Y,ot,tt){C.push(ot?tt.replace(j,"$1"):Y||E)}),C});function ka(_){if(typeof _=="string"||ic(_))return _;var C=_+"";return C=="0"&&1/_==-o?"-0":C}function Kn(_){if(_!=null){try{return ue.call(_)}catch{}try{return _+""}catch{}}return""}function ec(_,C){if(typeof _!="function"||C&&typeof C!="function")throw new TypeError(i);var E=function(){var Y=arguments,ot=C?C.apply(this,Y):Y[0],tt=E.cache;if(tt.has(ot))return tt.get(ot);var Tt=_.apply(this,Y);return E.cache=tt.set(ot,Tt),Tt};return E.cache=new(ec.Cache||rn),E}ec.Cache=rn;function mp(_,C){return _===C||_!==_&&C!==C}function yp(_){return yk(_)&&be.call(_,"callee")&&(!yS.call(_,"callee")||Qt.call(_)==c)}var Qn=Array.isArray;function bp(_){return _!=null&&nc(_.length)&&!vp(_)}function yk(_){return Pa(_)&&bp(_)}function vp(_){var C=Oa(_)?Qt.call(_):"";return C==b||C==x}function nc(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=l}function Oa(_){var C=typeof _;return!!_&&(C=="object"||C=="function")}function Pa(_){return!!_&&typeof _=="object"}function ic(_){return typeof _=="symbol"||Pa(_)&&Qt.call(_)==k}var bk=xt?ye(xt):ek;function vk(_){return _==null?"":ok(_)}function xk(_,C,E){var Y=_==null?void 0:up(_,C);return Y===void 0?E:Y}function wk(_,C){return _!=null&&fk(_,C,QS)}function Ea(_){return bp(_)?qS(_):ik(_)}function _k(_,C){var E={};return C=nk(C),GS(_,function(Y,ot,tt){E[C(Y,ot,tt)]=Y}),E}function Tk(_){return _}function Mk(_){return Sa(_)?Se(ka(_)):sk(_)}n.exports=_k}(wa,wa.exports);var eC=wa.exports;const nC=Yn(eC);var iC=1/0,rC=9007199254740991,aC="[object Arguments]",sC="[object Function]",oC="[object GeneratorFunction]",lC="[object Symbol]",cC=typeof me=="object"&&me&&me.Object===Object&&me,uC=typeof self=="object"&&self&&self.Object===Object&&self,dC=cC||uC||Function("return this")();function fC(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function hC(n,t){for(var e=-1,i=n?n.length:0,r=Array(i);++e<i;)r[e]=t(n[e],e,n);return r}function pC(n,t){for(var e=-1,i=t.length,r=n.length;++e<i;)n[r+e]=t[e];return n}var Vl=Object.prototype,gC=Vl.hasOwnProperty,ql=Vl.toString,Gh=dC.Symbol,mC=Vl.propertyIsEnumerable,Kh=Gh?Gh.isConcatSpreadable:void 0,Qh=Math.max;function Zh(n,t,e,i,r){var a=-1,s=n.length;for(e||(e=xC),r||(r=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?Zh(o,t-1,e,i,r):pC(r,o):i||(r[r.length]=o)}return r}function yC(n,t){return n=Object(n),bC(n,t,function(e,i){return i in n})}function bC(n,t,e){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],o=n[s];e(o,s)&&(a[s]=o)}return a}function vC(n,t){return t=Qh(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,r=Qh(e.length-t,0),a=Array(r);++i<r;)a[i]=e[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=e[i];return s[t]=a,fC(n,this,s)}}function xC(n){return TC(n)||_C(n)||!!(Kh&&n&&n[Kh])}function wC(n){if(typeof n=="string"||OC(n))return n;var t=n+"";return t=="0"&&1/n==-iC?"-0":t}function _C(n){return DC(n)&&gC.call(n,"callee")&&(!mC.call(n,"callee")||ql.call(n)==aC)}var TC=Array.isArray;function MC(n){return n!=null&&SC(n.length)&&!CC(n)}function DC(n){return Jh(n)&&MC(n)}function CC(n){var t=kC(n)?ql.call(n):"";return t==sC||t==oC}function SC(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=rC}function kC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Jh(n){return!!n&&typeof n=="object"}function OC(n){return typeof n=="symbol"||Jh(n)&&ql.call(n)==lC}var PC=vC(function(n,t){return n==null?{}:yC(n,hC(Zh(t,1),wC))}),EC=PC;const RC=Yn(EC);var tp={exports:{}};(function(n,t){(function(e,i){i()})(me,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof me=="object"&&me.global===me?me:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):r(p.href)?i(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(r(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,d);var p=c.type==="application/octet-stream",b=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&b||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var m=g.result;m=x?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=m:location=m,f=null},g.readAsDataURL(c)}else{var y=s.URL||s.webkitURL,v=y.createObjectURL(c);f?f.location=v:location.href=v,f=null,setTimeout(function(){y.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(tp);var AC=tp.exports,ep={exports:{}};/* @license
|
|
30
30
|
Papa Parse
|
|
31
31
|
v5.4.1
|
|
32
32
|
https://github.com/mholt/PapaParse
|
|
33
33
|
License: MIT
|
|
34
|
-
*/(function(n,t){(function(e,i){n.exports=i()})(me,function e(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},r=!i.document&&!!i.postMessage,a=i.IS_PAPA_WORKER||!1,s={},o=0,l={parse:function(M,
|
|
35
|
-
`,q='"',$=q+q,z=!1,I=null,rt=!1;(function(){if(typeof
|
|
36
|
-
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!r&&!!i.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=y,l.ParserHandle=x,l.NetworkStreamer=d,l.FileStreamer=f,l.StringStreamer=p,l.ReadableStreamStreamer=b,i.jQuery){var c=i.jQuery;c.fn.parse=function(M){var
|
|
37
|
-
`),Ae=1<
|
|
34
|
+
*/(function(n,t){(function(e,i){n.exports=i()})(me,function e(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},r=!i.document&&!!i.postMessage,a=i.IS_PAPA_WORKER||!1,s={},o=0,l={parse:function(M,D){var O=(D=D||{}).dynamicTyping||!1;if(k(O)&&(D.dynamicTypingFunction=O,O={}),D.dynamicTyping=O,D.transform=!!k(D.transform)&&D.transform,D.worker&&l.WORKERS_SUPPORTED){var P=function(){if(!l.WORKERS_SUPPORTED)return!1;var F=($=i.URL||i.webkitURL||null,z=e.toString(),l.BLOB_URL||(l.BLOB_URL=$.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",z,")();"],{type:"text/javascript"})))),q=new i.Worker(F),$,z;return q.onmessage=v,q.id=o++,s[q.id]=q}();return P.userStep=D.step,P.userChunk=D.chunk,P.userComplete=D.complete,P.userError=D.error,D.step=k(D.step),D.chunk=k(D.chunk),D.complete=k(D.complete),D.error=k(D.error),delete D.worker,void P.postMessage({input:M,config:D,workerId:P.id})}var R=null;return l.NODE_STREAM_INPUT,typeof M=="string"?(M=function(F){return F.charCodeAt(0)===65279?F.slice(1):F}(M),R=D.download?new d(D):new p(D)):M.readable===!0&&k(M.read)&&k(M.on)?R=new b(D):(i.File&&M instanceof File||M instanceof Object)&&(R=new f(D)),R.stream(M)},unparse:function(M,D){var O=!1,P=!0,R=",",F=`\r
|
|
35
|
+
`,q='"',$=q+q,z=!1,I=null,rt=!1;(function(){if(typeof D=="object"){if(typeof D.delimiter!="string"||l.BAD_DELIMITERS.filter(function(W){return D.delimiter.indexOf(W)!==-1}).length||(R=D.delimiter),(typeof D.quotes=="boolean"||typeof D.quotes=="function"||Array.isArray(D.quotes))&&(O=D.quotes),typeof D.skipEmptyLines!="boolean"&&typeof D.skipEmptyLines!="string"||(z=D.skipEmptyLines),typeof D.newline=="string"&&(F=D.newline),typeof D.quoteChar=="string"&&(q=D.quoteChar),typeof D.header=="boolean"&&(P=D.header),Array.isArray(D.columns)){if(D.columns.length===0)throw new Error("Option columns is empty");I=D.columns}D.escapeChar!==void 0&&($=D.escapeChar+q),(typeof D.escapeFormulae=="boolean"||D.escapeFormulae instanceof RegExp)&&(rt=D.escapeFormulae instanceof RegExp?D.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var B=new RegExp(g(q),"g");if(typeof M=="string"&&(M=JSON.parse(M)),Array.isArray(M)){if(!M.length||Array.isArray(M[0]))return bt(null,M,z);if(typeof M[0]=="object")return bt(I||Object.keys(M[0]),M,z)}else if(typeof M=="object")return typeof M.data=="string"&&(M.data=JSON.parse(M.data)),Array.isArray(M.data)&&(M.fields||(M.fields=M.meta&&M.meta.fields||I),M.fields||(M.fields=Array.isArray(M.data[0])?M.fields:typeof M.data[0]=="object"?Object.keys(M.data[0]):[]),Array.isArray(M.data[0])||typeof M.data[0]=="object"||(M.data=[M.data])),bt(M.fields||[],M.data||[],z);throw new Error("Unable to serialize unrecognized input");function bt(W,L,U){var j="";typeof W=="string"&&(W=JSON.parse(W)),typeof L=="string"&&(L=JSON.parse(L));var Z=Array.isArray(W)&&0<W.length,K=!Array.isArray(L[0]);if(Z&&P){for(var N=0;N<W.length;N++)0<N&&(j+=R),j+=dt(W[N],N);0<L.length&&(j+=F)}for(var A=0;A<L.length;A++){var Q=Z?W.length:L[A].length,X=!1,vt=Z?Object.keys(L[A]).length===0:L[A].length===0;if(U&&!Z&&(X=U==="greedy"?L[A].join("").trim()==="":L[A].length===1&&L[A][0].length===0),U==="greedy"&&Z){for(var ut=[],Pt=0;Pt<Q;Pt++){var _t=K?W[Pt]:Pt;ut.push(L[A][_t])}X=ut.join("").trim()===""}if(!X){for(var et=0;et<Q;et++){0<et&&!vt&&(j+=R);var xt=Z&&K?W[et]:et;j+=dt(L[A][xt],et)}A<L.length-1&&(!U||0<Q&&!vt)&&(j+=F)}}return j}function dt(W,L){if(W==null)return"";if(W.constructor===Date)return JSON.stringify(W).slice(1,25);var U=!1;rt&&typeof W=="string"&&rt.test(W)&&(W="'"+W,U=!0);var j=W.toString().replace(B,$);return(U=U||O===!0||typeof O=="function"&&O(W,L)||Array.isArray(O)&&O[L]||function(Z,K){for(var N=0;N<K.length;N++)if(-1<Z.indexOf(K[N]))return!0;return!1}(j,l.BAD_DELIMITERS)||-1<j.indexOf(R)||j.charAt(0)===" "||j.charAt(j.length-1)===" ")?q+j+q:j}}};if(l.RECORD_SEP="",l.UNIT_SEP="",l.BYTE_ORDER_MARK="\uFEFF",l.BAD_DELIMITERS=["\r",`
|
|
36
|
+
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!r&&!!i.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=y,l.ParserHandle=x,l.NetworkStreamer=d,l.FileStreamer=f,l.StringStreamer=p,l.ReadableStreamStreamer=b,i.jQuery){var c=i.jQuery;c.fn.parse=function(M){var D=M.config||{},O=[];return this.each(function(F){if(!(c(this).prop("tagName").toUpperCase()==="INPUT"&&c(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var q=0;q<this.files.length;q++)O.push({file:this.files[q],inputElem:this,instanceConfig:c.extend({},D)})}),P(),this;function P(){if(O.length!==0){var F,q,$,z,I=O[0];if(k(M.before)){var rt=M.before(I.file,I.inputElem);if(typeof rt=="object"){if(rt.action==="abort")return F="AbortError",q=I.file,$=I.inputElem,z=rt.reason,void(k(M.error)&&M.error({name:F},q,$,z));if(rt.action==="skip")return void R();typeof rt.config=="object"&&(I.instanceConfig=c.extend(I.instanceConfig,rt.config))}else if(rt==="skip")return void R()}var B=I.instanceConfig.complete;I.instanceConfig.complete=function(bt){k(B)&&B(bt,I.file,I.inputElem),R()},l.parse(I.file,I.instanceConfig)}else k(M.complete)&&M.complete()}function R(){O.splice(0,1),P()}}}function u(M){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(D){var O=T(D);O.chunkSize=parseInt(O.chunkSize),D.step||D.chunk||(O.chunkSize=null),this._handle=new x(O),(this._handle.streamer=this)._config=O}).call(this,M),this.parseChunk=function(D,O){if(this.isFirstChunk&&k(this._config.beforeFirstChunk)){var P=this._config.beforeFirstChunk(D);P!==void 0&&(D=P)}this.isFirstChunk=!1,this._halted=!1;var R=this._partialLine+D;this._partialLine="";var F=this._handle.parse(R,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var q=F.meta.cursor;this._finished||(this._partialLine=R.substring(q-this._baseIndex),this._baseIndex=q),F&&F.data&&(this._rowCount+=F.data.length);var $=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(a)i.postMessage({results:F,workerId:l.WORKER_ID,finished:$});else if(k(this._config.chunk)&&!O){if(this._config.chunk(F,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);F=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(F.data),this._completeResults.errors=this._completeResults.errors.concat(F.errors),this._completeResults.meta=F.meta),this._completed||!$||!k(this._config.complete)||F&&F.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),$||F&&F.meta.paused||this._nextChunk(),F}this._halted=!0},this._sendError=function(D){k(this._config.error)?this._config.error(D):a&&this._config.error&&i.postMessage({workerId:l.WORKER_ID,error:D,finished:!1})}}function d(M){var D;(M=M||{}).chunkSize||(M.chunkSize=l.RemoteChunkSize),u.call(this,M),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(O){this._input=O,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(D=new XMLHttpRequest,this._config.withCredentials&&(D.withCredentials=this._config.withCredentials),r||(D.onload=S(this._chunkLoaded,this),D.onerror=S(this._chunkError,this)),D.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var O=this._config.downloadRequestHeaders;for(var P in O)D.setRequestHeader(P,O[P])}if(this._config.chunkSize){var R=this._start+this._config.chunkSize-1;D.setRequestHeader("Range","bytes="+this._start+"-"+R)}try{D.send(this._config.downloadRequestBody)}catch(F){this._chunkError(F.message)}r&&D.status===0&&this._chunkError()}},this._chunkLoaded=function(){D.readyState===4&&(D.status<200||400<=D.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:D.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(O){var P=O.getResponseHeader("Content-Range");return P===null?-1:parseInt(P.substring(P.lastIndexOf("/")+1))}(D),this.parseChunk(D.responseText)))},this._chunkError=function(O){var P=D.statusText||O;this._sendError(new Error(P))}}function f(M){var D,O;(M=M||{}).chunkSize||(M.chunkSize=l.LocalChunkSize),u.call(this,M);var P=typeof FileReader<"u";this.stream=function(R){this._input=R,O=R.slice||R.webkitSlice||R.mozSlice,P?((D=new FileReader).onload=S(this._chunkLoaded,this),D.onerror=S(this._chunkError,this)):D=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var R=this._input;if(this._config.chunkSize){var F=Math.min(this._start+this._config.chunkSize,this._input.size);R=O.call(R,this._start,F)}var q=D.readAsText(R,this._config.encoding);P||this._chunkLoaded({target:{result:q}})},this._chunkLoaded=function(R){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(R.target.result)},this._chunkError=function(){this._sendError(D.error)}}function p(M){var D;u.call(this,M=M||{}),this.stream=function(O){return D=O,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var O,P=this._config.chunkSize;return P?(O=D.substring(0,P),D=D.substring(P)):(O=D,D=""),this._finished=!D,this.parseChunk(O)}}}function b(M){u.call(this,M=M||{});var D=[],O=!0,P=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(R){this._input=R,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){P&&D.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),D.length?this.parseChunk(D.shift()):O=!0},this._streamData=S(function(R){try{D.push(typeof R=="string"?R:R.toString(this._config.encoding)),O&&(O=!1,this._checkIsFinished(),this.parseChunk(D.shift()))}catch(F){this._streamError(F)}},this),this._streamError=S(function(R){this._streamCleanUp(),this._sendError(R)},this),this._streamEnd=S(function(){this._streamCleanUp(),P=!0,this._streamData("")},this),this._streamCleanUp=S(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function x(M){var D,O,P,R=Math.pow(2,53),F=-R,q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,$=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,z=this,I=0,rt=0,B=!1,bt=!1,dt=[],W={data:[],errors:[],meta:{}};if(k(M.step)){var L=M.step;M.step=function(A){if(W=A,Z())j();else{if(j(),W.data.length===0)return;I+=A.data.length,M.preview&&I>M.preview?O.abort():(W.data=W.data[0],L(W,z))}}}function U(A){return M.skipEmptyLines==="greedy"?A.join("").trim()==="":A.length===1&&A[0].length===0}function j(){return W&&P&&(N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),P=!1),M.skipEmptyLines&&(W.data=W.data.filter(function(A){return!U(A)})),Z()&&function(){if(!W)return;function A(X,vt){k(M.transformHeader)&&(X=M.transformHeader(X,vt)),dt.push(X)}if(Array.isArray(W.data[0])){for(var Q=0;Z()&&Q<W.data.length;Q++)W.data[Q].forEach(A);W.data.splice(0,1)}else W.data.forEach(A)}(),function(){if(!W||!M.header&&!M.dynamicTyping&&!M.transform)return W;function A(X,vt){var ut,Pt=M.header?{}:[];for(ut=0;ut<X.length;ut++){var _t=ut,et=X[ut];M.header&&(_t=ut>=dt.length?"__parsed_extra":dt[ut]),M.transform&&(et=M.transform(et,_t)),et=K(_t,et),_t==="__parsed_extra"?(Pt[_t]=Pt[_t]||[],Pt[_t].push(et)):Pt[_t]=et}return M.header&&(ut>dt.length?N("FieldMismatch","TooManyFields","Too many fields: expected "+dt.length+" fields but parsed "+ut,rt+vt):ut<dt.length&&N("FieldMismatch","TooFewFields","Too few fields: expected "+dt.length+" fields but parsed "+ut,rt+vt)),Pt}var Q=1;return!W.data.length||Array.isArray(W.data[0])?(W.data=W.data.map(A),Q=W.data.length):W.data=A(W.data,0),M.header&&W.meta&&(W.meta.fields=dt),rt+=Q,W}()}function Z(){return M.header&&dt.length===0}function K(A,Q){return X=A,M.dynamicTypingFunction&&M.dynamicTyping[X]===void 0&&(M.dynamicTyping[X]=M.dynamicTypingFunction(X)),(M.dynamicTyping[X]||M.dynamicTyping)===!0?Q==="true"||Q==="TRUE"||Q!=="false"&&Q!=="FALSE"&&(function(vt){if(q.test(vt)){var ut=parseFloat(vt);if(F<ut&&ut<R)return!0}return!1}(Q)?parseFloat(Q):$.test(Q)?new Date(Q):Q===""?null:Q):Q;var X}function N(A,Q,X,vt){var ut={type:A,code:Q,message:X};vt!==void 0&&(ut.row=vt),W.errors.push(ut)}this.parse=function(A,Q,X){var vt=M.quoteChar||'"';if(M.newline||(M.newline=function(_t,et){_t=_t.substring(0,1048576);var xt=new RegExp(g(et)+"([^]*?)"+g(et),"gm"),Ft=(_t=_t.replace(xt,"")).split("\r"),Se=_t.split(`
|
|
37
|
+
`),Ae=1<Se.length&&Se[0].length<Ft[0].length;if(Ft.length===1||Ae)return`
|
|
38
38
|
`;for(var ye=0,It=0;It<Ft.length;It++)Ft[It][0]===`
|
|
39
39
|
`&&ye++;return ye>=Ft.length/2?`\r
|
|
40
|
-
`:"\r"}(A,vt)),P=!1,M.delimiter)k(M.delimiter)&&(M.delimiter=M.delimiter(A),W.meta.delimiter=M.delimiter);else{var ut=function(_t,et,xt,Ft,
|
|
40
|
+
`:"\r"}(A,vt)),P=!1,M.delimiter)k(M.delimiter)&&(M.delimiter=M.delimiter(A),W.meta.delimiter=M.delimiter);else{var ut=function(_t,et,xt,Ft,Se){var Ae,ye,It,Ut;Se=Se||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var tn=0;tn<Se.length;tn++){var kt=Se[tn],Sn=0,Le=0,en=0;It=void 0;for(var _e=new y({comments:Ft,delimiter:kt,newline:et,preview:10}).parse(_t),ke=0;ke<_e.data.length;ke++)if(xt&&U(_e.data[ke]))en++;else{var Ie=_e.data[ke].length;Le+=Ie,It!==void 0?0<Ie&&(Sn+=Math.abs(Ie-It),It=Ie):It=Ie}0<_e.data.length&&(Le/=_e.data.length-en),(ye===void 0||Sn<=ye)&&(Ut===void 0||Ut<Le)&&1.99<Le&&(ye=Sn,Ae=kt,Ut=Le)}return{successful:!!(M.delimiter=Ae),bestDelimiter:Ae}}(A,M.newline,M.skipEmptyLines,M.comments,M.delimitersToGuess);ut.successful?M.delimiter=ut.bestDelimiter:(P=!0,M.delimiter=l.DefaultDelimiter),W.meta.delimiter=M.delimiter}var Pt=T(M);return M.preview&&M.header&&Pt.preview++,D=A,O=new y(Pt),W=O.parse(D,Q,X),j(),B?{meta:{paused:!0}}:W||{meta:{paused:!1}}},this.paused=function(){return B},this.pause=function(){B=!0,O.abort(),D=k(M.chunk)?"":D.substring(O.getCharIndex())},this.resume=function(){z.streamer._halted?(B=!1,z.streamer.parseChunk(D,!0)):setTimeout(z.resume,3)},this.aborted=function(){return bt},this.abort=function(){bt=!0,O.abort(),W.meta.aborted=!0,k(M.complete)&&M.complete(W),D=""}}function g(M){return M.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(M){var D,O=(M=M||{}).delimiter,P=M.newline,R=M.comments,F=M.step,q=M.preview,$=M.fastMode,z=D=M.quoteChar===void 0||M.quoteChar===null?'"':M.quoteChar;if(M.escapeChar!==void 0&&(z=M.escapeChar),(typeof O!="string"||-1<l.BAD_DELIMITERS.indexOf(O))&&(O=","),R===O)throw new Error("Comment character same as delimiter");R===!0?R="#":(typeof R!="string"||-1<l.BAD_DELIMITERS.indexOf(R))&&(R=!1),P!==`
|
|
41
41
|
`&&P!=="\r"&&P!==`\r
|
|
42
42
|
`&&(P=`
|
|
43
|
-
`);var I=0,rt=!1;this.parse=function(B,bt,dt){if(typeof B!="string")throw new Error("Input must be a string");var W=B.length,L=O.length,U=P.length,j=R.length,Z=k(F),K=[],N=[],A=[],Q=I=0;if(!B)return ue();if(M.header&&!bt){var X=B.split(P)[0].split(O),vt=[],ut={},Pt=!1;for(var _t in X){var et=X[_t];k(M.transformHeader)&&(et=M.transformHeader(et,_t));var xt=et,Ft=ut[et]||0;for(0<Ft&&(Pt=!0,xt=et+"_"+Ft),ut[et]=Ft+1;vt.includes(xt);)xt=xt+"_"+Ft;vt.push(xt)}if(Pt){var
|
|
44
|
-
`+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});AS.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IS))}}),FS=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NS,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),US={class:"kong-ui-public-csv-export-modal"},BS={key:0,class:"selected-range"},YS={key:1,class:"text-muted",tag:"span"},np=3,ip=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=Dt.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=i.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=Dt.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(np,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{r("toggleModal",!1)},p=h.computed(()=>{var T,D,k;if(!o.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=i.chartData.data.some(M=>M.timestamp!==i.chartData.data[0].timestamp),g=i.chartData.data.map(M=>{const C=new Date(M.timestamp);return{...Object.keys(M.event).reduce((P,R)=>{if(R in i.chartData.meta.display){const F=M.event[R],q=i.chartData.meta.display[R];P[R]=F&&q&&q[F].name||M.event[R]}else P[R]=M.event[R];return P},{}),...x?{timestamp:ko(C,"yyyy-MM-dd HH:mm:ss"),tzOffset:ko(C,"XXX")}:{}}});let y=[];x&&(y=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in i.chartData.meta&&((D=i.chartData.meta)!=null&&D.display)?(k=i.chartData.meta)==null?void 0:k.display:{},m=[...y,...Object.keys(v).map(M=>({label:e.t(`chartLabels.${M}`),key:M})),...i.chartData.meta.metric_names.map(M=>({label:e.t(`chartLabels.${M}`),key:M}))],w=m.reduce((M,C)=>(M[C.key]=C.label,M),{});return{headers:m,csvHeaders:w,rows:g}}),b=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,np)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),m=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",US,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BS,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:b,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"cta-is-hidden":"",icon:"stateNoData","icon-size":"96"},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),message:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",YS,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(m,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FS,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(m,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),rp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=Dt.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),r=h.ref(!1),a=o=>{r.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),r.value?(h.openBlock(),h.createBlock(ip,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),WS={class:"analytics-chart-shell"},zS={key:0,class:"chart-header"},HS={key:0,class:"chart-title"},$S={class:"chart-header-icons-wrapper"},jS={key:1,class:"chart-export-button"},VS={key:2,class:"analytics-chart-parent"},qS=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Dt.useI18n(),i=h.toRef(t,"chartData"),r=h.computed(()=>p.value?Dt.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Se},h.toRef(t,"chartData")).value:Dt.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Se},h.toRef(t,"chartData")).value),a=h.computed(()=>{var M;return(M=t.chartData)!=null&&M.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var M;return(M=t.chartData.meta)!=null&&M.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=Dt.useChartLegendValues(r,t.chartOptions.type,s),c=h.computed(()=>{var M,C,O;return((O=(C=(M=t.chartData)==null?void 0:M.meta)==null?void 0:C.limit)==null?void 0:O.toString())||null}),u=h.computed(()=>{var M,C;return((C=(M=t.chartData)==null?void 0:M.meta)==null?void 0:C.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ne.VERTICAL_BAR.toString(),ne.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ne.TIMESERIES_BAR,ne.TIMESERIES_LINE].some(M=>M===t.chartOptions.type)),b=h.computed(()=>t.chartOptions.type===ne.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var O,P,R;if(!((O=t.chartData)!=null&&O.meta.metric_names)||!((P=t.chartData)!=null&&P.meta.metric_units))return;const M=t.chartData.meta.metric_names[0],C=t.chartData.meta.metric_units[M];return((R=t.chartOptions)==null?void 0:R.metricAxesTitle)||e.te(`metricAxisTitles.${M}`)&&e.te(`chartUnits.${C}`)&&e.t(`metricAxisTitles.${M}`,{unit:e.t(`chartUnits.${C}`,{plural:"s"})})||void 0}),y=h.computed(()=>{const M=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||void 0}),v=h.computed(()=>{const M=Ml(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${M}`)}),m=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?Ew(r.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),D=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?Ml(t.chartData.meta.granularity_ms)||lt.HOURLY:Ml(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||lt.HOURLY);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(M,C)=>{const O=h.resolveComponent("KTooltip"),P=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",WS,[D.value?(h.openBlock(),h.createElementBlock("div",zS,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HS,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$S,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(O,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(fC),{color:h.unref(pC),decorative:"",size:h.unref(gC)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jS,[h.createVNode(rp,{data:i.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VS,[p.value?(h.openBlock(),h.createBlock(tS,{key:0,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":v.value,fill:n.chartOptions.fill,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(YC,{key:1,annotations:n.showAnnotations,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":y.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):b.value?(h.openBlock(),h.createBlock(ZC,{key:2,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(P,{key:1,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(m.value),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),XS=Je(qS,[["__scopeId","data-v-75978674"]]),GS={class:"chart-parent","data-testid":"doughnut-chart-parent"},KS={class:"chart-totals-flex"},QS={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZS=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:li.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Se},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}=Dt.useI18n(),i=h.ref(Cn()),r=h.computed(()=>[t.chartData.datasets.reduce((b,x)=>(b.labels.push(x.label),b.borderColor.push(x.backgroundColor),b.backgroundColor.push(x.backgroundColor),b.data.push(x.data.reduce((g,y)=>g+y,0)),b),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));Dt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return ar((p=r==null?void 0:r.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,b;return ar(((p=r==null?void 0:r.value[0])==null?void 0:p.data[0])+((b=r==null?void 0:r.value[0])==null?void 0:b.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=r==null?void 0:r.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[li.Full,li.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===li.Full);return(p,b)=>(h.openBlock(),h.createElementBlock("div",GS,[h.createElementVNode("div",KS,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QS,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JS=Je(ZS,[["__scopeId","data-v-5871cb7a"]]),tD={class:"simple-chart-shell"},eD={key:1,class:"analytics-chart-parent"},nD=Je(h.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}=Dt.useI18n(),i=h.computed(()=>{var c;const l=Dt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Se},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ia.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tD,[o.value?(h.openBlock(),h.createElementBlock("div",eD,[a.value?(h.openBlock(),h.createBlock(JS,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-7d1a0034"]]),iD={class:"top-n-card-title","data-testid":"top-n-card-title"},rD={class:"top-n-card-description","data-testid":"top-n-card-description"},aD={key:3,class:"top-n-table","data-testid":"top-n-table"},sD={class:"table-headings"},oD={class:"table-row"},lD={class:"column-1"},cD={class:"column-2"},uD={class:"table-body","data-testid":"top-n-data"},dD=["data-testid"],fD={class:"column-1"},hD={class:"column-2"},pD=Je(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=Dt.useI18n(),i=h.computed(()=>t.data.data),r=h.computed(()=>{var b;return!!((b=i.value)!=null&&b.length)}),a=h.computed(()=>{var b,x;return(b=t.data.meta)!=null&&b.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var b,x;return(x=(b=t.data.meta)==null?void 0:b.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=b=>{const x=b.event;return String(x[a.value])},d=b=>{const x=u(b),g=s.value&&s.value[x];return g?g.name:"-"},f=b=>{const x=u(b),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=b=>{if(!o.value)return"–";const g=b.event[o.value];return g?ar(g,{capital:!0,round:!0}):"–"};return(b,x)=>{const g=h.resolveComponent("KEmptyState"),y=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"cta-is-hidden":"","data-testid":"top-n-error-state","is-error":""},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(y,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",aD,[h.createElementVNode("div",sD,[h.createElementVNode("div",oD,[h.createElementVNode("div",lD,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(m,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(m)}`},[h.createElementVNode("div",fD,[h.renderSlot(b.$slots,"name",{record:{id:u(m),name:d(m),deleted:f(m),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(m)),1)],!0)]),h.createElementVNode("div",hD," "+h.toDisplayString(p(m)),1)],8,dD))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"cta-is-hidden":"","data-testid":"top-n-empty-state",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",iD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",rD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-d86b0a91"]]),Xl="#e0e4ea",gD={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"]},fr=(n,t)=>{let e=1;const i=gD[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},ap=new Map([[100,fr("100",[100,101,102,103])],[200,fr("200",[200,201,202,203,204,205,206,207,208,226])],[300,fr("300",[300,301,302,303,304,305,307,308])],[400,fr("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,fr("500",[500,501,502,503,504,505,506,507,508,510,511])]]),sp=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=ap.get(e);return i===void 0?Xl:i.get(t)??i.get(-1)??Xl},mD=n=>{const t=sp(n);return{solid:t,light:t}};st.AnalyticsChart=XS,st.ChartLegendPosition=Wt,st.ChartMetricDisplay=li,st.ChartTypes=ne,st.ChartTypesSimple=ia,st.CsvExportButton=rp,st.CsvExportModal=ip,st.DECIMAL_DISPLAY=wf,st.FONT_SIZE_REGULAR=Tf,st.FONT_SIZE_SMALL=_f,st.MAX_LABEL_LENGTH=oa,st.OTHERS_COLOR=q_,st.SimpleChart=nD,st.TopNTable=pD,st.ValidType=Xn,st.accessibleGrey=Cf,st.apiRequestStatusCodeColors=Sf,st.codesInSpec=ap,st.darkenColor=rr,st.datavisPalette=Se,st.errorRateColors=j_,st.formatTime=sa,st.latencyColors=V_,st.lightGrey=Xl,st.lookupColor=X_,st.lookupDatavisColor=ui,st.lookupStatusCodeCategoryColor=mD,st.lookupStatusCodeColor=sp,st.numberFormatter=aa,st.statusCodeBadgeBackgroundColor=H_,st.trafficColors=$_,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
`);var I=0,rt=!1;this.parse=function(B,bt,dt){if(typeof B!="string")throw new Error("Input must be a string");var W=B.length,L=O.length,U=P.length,j=R.length,Z=k(F),K=[],N=[],A=[],Q=I=0;if(!B)return ue();if(M.header&&!bt){var X=B.split(P)[0].split(O),vt=[],ut={},Pt=!1;for(var _t in X){var et=X[_t];k(M.transformHeader)&&(et=M.transformHeader(et,_t));var xt=et,Ft=ut[et]||0;for(0<Ft&&(Pt=!0,xt=et+"_"+Ft),ut[et]=Ft+1;vt.includes(xt);)xt=xt+"_"+Ft;vt.push(xt)}if(Pt){var Se=B.split(P);Se[0]=vt.join(O),B=Se.join(P)}}if($||$!==!1&&B.indexOf(D)===-1){for(var Ae=B.split(P),ye=0;ye<Ae.length;ye++){if(A=Ae[ye],I+=A.length,ye!==Ae.length-1)I+=P.length;else if(dt)return ue();if(!R||A.substring(0,j)!==R){if(Z){if(K=[],en(A.split(O)),be(),rt)return ue()}else en(A.split(O));if(q&&q<=ye)return K=K.slice(0,q),ue(!0)}}return ue()}for(var It=B.indexOf(O,I),Ut=B.indexOf(P,I),tn=new RegExp(g(z)+g(D),"g"),kt=B.indexOf(D,I);;)if(B[I]!==D)if(R&&A.length===0&&B.substring(I,I+j)===R){if(Ut===-1)return ue();I=Ut+U,Ut=B.indexOf(P,I),It=B.indexOf(O,I)}else if(It!==-1&&(It<Ut||Ut===-1))A.push(B.substring(I,It)),I=It+L,It=B.indexOf(O,I);else{if(Ut===-1)break;if(A.push(B.substring(I,Ut)),Ie(Ut+U),Z&&(be(),rt))return ue();if(q&&K.length>=q)return ue(!0)}else for(kt=I,I++;;){if((kt=B.indexOf(D,kt+1))===-1)return dt||N.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:K.length,index:I}),ke();if(kt===W-1)return ke(B.substring(I,kt).replace(tn,D));if(D!==z||B[kt+1]!==z){if(D===z||kt===0||B[kt-1]!==z){It!==-1&&It<kt+1&&(It=B.indexOf(O,kt+1)),Ut!==-1&&Ut<kt+1&&(Ut=B.indexOf(P,kt+1));var Sn=_e(Ut===-1?It:Math.min(It,Ut));if(B.substr(kt+1+Sn,L)===O){A.push(B.substring(I,kt).replace(tn,D)),B[I=kt+1+Sn+L]!==D&&(kt=B.indexOf(D,I)),It=B.indexOf(O,I),Ut=B.indexOf(P,I);break}var Le=_e(Ut);if(B.substring(kt+1+Le,kt+1+Le+U)===P){if(A.push(B.substring(I,kt).replace(tn,D)),Ie(kt+1+Le+U),It=B.indexOf(O,I),kt=B.indexOf(D,I),Z&&(be(),rt))return ue();if(q&&K.length>=q)return ue(!0);break}N.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:K.length,index:I}),kt++}}else kt++}return ke();function en(Qt){K.push(Qt),Q=I}function _e(Qt){var _a=0;if(Qt!==-1){var vi=B.substring(kt+1,Qt);vi&&vi.trim()===""&&(_a=vi.length)}return _a}function ke(Qt){return dt||(Qt===void 0&&(Qt=B.substring(I)),A.push(Qt),I=W,en(A),Z&&be()),ue()}function Ie(Qt){I=Qt,en(A),A=[],Ut=B.indexOf(P,I)}function ue(Qt){return{data:K,errors:N,meta:{delimiter:O,linebreak:P,aborted:rt,truncated:!!Qt,cursor:Q+(bt||0)}}}function be(){F(ue()),K=[],N=[]}},this.abort=function(){rt=!0},this.getCharIndex=function(){return I}}function v(M){var D=M.data,O=s[D.workerId],P=!1;if(D.error)O.userError(D.error,D.file);else if(D.results&&D.results.data){var R={abort:function(){P=!0,m(D.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:w,resume:w};if(k(O.userStep)){for(var F=0;F<D.results.data.length&&(O.userStep({data:D.results.data[F],errors:D.results.errors,meta:D.results.meta},R),!P);F++);delete D.results}else k(O.userChunk)&&(O.userChunk(D.results,R,D.file),delete D.results)}D.finished&&!P&&m(D.workerId,D.results)}function m(M,D){var O=s[M];k(O.userComplete)&&O.userComplete(D),O.terminate(),delete s[M]}function w(){throw new Error("Not implemented.")}function T(M){if(typeof M!="object"||M===null)return M;var D=Array.isArray(M)?[]:{};for(var O in M)D[O]=T(M[O]);return D}function S(M,D){return function(){M.apply(D,arguments)}}function k(M){return typeof M=="function"}return a&&(i.onmessage=function(M){var D=M.data;if(l.WORKER_ID===void 0&&D&&(l.WORKER_ID=D.workerId),typeof D.input=="string")i.postMessage({workerId:l.WORKER_ID,results:l.parse(D.input,D.config),finished:!0});else if(i.File&&D.input instanceof File||D.input instanceof Object){var O=l.parse(D.input,D.config);O&&i.postMessage({workerId:l.WORKER_ID,results:O,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(p.prototype=Object.create(p.prototype)).constructor=p,(b.prototype=Object.create(u.prototype)).constructor=b,l})})(ep);var LC=ep.exports;const IC=["id"],NC=h.defineComponent({__name:"VueJsonCsv",props:{data:{type:Array,required:!0},fields:{type:Array,required:!1,default:null},labels:{type:Object,required:!1,default:null},filename:{type:String,default:"report-data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},testing:{type:Boolean,required:!1,default:!1}},emits:["export-started","export-finished"],setup(n,{emit:t}){const e=t,i=n,r=h.computed(()=>`export_${new Date().getTime()}`),a=h.computed(()=>{const u=l();return u.length?u:null}),s=()=>{const u=i.labels;if(typeof i.fields!==Xn.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===Xn.Object?d=>nC(d,(f,p)=>u[p]||p):d=>d},o=()=>{const u=i.fields;if(typeof i.fields!==Xn.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>RC(d,u):d=>d},l=()=>{if(typeof i.fields===Xn.Undefined&&typeof i.labels===Xn.Undefined)return i.data;const u=s(),d=o();return i.data.map(f=>u(d(f)))},c=()=>{if(!(a!=null&&a.value)){console.warn("No data to export");return}e("export-started",a.value);let u=LC.unparse(a.value,Object.assign({delimiter:i.delimiter,encoding:i.encoding}));if(i.separatorExcel&&(u="SEP="+i.delimiter+`\r
|
|
44
|
+
`+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});AC.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IC))}}),FC=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NC,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),UC={class:"kong-ui-public-csv-export-modal"},BC={key:0,class:"selected-range"},YC={key:1,class:"text-muted",tag:"span"},np=3,ip=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=St.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=i.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=St.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(np,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{r("toggleModal",!1)},p=h.computed(()=>{var T,S,k;if(!o.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=i.chartData.data.some(M=>M.timestamp!==i.chartData.data[0].timestamp),g=i.chartData.data.map(M=>{const D=new Date(M.timestamp);return{...Object.keys(M.event).reduce((P,R)=>{if(R in i.chartData.meta.display){const F=M.event[R],q=i.chartData.meta.display[R];P[R]=F&&q&&q[F].name||M.event[R]}else P[R]=M.event[R];return P},{}),...x?{timestamp:ko(D,"yyyy-MM-dd HH:mm:ss"),tzOffset:ko(D,"XXX")}:{}}});let y=[];x&&(y=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in i.chartData.meta&&((S=i.chartData.meta)!=null&&S.display)?(k=i.chartData.meta)==null?void 0:k.display:{},m=[...y,...Object.keys(v).map(M=>({label:e.t(`chartLabels.${M}`),key:M})),...i.chartData.meta.metric_names.map(M=>({label:e.t(`chartLabels.${M}`),key:M}))],w=m.reduce((M,D)=>(M[D.key]=D.label,M),{});return{headers:m,csvHeaders:w,rows:g}}),b=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,np)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),m=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",UC,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BC,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:b,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"cta-is-hidden":"",icon:"stateNoData","icon-size":"96"},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),message:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",YC,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(m,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FC,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(m,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),rp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),r=h.ref(!1),a=o=>{r.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),r.value?(h.openBlock(),h.createBlock(ip,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),WC={class:"analytics-chart-shell"},zC={key:0,class:"chart-header"},HC={key:0,class:"chart-title"},$C={class:"chart-header-icons-wrapper"},jC={key:1,class:"chart-export-button"},VC={key:2,class:"analytics-chart-parent"},qC=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.toRef(t,"chartData"),r=h.computed(()=>p.value?St.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value:St.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value),a=h.computed(()=>{var M;return(M=t.chartData)!=null&&M.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var M;return(M=t.chartData.meta)!=null&&M.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=St.useChartLegendValues(r,t.chartOptions.type,s),c=h.computed(()=>{var M,D,O;return((O=(D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.limit)==null?void 0:O.toString())||null}),u=h.computed(()=>{var M,D;return((D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ne.VERTICAL_BAR.toString(),ne.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ne.TIMESERIES_BAR,ne.TIMESERIES_LINE].some(M=>M===t.chartOptions.type)),b=h.computed(()=>t.chartOptions.type===ne.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var O,P,R;if(!((O=t.chartData)!=null&&O.meta.metric_names)||!((P=t.chartData)!=null&&P.meta.metric_units))return;const M=t.chartData.meta.metric_names[0],D=t.chartData.meta.metric_units[M];return((R=t.chartOptions)==null?void 0:R.metricAxesTitle)||e.te(`metricAxisTitles.${M}`)&&e.te(`chartUnits.${D}`)&&e.t(`metricAxisTitles.${M}`,{unit:e.t(`chartUnits.${D}`,{plural:"s"})})||void 0}),y=h.computed(()=>{const M=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||void 0}),v=h.computed(()=>{const M=Ml(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${M}`)}),m=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?Ew(r.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),S=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?Ml(t.chartData.meta.granularity_ms)||lt.HOURLY:Ml(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||lt.HOURLY);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(M,D)=>{const O=h.resolveComponent("KTooltip"),P=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",WC,[S.value?(h.openBlock(),h.createElementBlock("div",zC,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HC,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$C,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(O,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(fD),{color:h.unref(pD),decorative:"",size:h.unref(gD)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jC,[h.createVNode(rp,{data:i.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VC,[p.value?(h.openBlock(),h.createBlock(tC,{key:0,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":v.value,fill:n.chartOptions.fill,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(YD,{key:1,annotations:n.showAnnotations,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":y.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):b.value?(h.openBlock(),h.createBlock(ZD,{key:2,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(P,{key:1,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(m.value),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),XC=Je(qC,[["__scopeId","data-v-75978674"]]),GC={class:"chart-parent","data-testid":"doughnut-chart-parent"},KC={class:"chart-totals-flex"},QC={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZC=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:li.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ce},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}=St.useI18n(),i=h.ref(Dn()),r=h.computed(()=>[t.chartData.datasets.reduce((b,x)=>(b.labels.push(x.label),b.borderColor.push(x.backgroundColor),b.backgroundColor.push(x.backgroundColor),b.data.push(x.data.reduce((g,y)=>g+y,0)),b),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return ar((p=r==null?void 0:r.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,b;return ar(((p=r==null?void 0:r.value[0])==null?void 0:p.data[0])+((b=r==null?void 0:r.value[0])==null?void 0:b.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=r==null?void 0:r.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[li.Full,li.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===li.Full);return(p,b)=>(h.openBlock(),h.createElementBlock("div",GC,[h.createElementVNode("div",KC,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QC,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JC=Je(ZC,[["__scopeId","data-v-5871cb7a"]]),tS={class:"simple-chart-shell"},eS={key:1,class:"analytics-chart-parent"},nS=Je(h.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}=St.useI18n(),i=h.computed(()=>{var c;const l=St.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ia.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tS,[o.value?(h.openBlock(),h.createElementBlock("div",eS,[a.value?(h.openBlock(),h.createBlock(JC,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-7d1a0034"]]),iS={class:"top-n-card-title","data-testid":"top-n-card-title"},rS={class:"top-n-card-description","data-testid":"top-n-card-description"},aS={key:3,class:"top-n-table","data-testid":"top-n-table"},sS={class:"table-headings"},oS={class:"table-row"},lS={class:"column-1"},cS={class:"column-2"},uS={class:"table-body","data-testid":"top-n-data"},dS=["data-testid"],fS={class:"column-1"},hS={class:"column-2"},pS=Je(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.data.data),r=h.computed(()=>{var b;return!!((b=i.value)!=null&&b.length)}),a=h.computed(()=>{var b,x;return(b=t.data.meta)!=null&&b.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var b,x;return(x=(b=t.data.meta)==null?void 0:b.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=b=>{const x=b.event;return String(x[a.value])},d=b=>{const x=u(b),g=s.value&&s.value[x];return g?g.name:"-"},f=b=>{const x=u(b),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=b=>{if(!o.value)return"–";const g=b.event[o.value];return g?ar(g,{capital:!0,round:!0}):"–"};return(b,x)=>{const g=h.resolveComponent("KEmptyState"),y=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"cta-is-hidden":"","data-testid":"top-n-error-state","is-error":""},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(y,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",aS,[h.createElementVNode("div",sS,[h.createElementVNode("div",oS,[h.createElementVNode("div",lS,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cS,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(m,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(m)}`},[h.createElementVNode("div",fS,[h.renderSlot(b.$slots,"name",{record:{id:u(m),name:d(m),deleted:f(m),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(m)),1)],!0)]),h.createElementVNode("div",hS," "+h.toDisplayString(p(m)),1)],8,dS))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"cta-is-hidden":"","data-testid":"top-n-empty-state",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",iS,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",rS,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-d86b0a91"]]),Xl="#e0e4ea",gS={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"]},fr=(n,t)=>{let e=1;const i=gS[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},ap=new Map([[100,fr("100",[100,101,102,103])],[200,fr("200",[200,201,202,203,204,205,206,207,208,226])],[300,fr("300",[300,301,302,303,304,305,307,308])],[400,fr("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,fr("500",[500,501,502,503,504,505,506,507,508,510,511])]]),sp=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=ap.get(e);return i===void 0?Xl:i.get(t)??i.get(-1)??Xl},mS=n=>{const t=sp(n);return{solid:t,light:t}};st.AnalyticsChart=XC,st.ChartLegendPosition=Wt,st.ChartMetricDisplay=li,st.ChartTypes=ne,st.ChartTypesSimple=ia,st.CsvExportButton=rp,st.CsvExportModal=ip,st.DECIMAL_DISPLAY=wf,st.FONT_SIZE_REGULAR=Tf,st.FONT_SIZE_SMALL=_f,st.MAX_LABEL_LENGTH=oa,st.OTHERS_COLOR=q_,st.SimpleChart=nS,st.TopNTable=pS,st.ValidType=Xn,st.accessibleGrey=Df,st.apiRequestStatusCodeColors=Cf,st.codesInSpec=ap,st.darkenColor=rr,st.datavisPalette=Ce,st.errorRateColors=j_,st.formatTime=sa,st.latencyColors=V_,st.lightGrey=Xl,st.lookupColor=X_,st.lookupDatavisColor=ui,st.lookupStatusCodeCategoryColor=mS,st.lookupStatusCodeColor=sp,st.numberFormatter=aa,st.statusCodeBadgeBackgroundColor=H_,st.trafficColors=$_,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
|