Linux premium61.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
LiteSpeed
Server IP : 185.61.154.53 & Your IP : 216.73.216.73
Domains :
Cant Read [ /etc/named.conf ]
User : vdeshvpx
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
vdeshvpx /
.ssh /
app.linkcrow.com /
assets /
Delete
Unzip
Name
Size
Permission
Date
Action
8-CQnrj2m9.jpg
14.79
KB
-rw-r--r--
2026-03-01 02:13
Add-B3ZxdN7d.js
342.7
KB
-rw-r--r--
2026-03-01 02:13
Cards-C-rLykMm.js
14.53
KB
-rw-r--r--
2026-03-01 02:13
Dashboard-B2x_Gtk7.js
237.04
KB
-rw-r--r--
2026-03-01 02:13
ForgotPassword-DdaiaBrE.js
3.08
KB
-rw-r--r--
2026-03-01 02:13
Invoices-Bjy2Bzcx.js
5.9
KB
-rw-r--r--
2026-03-01 02:13
InvoicesSingle-CzLnYQ-B.js
3.87
KB
-rw-r--r--
2026-03-01 02:13
List-B4ui6DUt.js
8.86
KB
-rw-r--r--
2026-03-01 02:13
List-CnIEC-M9.js
5.67
KB
-rw-r--r--
2026-03-01 02:13
Login-CVc3_wAi.js
3.92
KB
-rw-r--r--
2026-03-01 02:13
Page404-CLcIwN_y.js
1007
B
-rw-r--r--
2026-03-01 02:13
PageLoader-Dm-SyNWK.js
994
B
-rw-r--r--
2026-03-01 02:13
Payment-DF62jehW.js
9.42
KB
-rw-r--r--
2026-03-01 02:13
Profile-DGskeuND.js
11.48
KB
-rw-r--r--
2026-03-01 02:13
Register-BQap05Lu.js
6.09
KB
-rw-r--r--
2026-03-01 02:13
ResetPassword-B9DtgV3M.js
3.94
KB
-rw-r--r--
2026-03-01 02:13
Single-DTG1yelg.js
9.44
KB
-rw-r--r--
2026-03-01 02:13
TableComponent-P8ojSY5R.js
4.82
KB
-rw-r--r--
2026-03-01 02:13
TableCountTextComponent-D5Edl8_M.js
6.18
KB
-rw-r--r--
2026-03-01 02:13
american-express-IWwvyWWn.png
18.8
KB
-rw-r--r--
2026-03-01 02:13
auth-bg-BjvcqyUd.js
1.25
KB
-rw-r--r--
2026-03-01 02:13
auth-bg-H1yoVqGR.jpg
829.01
KB
-rw-r--r--
2026-03-01 02:13
billingStore-mCQFsieo.js
1.96
KB
-rw-r--r--
2026-03-01 02:13
cil-plus-D8mtC-W5.js
220
B
-rw-r--r--
2026-03-01 02:13
diners-club-C84criIS.png
12.26
KB
-rw-r--r--
2026-03-01 02:13
discover-B1TNMLx7.png
24.06
KB
-rw-r--r--
2026-03-01 02:13
index-CyQc2ntU.css
346.12
KB
-rw-r--r--
2026-03-01 02:13
index-Zp7qrHdE.js
518.95
KB
-rw-r--r--
2026-03-01 02:13
jcb-BfGD-1sm.png
18.55
KB
-rw-r--r--
2026-03-01 02:13
linkStore-DFKlxNHW.js
1.44
KB
-rw-r--r--
2026-03-01 02:13
logo-ERgtlAJY.png
27.02
KB
-rw-r--r--
2026-03-01 02:13
main-BwvqkGkB.js
182.28
KB
-rw-r--r--
2026-03-01 02:13
main-quVtzbnD.css
23.39
KB
-rw-r--r--
2026-03-01 02:13
master-CTNxQyRH.png
31.82
KB
-rw-r--r--
2026-03-01 02:13
moment-C5S46NFB.js
59.38
KB
-rw-r--r--
2026-03-01 02:13
orderStore-CJQxF20G.js
6.57
KB
-rw-r--r--
2026-03-01 02:13
unionpay-DgSOWRjV.png
31.95
KB
-rw-r--r--
2026-03-01 02:13
visa-Dmql89PY.png
14.6
KB
-rw-r--r--
2026-03-01 02:13
Save
Rename
var tl=Object.defineProperty;var el=(e,t,i)=>t in e?tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var w=(e,t,i)=>el(e,typeof t!="symbol"?t+"":t,i);import{d as il,r as lt,s as nl,c as mt,o as Pr,a as sl,b as ol,h as fs,e as En,f as rl,g as St,i as ht,j as fn,w as W,k as R,l as A,t as Qe,u as F,m as al,n as ll,p as Tt,F as cl,q as ve,R as gs,v as yt,x as hl}from"./index-Zp7qrHdE.js";import{_ as dl}from"./TableComponent-P8ojSY5R.js";import{_ as ul}from"./PageLoader-Dm-SyNWK.js";import{h as fl}from"./moment-C5S46NFB.js";/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License */function Ke(e){return e+.5|0}const Lt=(e,t,i)=>Math.max(Math.min(e,i),t);function Pe(e){return Lt(Ke(e*2.55),0,255)}function It(e){return Lt(Ke(e*255),0,255)}function Mt(e){return Lt(Ke(e/2.55)/100,0,1)}function ps(e){return Lt(Ke(e*100),0,100)}const at={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},gn=[..."0123456789ABCDEF"],gl=e=>gn[e&15],pl=e=>gn[(e&240)>>4]+gn[e&15],ti=e=>(e&240)>>4===(e&15),ml=e=>ti(e.r)&&ti(e.g)&&ti(e.b)&&ti(e.a);function bl(e){var t=e.length,i;return e[0]==="#"&&(t===4||t===5?i={r:255&at[e[1]]*17,g:255&at[e[2]]*17,b:255&at[e[3]]*17,a:t===5?at[e[4]]*17:255}:(t===7||t===9)&&(i={r:at[e[1]]<<4|at[e[2]],g:at[e[3]]<<4|at[e[4]],b:at[e[5]]<<4|at[e[6]],a:t===9?at[e[7]]<<4|at[e[8]]:255})),i}const _l=(e,t)=>e<255?t(e):"";function yl(e){var t=ml(e)?gl:pl;return e?"#"+t(e.r)+t(e.g)+t(e.b)+_l(e.a,t):void 0}const xl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Cr(e,t,i){const n=t*Math.min(i,1-i),s=(o,r=(o+e/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function vl(e,t,i){const n=(s,o=(s+e/60)%6)=>i-i*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function wl(e,t,i){const n=Cr(e,1,.5);let s;for(t+i>1&&(s=1/(t+i),t*=s,i*=s),s=0;s<3;s++)n[s]*=1-t-i,n[s]+=t;return n}function Sl(e,t,i,n,s){return e===s?(t-i)/n+(t<i?6:0):t===s?(i-e)/n+2:(e-t)/n+4}function In(e){const i=e.r/255,n=e.g/255,s=e.b/255,o=Math.max(i,n,s),r=Math.min(i,n,s),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=Sl(i,n,s,h,o),l=l*60+.5),[l|0,c||0,a]}function Fn(e,t,i,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,i,n)).map(It)}function Bn(e,t,i){return Fn(Cr,e,t,i)}function Ml(e,t,i){return Fn(wl,e,t,i)}function kl(e,t,i){return Fn(vl,e,t,i)}function Dr(e){return(e%360+360)%360}function Ol(e){const t=xl.exec(e);let i=255,n;if(!t)return;t[5]!==n&&(i=t[6]?Pe(+t[5]):It(+t[5]));const s=Dr(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=Ml(s,o,r):t[1]==="hsv"?n=kl(s,o,r):n=Bn(s,o,r),{r:n[0],g:n[1],b:n[2],a:i}}function Al(e,t){var i=In(e);i[0]=Dr(i[0]+t),i=Bn(i),e.r=i[0],e.g=i[1],e.b=i[2]}function Pl(e){if(!e)return;const t=In(e),i=t[0],n=ps(t[1]),s=ps(t[2]);return e.a<255?`hsla(${i}, ${n}%, ${s}%, ${Mt(e.a)})`:`hsl(${i}, ${n}%, ${s}%)`}const ms={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"},bs={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 Cl(){const e={},t=Object.keys(bs),i=Object.keys(ms);let n,s,o,r,a;for(n=0;n<t.length;n++){for(r=a=t[n],s=0;s<i.length;s++)o=i[s],a=a.replace(o,ms[o]);o=parseInt(bs[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let ei;function Dl(e){ei||(ei=Cl(),ei.transparent=[0,0,0,0]);const t=ei[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Tl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ll(e){const t=Tl.exec(e);let i=255,n,s,o;if(t){if(t[7]!==n){const r=+t[7];i=t[8]?Pe(r):Lt(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?Pe(n):Lt(n,0,255)),s=255&(t[4]?Pe(s):Lt(s,0,255)),o=255&(t[6]?Pe(o):Lt(o,0,255)),{r:n,g:s,b:o,a:i}}}function $l(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Mt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Zi=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,oe=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Rl(e,t,i){const n=oe(Mt(e.r)),s=oe(Mt(e.g)),o=oe(Mt(e.b));return{r:It(Zi(n+i*(oe(Mt(t.r))-n))),g:It(Zi(s+i*(oe(Mt(t.g))-s))),b:It(Zi(o+i*(oe(Mt(t.b))-o))),a:e.a+i*(t.a-e.a)}}function ii(e,t,i){if(e){let n=In(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*i,t===0?360:1)),n=Bn(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function Tr(e,t){return e&&Object.assign(t||{},e)}function _s(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=It(e[3]))):(t=Tr(e,{r:0,g:0,b:0,a:1}),t.a=It(t.a)),t}function El(e){return e.charAt(0)==="r"?Ll(e):Ol(e)}class Ne{constructor(t){if(t instanceof Ne)return t;const i=typeof t;let n;i==="object"?n=_s(t):i==="string"&&(n=bl(t)||Dl(t)||El(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Tr(this._rgb);return t&&(t.a=Mt(t.a)),t}set rgb(t){this._rgb=_s(t)}rgbString(){return this._valid?$l(this._rgb):void 0}hexString(){return this._valid?yl(this._rgb):void 0}hslString(){return this._valid?Pl(this._rgb):void 0}mix(t,i){if(t){const n=this.rgb,s=t.rgb;let o;const r=i===o?.5:i,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,i){return t&&(this._rgb=Rl(this._rgb,t._rgb,i)),this}clone(){return new Ne(this.rgb)}alpha(t){return this._rgb.a=It(t),this}clearer(t){const i=this._rgb;return i.a*=1-t,this}greyscale(){const t=this._rgb,i=Ke(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=i,this}opaquer(t){const i=this._rgb;return i.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 ii(this._rgb,2,t),this}darken(t){return ii(this._rgb,2,-t),this}saturate(t){return ii(this._rgb,1,t),this}desaturate(t){return ii(this._rgb,1,-t),this}rotate(t){return Al(this._rgb,t),this}}/*! * Chart.js v4.4.2 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */function xt(){}const Il=(()=>{let e=0;return()=>e++})();function $(e){return e===null||typeof e>"u"}function V(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function T(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function G(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ot(e,t){return G(e)?e:t}function P(e,t){return typeof e>"u"?t:e}const Fl=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Lr=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function B(e,t,i){if(e&&typeof e.call=="function")return e.apply(i,t)}function E(e,t,i,n){let s,o,r;if(V(e))for(o=e.length,s=0;s<o;s++)t.call(i,e[s],s);else if(T(e))for(r=Object.keys(e),o=r.length,s=0;s<o;s++)t.call(i,e[r[s]],r[s])}function ki(e,t){let i,n,s,o;if(!e||!t||e.length!==t.length)return!1;for(i=0,n=e.length;i<n;++i)if(s=e[i],o=t[i],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Oi(e){if(V(e))return e.map(Oi);if(T(e)){const t=Object.create(null),i=Object.keys(e),n=i.length;let s=0;for(;s<n;++s)t[i[s]]=Oi(e[i[s]]);return t}return e}function $r(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Bl(e,t,i,n){if(!$r(e))return;const s=t[e],o=i[e];T(s)&&T(o)?je(s,o,n):t[e]=Oi(o)}function je(e,t,i){const n=V(t)?t:[t],s=n.length;if(!T(e))return e;i=i||{};const o=i.merger||Bl;let r;for(let a=0;a<s;++a){if(r=n[a],!T(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],e,r,i)}return e}function Ee(e,t){return je(e,t,{merger:zl})}function zl(e,t,i){if(!$r(e))return;const n=t[e],s=i[e];T(n)&&T(s)?Ee(n,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Oi(s))}const ys={"":e=>e,x:e=>e.x,y:e=>e.y};function Nl(e){const t=e.split("."),i=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}function jl(e){const t=Nl(e);return i=>{for(const n of t){if(n==="")break;i=i&&i[n]}return i}}function Ft(e,t){return(ys[t]||(ys[t]=jl(t)))(e)}function zn(e){return e.charAt(0).toUpperCase()+e.slice(1)}const He=e=>typeof e<"u",Bt=e=>typeof e=="function",xs=(e,t)=>{if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0};function Hl(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const j=Math.PI,N=2*j,Vl=N+j,Ai=Number.POSITIVE_INFINITY,Wl=j/180,K=j/2,Ht=j/4,vs=j*2/3,$t=Math.log10,bt=Math.sign;function Ie(e,t,i){return Math.abs(e-t)<i}function ws(e){const t=Math.round(e);e=Ie(e,t,e/1e3)?t:e;const i=Math.pow(10,Math.floor($t(e))),n=e/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Gl(e){const t=[],i=Math.sqrt(e);let n;for(n=1;n<i;n++)e%n===0&&(t.push(n),t.push(e/n));return i===(i|0)&&t.push(i),t.sort((s,o)=>s-o).pop(),t}function ce(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Yl(e,t){const i=Math.round(e);return i-t<=e&&i+t>=e}function Rr(e,t,i){let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n][i],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function dt(e){return e*(j/180)}function Nn(e){return e*(180/j)}function Ss(e){if(!G(e))return;let t=1,i=0;for(;Math.round(e*t)/t!==e;)t*=10,i++;return i}function Er(e,t){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*j&&(o+=N),{angle:o,distance:s}}function pn(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Ul(e,t){return(e-t+Vl)%N-j}function rt(e){return(e%N+N)%N}function Ve(e,t,i,n){const s=rt(e),o=rt(t),r=rt(i),a=rt(o-s),l=rt(r-s),c=rt(s-o),h=rt(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function q(e,t,i){return Math.max(t,Math.min(i,e))}function Kl(e){return q(e,-32768,32767)}function Ot(e,t,i,n=1e-6){return e>=Math.min(t,i)-n&&e<=Math.max(t,i)+n}function jn(e,t,i){i=i||(r=>e[r]<t);let n=e.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,i(o)?s=o:n=o;return{lo:s,hi:n}}const At=(e,t,i,n)=>jn(e,i,n?s=>{const o=e[s][t];return o<i||o===i&&e[s+1][t]===i}:s=>e[s][t]<i),Xl=(e,t,i)=>jn(e,i,n=>e[n][t]>=i);function ql(e,t,i){let n=0,s=e.length;for(;n<s&&e[n]<t;)n++;for(;s>n&&e[s-1]>i;)s--;return n>0||s<e.length?e.slice(n,s):e}const Ir=["push","pop","shift","splice","unshift"];function Zl(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ir.forEach(i=>{const n="_onData"+zn(i),s=e[i];Object.defineProperty(e,i,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function Ms(e,t){const i=e._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Ir.forEach(o=>{delete e[o]}),delete e._chartjs)}function Fr(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Br=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function zr(e,t){let i=[],n=!1;return function(...s){i=s,n||(n=!0,Br.call(window,()=>{n=!1,e.apply(t,i)}))}}function Jl(e,t){let i;return function(...n){return t?(clearTimeout(i),i=setTimeout(e,t,n)):e.apply(this,n),t}}const Hn=e=>e==="start"?"left":e==="end"?"right":"center",Q=(e,t,i)=>e==="start"?t:e==="end"?i:(t+i)/2,Ql=(e,t,i,n)=>e===(n?"left":"right")?i:e==="center"?(t+i)/2:t;function Nr(e,t,i){const n=t.length;let s=0,o=n;if(e._sorted){const{iScale:r,_parsed:a}=e,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(s=q(Math.min(At(a,l,c).lo,i?n:At(t,l,r.getPixelForValue(c)).lo),0,n-1)),u?o=q(Math.max(At(a,r.axis,h,!0).hi+1,i?0:At(t,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function jr(e){const{xScale:t,yScale:i,_scaleRanges:n}=e,s={xmin:t.min,xmax:t.max,ymin:i.min,ymax:i.max};if(!n)return e._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}const ni=e=>e===0||e===1,ks=(e,t,i)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*N/i)),Os=(e,t,i)=>Math.pow(2,-10*e)*Math.sin((e-t)*N/i)+1,Fe={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*K)+1,easeOutSine:e=>Math.sin(e*K),easeInOutSine:e=>-.5*(Math.cos(j*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ni(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ni(e)?e:ks(e,.075,.3),easeOutElastic:e=>ni(e)?e:Os(e,.075,.3),easeInOutElastic(e){return ni(e)?e:e<.5?.5*ks(e*2,.1125,.45):.5+.5*Os(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Fe.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Fe.easeInBounce(e*2)*.5:Fe.easeOutBounce(e*2-1)*.5+.5};function Vn(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function As(e){return Vn(e)?e:new Ne(e)}function Ji(e){return Vn(e)?e:new Ne(e).saturate(.5).darken(.1).hexString()}const tc=["x","y","borderWidth","radius","tension"],ec=["color","borderColor","backgroundColor"];function ic(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:ec},numbers:{type:"number",properties:tc}}),e.describe("animations",{_fallback:"animation"}),e.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 nc(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ps=new Map;function sc(e,t){t=t||{};const i=e+JSON.stringify(t);let n=Ps.get(i);return n||(n=new Intl.NumberFormat(e,t),Ps.set(i,n)),n}function Xe(e,t,i){return sc(t,i).format(e)}const Hr={values(e){return V(e)?e:""+e},numeric(e,t,i){if(e===0)return"0";const n=this.chart.options.locale;let s,o=e;if(i.length>1){const c=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=oc(e,i)}const r=$t(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Xe(e,n,l)},logarithmic(e,t,i){if(e===0)return"0";const n=i[t].significand||e/Math.pow(10,Math.floor($t(e)));return[1,2,3,5,10,15].includes(n)||t>.8*i.length?Hr.numeric.call(this,e,t,i):""}};function oc(e,t){let i=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(i)>=1&&e!==Math.floor(e)&&(i=e-Math.floor(e)),i}var Fi={formatters:Hr};function rc(e){e.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,i)=>i.lineWidth,tickColor:(t,i)=>i.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:Fi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Jt=Object.create(null),mn=Object.create(null);function Be(e,t){if(!t)return e;const i=t.split(".");for(let n=0,s=i.length;n<s;++n){const o=i[n];e=e[o]||(e[o]=Object.create(null))}return e}function Qi(e,t,i){return typeof t=="string"?je(Be(e,t),i):je(Be(e,""),t)}class ac{constructor(t,i){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=n=>n.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=(n,s)=>Ji(s.backgroundColor),this.hoverBorderColor=(n,s)=>Ji(s.borderColor),this.hoverColor=(n,s)=>Ji(s.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(i)}set(t,i){return Qi(this,t,i)}get(t){return Be(this,t)}describe(t,i){return Qi(mn,t,i)}override(t,i){return Qi(Jt,t,i)}route(t,i,n,s){const o=Be(this,t),r=Be(this,n),a="_"+i;Object.defineProperties(o,{[a]:{value:o[i],writable:!0},[i]:{enumerable:!0,get(){const l=this[a],c=r[s];return T(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(i=>i(this))}}var Y=new ac({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ic,nc,rc]);function lc(e){return!e||$(e.size)||$(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Pi(e,t,i,n,s){let o=t[s];return o||(o=t[s]=e.measureText(s).width,i.push(s)),o>n&&(n=o),n}function cc(e,t,i,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),e.save(),e.font=t;let r=0;const a=i.length;let l,c,h,d,u;for(l=0;l<a;l++)if(d=i[l],d!=null&&!V(d))r=Pi(e,s,o,r,d);else if(V(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!V(u)&&(r=Pi(e,s,o,r,u));e.restore();const f=o.length/2;if(f>i.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Vt(e,t,i){const n=e.currentDevicePixelRatio,s=i!==0?Math.max(i/2,.5):0;return Math.round((t-s)*n)/n+s}function Cs(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function bn(e,t,i,n){Vr(e,t,i,n,null)}function Vr(e,t,i,n,s){let o,r,a,l,c,h,d,u;const f=t.pointStyle,g=t.rotation,p=t.radius;let m=(g||0)*Wl;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(i,n),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),f){default:s?e.ellipse(i,n,s/2,p,0,0,N):e.arc(i,n,p,0,N),e.closePath();break;case"triangle":h=s?s/2:p,e.moveTo(i+Math.sin(m)*h,n-Math.cos(m)*p),m+=vs,e.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*p),m+=vs,e.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(m+Ht)*l,d=Math.cos(m+Ht)*(s?s/2-c:l),a=Math.sin(m+Ht)*l,u=Math.sin(m+Ht)*(s?s/2-c:l),e.arc(i-d,n-a,c,m-j,m-K),e.arc(i+u,n-r,c,m-K,m),e.arc(i+d,n+a,c,m,m+K),e.arc(i-u,n+r,c,m+K,m+j),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,h=s?s/2:l,e.rect(i-h,n-l,2*h,2*l);break}m+=Ht;case"rectRot":d=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(i-d,n-a),e.lineTo(i+u,n-r),e.lineTo(i+d,n+a),e.lineTo(i-u,n+r),e.closePath();break;case"crossRot":m+=Ht;case"cross":d=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(i-d,n-a),e.lineTo(i+d,n+a),e.moveTo(i+u,n-r),e.lineTo(i-u,n+r);break;case"star":d=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(i-d,n-a),e.lineTo(i+d,n+a),e.moveTo(i+u,n-r),e.lineTo(i-u,n+r),m+=Ht,d=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(i-d,n-a),e.lineTo(i+d,n+a),e.moveTo(i+u,n-r),e.lineTo(i-u,n+r);break;case"line":r=s?s/2:Math.cos(m)*p,a=Math.sin(m)*p,e.moveTo(i-r,n-a),e.lineTo(i+r,n+a);break;case"dash":e.moveTo(i,n),e.lineTo(i+Math.cos(m)*(s?s/2:p),n+Math.sin(m)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Pt(e,t,i){return i=i||.5,!t||e&&e.x>t.left-i&&e.x<t.right+i&&e.y>t.top-i&&e.y<t.bottom+i}function Bi(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function zi(e){e.restore()}function hc(e,t,i,n,s){if(!t)return e.lineTo(i.x,i.y);if(s==="middle"){const o=(t.x+i.x)/2;e.lineTo(o,t.y),e.lineTo(o,i.y)}else s==="after"!=!!n?e.lineTo(t.x,i.y):e.lineTo(i.x,t.y);e.lineTo(i.x,i.y)}function dc(e,t,i,n){if(!t)return e.lineTo(i.x,i.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function uc(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),$(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function fc(e,t,i,n,s){if(s.strikethrough||s.underline){const o=e.measureText(n),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,c=i+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,h),e.lineTo(a,h),e.stroke()}}function gc(e,t){const i=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=i}function Qt(e,t,i,n,s,o={}){const r=V(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,uc(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&gc(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),$(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,i,n,o.maxWidth)),e.fillText(c,i,n,o.maxWidth),fc(e,i,n,c,o),n+=Number(s.lineHeight);e.restore()}function We(e,t){const{x:i,y:n,w:s,h:o,radius:r}=t;e.arc(i+r.topLeft,n+r.topLeft,r.topLeft,1.5*j,j,!0),e.lineTo(i,n+o-r.bottomLeft),e.arc(i+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,j,K,!0),e.lineTo(i+s-r.bottomRight,n+o),e.arc(i+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,K,0,!0),e.lineTo(i+s,n+r.topRight),e.arc(i+s-r.topRight,n+r.topRight,r.topRight,0,-K,!0),e.lineTo(i+r.topLeft,n)}const pc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,mc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function bc(e,t){const i=(""+e).match(pc);if(!i||i[1]==="normal")return t*1.2;switch(e=+i[2],i[3]){case"px":return e;case"%":e/=100;break}return t*e}const _c=e=>+e||0;function Wn(e,t){const i={},n=T(t),s=n?Object.keys(t):t,o=T(e)?n?r=>P(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of s)i[r]=_c(o(r));return i}function Wr(e){return Wn(e,{top:"y",right:"x",bottom:"y",left:"x"})}function qt(e){return Wn(e,["topLeft","topRight","bottomLeft","bottomRight"])}function et(e){const t=Wr(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(e,t){e=e||{},t=t||Y.font;let i=P(e.size,t.size);typeof i=="string"&&(i=parseInt(i,10));let n=P(e.style,t.style);n&&!(""+n).match(mc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:P(e.family,t.family),lineHeight:bc(P(e.lineHeight,t.lineHeight),i),size:i,style:n,weight:P(e.weight,t.weight),string:""};return s.string=lc(s),s}function Ce(e,t,i,n){let s,o,r;for(s=0,o=e.length;s<o;++s)if(r=e[s],r!==void 0&&r!==void 0)return r}function yc(e,t,i){const{min:n,max:s}=e,o=Lr(t,(s-n)/2),r=(a,l)=>i&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function zt(e,t){return Object.assign(Object.create(e),t)}function Gn(e,t=[""],i,n,s=()=>e[0]){const o=i||e;typeof n>"u"&&(n=Kr("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Gn([a,...e],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Yr(a,l,()=>Ac(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Ts(a).includes(l)},ownKeys(a){return Ts(a)},set(a,l,c){const h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function he(e,t,i,n){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:i,_stack:new Set,_descriptors:Gr(e,n),setContext:o=>he(e,o,i,n),override:o=>he(e.override(o),t,i,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return Yr(o,r,()=>vc(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Gr(e,t={scriptable:!0,indexable:!0}){const{_scriptable:i=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:i,indexable:n,isScriptable:Bt(i)?i:()=>i,isIndexable:Bt(n)?n:()=>n}}const xc=(e,t)=>e?e+zn(t):t,Yn=(e,t)=>T(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Yr(e,t,i){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const n=i();return e[t]=n,n}function vc(e,t,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=e;let a=n[t];return Bt(a)&&r.isScriptable(t)&&(a=wc(t,a,e,i)),V(a)&&a.length&&(a=Sc(t,a,e,r.isIndexable)),Yn(t,a)&&(a=he(a,s,o&&o[t],r)),a}function wc(e,t,i,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=i;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||n);return a.delete(e),Yn(e,l)&&(l=Un(s._scopes,s,e,l)),l}function Sc(e,t,i,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=i;if(typeof o.index<"u"&&n(e))return t[o.index%t.length];if(T(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Un(c,s,e,h);t.push(he(d,o,r&&r[e],a))}}return t}function Ur(e,t,i){return Bt(e)?e(t,i):e}const Mc=(e,t)=>e===!0?t:typeof e=="string"?Ft(t,e):void 0;function kc(e,t,i,n,s){for(const o of t){const r=Mc(i,o);if(r){e.add(r);const a=Ur(r._fallback,i,s);if(typeof a<"u"&&a!==i&&a!==n)return a}else if(r===!1&&typeof n<"u"&&i!==n)return null}return!1}function Un(e,t,i,n){const s=t._rootScopes,o=Ur(t._fallback,i,n),r=[...e,...s],a=new Set;a.add(n);let l=Ds(a,r,i,o||i,n);return l===null||typeof o<"u"&&o!==i&&(l=Ds(a,r,o,l,n),l===null)?!1:Gn(Array.from(a),[""],s,o,()=>Oc(t,i,n))}function Ds(e,t,i,n,s){for(;i;)i=kc(e,t,i,n,s);return i}function Oc(e,t,i){const n=e._getTarget();t in n||(n[t]={});const s=n[t];return V(s)&&T(i)?i:s||{}}function Ac(e,t,i,n){let s;for(const o of t)if(s=Kr(xc(o,e),i),typeof s<"u")return Yn(e,s)?Un(i,n,e,s):s}function Kr(e,t){for(const i of t){if(!i)continue;const n=i[e];if(typeof n<"u")return n}}function Ts(e){let t=e._keys;return t||(t=e._keys=Pc(e._scopes)),t}function Pc(e){const t=new Set;for(const i of e)for(const n of Object.keys(i).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function Xr(e,t,i,n){const{iScale:s}=e,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=t[c],r[a]={r:s.parse(Ft(h,o),c)};return r}const Cc=Number.EPSILON||1e-14,de=(e,t)=>t<e.length&&!e[t].skip&&e[t],qr=e=>e==="x"?"y":"x";function Dc(e,t,i,n){const s=e.skip?t:e,o=t,r=i.skip?t:i,a=pn(o,s),l=pn(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:o.x-d*(r.x-s.x),y:o.y-d*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function Tc(e,t,i){const n=e.length;let s,o,r,a,l,c=de(e,0);for(let h=0;h<n-1;++h)if(l=c,c=de(e,h+1),!(!l||!c)){if(Ie(t[h],0,Cc)){i[h]=i[h+1]=0;continue}s=i[h]/t[h],o=i[h+1]/t[h],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),i[h]=s*r*t[h],i[h+1]=o*r*t[h])}}function Lc(e,t,i="x"){const n=qr(i),s=e.length;let o,r,a,l=de(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=de(e,c+1),!a)continue;const h=a[i],d=a[n];r&&(o=(h-r[i])/3,a[`cp1${i}`]=h-o,a[`cp1${n}`]=d-o*t[c]),l&&(o=(l[i]-h)/3,a[`cp2${i}`]=h+o,a[`cp2${n}`]=d+o*t[c])}}function $c(e,t="x"){const i=qr(t),n=e.length,s=Array(n).fill(0),o=Array(n);let r,a,l,c=de(e,0);for(r=0;r<n;++r)if(a=l,l=c,c=de(e,r+1),!!l){if(c){const h=c[t]-l[t];s[r]=h!==0?(c[i]-l[i])/h:0}o[r]=a?c?bt(s[r-1])!==bt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Tc(e,s,o),Lc(e,o,t)}function si(e,t,i){return Math.max(Math.min(e,i),t)}function Rc(e,t){let i,n,s,o,r,a=Pt(e[0],t);for(i=0,n=e.length;i<n;++i)r=o,o=a,a=i<n-1&&Pt(e[i+1],t),o&&(s=e[i],r&&(s.cp1x=si(s.cp1x,t.left,t.right),s.cp1y=si(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=si(s.cp2x,t.left,t.right),s.cp2y=si(s.cp2y,t.top,t.bottom)))}function Ec(e,t,i,n,s){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")$c(e,s);else{let c=n?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=Dc(c,a,e[Math.min(o+1,r-(n?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Rc(e,i)}function Kn(){return typeof window<"u"&&typeof document<"u"}function Xn(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ci(e,t,i){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*t.parentNode[i])):n=e,n}const Ni=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Ic(e,t){return Ni(e).getPropertyValue(t)}const Fc=["top","right","bottom","left"];function Zt(e,t,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=Fc[s];n[o]=parseFloat(e[t+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Bc=(e,t,i)=>(e>0||t>0)&&(!i||!i.shadowRoot);function zc(e,t){const i=e.touches,n=i&&i.length?i[0]:e,{offsetX:s,offsetY:o}=n;let r=!1,a,l;if(Bc(s,o,e.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Yt(e,t){if("native"in e)return e;const{canvas:i,currentDevicePixelRatio:n}=t,s=Ni(i),o=s.boxSizing==="border-box",r=Zt(s,"padding"),a=Zt(s,"border","width"),{x:l,y:c,box:h}=zc(e,i),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:g}=t;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}function Nc(e,t,i){let n,s;if(t===void 0||i===void 0){const o=Xn(e);if(!o)t=e.clientWidth,i=e.clientHeight;else{const r=o.getBoundingClientRect(),a=Ni(o),l=Zt(a,"border","width"),c=Zt(a,"padding");t=r.width-c.width-l.width,i=r.height-c.height-l.height,n=Ci(a.maxWidth,o,"clientWidth"),s=Ci(a.maxHeight,o,"clientHeight")}}return{width:t,height:i,maxWidth:n||Ai,maxHeight:s||Ai}}const oi=e=>Math.round(e*10)/10;function jc(e,t,i,n){const s=Ni(e),o=Zt(s,"margin"),r=Ci(s.maxWidth,e,"clientWidth")||Ai,a=Ci(s.maxHeight,e,"clientHeight")||Ai,l=Nc(e,t,i);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const u=Zt(s,"border","width"),f=Zt(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=oi(Math.min(c,r,l.maxWidth)),h=oi(Math.min(h,a,l.maxHeight)),c&&!h&&(h=oi(c/2)),(t!==void 0||i!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=oi(Math.floor(h*n))),{width:c,height:h}}function Ls(e,t,i){const n=t||1,s=Math.floor(e.height*n),o=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${e.height}px`,r.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(e.currentDevicePixelRatio=n,r.height=s,r.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}const Hc=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Kn()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function $s(e,t){const i=Ic(e,t),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ut(e,t,i,n){return{x:e.x+i*(t.x-e.x),y:e.y+i*(t.y-e.y)}}function Vc(e,t,i,n){return{x:e.x+i*(t.x-e.x),y:n==="middle"?i<.5?e.y:t.y:n==="after"?i<1?e.y:t.y:i>0?t.y:e.y}}function Wc(e,t,i,n){const s={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=Ut(e,s,i),a=Ut(s,o,i),l=Ut(o,t,i),c=Ut(r,a,i),h=Ut(a,l,i);return Ut(c,h,i)}const Gc=function(e,t){return{x(i){return e+e+t-i},setWidth(i){t=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,n){return i-n},leftForLtr(i,n){return i-n}}},Yc=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function le(e,t,i){return e?Gc(t,i):Yc()}function Zr(e,t){let i,n;(t==="ltr"||t==="rtl")&&(i=e.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",t,"important"),e.prevTextDirection=n)}function Jr(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Qr(e){return e==="angle"?{between:Ve,compare:Ul,normalize:rt}:{between:Ot,compare:(t,i)=>t-i,normalize:t=>t}}function Rs({start:e,end:t,count:i,loop:n,style:s}){return{start:e%i,end:t%i,loop:n&&(t-e+1)%i===0,style:s}}function Uc(e,t,i){const{property:n,start:s,end:o}=i,{between:r,normalize:a}=Qr(n),l=t.length;let{start:c,end:h,loop:d}=e,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(t[c%l][n]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:e.style}}function ta(e,t,i){if(!i)return[e];const{property:n,start:s,end:o}=i,r=t.length,{compare:a,between:l,normalize:c}=Qr(n),{start:h,end:d,loop:u,style:f}=Uc(e,t,i),g=[];let p=!1,m=null,b,_,v;const x=()=>l(s,v,b)&&a(s,v)!==0,y=()=>a(o,b)===0||l(o,v,b),S=()=>p||x(),M=()=>!p||y();for(let k=h,O=h;k<=d;++k)_=t[k%r],!_.skip&&(b=c(_[n]),b!==v&&(p=l(b,s,o),m===null&&S()&&(m=a(b,s)===0?k:O),m!==null&&M()&&(g.push(Rs({start:m,end:k,loop:u,count:r,style:f})),m=null),O=k,v=b));return m!==null&&g.push(Rs({start:m,end:d,loop:u,count:r,style:f})),g}function ea(e,t){const i=[],n=e.segments;for(let s=0;s<n.length;s++){const o=ta(n[s],e.points,t);o.length&&i.push(...o)}return i}function Kc(e,t,i,n){let s=0,o=t-1;if(i&&!n)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,i&&(o+=s);o>s&&e[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Xc(e,t,i,n){const s=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=i;++l){const c=e[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function qc(e,t){const i=e.points,n=e.options.spanGaps,s=i.length;if(!s)return[];const o=!!e._loop,{start:r,end:a}=Kc(i,s,o,n);if(n===!0)return Es(e,[{start:r,end:a,loop:o}],i,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return Es(e,Xc(i,r,l,c),i,t)}function Es(e,t,i,n){return!n||!n.setContext||!i?t:Zc(e,t,i,n)}function Zc(e,t,i,n){const s=e._chart.getContext(),o=Is(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=i.length,c=[];let h=o,d=t[0].start,u=d;function f(g,p,m,b){const _=a?-1:1;if(g!==p){for(g+=l;i[g%l].skip;)g-=_;for(;i[p%l].skip;)p+=_;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),h=b,d=p%l)}}for(const g of t){d=a?d:g.start;let p=i[d%l],m;for(u=d+1;u<=g.end;u++){const b=i[u%l];m=Is(n.setContext(zt(s,{type:"segment",p0:p,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Jc(m,h)&&f(d,u-1,g.loop,h),p=b,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}function Is(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Jc(e,t){if(!t)return!1;const i=[],n=function(s,o){return Vn(o)?(i.includes(o)||i.push(o),i.indexOf(o)):o};return JSON.stringify(e,n)!==JSON.stringify(t,n)}/*! * Chart.js v4.4.2 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */class Qc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,i,n,s){const o=i.listeners[s],r=i.duration;o.forEach(a=>a({chart:t,initial:i.initial,numSteps:r,currentStep:Math.min(n-i.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Br.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let i=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),i+=o.length}),this._lastDate=t,i===0&&(this._running=!1)}_getAnims(t){const i=this._charts;let n=i.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(t,n)),n}listen(t,i,n){this._getAnims(t).listeners[i].push(n)}add(t,i){!i||!i.length||this._getAnims(t).items.push(...i)}has(t){return this._getAnims(t).items.length>0}start(t){const i=this._charts.get(t);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const i=this._charts.get(t);return!(!i||!i.running||!i.items.length)}stop(t){const i=this._charts.get(t);if(!i||!i.items.length)return;const n=i.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();i.items=[],this._notify(t,i,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var vt=new Qc;const Fs="transparent",th={boolean(e,t,i){return i>.5?t:e},color(e,t,i){const n=As(e||Fs),s=n.valid&&As(t||Fs);return s&&s.valid?s.mix(n,i).hexString():t},number(e,t,i){return e+(t-e)*i}};class eh{constructor(t,i,n,s){const o=i[n];s=Ce([t.to,s,o,t.from]);const r=Ce([t.from,o,s]);this._active=!0,this._fn=t.fn||th[t.type||typeof r],this._easing=Fe[t.easing]||Fe.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=i,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,i,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ce([t.to,i,s,t.from]),this._from=Ce([t.from,s,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const i=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||i<n),!this._active){this._target[s]=a,this._notify(!0);return}if(i<0){this._target[s]=o;return}l=i/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((i,n)=>{t.push({res:i,rej:n})})}_notify(t){const i=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][i]()}}class ia{constructor(t,i){this._chart=t,this._properties=new Map,this.configure(i)}configure(t){if(!T(t))return;const i=Object.keys(Y.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!T(o))return;const r={};for(const a of i)r[a]=o[a];(V(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,i){const n=i.options,s=nh(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&ih(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,i){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(i),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,i));continue}const h=i[c];let d=o[c];const u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new eh(u,t,c,h),s.push(d)}return s}update(t,i){if(this._properties.size===0){Object.assign(t,i);return}const n=this._createAnimations(t,i);if(n.length)return vt.add(this._chart,n),!0}}function ih(e,t){const i=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const o=e[n[s]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}function nh(e,t){if(!t)return;let i=e.options;if(!i){e.options=t;return}return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function Bs(e,t){const i=e&&e.options||{},n=i.reverse,s=i.min===void 0?t:0,o=i.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function sh(e,t,i){if(i===!1)return!1;const n=Bs(e,i),s=Bs(t,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function oh(e){let t,i,n,s;return T(e)?(t=e.top,i=e.right,n=e.bottom,s=e.left):t=i=n=s=e,{top:t,right:i,bottom:n,left:s,disabled:e===!1}}function na(e,t){const i=[],n=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=n.length;s<o;++s)i.push(n[s].index);return i}function zs(e,t,i,n={}){const s=e.keys,o=n.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===i){if(n.all)continue;break}c=e.values[l],G(c)&&(o||t===0||bt(t)===bt(c))&&(t+=c)}return t}}function rh(e){const t=Object.keys(e),i=new Array(t.length);let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],i[n]={x:o,y:e[o]};return i}function Ns(e,t){const i=e&&e.options.stacked;return i||i===void 0&&t.stack!==void 0}function ah(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function lh(e){const{min:t,max:i,minDefined:n,maxDefined:s}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}function ch(e,t,i){const n=e[t]||(e[t]={});return n[i]||(n[i]={})}function js(e,t,i,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const o=e[s.index];if(i&&o>0||!i&&o<0)return s.index}return null}function Hs(e,t){const{chart:i,_cachedMeta:n}=e,s=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=ah(o,r,n),d=t.length;let u;for(let f=0;f<d;++f){const g=t[f],{[l]:p,[c]:m}=g,b=g._stacks||(g._stacks={});u=b[c]=ch(s,h,p),u[a]=m,u._top=js(u,r,!0,n.type),u._bottom=js(u,r,!1,n.type);const _=u._visualValues||(u._visualValues={});_[a]=m}}function tn(e,t){const i=e.scales;return Object.keys(i).filter(n=>i[n].axis===t).shift()}function hh(e,t){return zt(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function dh(e,t,i){return zt(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function we(e,t){const i=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][i]===void 0)return;delete o[n][i],o[n]._visualValues!==void 0&&o[n]._visualValues[i]!==void 0&&delete o[n]._visualValues[i]}}}const en=e=>e==="reset"||e==="none",Vs=(e,t)=>t?e:Object.assign({},e),uh=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:na(i,!0),values:null};class ut{constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,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=Ns(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&&we(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,i=this._cachedMeta,n=this.getDataset(),s=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=i.xAxisID=P(n.xAxisID,tn(t,"x")),r=i.yAxisID=P(n.yAxisID,tn(t,"y")),a=i.rAxisID=P(n.rAxisID,tn(t,"r")),l=i.indexAxis,c=i.iAxisID=s(l,o,r,a),h=i.vAxisID=s(l,r,o,a);i.xScale=this.getScaleForId(o),i.yScale=this.getScaleForId(r),i.rScale=this.getScaleForId(a),i.iScale=this.getScaleForId(c),i.vScale=this.getScaleForId(h)}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 i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ms(this._data,this),t._stacked&&we(t)}_dataCheck(){const t=this.getDataset(),i=t.data||(t.data=[]),n=this._data;if(T(i))this._data=rh(i);else if(n!==i){if(n){Ms(n,this);const s=this._cachedMeta;we(s),s._parsed=[]}i&&Object.isExtensible(i)&&Zl(i,this),this._syncList=[],this._data=i}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const i=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=i._stacked;i._stacked=Ns(i.vScale,i),i.stack!==n.stack&&(s=!0,we(i),i.stack=n.stack),this._resyncElements(t),(s||o!==i._stacked)&&Hs(this,i._parsed)}configure(){const t=this.chart.config,i=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),i,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,i){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=t===0&&i===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,d,u;if(this._parsing===!1)n._parsed=s,n._sorted=!0,u=s;else{V(s[t])?u=this.parseArrayData(n,s,t,i):T(s[t])?u=this.parseObjectData(n,s,t,i):u=this.parsePrimitiveData(n,s,t,i);const f=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<i;++h)n._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);n._sorted=l}r&&Hs(this,u)}parsePrimitiveData(t,i,n,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(s);let u,f,g;for(u=0,f=s;u<f;++u)g=u+n,d[u]={[a]:h||o.parse(c[g],g),[l]:r.parse(i[g],g)};return d}parseArrayData(t,i,n,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,h,d;for(l=0,c=s;l<c;++l)h=l+n,d=i[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,i,n,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,d,u,f;for(h=0,d=s;h<d;++h)u=h+n,f=i[u],c[h]={x:o.parse(Ft(f,a),u),y:r.parse(Ft(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,n){const s=this.chart,o=this._cachedMeta,r=i[t.axis],a={keys:na(s,!0),values:i._stacks[t.axis]._visualValues};return zs(a,r,o.index,{mode:n})}updateRangeFromParsed(t,i,n,s){const o=n[i.axis];let r=o===null?NaN:o;const a=s&&n._stacks[i.axis];s&&a&&(s.values=a,r=zs(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,i){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,r=s.length,a=this._getOtherScale(t),l=uh(i,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=lh(a);let u,f;function g(){f=s[u];const p=f[a.axis];return!G(f[t.axis])||h>p||d<p}for(u=0;u<r&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const i=this._cachedMeta._parsed,n=[];let s,o,r;for(s=0,o=i.length;s<o;++s)r=i[s][t.axis],G(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this._cachedMeta,n=i.iScale,s=i.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const i=this._cachedMeta;this.update(t||"default"),i._clip=oh(P(this.options.clip,sh(i.xScale,i.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,i=this.chart,n=this._cachedMeta,s=n.data||[],o=i.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=s[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,i){const n=i?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,i,n){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=dh(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=hh(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!i,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",n){const s=i==="active",o=this._cachedDataOpts,r=t+"-"+i,a=o[r],l=this.enableOptionSharing&&He(n);if(a)return Vs(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(Y.elements[t]),g=()=>this.getContext(n,s,i),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(Vs(p,l))),p}_resolveAnimations(t,i,n){const s=this.chart,o=this._cachedDataOpts,r=`animation-${i}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,i),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,n,i))}const c=new ia(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||en(t)||this.chart._animationsDisabled}_getSharedOptions(t,i){const n=this.resolveDataElementOptions(t,i),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(i,o)||o!==s;return this.updateSharedOptions(o,i,n),{sharedOptions:o,includeOptions:r}}updateElement(t,i,n,s){en(s)?Object.assign(t,n):this._resolveAnimations(i,s).update(t,n)}updateSharedOptions(t,i,n){t&&!en(i)&&this._resolveAnimations(void 0,i).update(t,n)}_setStyle(t,i,n,s){t.active=s;const o=this.getStyle(i,s);this._resolveAnimations(i,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,i,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,i,n){this._setStyle(t,n,"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 i=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,o=i.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,i,n=!0){const s=this._cachedMeta,o=s.data,r=t+i;let a;const l=c=>{for(c.length+=i,a=c.length-1;a>=r;a--)c[a]=c[a-i]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,i),n&&this.updateElements(o,t,i,"reset")}updateElements(t,i,n,s){}_removeElements(t,i){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,i);n._stacked&&we(n,s)}n.data.splice(t,i)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[i,n,s]=t;this[i](n,s)}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,i){i&&this._sync(["_removeElements",t,i]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}w(ut,"defaults",{}),w(ut,"datasetElementType",null),w(ut,"dataElementType",null);function fh(e,t){if(!e._cache.$bar){const i=e.getMatchingVisibleMetas(t);let n=[];for(let s=0,o=i.length;s<o;s++)n=n.concat(i[s].controller.getAllParsedValues(e));e._cache.$bar=Fr(n.sort((s,o)=>s-o))}return e._cache.$bar}function gh(e){const t=e.iScale,i=fh(t,e.type);let n=t._length,s,o,r,a;const l=()=>{r===32767||r===-32768||(He(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=i.length;s<o;++s)r=t.getPixelForValue(i[s]),l();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),l();return n}function ph(e,t,i,n){const s=i.barThickness;let o,r;return $(s)?(o=t.min*i.categoryPercentage,r=i.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:t.pixels[e]-o/2}}function mh(e,t,i,n){const s=t.pixels,o=s[e];let r=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=i.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:c}}function bh(e,t,i,n){const s=i.parse(e[0],n),o=i.parse(e[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[i.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function sa(e,t,i,n){return V(e)?bh(e,t,i,n):t[i.axis]=i.parse(e,n),t}function Ws(e,t,i,n){const s=e.iScale,o=e.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=t[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(sa(u,d,o,c));return l}function nn(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function _h(e,t,i){return e!==0?bt(e):(t.isHorizontal()?1:-1)*(t.min>=i?1:-1)}function yh(e){let t,i,n,s,o;return e.horizontal?(t=e.base>e.x,i="left",n="right"):(t=e.base<e.y,i="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:i,end:n,reverse:t,top:s,bottom:o}}function xh(e,t,i,n){let s=t.borderSkipped;const o={};if(!s){e.borderSkipped=o;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=yh(e);s==="middle"&&i&&(e.enableBorderRadius=!0,(i._top||0)===n?s=c:(i._bottom||0)===n?s=h:(o[Gs(h,r,a,l)]=!0,s=c)),o[Gs(s,r,a,l)]=!0,e.borderSkipped=o}function Gs(e,t,i,n){return n?(e=vh(e,t,i),e=Ys(e,i,t)):e=Ys(e,t,i),e}function vh(e,t,i){return e===t?i:e===i?t:e}function Ys(e,t,i){return e==="start"?t:e==="end"?i:e}function wh(e,{inflateAmount:t},i){e.inflateAmount=t==="auto"?i===1?.33:0:t}class mi extends ut{parsePrimitiveData(t,i,n,s){return Ws(t,i,n,s)}parseArrayData(t,i,n,s){return Ws(t,i,n,s)}parseObjectData(t,i,n,s){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,d=[];let u,f,g,p;for(u=n,f=n+s;u<f;++u)p=i[u],g={},g[o.axis]=o.parse(Ft(p,c),u),d.push(sa(Ft(p,h),g,r,u));return d}updateRangeFromParsed(t,i,n,s){super.updateRangeFromParsed(t,i,n,s);const o=n._custom;o&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const i=this._cachedMeta,{iScale:n,vScale:s}=i,o=this.getParsed(t),r=o._custom,a=nn(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,t)}updateElements(t,i,n,s){const o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(i,s);for(let f=i;f<i+n;f++){const g=this.getParsed(f),p=o||$(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(g._stacks||{})[a.axis],_={horizontal:c,base:p.base,enableBorderRadius:!b||nn(g._custom)||r===b._top||r===b._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":s));const v=_.options||t[f].options;xh(_,v,b,r),wh(_,v,h.ratio),this.updateElement(t[f],f,_,s)}}_getStacks(t,i){const{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(i),h=c&&c[l.vScale.axis];if($(h)||isNaN(h))return!0};for(const l of s)if(!(i!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,i,n){const s=this._getStacks(t,n),o=i!==void 0?s.indexOf(i):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,i=this._cachedMeta,n=i.iScale,s=[];let o,r;for(o=0,r=i.data.length;o<r;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=t.barThickness;return{min:a||gh(i),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:i,_stacked:n,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=nn(c);let d=l[i.axis],u=0,f=n?this.applyStack(i,l,n):d,g,p;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&bt(d)!==bt(c.barEnd)&&(u=0),u+=d);const m=!$(o)&&!h?o:u;let b=i.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=i.getPixelForValue(u+f):g=b,p=g-b,Math.abs(p)<r){p=_h(p,i,a)*r,d===a&&(b-=p/2);const _=i.getPixelForDecimal(0),v=i.getPixelForDecimal(1),x=Math.min(_,v),y=Math.max(_,v);b=Math.max(Math.min(b,y),x),g=b+p,n&&!h&&(l._stacks[i.axis]._visualValues[s]=i.getValueForPixel(g)-i.getValueForPixel(b))}if(b===i.getPixelForValue(a)){const _=bt(p)*i.getLineWidthForValue(a)/2;b+=_,p-=_}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,i){const n=i.scale,s=this.options,o=s.skipNull,r=P(s.maxBarThickness,1/0);let a,l;if(i.grouped){const c=o?this._getStackCount(t):i.stackCount,h=s.barThickness==="flex"?mh(t,i,s,c):ph(t,i,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=h.start+h.chunk*d+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(r,i.min*i.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,i=t.vScale,n=t.data,s=n.length;let o=0;for(;o<s;++o)this.getParsed(o)[i.axis]!==null&&n[o].draw(this._ctx)}}w(mi,"id","bar"),w(mi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),w(mi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class bi extends ut{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,i,n,s){const o=super.parsePrimitiveData(t,i,n,s);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+n).radius;return o}parseArrayData(t,i,n,s){const o=super.parseArrayData(t,i,n,s);for(let r=0;r<o.length;r++){const a=i[n+r];o[r]._custom=P(a[2],this.resolveDataElementOptions(r+n).radius)}return o}parseObjectData(t,i,n,s){const o=super.parseObjectData(t,i,n,s);for(let r=0;r<o.length;r++){const a=i[n+r];o[r]._custom=P(a&&a.r&&+a.r,this.resolveDataElementOptions(r+n).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size(this.resolveDataElementOptions(n))/2);return i>0&&i}getLabelAndValue(t){const i=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=i,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const i=this._cachedMeta.data;this.updateElements(i,0,i.length,t)}updateElements(t,i,n,s){const o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(i,s),h=r.axis,d=a.axis;for(let u=i;u<i+n;u++){const f=t[u],g=!o&&this.getParsed(u),p={},m=p[h]=o?r.getPixelForDecimal(.5):r.getPixelForValue(g[h]),b=p[d]=o?a.getBasePixel():a.getPixelForValue(g[d]);p.skip=isNaN(m)||isNaN(b),c&&(p.options=l||this.resolveDataElementOptions(u,f.active?"active":s),o&&(p.options.radius=0)),this.updateElement(f,u,p,s)}}resolveDataElementOptions(t,i){const n=this.getParsed(t);let s=super.resolveDataElementOptions(t,i);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return i!=="active"&&(s.radius=0),s.radius+=P(n&&n._custom,o),s}}w(bi,"id","bubble"),w(bi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),w(bi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Sh(e,t,i){let n=1,s=1,o=0,r=0;if(t<N){const a=e,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(v,x,y)=>Ve(v,a,l,!0)?1:Math.max(x,x*i,y,y*i),g=(v,x,y)=>Ve(v,a,l,!0)?-1:Math.min(x,x*i,y,y*i),p=f(0,c,d),m=f(K,h,u),b=g(j,c,d),_=g(j+K,h,u);n=(p-b)/2,s=(m-_)/2,o=-(p+b)/2,r=-(m+_)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}class Xt extends ut{constructor(t,i){super(t,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,i){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(T(n[t])){const{key:l="value"}=this._parsing;o=c=>+Ft(n[c],l)}let r,a;for(r=t,a=t+i;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return dt(this.options.rotation-90)}_getCircumference(){return dt(this.options.circumference)}_getRotationExtents(){let t=N,i=-N;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),i=Math.max(i,o+r)}return{rotation:t,circumference:i-t}}update(t){const i=this.chart,{chartArea:n}=i,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-r)/2,0),l=Math.min(Fl(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=Sh(d,h,l),m=(n.width-r)/u,b=(n.height-r)/f,_=Math.max(Math.min(m,b)/2,0),v=Lr(this.options.radius,_),x=Math.max(v*l,0),y=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=p*v,s.total=this.calculateTotal(),this.outerRadius=v-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,i){const n=this.options,s=this._cachedMeta,o=this._getCircumference();return i&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/N)}updateElements(t,i,n,s){const o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,g=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(i,s);let b=this._getRotation(),_;for(_=0;_<i;++_)b+=this._circumference(_,o);for(_=i;_<i+n;++_){const v=this._circumference(_,o),x=t[_],y={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+v,circumference:v,outerRadius:g,innerRadius:f};m&&(y.options=p||this.resolveDataElementOptions(_,x.active?"active":s)),b+=v,this.updateElement(x,_,y,s)}}calculateTotal(){const t=this._cachedMeta,i=t.data;let n=0,s;for(s=0;s<i.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!i[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){const i=this._cachedMeta.total;return i>0&&!isNaN(t)?N*(Math.abs(t)/i):0}getLabelAndValue(t){const i=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Xe(i._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let i=0;const n=this.chart;let s,o,r,a,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){r=n.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let i=0;for(let n=0,s=t.length;n<s;++n){const o=this.resolveDataElementOptions(n);i=Math.max(i,o.offset||0,o.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(i+=this._getRingWeight(n));return i}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}w(Xt,"id","doughnut"),w(Xt,"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"}),w(Xt,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),w(Xt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return i.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,i,n){n.chart.toggleDataVisibility(i.index),n.chart.update()}}}});class _i extends ut{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const i=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=i,r=this.chart._animationsDisabled;let{start:a,count:l}=Nr(i,s,r);this._drawStart=a,this._drawCount=l,jr(i)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,i,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(i,s),u=r.axis,f=a.axis,{spanGaps:g,segment:p}=this.options,m=ce(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",_=i+n,v=t.length;let x=i>0&&this.getParsed(i-1);for(let y=0;y<v;++y){const S=t[y],M=b?S:{};if(y<i||y>=_){M.skip=!0;continue}const k=this.getParsed(y),O=$(k[f]),C=M[u]=r.getPixelForValue(k[u],y),D=M[f]=o||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[f],y);M.skip=isNaN(C)||isNaN(D)||O,M.stop=y>0&&Math.abs(k[u]-x[u])>m,p&&(M.parsed=k,M.raw=c.data[y]),d&&(M.options=h||this.resolveDataElementOptions(y,S.active?"active":s)),b||this.updateElement(S,y,M,s),x=k}}getMaxOverflow(){const t=this._cachedMeta,i=t.dataset,n=i.options&&i.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}w(_i,"id","line"),w(_i,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),w(_i,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ze extends ut{constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const i=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Xe(i._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,i,n,s){return Xr.bind(this)(t,i,n,s)}update(t){const i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}getMinMax(){const t=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<i.min&&(i.min=o),o>i.max&&(i.max=o))}),i}_updateRadius(){const t=this.chart,i=t.chartArea,n=t.options,s=Math.min(i.right-i.left,i.bottom-i.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,i,n,s){const o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*j;let f=u,g;const p=360/this.countVisibleElements();for(g=0;g<i;++g)f+=this._computeAngle(g,s,p);for(g=i;g<i+n;g++){const m=t[g];let b=f,_=f+this._computeAngle(g,s,p),v=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=_,o&&(l.animateScale&&(v=0),l.animateRotate&&(b=_=u));const x={x:h,y:d,innerRadius:0,outerRadius:v,startAngle:b,endAngle:_,options:this.resolveDataElementOptions(g,m.active?"active":s)};this.updateElement(m,g,x,s)}}countVisibleElements(){const t=this._cachedMeta;let i=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&i++}),i}_computeAngle(t,i,n){return this.chart.getDataVisibility(t)?dt(this.resolveDataElementOptions(t,i).angle||n):0}}w(ze,"id","polarArea"),w(ze,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),w(ze,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const i=t.data;if(i.labels.length&&i.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return i.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,i,n){n.chart.toggleDataVisibility(i.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class _n extends Xt{}w(_n,"id","pie"),w(_n,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class yi extends ut{getLabelAndValue(t){const i=this._cachedMeta.vScale,n=this.getParsed(t);return{label:i.getLabels()[t],value:""+i.getLabelForValue(n[i.axis])}}parseObjectData(t,i,n,s){return Xr.bind(this)(t,i,n,s)}update(t){const i=this._cachedMeta,n=i.dataset,s=i.data||[],o=i.iScale.getLabels();if(n.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(n,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,i,n,s){const o=this._cachedMeta.rScale,r=s==="reset";for(let a=i;a<i+n;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),h=o.getPointPositionForValue(a,this.getParsed(a).r),d=r?o.xCenter:h.x,u=r?o.yCenter:h.y,f={x:d,y:u,angle:h.angle,skip:isNaN(d)||isNaN(u),options:c};this.updateElement(l,a,f,s)}}}w(yi,"id","radar"),w(yi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),w(yi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class xi extends ut{getLabelAndValue(t){const i=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=i,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:n[t]||"",value:"("+a+", "+l+")"}}update(t){const i=this._cachedMeta,{data:n=[]}=i,s=this.chart._animationsDisabled;let{start:o,count:r}=Nr(i,n,s);if(this._drawStart=o,this._drawCount=r,jr(i)&&(o=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=i;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=n;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete i.dataset,this.datasetElementType=!1);this.updateElements(n,o,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,i,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(i,s),d=this.getSharedOptions(h),u=this.includeOptions(s,d),f=r.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=ce(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||s==="none";let v=i>0&&this.getParsed(i-1);for(let x=i;x<i+n;++x){const y=t[x],S=this.getParsed(x),M=_?y:{},k=$(S[g]),O=M[f]=r.getPixelForValue(S[f],x),C=M[g]=o||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[g],x);M.skip=isNaN(O)||isNaN(C)||k,M.stop=x>0&&Math.abs(S[f]-v[f])>b,m&&(M.parsed=S,M.raw=c.data[x]),u&&(M.options=d||this.resolveDataElementOptions(x,y.active?"active":s)),_||this.updateElement(y,x,M,s),v=S}this.updateSharedOptions(d,s,h)}getMaxOverflow(){const t=this._cachedMeta,i=t.data||[];if(!this.options.showLine){let a=0;for(let l=i.length-1;l>=0;--l)a=Math.max(a,i[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!i.length)return s;const o=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,o,r)/2}}w(xi,"id","scatter"),w(xi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),w(xi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Mh=Object.freeze({__proto__:null,BarController:mi,BubbleController:bi,DoughnutController:Xt,LineController:_i,PieController:_n,PolarAreaController:ze,RadarController:yi,ScatterController:xi});function Wt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class qn{constructor(t){w(this,"options");this.options=t||{}}static override(t){Object.assign(qn.prototype,t)}init(){}formats(){return Wt()}parse(){return Wt()}format(){return Wt()}add(){return Wt()}diff(){return Wt()}startOf(){return Wt()}endOf(){return Wt()}}var kh={_date:qn};function Oh(e,t,i,n){const{controller:s,data:o,_sorted:r}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Xl:At;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,i-h),u=l(o,t,i+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,i)}return{lo:0,hi:o.length-1}}function qe(e,t,i,n,s){const o=e.getSortedVisibleDatasetMetas(),r=i[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Oh(o[a],t,r,s);for(let f=d;f<=u;++f){const g=h[f];g.skip||n(g,c,f)}}}function Ah(e){const t=e.indexOf("x")!==-1,i=e.indexOf("y")!==-1;return function(n,s){const o=t?Math.abs(n.x-s.x):0,r=i?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function sn(e,t,i,n,s){const o=[];return!s&&!e.isPointInArea(t)||qe(e,i,t,function(a,l,c){!s&&!Pt(a,e.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Ph(e,t,i,n){let s=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],n),{angle:d}=Er(r,{x:t.x,y:t.y});Ve(d,c,h)&&s.push({element:r,datasetIndex:a,index:l})}return qe(e,i,t,o),s}function Ch(e,t,i,n,s,o){let r=[];const a=Ah(i);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,s);if(n&&!f)return;const g=h.getCenterPoint(s);if(!(!!o||e.isPointInArea(g))&&!f)return;const m=a(t,g);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}return qe(e,i,t,c),r}function on(e,t,i,n,s,o){return!o&&!e.isPointInArea(t)?[]:i==="r"&&!n?Ph(e,t,i,s):Ch(e,t,i,n,s,o)}function Us(e,t,i,n,s){const o=[],r=i==="x"?"inXRange":"inYRange";let a=!1;return qe(e,i,t,(l,c,h)=>{l[r](t[i],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}var Dh={evaluateInteractionItems:qe,modes:{index(e,t,i,n){const s=Yt(t,e),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?sn(e,s,o,n,r):on(e,s,o,!1,n,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(e,t,i,n){const s=Yt(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?sn(e,s,o,n,r):on(e,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(e,t,i,n){const s=Yt(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;return sn(e,s,o,n,r)},nearest(e,t,i,n){const s=Yt(t,e),o=i.axis||"xy",r=i.includeInvisible||!1;return on(e,s,o,i.intersect,n,r)},x(e,t,i,n){const s=Yt(t,e);return Us(e,s,"x",i.intersect,n)},y(e,t,i,n){const s=Yt(t,e);return Us(e,s,"y",i.intersect,n)}}};const oa=["left","top","right","bottom"];function Se(e,t){return e.filter(i=>i.pos===t)}function Ks(e,t){return e.filter(i=>oa.indexOf(i.pos)===-1&&i.box.axis===t)}function Me(e,t){return e.sort((i,n)=>{const s=t?n:i,o=t?i:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Th(e){const t=[];let i,n,s,o,r,a;for(i=0,n=(e||[]).length;i<n;++i)s=e[i],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:i,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Lh(e){const t={};for(const i of e){const{stack:n,pos:s,stackWeight:o}=i;if(!n||!oa.includes(s))continue;const r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function $h(e,t){const i=Lh(e),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=i[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&t.availableHeight)}return i}function Rh(e){const t=Th(e),i=Me(t.filter(c=>c.box.fullSize),!0),n=Me(Se(t,"left"),!0),s=Me(Se(t,"right")),o=Me(Se(t,"top"),!0),r=Me(Se(t,"bottom")),a=Ks(t,"x"),l=Ks(t,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:Se(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Xs(e,t,i,n){return Math.max(e[i],t[i])+Math.max(e[n],t[n])}function ra(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Eh(e,t,i,n){const{pos:s,box:o}=i,r=e.maxPadding;if(!T(s)){i.size&&(e[s]-=i.size);const d=n[i.stack]||{size:0,count:1};d.size=Math.max(d.size,i.horizontal?o.height:o.width),i.size=d.size/d.count,e[s]+=i.size}o.getPadding&&ra(r,o.getPadding());const a=Math.max(0,t.outerWidth-Xs(r,e,"left","right")),l=Math.max(0,t.outerHeight-Xs(r,e,"top","bottom")),c=a!==e.w,h=l!==e.h;return e.w=a,e.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Ih(e){const t=e.maxPadding;function i(n){const s=Math.max(t[n]-e[n],0);return e[n]+=s,s}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function Fh(e,t){const i=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],i[r])}),o}return n(e?["left","right"]:["top","bottom"])}function De(e,t,i,n){const s=[];let o,r,a,l,c,h;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Fh(a.horizontal,t));const{same:d,other:u}=Eh(t,i,a,n);c|=d&&s.length,h=h||u,l.fullSize||s.push(a)}return c&&De(s,t,i,n)||h}function ri(e,t,i,n,s){e.top=i,e.left=t,e.right=t+n,e.bottom=i+s,e.width=n,e.height=s}function qs(e,t,i,n){const s=i.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;He(c.start)&&(r=c.start),l.fullSize?ri(l,s.left,r,i.outerWidth-s.right-s.left,u):ri(l,t.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*h,u=c.size||l.width;He(c.start)&&(o=c.start),l.fullSize?ri(l,o,s.top,u,i.outerHeight-s.bottom-s.top):ri(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var tt={addBox(e,t){e.boxes||(e.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(i){t.draw(i)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;i!==-1&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,n){if(!e)return;const s=et(e.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(i-s.height,0),a=Rh(e.boxes),l=a.vertical,c=a.horizontal;E(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:i,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},s);ra(u,et(n));const f=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s),g=$h(l.concat(c),d);De(a.fullSize,f,d,g),De(l,f,d,g),De(c,f,d,g)&&De(l,f,d,g),Ih(f),qs(a.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,qs(a.rightAndBottom,f,d,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(a.chartArea,p=>{const m=p.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class aa{acquireContext(t,i){}releaseContext(t){return!1}addEventListener(t,i,n){}removeEventListener(t,i,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,i,n,s){return i=Math.max(0,i||t.width),n=n||t.height,{width:i,height:Math.max(0,s?Math.floor(i/s):n)}}isAttached(t){return!0}updateConfig(t){}}class Bh extends aa{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const vi="$chartjs",zh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zs=e=>e===null||e==="";function Nh(e,t){const i=e.style,n=e.getAttribute("height"),s=e.getAttribute("width");if(e[vi]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Zs(s)){const o=$s(e,"width");o!==void 0&&(e.width=o)}if(Zs(n))if(e.style.height==="")e.height=e.width/(t||2);else{const o=$s(e,"height");o!==void 0&&(e.height=o)}return e}const la=Hc?{passive:!0}:!1;function jh(e,t,i){e&&e.addEventListener(t,i,la)}function Hh(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,la)}function Vh(e,t){const i=zh[e.type]||e.type,{x:n,y:s}=Yt(e,t);return{type:i,chart:t,native:e,x:n!==void 0?n:null,y:s!==void 0?s:null}}function Di(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function Wh(e,t,i){const n=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Di(a.addedNodes,n),r=r&&!Di(a.removedNodes,n);r&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function Gh(e,t,i){const n=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Di(a.removedNodes,n),r=r&&!Di(a.addedNodes,n);r&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ge=new Map;let Js=0;function ca(){const e=window.devicePixelRatio;e!==Js&&(Js=e,Ge.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function Yh(e,t){Ge.size||window.addEventListener("resize",ca),Ge.set(e,t)}function Uh(e){Ge.delete(e),Ge.size||window.removeEventListener("resize",ca)}function Kh(e,t,i){const n=e.canvas,s=n&&Xn(n);if(!s)return;const o=zr((a,l)=>{const c=s.clientWidth;i(a,l),c<s.clientWidth&&i()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(s),Yh(e,o),r}function rn(e,t,i){i&&i.disconnect(),t==="resize"&&Uh(e)}function Xh(e,t,i){const n=e.canvas,s=zr(o=>{e.ctx!==null&&i(Vh(o,e))},e);return jh(n,t,s),s}class qh extends aa{acquireContext(t,i){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Nh(t,i),n):null}releaseContext(t){const i=t.canvas;if(!i[vi])return!1;const n=i[vi].initial;["height","width"].forEach(o=>{const r=n[o];$(r)?i.removeAttribute(o):i.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{i.style[o]=s[o]}),i.width=i.width,delete i[vi],!0}addEventListener(t,i,n){this.removeEventListener(t,i);const s=t.$proxies||(t.$proxies={}),r={attach:Wh,detach:Gh,resize:Kh}[i]||Xh;s[i]=r(t,i,n)}removeEventListener(t,i){const n=t.$proxies||(t.$proxies={}),s=n[i];if(!s)return;({attach:rn,detach:rn,resize:rn}[i]||Hh)(t,i,s),n[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,i,n,s){return jc(t,i,n,s)}isAttached(t){const i=Xn(t);return!!(i&&i.isConnected)}}function Zh(e){return!Kn()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Bh:qh}class ft{constructor(){w(this,"x");w(this,"y");w(this,"active",!1);w(this,"options");w(this,"$animations")}tooltipPosition(t){const{x:i,y:n}=this.getProps(["x","y"],t);return{x:i,y:n}}hasValue(){return ce(this.x)&&ce(this.y)}getProps(t,i){const n=this.$animations;if(!i||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}w(ft,"defaults",{}),w(ft,"defaultRoutes");function Jh(e,t){const i=e.options.ticks,n=Qh(e),s=Math.min(i.maxTicksLimit||n,n),o=i.major.enabled?ed(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return id(t,c,o,r/s),c;const h=td(o,t,s);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(ai(t,c,h,$(f)?0:a-f,a),d=0,u=r-1;d<u;d++)ai(t,c,h,o[d],o[d+1]);return ai(t,c,h,l,$(f)?t.length:l+f),c}return ai(t,c,h),c}function Qh(e){const t=e.options.offset,i=e._tickSize(),n=e._length/i+(t?0:1),s=e._maxLength/i;return Math.floor(Math.min(n,s))}function td(e,t,i){const n=nd(e),s=t.length/i;if(!n)return Math.max(s,1);const o=Gl(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function ed(e){const t=[];let i,n;for(i=0,n=e.length;i<n;i++)e[i].major&&t.push(i);return t}function id(e,t,i,n){let s=0,o=i[0],r;for(n=Math.ceil(n),r=0;r<e.length;r++)r===o&&(t.push(e[r]),s++,o=i[s*n])}function ai(e,t,i,n,s){const o=P(n,0),r=Math.min(P(s,e.length),e.length);let a=0,l,c,h;for(i=Math.ceil(i),s&&(l=s-n,i=l/Math.floor(l/i)),h=o;h<0;)a++,h=Math.round(o+a*i);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(e[c]),a++,h=Math.round(o+a*i))}function nd(e){const t=e.length;let i,n;if(t<2)return!1;for(n=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==n)return!1;return n}const sd=e=>e==="left"?"right":e==="right"?"left":e,Qs=(e,t,i)=>t==="top"||t==="left"?e[t]+i:e[t]-i,to=(e,t)=>Math.min(t||e,e);function eo(e,t){const i=[],n=e.length/t,s=e.length;let o=0;for(;o<s;o+=n)i.push(e[Math.floor(o)]);return i}function od(e,t,i){const n=e.ticks.length,s=Math.min(t,n-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),c;if(!(i&&(n===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function rd(e,t){E(e,i=>{const n=i.gc,s=n.length/2;let o;if(s>t){for(o=0;o<s;++o)delete i.data[n[o]];n.splice(0,s)}})}function ke(e){return e.drawTicks?e.tickLength:0}function io(e,t){if(!e.display)return 0;const i=X(e.font,t),n=et(e.padding);return(V(e.text)?e.text.length:1)*i.lineHeight+n.height}function ad(e,t){return zt(e,{scale:t,type:"scale"})}function ld(e,t,i){return zt(e,{tick:i,index:t,type:"tick"})}function cd(e,t,i){let n=Hn(e);return(i&&t!=="right"||!i&&t==="right")&&(n=sd(n)),n}function hd(e,t,i,n){const{top:s,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:h}=l;let d=0,u,f,g;const p=r-s,m=a-o;if(e.isHorizontal()){if(f=Q(n,o,a),T(i)){const b=Object.keys(i)[0],_=i[b];g=h[b].getPixelForValue(_)+p-t}else i==="center"?g=(c.bottom+c.top)/2+p-t:g=Qs(e,i,t);u=a-o}else{if(T(i)){const b=Object.keys(i)[0],_=i[b];f=h[b].getPixelForValue(_)-m+t}else i==="center"?f=(c.left+c.right)/2-m+t:f=Qs(e,i,t);g=Q(n,r,s),d=i==="left"?-K:K}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}class te extends ft{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,i){return t}getUserBounds(){let{_userMin:t,_userMax:i,_suggestedMin:n,_suggestedMax:s}=this;return t=ot(t,Number.POSITIVE_INFINITY),i=ot(i,Number.NEGATIVE_INFINITY),n=ot(n,Number.POSITIVE_INFINITY),s=ot(s,Number.NEGATIVE_INFINITY),{min:ot(t,n),max:ot(i,s),minDefined:G(t),maxDefined:G(i)}}getMinMax(t){let{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(i=Math.min(i,r.min)),o||(n=Math.max(n,r.max));return i=o&&i>n?n:i,n=s&&i>n?i:n,{min:ot(i,ot(n,i)),max:ot(n,ot(i,n))}}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(){B(this.options.beforeUpdate,[this])}update(t,i,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=yc(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?eo(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Jh(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,i,n;this.isHorizontal()?(i=this.left,n=this.right):(i=this.top,n=this.bottom,t=!t),this._startPixel=i,this._endPixel=n,this._reversePixels=t,this._length=n-i,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(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(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const i=this.options.ticks;let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=B(i.callback,[o.value,n,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,i=t.ticks,n=to(this.ticks.length,t.ticks.maxTicksLimit),s=i.minRotation||0,o=i.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!i.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=q(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-ke(t.grid)-i.padding-io(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=Nn(Math.min(Math.asin(q((h.highest.height+6)/a,-1,1)),Math.asin(q(l/c,-1,1))-Math.asin(q(u/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:i,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=io(s,i.options.font);if(a?(t.width=this.maxWidth,t.height=ke(o)+l):(t.height=this.maxHeight,t.width=ke(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,g=dt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){const b=n.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=n.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),a?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,i,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*t.width,f=n*i.height):(u=n*t.height,f=s*i.width):o==="start"?f=i.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=i.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=i.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=i.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_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(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:i}=this.options;return i==="top"||i==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let i,n;for(i=0,n=t.length;i<n;i++)$(t[i].label)&&(t.splice(i,1),n--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const i=this.options.ticks.sampleSize;let n=this.ticks;i<n.length&&(n=eo(n,i)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,i,n){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(i/to(i,n));let c=0,h=0,d,u,f,g,p,m,b,_,v,x,y;for(d=0;d<i;d+=l){if(g=t[d].label,p=this._resolveTickFontOptions(d),s.font=m=p.string,b=o[m]=o[m]||{data:{},gc:[]},_=p.lineHeight,v=x=0,!$(g)&&!V(g))v=Pi(s,b.data,b.gc,v,g),x=_;else if(V(g))for(u=0,f=g.length;u<f;++u)y=g[u],!$(y)&&!V(y)&&(v=Pi(s,b.data,b.gc,v,y),x+=_);r.push(v),a.push(x),c=Math.max(v,c),h=Math.max(x,h)}rd(o,i);const S=r.indexOf(c),M=a.indexOf(h),k=O=>({width:r[O]||0,height:a[O]||0});return{first:k(0),last:k(i-1),widest:k(S),highest:k(M),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,i){return NaN}getValueForPixel(t){}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const i=this._startPixel+t*this._length;return Kl(this._alignToPixels?Vt(this.chart,i,0):i)}getDecimalForPixel(t){const i=(t-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:i}=this;return t<0&&i<0?i:t>0&&i>0?t:0}getContext(t){const i=this.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=ld(this.getContext(),t,n))}return this.$context||(this.$context=ad(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,i=dt(this.labelRotation),n=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const i=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=ke(o),f=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(H){return Vt(n,H,p)};let _,v,x,y,S,M,k,O,C,D,L,Z;if(r==="top")_=b(this.bottom),M=this.bottom-u,O=_-m,D=b(t.top)+m,Z=t.bottom;else if(r==="bottom")_=b(this.top),D=t.top,Z=b(t.bottom)-m,M=_+m,O=this.top+u;else if(r==="left")_=b(this.right),S=this.right-u,k=_-m,C=b(t.left)+m,L=t.right;else if(r==="right")_=b(this.left),C=t.left,L=b(t.right)-m,S=_+m,k=this.left+u;else if(i==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(T(r)){const H=Object.keys(r)[0],U=r[H];_=b(this.chart.scales[H].getPixelForValue(U))}D=t.top,Z=t.bottom,M=_+m,O=M+u}else if(i==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(T(r)){const H=Object.keys(r)[0],U=r[H];_=b(this.chart.scales[H].getPixelForValue(U))}S=_-m,k=S-u,C=t.left,L=t.right}const st=P(s.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/st));for(v=0;v<d;v+=I){const H=this.getContext(v),U=o.setContext(H),ct=a.setContext(H),J=U.lineWidth,ne=U.color,Je=ct.dash||[],se=ct.dashOffset,ye=U.tickWidth,Nt=U.tickColor,xe=U.tickBorderDash||[],jt=U.tickBorderDashOffset;x=od(this,v,l),x!==void 0&&(y=Vt(n,x,J),c?S=k=C=L=y:M=O=D=Z=y,f.push({tx1:S,ty1:M,tx2:k,ty2:O,x1:C,y1:D,x2:L,y2:Z,width:J,color:ne,borderDash:Je,borderDashOffset:se,tickWidth:ye,tickColor:Nt,tickBorderDash:xe,tickBorderDashOffset:jt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const i=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=ke(n.grid),f=u+h,g=d?-h:f,p=-dt(this.labelRotation),m=[];let b,_,v,x,y,S,M,k,O,C,D,L,Z="middle";if(s==="top")S=this.bottom-g,M=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+g,M=this._getXAxisLabelAlignment();else if(s==="left"){const I=this._getYAxisLabelAlignment(u);M=I.textAlign,y=I.x}else if(s==="right"){const I=this._getYAxisLabelAlignment(u);M=I.textAlign,y=I.x}else if(i==="x"){if(s==="center")S=(t.top+t.bottom)/2+f;else if(T(s)){const I=Object.keys(s)[0],H=s[I];S=this.chart.scales[I].getPixelForValue(H)+f}M=this._getXAxisLabelAlignment()}else if(i==="y"){if(s==="center")y=(t.left+t.right)/2-f;else if(T(s)){const I=Object.keys(s)[0],H=s[I];y=this.chart.scales[I].getPixelForValue(H)}M=this._getYAxisLabelAlignment(u).textAlign}i==="y"&&(l==="start"?Z="top":l==="end"&&(Z="bottom"));const st=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){v=a[b],x=v.label;const I=o.setContext(this.getContext(b));k=this.getPixelForTick(b)+o.labelOffset,O=this._resolveTickFontOptions(b),C=O.lineHeight,D=V(x)?x.length:1;const H=D/2,U=I.color,ct=I.textStrokeColor,J=I.textStrokeWidth;let ne=M;r?(y=k,M==="inner"&&(b===_-1?ne=this.options.reverse?"left":"right":b===0?ne=this.options.reverse?"right":"left":ne="center"),s==="top"?c==="near"||p!==0?L=-D*C+C/2:c==="center"?L=-st.highest.height/2-H*C+C:L=-st.highest.height+C/2:c==="near"||p!==0?L=C/2:c==="center"?L=st.highest.height/2-H*C:L=st.highest.height-D*C,d&&(L*=-1),p!==0&&!I.showLabelBackdrop&&(y+=C/2*Math.sin(p))):(S=k,L=(1-D)*C/2);let Je;if(I.showLabelBackdrop){const se=et(I.backdropPadding),ye=st.heights[b],Nt=st.widths[b];let xe=L-se.top,jt=0-se.left;switch(Z){case"middle":xe-=ye/2;break;case"bottom":xe-=ye;break}switch(M){case"center":jt-=Nt/2;break;case"right":jt-=Nt;break;case"inner":b===_-1?jt-=Nt:b>0&&(jt-=Nt/2);break}Je={left:jt,top:xe,width:Nt+se.width,height:ye+se.height,color:I.backdropColor}}m.push({label:x,font:O,textOffset:L,options:{rotation:p,color:U,strokeColor:ct,strokeWidth:J,textAlign:ne,textBaseline:Z,translation:[y,S],backdrop:Je}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:i}=this.options;if(-dt(this.labelRotation))return t==="top"?"left":"right";let s="center";return i.align==="start"?s="left":i.align==="end"?s="right":i.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:i,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return i==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):i==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,i=this.options.position;if(i==="left"||i==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(i==="top"||i==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:i},left:n,top:s,width:o,height:r}=this;i&&(t.save(),t.fillStyle=i,t.fillRect(n,s,o,r),t.restore())}getLineWidthForValue(t){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?i.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const i=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(i.display)for(o=0,r=s.length;o<r;++o){const l=s[o];i.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),i.drawTicks&&a({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:i,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=Vt(t,this.left,r)-r/2,h=Vt(t,this.right,a)+a/2,d=u=l):(d=Vt(t,this.top,r)-r/2,u=Vt(t,this.bottom,a)+a/2,c=h=l),i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.beginPath(),i.moveTo(c,d),i.lineTo(h,u),i.stroke(),i.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&Bi(n,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;Qt(n,c,0,h,l,a)}s&&zi(n)}drawTitle(){const{ctx:t,options:{position:i,title:n,reverse:s}}=this;if(!n.display)return;const o=X(n.font),r=et(n.padding),a=n.align;let l=o.lineHeight/2;i==="bottom"||i==="center"||T(i)?(l+=r.bottom,V(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=hd(this,l,i,a);Qt(t,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:u,textAlign:cd(a,i,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,i=t.ticks&&t.ticks.z||0,n=P(t.grid&&t.grid.z,-1),s=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==te.prototype.draw?[{z:i,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:i,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const i=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=i.length;o<r;++o){const a=i[o];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const i=this.options.ticks.setContext(this.getContext(t));return X(i.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class li{constructor(t,i,n){this.type=t,this.scope=i,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const i=Object.getPrototypeOf(t);let n;fd(i)&&(n=this.register(i));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,dd(t,r,n),this.override&&Y.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const i=this.items,n=t.id,s=this.scope;n in i&&delete i[n],s&&n in Y[s]&&(delete Y[s][n],this.override&&delete Jt[n])}}function dd(e,t,i){const n=je(Object.create(null),[i?Y.get(i):{},Y.get(t),e.defaults]);Y.set(t,n),e.defaultRoutes&&ud(t,e.defaultRoutes),e.descriptors&&Y.describe(t,e.descriptors)}function ud(e,t){Object.keys(t).forEach(i=>{const n=i.split("."),s=n.pop(),o=[e].concat(n).join("."),r=t[i].split("."),a=r.pop(),l=r.join(".");Y.route(o,s,l,a)})}function fd(e){return"id"in e&&"defaults"in e}class gd{constructor(){this.controllers=new li(ut,"datasets",!0),this.elements=new li(ft,"elements"),this.plugins=new li(Object,"plugins"),this.scales=new li(te,"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,i,n){[...i].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):E(s,r=>{const a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,i,n){const s=zn(t);B(n["before"+s],[],n),i[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let i=0;i<this._typedRegistries.length;i++){const n=this._typedRegistries[i];if(n.isForType(t))return n}return this.plugins}_get(t,i,n){const s=i.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var pt=new gd;class pd{constructor(){this._init=[]}notify(t,i,n,s){i==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,i,n);return i==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,i,n,s){s=s||{};for(const o of t){const r=o.plugin,a=r[n],l=[i,s,o.options];if(B(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),i}_createDescriptors(t,i){const n=t&&t.config,s=P(n.options&&n.options.plugins,{}),o=md(n);return s===!1&&!i?[]:_d(t,o,s,i)}_notifyStateChanges(t){const i=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(i,n),t,"stop"),this._notify(s(n,i),t,"start")}}function md(e){const t={},i=[],n=Object.keys(pt.plugins.items);for(let o=0;o<n.length;o++)i.push(pt.getPlugin(n[o]));const s=e.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];i.indexOf(r)===-1&&(i.push(r),t[r.id]=!0)}return{plugins:i,localIds:t}}function bd(e,t){return!t&&e===!1?null:e===!0?{}:e}function _d(e,{plugins:t,localIds:i},n,s){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=bd(n[l],s);c!==null&&o.push({plugin:a,options:yd(e.config,{plugin:a,local:i[l]},c,r)})}return o}function yd(e,{plugin:t,local:i},n,s){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(n,o);return i&&t.defaults&&r.push(t.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function yn(e,t){const i=Y.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function xd(e,t){let i=e;return e==="_index_"?i=t:e==="_value_"&&(i=t==="x"?"y":"x"),i}function vd(e,t){return e===t?"_index_":"_value_"}function no(e){if(e==="x"||e==="y"||e==="r")return e}function wd(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function xn(e,...t){if(no(e))return e;for(const i of t){const n=i.axis||wd(i.position)||e.length>1&&no(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function so(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function Sd(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(i.length)return so(e,"x",i[0])||so(e,"y",i[0])}return{}}function Md(e,t){const i=Jt[e.type]||{scales:{}},n=t.scales||{},s=yn(e.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!T(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=xn(r,a,Sd(r,e),Y.scales[a.type]),c=vd(l,s),h=i.scales||{};o[r]=Ee(Object.create(null),[{axis:l},a,h[l],h[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||yn(a,t),h=(Jt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=xd(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Ee(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ee(a,[Y.scales[a.type],Y.scale])}),o}function ha(e){const t=e.options||(e.options={});t.plugins=P(t.plugins,{}),t.scales=Md(e,t)}function da(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function kd(e){return e=e||{},e.data=da(e.data),ha(e),e}const oo=new Map,ua=new Set;function ci(e,t){let i=oo.get(e);return i||(i=t(),oo.set(e,i),ua.add(i)),i}const Oe=(e,t,i)=>{const n=Ft(t,i);n!==void 0&&e.add(n)};class Od{constructor(t){this._config=kd(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=da(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(),ha(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ci(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,i){return ci(`${t}.transition.${i}`,()=>[[`datasets.${t}.transitions.${i}`,`transitions.${i}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,i){return ci(`${t}-${i}`,()=>[[`datasets.${t}.elements.${i}`,`datasets.${t}`,`elements.${i}`,""]])}pluginScopeKeys(t){const i=t.id,n=this.type;return ci(`${n}-plugin-${i}`,()=>[[`plugins.${i}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,i){const n=this._scopeCache;let s=n.get(t);return(!s||i)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,i,n){const{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(i);if(a)return a;const l=new Set;i.forEach(h=>{t&&(l.add(t),h.forEach(d=>Oe(l,t,d))),h.forEach(d=>Oe(l,s,d)),h.forEach(d=>Oe(l,Jt[o]||{},d)),h.forEach(d=>Oe(l,Y,d)),h.forEach(d=>Oe(l,mn,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ua.has(i)&&r.set(i,c),c}chartOptionScopes(){const{options:t,type:i}=this;return[t,Jt[i]||{},Y.datasets[i]||{},{type:i},Y,mn]}resolveNamedOptions(t,i,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=ro(this._resolverCache,t,s);let l=r;if(Pd(r,i)){o.$shared=!1,n=Bt(n)?n():n;const c=this.createResolver(t,n,a);l=he(r,n,c)}for(const c of i)o[c]=l[c];return o}createResolver(t,i,n=[""],s){const{resolver:o}=ro(this._resolverCache,t,n);return T(i)?he(o,i,void 0,s):o}}function ro(e,t,i){let n=e.get(t);n||(n=new Map,e.set(t,n));const s=i.join();let o=n.get(s);return o||(o={resolver:Gn(t,i),subPrefixes:i.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const Ad=e=>T(e)&&Object.getOwnPropertyNames(e).some(t=>Bt(e[t]));function Pd(e,t){const{isScriptable:i,isIndexable:n}=Gr(e);for(const s of t){const o=i(s),r=n(s),a=(r||o)&&e[s];if(o&&(Bt(a)||Ad(a))||r&&V(a))return!0}return!1}var Cd="4.4.2";const Dd=["top","bottom","left","right","chartArea"];function ao(e,t){return e==="top"||e==="bottom"||Dd.indexOf(e)===-1&&t==="x"}function lo(e,t){return function(i,n){return i[e]===n[e]?i[t]-n[t]:i[e]-n[e]}}function co(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),B(i&&i.onComplete,[e],t)}function Td(e){const t=e.chart,i=t.options.animation;B(i&&i.onProgress,[e],t)}function fa(e){return Kn()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const wi={},ho=e=>{const t=fa(e);return Object.values(wi).filter(i=>i.canvas===t).pop()};function Ld(e,t,i){const n=Object.keys(e);for(const s of n){const o=+s;if(o>=t){const r=e[s];delete e[s],(i>0||o>t)&&(e[o+i]=r)}}}function $d(e,t,i,n){return!i||e.type==="mouseout"?null:n?t:e}function hi(e,t,i){return e.options.clip?e[i]:t[i]}function Rd(e,t){const{xScale:i,yScale:n}=e;return i&&n?{left:hi(i,t,"left"),right:hi(i,t,"right"),top:hi(n,t,"top"),bottom:hi(n,t,"bottom")}:t}class kt{static register(...t){pt.add(...t),uo()}static unregister(...t){pt.remove(...t),uo()}constructor(t,i){const n=this.config=new Od(i),s=fa(t),o=ho(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Zh(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Il(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,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 pd,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Jl(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],wi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}vt.listen(this,"complete",co),vt.listen(this,"progress",Td),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:i},width:n,height:s,_aspectRatio:o}=this;return $(t)?i&&o?o:s?n/s: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 pt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ls(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Cs(this.canvas,this.ctx),this}stop(){return vt.stop(this),this}resize(t,i){vt.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,i,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ls(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};E(i,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,i=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];i&&(o=o.concat(Object.keys(i).map(r=>{const a=i[r],l=xn(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,r=>{const a=r.options,l=a.id,c=xn(l,a),h=P(a.type,r.dtype);(a.position===void 0||ao(a.position,c)!==ao(r.dposition))&&(a.position=r.dposition),s[l]=!0;let d=null;if(l in n&&n[l].type===h)d=n[l];else{const u=pt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(a,t)}),E(s,(r,a)=>{r||delete n[a]}),E(n,r=>{tt.configure(this,r,r.options),tt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,i=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>i){for(let s=i;s<n;++s)this._destroyDatasetMeta(s);t.splice(i,n-i)}this._sortedMetasets=t.slice(0).sort(lo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:i}}=this;t.length>i.length&&delete this._stacks,t.forEach((n,s)=>{i.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],i=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=i.length;n<s;n++){const o=i[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||yn(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=pt.getController(a),{datasetElementType:c,dataElementType:h}=Y.datasets[a];Object.assign(l,{dataElementType:pt.getElement(h),datasetElementType:c&&pt.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){E(this.data.datasets,(t,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const i=this.config;i.update();const n=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!s&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||E(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(lo("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){E(this.scales,t=>{tt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,i=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!xs(i,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,i=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of i){const r=n==="_removeElements"?-o:o;Ld(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const i=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<i;o++)if(!xs(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;tt.update(this,this.width,this.height,t);const i=this.chartArea,n=i.width<=0||i.height<=0;this._layers=[],E(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let i=0,n=this.data.datasets.length;i<n;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,n=this.data.datasets.length;i<n;++i)this._updateDataset(i,Bt(t)?t({datasetIndex:i}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(i),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(vt.has(this)?this.attached&&!vt.running(this)&&vt.start(this):(this.draw(),co({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const i=this._sortedMetasets,n=[];let s,o;for(s=0,o=i.length;s<o;++s){const r=i[s];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let i=t.length-1;i>=0;--i)this._drawDataset(t[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const i=this.ctx,n=t._clip,s=!n.disabled,o=Rd(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Bi(i,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&zi(i),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Pt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,i,n,s){const o=Dh.modes[i];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const i=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===i).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:t,_dataset:i,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=zt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const i=this.data.datasets[t];if(!i)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!i.hidden}setDatasetVisibility(t,i){const n=this.getDatasetMeta(t);n.hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,i,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);He(i)?(o.data[i].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,i){this._updateVisibility(t,i,!1)}show(t,i){this._updateVisibility(t,i,!0)}_destroyDatasetMeta(t){const i=this._metasets[t];i&&i.controller&&i.controller._destroy(),delete this._metasets[t]}_stop(){let t,i;for(this.stop(),vt.remove(this),t=0,i=this.data.datasets.length;t<i;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:i}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Cs(t,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete wi[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,i=this.platform,n=(o,r)=>{i.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};E(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,i=this.platform,n=(l,c)=>{i.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(i.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},i.isAttached(this.canvas)?a():r()}unbindEvents(){E(this._listeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._listeners={},E(this._responsiveListeners,(t,i)=>{this.platform.removeEventListener(this,i,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,i,n){const s=n?"set":"remove";let o,r,a,l;for(i==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const i=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!ki(n,i)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,i))}notifyPlugins(t,i,n){return this._plugins.notify(this,t,i,n)}isPluginEnabled(t){return this._plugins._cache.filter(i=>i.plugin.id===t).length===1}_updateHoverStyles(t,i,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(i,t),a=n?t:o(t,i);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,i){const n={event:t,replay:i,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,i,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,i,n){const{_active:s=[],options:o}=this,r=i,a=this._getActiveElements(t,s,n,r),l=Hl(t),c=$d(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,a,this],this),l&&B(o.onClick,[t,a,this],this));const h=!ki(a,s);return(h||i)&&(this._active=a,this._updateHoverStyles(a,s,i)),this._lastEvent=c,h}_getActiveElements(t,i,n,s){if(t.type==="mouseout")return[];if(!n)return i;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}w(kt,"defaults",Y),w(kt,"instances",wi),w(kt,"overrides",Jt),w(kt,"registry",pt),w(kt,"version",Cd),w(kt,"getChart",ho);function uo(){return E(kt.instances,e=>e._plugins.invalidate())}function Ed(e,t,i){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;e.beginPath(),e.arc(o,r,a,n-c,i+c),l>s?(c=s/l,e.arc(o,r,l,i+c,n-c,!0)):e.arc(o,r,s,i+K,n-K),e.closePath(),e.clip()}function Id(e){return Wn(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Fd(e,t,i,n){const s=Id(e.options.borderRadius),o=(i-t)/2,r=Math.min(o,n*t/2),a=l=>{const c=(i-Math.min(o,l))*n/2;return q(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:q(s.innerStart,0,r),innerEnd:q(s.innerEnd,0,r)}}function re(e,t,i,n){return{x:i+e*Math.cos(t),y:n+e*Math.sin(t)}}function Ti(e,t,i,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+n+i-c,0),u=h>0?h+n+i+c:0;let f=0;const g=s-l;if(n){const I=h>0?h-n:0,H=d>0?d-n:0,U=(I+H)/2,ct=U!==0?g*U/(U+n):g;f=(g-ct)/2}const p=Math.max(.001,g*d-i/j)/d,m=(g-p)/2,b=l+m+f,_=s-m-f,{outerStart:v,outerEnd:x,innerStart:y,innerEnd:S}=Fd(t,u,d,_-b),M=d-v,k=d-x,O=b+v/M,C=_-x/k,D=u+y,L=u+S,Z=b+y/D,st=_-S/L;if(e.beginPath(),o){const I=(O+C)/2;if(e.arc(r,a,d,O,I),e.arc(r,a,d,I,C),x>0){const J=re(k,C,r,a);e.arc(J.x,J.y,x,C,_+K)}const H=re(L,_,r,a);if(e.lineTo(H.x,H.y),S>0){const J=re(L,st,r,a);e.arc(J.x,J.y,S,_+K,st+Math.PI)}const U=(_-S/u+(b+y/u))/2;if(e.arc(r,a,u,_-S/u,U,!0),e.arc(r,a,u,U,b+y/u,!0),y>0){const J=re(D,Z,r,a);e.arc(J.x,J.y,y,Z+Math.PI,b-K)}const ct=re(M,b,r,a);if(e.lineTo(ct.x,ct.y),v>0){const J=re(M,O,r,a);e.arc(J.x,J.y,v,b-K,O)}}else{e.moveTo(r,a);const I=Math.cos(O)*d+r,H=Math.sin(O)*d+a;e.lineTo(I,H);const U=Math.cos(C)*d+r,ct=Math.sin(C)*d+a;e.lineTo(U,ct)}e.closePath()}function Bd(e,t,i,n,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){Ti(e,t,i,n,l,s);for(let c=0;c<o;++c)e.fill();isNaN(a)||(l=r+(a%N||N))}return Ti(e,t,i,n,l,s),e.fill(),l}function zd(e,t,i,n,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=u,f?(e.lineWidth=c*2,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let g=t.endAngle;if(o){Ti(e,t,i,n,g,s);for(let p=0;p<o;++p)e.stroke();isNaN(a)||(g=r+(a%N||N))}f&&Ed(e,t,g),o||(Ti(e,t,i,n,g,s),e.stroke())}class Te extends ft{constructor(i){super();w(this,"circumference");w(this,"endAngle");w(this,"fullCircles");w(this,"innerRadius");w(this,"outerRadius");w(this,"pixelMargin");w(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,i&&Object.assign(this,i)}inRange(i,n,s){const o=this.getProps(["x","y"],s),{angle:r,distance:a}=Er(o,{x:i,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,p=P(u,c-l)>=N||Ve(r,l,c),m=Ot(a,h+f,d+f);return p&&m}getCenterPoint(i){const{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:c,spacing:h}=this.options,d=(o+r)/2,u=(a+l+h+c)/2;return{x:n+Math.cos(d)*u,y:s+Math.sin(d)*u}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>N?Math.floor(s/N):0,s===0||this.innerRadius<0||this.outerRadius<0)return;i.save();const l=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(j,s||0)),h=o*c;i.fillStyle=n.backgroundColor,i.strokeStyle=n.borderColor,Bd(i,this,h,r,a),zd(i,this,h,r,a),i.restore()}}w(Te,"id","arc"),w(Te,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),w(Te,"defaultRoutes",{backgroundColor:"backgroundColor"}),w(Te,"descriptors",{_scriptable:!0,_indexable:i=>i!=="borderDash"});function ga(e,t,i=t){e.lineCap=P(i.borderCapStyle,t.borderCapStyle),e.setLineDash(P(i.borderDash,t.borderDash)),e.lineDashOffset=P(i.borderDashOffset,t.borderDashOffset),e.lineJoin=P(i.borderJoinStyle,t.borderJoinStyle),e.lineWidth=P(i.borderWidth,t.borderWidth),e.strokeStyle=P(i.borderColor,t.borderColor)}function Nd(e,t,i){e.lineTo(i.x,i.y)}function jd(e){return e.stepped?hc:e.tension||e.cubicInterpolationMode==="monotone"?dc:Nd}function pa(e,t,i={}){const n=e.length,{start:s=0,end:o=n-1}=i,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function Hd(e,t,i,n){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=pa(s,i,n),h=jd(o);let{move:d=!0,reverse:u}=n||{},f,g,p;for(f=0;f<=c;++f)g=s[(a+(u?c-f:f))%r],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):h(e,p,g,u,o.stepped),p=g);return l&&(g=s[(a+(u?c:0))%r],h(e,p,g,u,o.stepped)),!!l}function Vd(e,t,i,n){const s=t.points,{count:o,start:r,ilen:a}=pa(s,i,n),{move:l=!0,reverse:c}=n||{};let h=0,d=0,u,f,g,p,m,b;const _=x=>(r+(c?a-x:x))%o,v=()=>{p!==m&&(e.lineTo(h,m),e.lineTo(h,p),e.lineTo(h,b))};for(l&&(f=s[_(0)],e.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=s[_(u)],f.skip)continue;const x=f.x,y=f.y,S=x|0;S===g?(y<p?p=y:y>m&&(m=y),h=(d*h+x)/++d):(v(),e.lineTo(x,y),g=S,d=0,p=m=y),b=y}v()}function vn(e){const t=e.options,i=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!i?Vd:Hd}function Wd(e){return e.stepped?Vc:e.tension||e.cubicInterpolationMode==="monotone"?Wc:Ut}function Gd(e,t,i,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,i,n)&&s.closePath()),ga(e,t.options),e.stroke(s)}function Yd(e,t,i,n){const{segments:s,options:o}=t,r=vn(t);for(const a of s)ga(e,o,a.style),e.beginPath(),r(e,t,a,{start:i,end:i+n-1})&&e.closePath(),e.stroke()}const Ud=typeof Path2D=="function";function Kd(e,t,i,n){Ud&&!t.options.segment?Gd(e,t,i,n):Yd(e,t,i,n)}class Rt extends ft{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,i){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;Ec(this._points,n,t,s,i),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=qc(this,this.options.segment))}first(){const t=this.segments,i=this.points;return t.length&&i[t[0].start]}last(){const t=this.segments,i=this.points,n=t.length;return n&&i[t[n-1].end]}interpolate(t,i){const n=this.options,s=t[i],o=this.points,r=ea(this,{property:i,start:s,end:s});if(!r.length)return;const a=[],l=Wd(n);let c,h;for(c=0,h=r.length;c<h;++c){const{start:d,end:u}=r[c],f=o[d],g=o[u];if(f===g){a.push(f);continue}const p=Math.abs((s-f[i])/(g[i]-f[i])),m=l(f,g,p,n.stepped);m[i]=t[i],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,i,n){return vn(this)(t,this,i,n)}path(t,i,n){const s=this.segments,o=vn(this);let r=this._loop;i=i||0,n=n||this.points.length-i;for(const a of s)r&=o(t,this,a,{start:i,end:i+n-1});return!!r}draw(t,i,n,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Kd(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}w(Rt,"id","line"),w(Rt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),w(Rt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),w(Rt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function fo(e,t,i,n){const s=e.options,{[i]:o}=e.getProps([i],n);return Math.abs(t-o)<s.radius+s.hitRadius}class Si extends ft{constructor(i){super();w(this,"parsed");w(this,"skip");w(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,i&&Object.assign(this,i)}inRange(i,n,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(i-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(i,n){return fo(this,i,"x",n)}inYRange(i,n){return fo(this,i,"y",n)}getCenterPoint(i){const{x:n,y:s}=this.getProps(["x","y"],i);return{x:n,y:s}}size(i){i=i||this.options||{};let n=i.radius||0;n=Math.max(n,n&&i.hoverRadius||0);const s=n&&i.borderWidth||0;return(n+s)*2}draw(i,n){const s=this.options;this.skip||s.radius<.1||!Pt(this,n,this.size(s)/2)||(i.strokeStyle=s.borderColor,i.lineWidth=s.borderWidth,i.fillStyle=s.backgroundColor,bn(i,s,this.x,this.y))}getRange(){const i=this.options||{};return i.radius+i.hitRadius}}w(Si,"id","point"),w(Si,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),w(Si,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ma(e,t){const{x:i,y:n,base:s,width:o,height:r}=e.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return e.horizontal?(d=r/2,a=Math.min(i,s),l=Math.max(i,s),c=n-d,h=n+d):(d=o/2,a=i-d,l=i+d,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Et(e,t,i,n){return e?0:q(t,i,n)}function Xd(e,t,i){const n=e.options.borderWidth,s=e.borderSkipped,o=Wr(n);return{t:Et(s.top,o.top,0,i),r:Et(s.right,o.right,0,t),b:Et(s.bottom,o.bottom,0,i),l:Et(s.left,o.left,0,t)}}function qd(e,t,i){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,o=qt(s),r=Math.min(t,i),a=e.borderSkipped,l=n||T(s);return{topLeft:Et(!l||a.top||a.left,o.topLeft,0,r),topRight:Et(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Et(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Et(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Zd(e){const t=ma(e),i=t.right-t.left,n=t.bottom-t.top,s=Xd(e,i/2,n/2),o=qd(e,i/2,n/2);return{outer:{x:t.left,y:t.top,w:i,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function an(e,t,i,n){const s=t===null,o=i===null,a=e&&!(s&&o)&&ma(e,n);return a&&(s||Ot(t,a.left,a.right))&&(o||Ot(i,a.top,a.bottom))}function Jd(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Qd(e,t){e.rect(t.x,t.y,t.w,t.h)}function ln(e,t,i={}){const n=e.x!==i.x?-t:0,s=e.y!==i.y?-t:0,o=(e.x+e.w!==i.x+i.w?t:0)-n,r=(e.y+e.h!==i.y+i.h?t:0)-s;return{x:e.x+n,y:e.y+s,w:e.w+o,h:e.h+r,radius:e.radius}}class Mi extends ft{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:i,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=Zd(this),a=Jd(r.radius)?We:Qd;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,ln(r,i,o)),t.clip(),a(t,ln(o,-i,r)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,ln(o,i)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,i,n){return an(this,t,i,n)}inXRange(t,i){return an(this,t,null,i)}inYRange(t,i){return an(this,null,t,i)}getCenterPoint(t){const{x:i,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(i+s)/2:i,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}w(Mi,"id","bar"),w(Mi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),w(Mi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var tu=Object.freeze({__proto__:null,ArcElement:Te,BarElement:Mi,LineElement:Rt,PointElement:Si});const wn=["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)"],go=wn.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function ba(e){return wn[e%wn.length]}function _a(e){return go[e%go.length]}function eu(e,t){return e.borderColor=ba(t),e.backgroundColor=_a(t),++t}function iu(e,t){return e.backgroundColor=e.data.map(()=>ba(t++)),t}function nu(e,t){return e.backgroundColor=e.data.map(()=>_a(t++)),t}function su(e){let t=0;return(i,n)=>{const s=e.getDatasetMeta(n).controller;s instanceof Xt?t=iu(i,t):s instanceof ze?t=nu(i,t):s&&(t=eu(i,t))}}function po(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function ou(e){return e&&(e.borderColor||e.backgroundColor)}var ru={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,i){if(!i.enabled)return;const{data:{datasets:n},options:s}=e.config,{elements:o}=s;if(!i.forceOverride&&(po(n)||ou(s)||o&&po(o)))return;const r=su(e);n.forEach(r)}};function au(e,t,i,n,s){const o=s.samples||n;if(o>=i)return e.slice(t,t+i);const r=[],a=(i-2)/(o-2);let l=0;const c=t+i-1;let h=t,d,u,f,g,p;for(r[l++]=e[h],d=0;d<o-2;d++){let m=0,b=0,_;const v=Math.floor((d+1)*a)+1+t,x=Math.min(Math.floor((d+2)*a)+1,i)+t,y=x-v;for(_=v;_<x;_++)m+=e[_].x,b+=e[_].y;m/=y,b/=y;const S=Math.floor(d*a)+1+t,M=Math.min(Math.floor((d+1)*a)+1,i)+t,{x:k,y:O}=e[h];for(f=g=-1,_=S;_<M;_++)g=.5*Math.abs((k-m)*(e[_].y-O)-(k-e[_].x)*(b-O)),g>f&&(f=g,u=e[_],p=_);r[l++]=u,h=p}return r[l++]=e[c],r}function lu(e,t,i,n){let s=0,o=0,r,a,l,c,h,d,u,f,g,p;const m=[],b=t+i-1,_=e[t].x,x=e[b].x-_;for(r=t;r<t+i;++r){a=e[r],l=(a.x-_)/x*n,c=a.y;const y=l|0;if(y===h)c<g?(g=c,d=r):c>p&&(p=c,u=r),s=(o*s+a.x)/++o;else{const S=r-1;if(!$(d)&&!$(u)){const M=Math.min(d,u),k=Math.max(d,u);M!==f&&M!==S&&m.push({...e[M],x:s}),k!==f&&k!==S&&m.push({...e[k],x:s})}r>0&&S!==f&&m.push(e[S]),m.push(a),h=y,o=0,g=p=c,d=u=f=r}}return m}function ya(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function mo(e){e.data.datasets.forEach(t=>{ya(t)})}function cu(e,t){const i=t.length;let n=0,s;const{iScale:o}=e,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=q(At(t,o.axis,r).lo,0,i-1)),c?s=q(At(t,o.axis,a).hi+1,n,i)-n:s=i-n,{start:n,count:s}}var hu={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,i)=>{if(!i.enabled){mo(e);return}const n=e.width;e.data.datasets.forEach((s,o)=>{const{_data:r,indexAxis:a}=s,l=e.getDatasetMeta(o),c=r||s.data;if(Ce([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=e.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||e.options.parsing)return;let{start:d,count:u}=cu(l,c);const f=i.threshold||4*n;if(u<=f){ya(s);return}$(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(i.algorithm){case"lttb":g=au(c,d,u,n,i);break;case"min-max":g=lu(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}s._decimated=g})},destroy(e){mo(e)}};function du(e,t,i){const n=e.segments,s=e.points,o=t.points,r=[];for(const a of n){let{start:l,end:c}=a;c=Zn(l,c,s);const h=Sn(i,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:h,start:s[l],end:s[c]});continue}const d=ea(t,h);for(const u of d){const f=Sn(i,o[u.start],o[u.end],u.loop),g=ta(a,s,f);for(const p of g)r.push({source:p,target:u,start:{[i]:bo(h,f,"start",Math.max)},end:{[i]:bo(h,f,"end",Math.min)}})}}return r}function Sn(e,t,i,n){if(n)return;let s=t[e],o=i[e];return e==="angle"&&(s=rt(s),o=rt(o)),{property:e,start:s,end:o}}function uu(e,t){const{x:i=null,y:n=null}=e||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=Zn(r,a,s);const l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):i!==null&&(o.push({x:i,y:l.y}),o.push({x:i,y:c.y}))}),o}function Zn(e,t,i){for(;t>e;t--){const n=i[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function bo(e,t,i,n){return e&&t?n(e[i],t[i]):e?e[i]:t?t[i]:0}function xa(e,t){let i=[],n=!1;return V(e)?(n=!0,i=e):i=uu(e,t),i.length?new Rt({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function _o(e){return e&&e.fill!==!1}function fu(e,t,i){let s=e[t].fill;const o=[t];let r;if(!i)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!G(s))return s;if(r=e[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function gu(e,t,i){const n=_u(e);if(T(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return G(s)&&Math.floor(s)===s?pu(n[0],t,s,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function pu(e,t,i,n){return(e==="-"||e==="+")&&(i=t+i),i===t||i<0||i>=n?!1:i}function mu(e,t){let i=null;return e==="start"?i=t.bottom:e==="end"?i=t.top:T(e)?i=t.getPixelForValue(e.value):t.getBasePixel&&(i=t.getBasePixel()),i}function bu(e,t,i){let n;return e==="start"?n=i:e==="end"?n=t.options.reverse?t.min:t.max:T(e)?n=e.value:n=t.getBaseValue(),n}function _u(e){const t=e.options,i=t.fill;let n=P(i&&i.target,i);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function yu(e){const{scale:t,index:i,line:n}=e,s=[],o=n.segments,r=n.points,a=xu(t,i);a.push(xa({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)vu(s,r[h],a)}return new Rt({points:s,options:{}})}function xu(e,t){const i=[],n=e.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const o=n[s];if(o.index===t)break;o.hidden||i.unshift(o.dataset)}return i}function vu(e,t,i){const n=[];for(let s=0;s<i.length;s++){const o=i[s],{first:r,last:a,point:l}=wu(o,t,"x");if(!(!l||r&&a)){if(r)n.unshift(l);else if(e.push(l),!a)break}}e.push(...n)}function wu(e,t,i){const n=e.interpolate(t,i);if(!n)return{};const s=n[i],o=e.segments,r=e.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],d=r[h.start][i],u=r[h.end][i];if(Ot(s,d,u)){a=s===d,l=s===u;break}}return{first:a,last:l,point:n}}class va{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,i,n){const{x:s,y:o,radius:r}=this;return i=i||{start:0,end:N},t.arc(s,o,r,i.end,i.start,!0),!n.bounds}interpolate(t){const{x:i,y:n,radius:s}=this,o=t.angle;return{x:i+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}}function Su(e){const{chart:t,fill:i,line:n}=e;if(G(i))return Mu(t,i);if(i==="stack")return yu(e);if(i==="shape")return!0;const s=ku(e);return s instanceof va?s:xa(s,n)}function Mu(e,t){const i=e.getDatasetMeta(t);return i&&e.isDatasetVisible(t)?i.dataset:null}function ku(e){return(e.scale||{}).getPointPositionForValue?Au(e):Ou(e)}function Ou(e){const{scale:t={},fill:i}=e,n=mu(i,t);if(G(n)){const s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function Au(e){const{scale:t,fill:i}=e,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,r=bu(i,t,o),a=[];if(n.grid.circular){const l=t.getPointPositionForValue(0,o);return new va({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function cn(e,t,i){const n=Su(t),{line:s,scale:o,axis:r}=t,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:d=c}=l||{};n&&s.points.length&&(Bi(e,i),Pu(e,{line:s,target:n,above:h,below:d,area:i,scale:o,axis:r}),zi(e))}function Pu(e,t){const{line:i,target:n,above:s,below:o,area:r,scale:a}=t,l=i._loop?"angle":t.axis;e.save(),l==="x"&&o!==s&&(yo(e,n,r.top),xo(e,{line:i,target:n,color:s,scale:a,property:l}),e.restore(),e.save(),yo(e,n,r.bottom)),xo(e,{line:i,target:n,color:o,scale:a,property:l}),e.restore()}function yo(e,t,i){const{segments:n,points:s}=t;let o=!0,r=!1;e.beginPath();for(const a of n){const{start:l,end:c}=a,h=s[l],d=s[Zn(l,c,s)];o?(e.moveTo(h.x,h.y),o=!1):(e.lineTo(h.x,i),e.lineTo(h.x,h.y)),r=!!t.pathSegment(e,a,{move:r}),r?e.closePath():e.lineTo(d.x,i)}e.lineTo(t.first().x,i),e.closePath(),e.clip()}function xo(e,t){const{line:i,target:n,property:s,color:o,scale:r}=t,a=du(i,n,s);for(const{source:l,target:c,start:h,end:d}of a){const{style:{backgroundColor:u=o}={}}=l,f=n!==!0;e.save(),e.fillStyle=u,Cu(e,r,f&&Sn(s,h,d)),e.beginPath();const g=!!i.pathSegment(e,l);let p;if(f){g?e.closePath():vo(e,n,d,s);const m=!!n.pathSegment(e,c,{move:g,reverse:!0});p=g&&m,p||vo(e,n,h,s)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function Cu(e,t,i){const{top:n,bottom:s}=t.chart.chartArea,{property:o,start:r,end:a}=i||{};o==="x"&&(e.beginPath(),e.rect(r,n,a-r,s-n),e.clip())}function vo(e,t,i,n){const s=t.interpolate(i,n);s&&e.lineTo(s.x,s.y)}var Du={id:"filler",afterDatasetsUpdate(e,t,i){const n=(e.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=e.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Rt&&(l={visible:e.isDatasetVisible(r),index:r,fill:gu(a,r,n),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=fu(s,r,i.propagate))},beforeDraw(e,t,i){const n=i.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&cn(e.ctx,a,o))}},beforeDatasetsDraw(e,t,i){if(i.drawTime!=="beforeDatasetsDraw")return;const n=e.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;_o(o)&&cn(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,i){const n=t.meta.$filler;!_o(n)||i.drawTime!=="beforeDatasetDraw"||cn(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const wo=(e,t)=>{let{boxHeight:i=t,boxWidth:n=t}=e;return e.usePointStyle&&(i=Math.min(i,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(t,i)}},Tu=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class So extends ft{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,i,n){this.maxWidth=t,this.maxHeight=i,this._margins=n,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 i=B(t.generateLabels,[this.chart],this)||[];t.filter&&(i=i.filter(n=>t.filter(n,this.chart.data))),t.sort&&(i=i.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:t,ctx:i}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=X(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=wo(n,o);let c,h;i.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,i,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{const m=n+i/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+a}),d}_fitCols(t,i,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:v}=Lu(n,i,o,m,s);b>0&&f+v+2*a>h&&(d+=u+a,c.push({width:u,height:f}),g+=u+a,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:v},u=Math.max(u,_),f+=v+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s},rtl:o}}=this,r=le(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Q(n,this.left+s,this.right-this.lineWidths[a]);for(const c of i)a!==c.row&&(a=c.row,l=Q(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=Q(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of i)c.col!==a&&(a=c.col,l=Q(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Bi(t,this),this._draw(),zi(t)}}_draw(){const{options:t,columnSizes:i,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=Y.color,l=le(t.rtl,this.left,this.width),c=X(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=wo(r,d),b=function(S,M,k){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const O=P(k.lineWidth,1);if(s.fillStyle=P(k.fillStyle,a),s.lineCap=P(k.lineCap,"butt"),s.lineDashOffset=P(k.lineDashOffset,0),s.lineJoin=P(k.lineJoin,"miter"),s.lineWidth=O,s.strokeStyle=P(k.strokeStyle,a),s.setLineDash(P(k.lineDash,[])),r.usePointStyle){const C={radius:p*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:O},D=l.xPlus(S,g/2),L=M+u;Vr(s,C,D,L,r.pointStyleWidth&&g)}else{const C=M+Math.max((d-p)/2,0),D=l.leftForLtr(S,g),L=qt(k.borderRadius);s.beginPath(),Object.values(L).some(Z=>Z!==0)?We(s,{x:D,y:C,w:g,h:p,radius:L}):s.rect(D,C,g,p),s.fill(),O!==0&&s.stroke()}s.restore()},_=function(S,M,k){Qt(s,k.text,S,M+m/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?f={x:Q(o,this.left+h,this.right-n[0]),y:this.top+h+x,line:0}:f={x:this.left+h,y:Q(o,this.top+x+h,this.bottom-i[0].height),line:0},Zr(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach((S,M)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const k=s.measureText(S.text).width,O=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),C=g+u+k;let D=f.x,L=f.y;l.setWidth(this.width),v?M>0&&D+C+h>this.right&&(L=f.y+=y,f.line++,D=f.x=Q(o,this.left+h,this.right-n[f.line])):M>0&&L+y>this.bottom&&(D=f.x=D+i[f.line].width+h,f.line++,L=f.y=Q(o,this.top+x+h,this.bottom-i[f.line].height));const Z=l.x(D);if(b(Z,L,S),D=Ql(O,D+g+u,v?D+C:this.right,t.rtl),_(l.x(D),L,S),v)f.x+=C+h;else if(typeof S.text!="string"){const st=c.lineHeight;f.y+=wa(S,st)+h}else f.y+=y}),Jr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,i=t.title,n=X(i.font),s=et(i.padding);if(!i.display)return;const o=le(t.rtl,this.left,this.width),r=this.ctx,a=i.position,l=n.size/2,c=s.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=Q(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+Q(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=Q(a,d,d+u);r.textAlign=o.textAlign(Hn(a)),r.textBaseline="middle",r.strokeStyle=i.color,r.fillStyle=i.color,r.font=n.string,Qt(r,i.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,i=X(t.font),n=et(t.padding);return t.display?i.lineHeight+n.height:0}_getLegendItemAt(t,i){let n,s,o;if(Ot(t,this.left,this.right)&&Ot(i,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],Ot(t,s.left,s.left+s.width)&&Ot(i,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const i=this.options;if(!Eu(t.type,i))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=Tu(s,n);s&&!o&&B(i.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&B(i.onHover,[t,n,this],this)}else n&&B(i.onClick,[t,n,this],this)}}function Lu(e,t,i,n,s){const o=$u(n,e,t,i),r=Ru(s,n,t.lineHeight);return{itemWidth:o,itemHeight:r}}function $u(e,t,i,n){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+i.size/2+n.measureText(s).width}function Ru(e,t,i){let n=e;return typeof t.text!="string"&&(n=wa(t,i)),n}function wa(e,t){const i=e.text?e.text.length:0;return t*i}function Eu(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Iu={id:"legend",_element:So,start(e,t,i){const n=e.legend=new So({ctx:e.ctx,options:i,chart:e});tt.configure(e,n,i),tt.addBox(e,n)},stop(e){tt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const n=e.legend;tt.configure(e,n,i),n.options=i},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,i){const n=t.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(i?0:void 0),h=et(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Jn extends ft{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,i){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=i;const s=V(n.text)?n.text.length:1;this._padding=et(n.padding);const o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:i,left:n,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=Q(a,n,o),d=i+t,c=o-n):(r.position==="left"?(h=n+t,d=Q(a,s,i),l=j*-.5):(h=o-t,d=Q(a,i,s),l=j*.5),c=s-i),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,i=this.options;if(!i.display)return;const n=X(i.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Qt(t,i.text,0,0,n,{color:i.color,maxWidth:l,rotation:c,textAlign:Hn(i.align),textBaseline:"middle",translation:[r,a]})}}function Fu(e,t){const i=new Jn({ctx:e.ctx,options:t,chart:e});tt.configure(e,i,t),tt.addBox(e,i),e.titleBlock=i}var Bu={id:"title",_element:Jn,start(e,t,i){Fu(e,i)},stop(e){const t=e.titleBlock;tt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,i){const n=e.titleBlock;tt.configure(e,n,i),n.options=i},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 di=new WeakMap;var zu={id:"subtitle",start(e,t,i){const n=new Jn({ctx:e.ctx,options:i,chart:e});tt.configure(e,n,i),tt.addBox(e,n),di.set(e,n)},stop(e){tt.removeBox(e,di.get(e)),di.delete(e)},beforeUpdate(e,t,i){const n=di.get(e);tt.configure(e,n,i),n.options=i},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 Le={average(e){if(!e.length)return!1;let t,i,n=new Set,s=0,o=0;for(t=0,i=e.length;t<i;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),s+=l.y,++o}}return{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/o}},nearest(e,t){if(!e.length)return!1;let i=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=pn(t,c);h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();i=l.x,n=l.y}return{x:i,y:n}}};function gt(e,t){return t&&(V(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function wt(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(` `)>-1?e.split(` `):e}function Nu(e,t){const{element:i,datasetIndex:n,index:s}=t,o=e.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:e,label:r,parsed:o.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function Mo(e,t){const i=e.chart.ctx,{body:n,footer:s,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=s.length,f=n.length,g=et(t.padding);let p=g.height,m=0,b=n.reduce((x,y)=>x+y.before.length+y.lines.length+y.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=f*x+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const v=function(x){m=Math.max(m,i.measureText(x).width+_)};return i.save(),i.font=c.string,E(e.title,v),i.font=l.string,E(e.beforeBody.concat(e.afterBody),v),_=t.displayColors?r+2+t.boxPadding:0,E(n,x=>{E(x.before,v),E(x.lines,v),E(x.after,v)}),_=0,i.font=h.string,E(e.footer,v),i.restore(),m+=g.width,{width:m,height:p}}function ju(e,t){const{y:i,height:n}=t;return i<n/2?"top":i>e.height-n/2?"bottom":"center"}function Hu(e,t,i,n){const{x:s,width:o}=n,r=i.caretSize+i.caretPadding;if(e==="left"&&s+o+r>t.width||e==="right"&&s-o-r<0)return!0}function Vu(e,t,i,n){const{x:s,width:o}=i,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),Hu(c,e,t,i)&&(c="center"),c}function ko(e,t,i){const n=i.yAlign||t.yAlign||ju(e,i);return{xAlign:i.xAlign||t.xAlign||Vu(e,t,i,n),yAlign:n}}function Wu(e,t){let{x:i,width:n}=e;return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function Gu(e,t,i){let{y:n,height:s}=e;return t==="top"?n+=i:t==="bottom"?n-=s+i:n-=s/2,n}function Oo(e,t,i,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=i,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=qt(r);let g=Wu(t,a);const p=Gu(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(h,u)+s:a==="right"&&(g+=Math.max(d,f)+s),{x:q(g,0,n.width-t.width),y:q(p,0,n.height-t.height)}}function ui(e,t,i){const n=et(i.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function Ao(e){return gt([],wt(e))}function Yu(e,t,i){return zt(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function Po(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const Sa={beforeTitle:xt,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,n=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return i[t.dataIndex]}return""},afterTitle:xt,beforeBody:xt,beforeLabel:xt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return $(i)||(t+=i),t},labelColor(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const i=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:xt,afterBody:xt,beforeFooter:xt,footer:xt,afterFooter:xt};function it(e,t,i,n){const s=e[t].call(i,n);return typeof s>"u"?Sa[t].call(i,n):s}class Mn extends ft{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 i=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&i.options.animation&&n.animations,o=new ia(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Yu(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,i){const{callbacks:n}=i,s=it(n,"beforeTitle",this,t),o=it(n,"title",this,t),r=it(n,"afterTitle",this,t);let a=[];return a=gt(a,wt(s)),a=gt(a,wt(o)),a=gt(a,wt(r)),a}getBeforeBody(t,i){return Ao(it(i.callbacks,"beforeBody",this,t))}getBody(t,i){const{callbacks:n}=i,s=[];return E(t,o=>{const r={before:[],lines:[],after:[]},a=Po(n,o);gt(r.before,wt(it(a,"beforeLabel",this,o))),gt(r.lines,it(a,"label",this,o)),gt(r.after,wt(it(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,i){return Ao(it(i.callbacks,"afterBody",this,t))}getFooter(t,i){const{callbacks:n}=i,s=it(n,"beforeFooter",this,t),o=it(n,"footer",this,t),r=it(n,"afterFooter",this,t);let a=[];return a=gt(a,wt(s)),a=gt(a,wt(o)),a=gt(a,wt(r)),a}_createItems(t){const i=this._active,n=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=i.length;l<c;++l)a.push(Nu(this.chart,i[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,n))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,n))),E(a,h=>{const d=Po(t.callbacks,h);s.push(it(d,"labelColor",this,h)),o.push(it(d,"labelPointStyle",this,h)),r.push(it(d,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,i){const n=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=Le[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=Mo(this,n),c=Object.assign({},a,l),h=ko(this.chart,n,c),d=Oo(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(t,i,n,s){const o=this.getCaretPosition(t,n,s);i.lineTo(o.x1,o.y1),i.lineTo(o.x2,o.y2),i.lineTo(o.x3,o.y3)}getCaretPosition(t,i,n){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=qt(a),{x:u,y:f}=t,{width:g,height:p}=i;let m,b,_,v,x,y;return o==="center"?(x=f+p/2,s==="left"?(m=u,b=m-r,v=x+r,y=x-r):(m=u+g,b=m+r,v=x-r,y=x+r),_=m):(s==="left"?b=u+Math.max(l,h)+r:s==="right"?b=u+g-Math.max(c,d)-r:b=this.caretX,o==="top"?(v=f,x=v-r,m=b-r,_=b+r):(v=f+p,x=v+r,m=b+r,_=b-r),y=v),{x1:m,x2:b,x3:_,y1:v,y2:x,y3:y}}drawTitle(t,i,n){const s=this.title,o=s.length;let r,a,l;if(o){const c=le(n.rtl,this.x,this.width);for(t.x=ui(this,n.titleAlign,n),i.textAlign=c.textAlign(n.titleAlign),i.textBaseline="middle",r=X(n.titleFont),a=n.titleSpacing,i.fillStyle=n.titleColor,i.font=r.string,l=0;l<o;++l)i.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,i,n,s,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=ui(this,"left",o),u=s.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=i.y+f;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=s.leftForLtr(u,c)+c/2,b=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,bn(t,p,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,bn(t,p,m,b)}else{t.lineWidth=T(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const p=s.leftForLtr(u,c),m=s.leftForLtr(s.xPlus(u,1),c-2),b=qt(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,We(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),We(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,i,n){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=n,d=X(n.bodyFont);let u=d.lineHeight,f=0;const g=le(n.rtl,this.x,this.width),p=function(k){i.fillText(k,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(r);let b,_,v,x,y,S,M;for(i.textAlign=r,i.textBaseline="middle",i.font=d.string,t.x=ui(this,m,n),i.fillStyle=n.bodyColor,E(this.beforeBody,p),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,x=0,S=s.length;x<S;++x){for(b=s[x],_=this.labelTextColors[x],i.fillStyle=_,E(b.before,p),v=b.lines,a&&v.length&&(this._drawColorBox(i,t,x,g,n),u=Math.max(d.lineHeight,l)),y=0,M=v.length;y<M;++y)p(v[y]),u=d.lineHeight;E(b.after,p)}f=0,u=d.lineHeight,E(this.afterBody,p),t.y-=o}drawFooter(t,i,n){const s=this.footer,o=s.length;let r,a;if(o){const l=le(n.rtl,this.x,this.width);for(t.x=ui(this,n.footerAlign,n),t.y+=n.footerMarginTop,i.textAlign=l.textAlign(n.footerAlign),i.textBaseline="middle",r=X(n.footerFont),i.fillStyle=n.footerColor,i.font=r.string,a=0;a<o;++a)i.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,i,n,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=n,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=qt(s.cornerRadius);i.fillStyle=s.backgroundColor,i.strokeStyle=s.borderColor,i.lineWidth=s.borderWidth,i.beginPath(),i.moveTo(a+d,l),r==="top"&&this.drawCaret(t,i,n,s),i.lineTo(a+c-u,l),i.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,i,n,s),i.lineTo(a+c,l+h-g),i.quadraticCurveTo(a+c,l+h,a+c-g,l+h),r==="bottom"&&this.drawCaret(t,i,n,s),i.lineTo(a+f,l+h),i.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,i,n,s),i.lineTo(a,l+d),i.quadraticCurveTo(a,l,a+d,l),i.closePath(),i.fill(),s.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const r=Le[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Mo(this,t),l=Object.assign({},r,this._size),c=ko(i,t,l),h=Oo(t,l,c,i);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const i=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(i);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=et(i.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,i),Zr(t,i.textDirection),o.y+=r.top,this.drawTitle(o,t,i),this.drawBody(o,t,i),this.drawFooter(o,t,i),Jr(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const n=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!ki(n,s),r=this._positionChanged(s,i);(o||r)&&(this._active=s,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,i,n=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,i,n),a=this._positionChanged(r,t),l=i||!ki(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,i))),l}_getActiveElements(t,i,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return i.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,i){const{caretX:n,caretY:s,options:o}=this,r=Le[o.position].call(this,t,i);return r!==!1&&(n!==r.x||s!==r.y)}}w(Mn,"positioners",Le);var Uu={id:"tooltip",_element:Mn,positioners:Le,afterInit(e,t,i){i&&(e.tooltip=new Mn({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,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:(e,t)=>t.bodyFont.size,boxWidth:(e,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:Sa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ku=Object.freeze({__proto__:null,Colors:ru,Decimation:hu,Filler:Du,Legend:Iu,SubTitle:zu,Title:Bu,Tooltip:Uu});const Xu=(e,t,i,n)=>(typeof t=="string"?(i=e.push(t)-1,n.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function qu(e,t,i,n){const s=e.indexOf(t);if(s===-1)return Xu(e,t,i,n);const o=e.lastIndexOf(t);return s!==o?i:s}const Zu=(e,t)=>e===null?null:q(Math.round(e),0,t);function Co(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class kn extends te{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const i=this._addedLabels;if(i.length){const n=this.getLabels();for(const{index:s,label:o}of i)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,i){if($(t))return null;const n=this.getLabels();return i=isFinite(i)&&n[i]===t?i:qu(n,t,P(i,t),this._addedLabels),Zu(i,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),i||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,i=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=t===0&&i===o.length-1?o:o.slice(t,i+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=i;r++)s.push({value:r});return s}getLabelForValue(t){return Co.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 i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}w(kn,"id","category"),w(kn,"defaults",{ticks:{callback:Co}});function Ju(e,t){const i=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=e,f=o||1,g=h-1,{min:p,max:m}=t,b=!$(r),_=!$(a),v=!$(c),x=(m-p)/(d+1);let y=ws((m-p)/g/f)*f,S,M,k,O;if(y<1e-14&&!b&&!_)return[{value:p},{value:m}];O=Math.ceil(m/y)-Math.floor(p/y),O>g&&(y=ws(O*y/g/f)*f),$(l)||(S=Math.pow(10,l),y=Math.ceil(y*S)/S),s==="ticks"?(M=Math.floor(p/y)*y,k=Math.ceil(m/y)*y):(M=p,k=m),b&&_&&o&&Yl((a-r)/o,y/1e3)?(O=Math.round(Math.min((a-r)/y,h)),y=(a-r)/O,M=r,k=a):v?(M=b?r:M,k=_?a:k,O=c-1,y=(k-M)/O):(O=(k-M)/y,Ie(O,Math.round(O),y/1e3)?O=Math.round(O):O=Math.ceil(O));const C=Math.max(Ss(y),Ss(M));S=Math.pow(10,$(l)?C:l),M=Math.round(M*S)/S,k=Math.round(k*S)/S;let D=0;for(b&&(u&&M!==r?(i.push({value:r}),M<r&&D++,Ie(Math.round((M+D*y)*S)/S,r,Do(r,x,e))&&D++):M<r&&D++);D<O;++D){const L=Math.round((M+D*y)*S)/S;if(_&&L>a)break;i.push({value:L})}return _&&u&&k!==a?i.length&&Ie(i[i.length-1].value,a,Do(a,x,e))?i[i.length-1].value=a:i.push({value:a}):(!_||k===a)&&i.push({value:k}),i}function Do(e,t,{horizontal:i,minRotation:n}){const s=dt(n),o=(i?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Li extends te{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,i){return $(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:i,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=i?s:l,a=l=>o=n?o:l;if(t){const l=bt(s),c=bt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:i,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),i=i||11),i&&(s=Math.min(i,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,i=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:i.includeBounds!==!1},o=this._range||this,r=Ju(s,o);return t.bounds==="ticks"&&Rr(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let i=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-i)/Math.max(t.length-1,1)/2;i-=s,n+=s}this._startValue=i,this._endValue=n,this._valueRange=n-i}getLabelForValue(t){return Xe(t,this.chart.options.locale,this.options.ticks.format)}}class On extends Li{determineDataLimits(){const{min:t,max:i}=this.getMinMax(!0);this.min=G(t)?t:0,this.max=G(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),i=t?this.width:this.height,n=dt(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}w(On,"id","linear"),w(On,"defaults",{ticks:{callback:Fi.formatters.numeric}});const Ye=e=>Math.floor($t(e)),Gt=(e,t)=>Math.pow(10,Ye(e)+t);function To(e){return e/Math.pow(10,Ye(e))===1}function Lo(e,t,i){const n=Math.pow(10,i),s=Math.floor(e/n);return Math.ceil(t/n)-s}function Qu(e,t){const i=t-e;let n=Ye(i);for(;Lo(e,t,n)>10;)n++;for(;Lo(e,t,n)<10;)n--;return Math.min(n,Ye(e))}function tf(e,{min:t,max:i}){t=ot(e.min,t);const n=[],s=Ye(t);let o=Qu(t,i),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=ot(e.min,Math.round((l+h+d*Math.pow(10,o))*r)/r);for(;u<i;)n.push({value:u,major:To(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),u=Math.round((l+h+d*Math.pow(10,o))*r)/r;const f=ot(e.max,u);return n.push({value:f,major:To(f),significand:d}),n}class An extends te{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,i){const n=Li.prototype.parse.apply(this,[t,i]);if(n===0){this._zero=!0;return}return G(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:i}=this.getMinMax(!0);this.min=G(t)?Math.max(0,t):null,this.max=G(i)?Math.max(0,i):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!G(this._userMin)&&(this.min=t===Gt(this.min,0)?Gt(this.min,-1):Gt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:i}=this.getUserBounds();let n=this.min,s=this.max;const o=a=>n=t?n:a,r=a=>s=i?s:a;n===s&&(n<=0?(o(1),r(10)):(o(Gt(n,-1)),r(Gt(s,1)))),n<=0&&o(Gt(s,-1)),s<=0&&r(Gt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,i={min:this._userMin,max:this._userMax},n=tf(i,this);return t.bounds==="ticks"&&Rr(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Xe(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=$t(t),this._valueRange=$t(this.max)-$t(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:($t(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const i=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+i*this._valueRange)}}w(An,"id","logarithmic"),w(An,"defaults",{ticks:{callback:Fi.formatters.logarithmic,major:{enabled:!0}}});function Pn(e){const t=e.ticks;if(t.display&&e.display){const i=et(t.backdropPadding);return P(t.font&&t.font.size,Y.font.size)+i.height}return 0}function ef(e,t,i){return i=V(i)?i:[i],{w:cc(e,t.string,i),h:i.length*t.lineHeight}}function $o(e,t,i,n,s){return e===n||e===s?{start:t-i/2,end:t+i/2}:e<n||e>s?{start:t-i,end:t}:{start:t,end:t+i}}function nf(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},i=Object.assign({},t),n=[],s=[],o=e._pointLabels.length,r=e.options.pointLabels,a=r.centerPointLabels?j/o:0;for(let l=0;l<o;l++){const c=r.setContext(e.getPointLabelContext(l));s[l]=c.padding;const h=e.getPointPosition(l,e.drawingArea+s[l],a),d=X(c.font),u=ef(e.ctx,d,e._pointLabels[l]);n[l]=u;const f=rt(e.getIndexAngle(l)+a),g=Math.round(Nn(f)),p=$o(g,h.x,u.w,0,180),m=$o(g,h.y,u.h,90,270);sf(i,t,f,p,m)}e.setCenterPoint(t.l-i.l,i.r-t.r,t.t-i.t,i.b-t.b),e._pointLabelItems=af(e,n,s)}function sf(e,t,i,n,s){const o=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<t.l?(a=(t.l-n.start)/o,e.l=Math.min(e.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,e.t=Math.min(e.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,e.b=Math.max(e.b,t.b+l))}function of(e,t,i){const n=e.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=i,l=e.getPointPosition(t,n+s+r,o),c=Math.round(Nn(rt(l.angle+K))),h=hf(l.y,a.h,c),d=lf(c),u=cf(l.x,a.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+a.w,bottom:h+a.h}}function rf(e,t){if(!t)return!0;const{left:i,top:n,right:s,bottom:o}=e;return!(Pt({x:i,y:n},t)||Pt({x:i,y:o},t)||Pt({x:s,y:n},t)||Pt({x:s,y:o},t))}function af(e,t,i){const n=[],s=e._pointLabels.length,o=e.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Pn(o)/2,additionalAngle:r?j/s:0};let c;for(let h=0;h<s;h++){l.padding=i[h],l.size=t[h];const d=of(e,h,l);n.push(d),a==="auto"&&(d.visible=rf(d,c),d.visible&&(c=d))}return n}function lf(e){return e===0||e===180?"center":e<180?"left":"right"}function cf(e,t,i){return i==="right"?e-=t:i==="center"&&(e-=t/2),e}function hf(e,t,i){return i===90||i===270?e-=t/2:(i>270||i<90)&&(e-=t),e}function df(e,t,i){const{left:n,top:s,right:o,bottom:r}=i,{backdropColor:a}=t;if(!$(a)){const l=qt(t.borderRadius),c=et(t.backdropPadding);e.fillStyle=a;const h=n-c.left,d=s-c.top,u=o-n+c.width,f=r-s+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),We(e,{x:h,y:d,w:u,h:f,radius:l}),e.fill()):e.fillRect(h,d,u,f)}}function uf(e,t){const{ctx:i,options:{pointLabels:n}}=e;for(let s=t-1;s>=0;s--){const o=e._pointLabelItems[s];if(!o.visible)continue;const r=n.setContext(e.getPointLabelContext(s));df(i,r,o);const a=X(r.font),{x:l,y:c,textAlign:h}=o;Qt(i,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function Ma(e,t,i,n){const{ctx:s}=e;if(i)s.arc(e.xCenter,e.yCenter,t,0,N);else{let o=e.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=e.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function ff(e,t,i,n,s){const o=e.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!n||!a||!l||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),Ma(e,i,r,n),o.closePath(),o.stroke(),o.restore())}function gf(e,t,i){return zt(e,{label:i,index:t,type:"pointLabel"})}class $e extends Li{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=et(Pn(this.options)/2),i=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+i/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(i,n)/2)}determineDataLimits(){const{min:t,max:i}=this.getMinMax(!1);this.min=G(t)&&!isNaN(t)?t:0,this.max=G(i)&&!isNaN(i)?i:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Pn(this.options))}generateTickLabels(t){Li.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((i,n)=>{const s=B(this.options.pointLabels.callback,[i,n],this);return s||s===0?s:""}).filter((i,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?nf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,i,n,s){this.xCenter+=Math.floor((t-i)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,i,n,s))}getIndexAngle(t){const i=N/(this._pointLabels.length||1),n=this.options.startAngle||0;return rt(t*i+dt(n))}getDistanceFromCenterForValue(t){if($(t))return NaN;const i=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*i:(t-this.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const i=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-i:this.min+i}getPointLabelContext(t){const i=this._pointLabels||[];if(t>=0&&t<i.length){const n=i[t];return gf(this.getContext(),t,n)}}getPointPosition(t,i,n=0){const s=this.getIndexAngle(t)-K+n;return{x:Math.cos(s)*i+this.xCenter,y:Math.sin(s)*i+this.yCenter,angle:s}}getPointPositionForValue(t,i){return this.getPointPosition(t,this.getDistanceFromCenterForValue(i))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:i,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:i,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:i}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),Ma(this,this.getDistanceFromCenterForValue(this._endValue),i,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,i=this.options,{angleLines:n,grid:s,border:o}=i,r=this._pointLabels.length;let a,l,c;if(i.pointLabels.display&&uf(this,r),s.display&&this.ticks.forEach((h,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=s.setContext(u),g=o.setContext(u);ff(this,f,l,r,g)}}),n.display){for(t.save(),a=r-1;a>=0;a--){const h=n.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(i.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,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,i=this.options,n=i.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!i.reverse)return;const c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=et(c.backdropPadding);t.fillRect(-r/2-d.left,-o-h.size/2-d.top,r+d.width,h.size+d.height)}Qt(t,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}w($e,"id","radialLinear"),w($e,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Fi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),w($e,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),w($e,"descriptors",{angleLines:{_fallback:"grid"}});const ji={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}},nt=Object.keys(ji);function Ro(e,t){return e-t}function Eo(e,t){if($(t))return null;const i=e._adapter,{parser:n,round:s,isoWeekday:o}=e._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),G(r)||(r=typeof n=="string"?i.parse(r,n):i.parse(r)),r===null?null:(s&&(r=s==="week"&&(ce(o)||o===!0)?i.startOf(r,"isoWeek",o):i.startOf(r,s)),+r)}function Io(e,t,i,n){const s=nt.length;for(let o=nt.indexOf(e);o<s-1;++o){const r=ji[nt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((i-t)/(a*r.size))<=n)return nt[o]}return nt[s-1]}function pf(e,t,i,n,s){for(let o=nt.length-1;o>=nt.indexOf(i);o--){const r=nt[o];if(ji[r].common&&e._adapter.diff(s,n,r)>=t-1)return r}return nt[i?nt.indexOf(i):0]}function mf(e){for(let t=nt.indexOf(e)+1,i=nt.length;t<i;++t)if(ji[nt[t]].common)return nt[t]}function Fo(e,t,i){if(!i)e[t]=!0;else if(i.length){const{lo:n,hi:s}=jn(i,t),o=i[n]>=t?i[n]:i[s];e[o]=!0}}function bf(e,t,i,n){const s=e._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=i[a],l>=0&&(t[l].major=!0);return t}function Bo(e,t,i){const n=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,n.push({value:a,major:!1});return o===0||!i?n:bf(e,n,s,i)}class Ue extends te{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,i={}){const n=t.time||(t.time={}),s=this._adapter=new kh._date(t.adapters.date);s.init(i),Ee(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=i.normalized}parse(t,i){return t===void 0?null:Eo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,i=this._adapter,n=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=G(s)&&!isNaN(s)?s:+i.startOf(Date.now(),n),o=G(o)&&!isNaN(o)?o:+i.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],n=t[t.length-1]),{min:i,max:n}}buildTicks(){const t=this.options,i=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=ql(s,o,r);return this._unit=i.unit||(n.autoSkip?Io(i.minUnit,this.min,this.max,this._getLabelCapacity(o)):pf(this,a.length,i.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:mf(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Bo(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let i=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?i=1-s:i=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;i=q(i,0,r),n=q(n,0,r),this._offsets={start:i,end:n,factor:1/(i+1+n)}}_generate(){const t=this._adapter,i=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||Io(o.minUnit,i,n,this._getLabelCapacity(i)),a=P(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=ce(l)||l===!0,h={};let d=i,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(n,i,r)>1e5*a)throw new Error(i+" and "+n+" are too far apart with stepSize of "+a+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<n;u=+t.add(u,a,r),f++)Fo(h,u,g);return(u===n||s.bounds==="ticks"||f===1)&&Fo(h,u,g),Object.keys(h).sort(Ro).map(p=>+p)}getLabelForValue(t){const i=this._adapter,n=this.options.time;return n.tooltipFormat?i.format(t,n.tooltipFormat):i.format(t,n.displayFormats.datetime)}format(t,i){const s=this.options.time.displayFormats,o=this._unit,r=i||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,i,n,s){const o=this.options,r=o.ticks.callback;if(r)return B(r,[t,i,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=n[i],f=c&&d&&u&&u.major;return this._adapter.format(t,s||(f?d:h))}generateTickLabels(t){let i,n,s;for(i=0,n=t.length;i<n;++i)s=t[i],s.label=this._tickFormatFunction(s.value,i,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const i=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const i=this._offsets,n=this.getDecimalForPixel(t)/i.factor-i.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const i=this.options.ticks,n=this.ctx.measureText(t).width,s=dt(this.isHorizontal()?i.maxRotation:i.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){const i=this.options.time,n=i.displayFormats,s=n[i.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Bo(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],i,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(i=0,n=s.length;i<n;++i)t=t.concat(s[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let i,n;if(t.length)return t;const s=this.getLabels();for(i=0,n=s.length;i<n;++i)t.push(Eo(this,s[i]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Fr(t.sort(Ro))}}w(Ue,"id","time"),w(Ue,"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 fi(e,t,i){let n=0,s=e.length-1,o,r,a,l;i?(t>=e[n].pos&&t<=e[s].pos&&({lo:n,hi:s}=At(e,"pos",t)),{pos:o,time:a}=e[n],{pos:r,time:l}=e[s]):(t>=e[n].time&&t<=e[s].time&&({lo:n,hi:s}=At(e,"time",t)),{time:o,pos:a}=e[n],{time:r,pos:l}=e[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Cn extends Ue{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(t);this._minPos=fi(i,this.min),this._tableRange=fi(i,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:i,max:n}=this,s=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=i&&c<=n&&s.push(c);if(s.length<2)return[{time:i,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)h=s[r+1],l=s[r-1],c=s[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,i=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(i)||n.length===1)&&n.push(i),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const i=this.getDataTimestamps(),n=this.getLabelTimestamps();return i.length&&n.length?t=this.normalize(i.concat(n)):t=i.length?i:n,t=this._cache.all=t,t}getDecimalForValue(t){return(fi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const i=this._offsets,n=this.getDecimalForPixel(t)/i.factor-i.end;return fi(this._table,n*this._tableRange+this._minPos,!0)}}w(Cn,"id","timeseries"),w(Cn,"defaults",Ue.defaults);var _f=Object.freeze({__proto__:null,CategoryScale:kn,LinearScale:On,LogarithmicScale:An,RadialLinearScale:$e,TimeScale:Ue,TimeSeriesScale:Cn});const yf=[Mh,tu,Ku,_f];kt.register(...yf);/*! * CoreUI v4.0.0 (https://coreui.io) * Copyright 2024 [object Object] * Licensed under MIT (https://github.com/coreui/coreui-chartjs/blob/main/LICENSE) */const Re={TOOLTIP:"chartjs-tooltip",TOOLTIP_BODY:"chartjs-tooltip-body",TOOLTIP_BODY_ITEM:"chartjs-tooltip-body-item",TOOLTIP_HEADER:"chartjs-tooltip-header",TOOLTIP_HEADER_ITEM:"chartjs-tooltip-header-item"},xf=e=>{let t=e.canvas.parentNode.querySelector("div");if(!t){t=document.createElement("div"),t.classList.add(Re.TOOLTIP);const i=document.createElement("table");i.style.margin="0px",t.append(i),e.canvas.parentNode.append(t)}return t},vf=e=>{const{chart:t,tooltip:i}=e,n=xf(t);if(i.opacity===0){n.style.opacity=0;return}if(i.body){const r=i.title||[],a=i.body.map(d=>d.lines),l=document.createElement("thead");l.classList.add(Re.TOOLTIP_HEADER);for(const d of r){const u=document.createElement("tr");u.style.borderWidth=0,u.classList.add(Re.TOOLTIP_HEADER_ITEM);const f=document.createElement("th");f.style.borderWidth=0;const g=document.createTextNode(d);f.append(g),u.append(f),l.append(u)}const c=document.createElement("tbody");c.classList.add(Re.TOOLTIP_BODY);for(const[d,u]of a.entries()){const f=i.labelColors[d],g=document.createElement("span");g.style.background=f.backgroundColor,g.style.borderColor=f.borderColor,g.style.borderWidth="2px",g.style.marginRight="10px",g.style.height="10px",g.style.width="10px",g.style.display="inline-block";const p=document.createElement("tr");p.classList.add(Re.TOOLTIP_BODY_ITEM);const m=document.createElement("td");m.style.borderWidth=0;const b=document.createTextNode(u);m.append(g),m.append(b),p.append(m),c.append(p)}const h=n.querySelector("table");for(;h.firstChild;)h.firstChild.remove();h.append(l),h.append(c)}const{offsetLeft:s,offsetTop:o}=t.canvas;n.style.opacity=1,n.style.left=`${s+i.caretX}px`,n.style.top=`${o+i.caretY}px`,n.style.font=i.options.bodyFont.string,n.style.padding=`${i.padding}px ${i.padding}px`};var gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wf=typeof gi=="object"&&gi&&gi.Object===Object&&gi,ka=wf,Sf=ka,Mf=typeof self=="object"&&self&&self.Object===Object&&self,kf=Sf||Mf||Function("return this")(),_t=kf,Of=_t,Af=Of.Symbol,Hi=Af,zo=Hi,Oa=Object.prototype,Pf=Oa.hasOwnProperty,Cf=Oa.toString,Ae=zo?zo.toStringTag:void 0;function Df(e){var t=Pf.call(e,Ae),i=e[Ae];try{e[Ae]=void 0;var n=!0}catch{}var s=Cf.call(e);return n&&(t?e[Ae]=i:delete e[Ae]),s}var Tf=Df,Lf=Object.prototype,$f=Lf.toString;function Rf(e){return $f.call(e)}var Ef=Rf,No=Hi,If=Tf,Ff=Ef,Bf="[object Null]",zf="[object Undefined]",jo=No?No.toStringTag:void 0;function Nf(e){return e==null?e===void 0?zf:Bf:jo&&jo in Object(e)?If(e):Ff(e)}var ue=Nf;function jf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ct=jf,Hf=ue,Vf=Ct,Wf="[object AsyncFunction]",Gf="[object Function]",Yf="[object GeneratorFunction]",Uf="[object Proxy]";function Kf(e){if(!Vf(e))return!1;var t=Hf(e);return t==Gf||t==Yf||t==Wf||t==Uf}var ts=Kf,Xf=_t,qf=Xf["__core-js_shared__"],Zf=qf,hn=Zf,Ho=function(){var e=/[^.]+$/.exec(hn&&hn.keys&&hn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jf(e){return!!Ho&&Ho in e}var Qf=Jf,tg=Function.prototype,eg=tg.toString;function ig(e){if(e!=null){try{return eg.call(e)}catch{}try{return e+""}catch{}}return""}var Aa=ig,ng=ts,sg=Qf,og=Ct,rg=Aa,ag=/[\\^$.*+?()[\]{}|]/g,lg=/^\[object .+?Constructor\]$/,cg=Function.prototype,hg=Object.prototype,dg=cg.toString,ug=hg.hasOwnProperty,fg=RegExp("^"+dg.call(ug).replace(ag,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gg(e){if(!og(e)||sg(e))return!1;var t=ng(e)?fg:lg;return t.test(rg(e))}var pg=gg;function mg(e,t){return e==null?void 0:e[t]}var bg=mg,_g=pg,yg=bg;function xg(e,t){var i=yg(e,t);return _g(i)?i:void 0}var ee=xg,vg=ee,wg=function(){try{var e=vg(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Pa=wg,Vo=Pa;function Sg(e,t,i){t=="__proto__"&&Vo?Vo(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}var es=Sg;function Mg(e,t){return e===t||e!==e&&t!==t}var Ze=Mg,kg=es,Og=Ze,Ag=Object.prototype,Pg=Ag.hasOwnProperty;function Cg(e,t,i){var n=e[t];(!(Pg.call(e,t)&&Og(n,i))||i===void 0&&!(t in e))&&kg(e,t,i)}var Ca=Cg,Dg=Ca,Tg=es;function Lg(e,t,i,n){var s=!i;i||(i={});for(var o=-1,r=t.length;++o<r;){var a=t[o],l=n?n(i[a],e[a],a,i,e):void 0;l===void 0&&(l=e[a]),s?Tg(i,a,l):Dg(i,a,l)}return i}var Da=Lg;function $g(e){return e}var is=$g;function Rg(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}var Eg=Rg,Ig=Eg,Wo=Math.max;function Fg(e,t,i){return t=Wo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,s=-1,o=Wo(n.length-t,0),r=Array(o);++s<o;)r[s]=n[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=n[s];return a[t]=i(r),Ig(e,this,a)}}var Bg=Fg;function zg(e){return function(){return e}}var Ng=zg,jg=Ng,Go=Pa,Hg=is,Vg=Go?function(e,t){return Go(e,"toString",{configurable:!0,enumerable:!1,value:jg(t),writable:!0})}:Hg,Wg=Vg,Gg=800,Yg=16,Ug=Date.now;function Kg(e){var t=0,i=0;return function(){var n=Ug(),s=Yg-(n-i);if(i=n,s>0){if(++t>=Gg)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Xg=Kg,qg=Wg,Zg=Xg,Jg=Zg(qg),Qg=Jg,tp=is,ep=Bg,ip=Qg;function np(e,t){return ip(ep(e,t,tp),e+"")}var sp=np,op=9007199254740991;function rp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=op}var ns=rp,ap=ts,lp=ns;function cp(e){return e!=null&&lp(e.length)&&!ap(e)}var fe=cp,hp=9007199254740991,dp=/^(?:0|[1-9]\d*)$/;function up(e,t){var i=typeof e;return t=t??hp,!!t&&(i=="number"||i!="symbol"&&dp.test(e))&&e>-1&&e%1==0&&e<t}var ss=up,fp=Ze,gp=fe,pp=ss,mp=Ct;function bp(e,t,i){if(!mp(i))return!1;var n=typeof t;return(n=="number"?gp(i)&&pp(t,i.length):n=="string"&&t in i)?fp(i[t],e):!1}var _p=bp,yp=sp,xp=_p;function vp(e){return yp(function(t,i){var n=-1,s=i.length,o=s>1?i[s-1]:void 0,r=s>2?i[2]:void 0;for(o=e.length>3&&typeof o=="function"?(s--,o):void 0,r&&xp(i[0],i[1],r)&&(o=s<3?void 0:o,s=1),t=Object(t);++n<s;){var a=i[n];a&&e(t,a,n,o)}return t})}var Ta=vp,wp=Object.prototype;function Sp(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||wp;return e===i}var Vi=Sp;function Mp(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}var kp=Mp;function Op(e){return e!=null&&typeof e=="object"}var ie=Op,Ap=ue,Pp=ie,Cp="[object Arguments]";function Dp(e){return Pp(e)&&Ap(e)==Cp}var Tp=Dp,Yo=Tp,Lp=ie,La=Object.prototype,$p=La.hasOwnProperty,Rp=La.propertyIsEnumerable,Ep=Yo(function(){return arguments}())?Yo:function(e){return Lp(e)&&$p.call(e,"callee")&&!Rp.call(e,"callee")},os=Ep,Ip=Array.isArray,Dt=Ip,$i={exports:{}};function Fp(){return!1}var Bp=Fp;$i.exports;(function(e,t){var i=_t,n=Bp,s=t&&!t.nodeType&&t,o=s&&!0&&e&&!e.nodeType&&e,r=o&&o.exports===s,a=r?i.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||n;e.exports=c})($i,$i.exports);var rs=$i.exports,zp=ue,Np=ns,jp=ie,Hp="[object Arguments]",Vp="[object Array]",Wp="[object Boolean]",Gp="[object Date]",Yp="[object Error]",Up="[object Function]",Kp="[object Map]",Xp="[object Number]",qp="[object Object]",Zp="[object RegExp]",Jp="[object Set]",Qp="[object String]",tm="[object WeakMap]",em="[object ArrayBuffer]",im="[object DataView]",nm="[object Float32Array]",sm="[object Float64Array]",om="[object Int8Array]",rm="[object Int16Array]",am="[object Int32Array]",lm="[object Uint8Array]",cm="[object Uint8ClampedArray]",hm="[object Uint16Array]",dm="[object Uint32Array]",z={};z[nm]=z[sm]=z[om]=z[rm]=z[am]=z[lm]=z[cm]=z[hm]=z[dm]=!0;z[Hp]=z[Vp]=z[em]=z[Wp]=z[im]=z[Gp]=z[Yp]=z[Up]=z[Kp]=z[Xp]=z[qp]=z[Zp]=z[Jp]=z[Qp]=z[tm]=!1;function um(e){return jp(e)&&Np(e.length)&&!!z[zp(e)]}var fm=um;function gm(e){return function(t){return e(t)}}var pm=gm,Ri={exports:{}};Ri.exports;(function(e,t){var i=ka,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===n,r=o&&i.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||r&&r.binding&&r.binding("util")}catch{}}();e.exports=a})(Ri,Ri.exports);var mm=Ri.exports,bm=fm,_m=pm,Uo=mm,Ko=Uo&&Uo.isTypedArray,ym=Ko?_m(Ko):bm,as=ym,xm=kp,vm=os,wm=Dt,Sm=rs,Mm=ss,km=as,Om=Object.prototype,Am=Om.hasOwnProperty;function Pm(e,t){var i=wm(e),n=!i&&vm(e),s=!i&&!n&&Sm(e),o=!i&&!n&&!s&&km(e),r=i||n||s||o,a=r?xm(e.length,String):[],l=a.length;for(var c in e)(t||Am.call(e,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Mm(c,l)))&&a.push(c);return a}var $a=Pm;function Cm(e,t){return function(i){return e(t(i))}}var Ra=Cm,Dm=Ra,Tm=Dm(Object.keys,Object),Lm=Tm,$m=Vi,Rm=Lm,Em=Object.prototype,Im=Em.hasOwnProperty;function Fm(e){if(!$m(e))return Rm(e);var t=[];for(var i in Object(e))Im.call(e,i)&&i!="constructor"&&t.push(i);return t}var Bm=Fm,zm=$a,Nm=Bm,jm=fe;function Hm(e){return jm(e)?zm(e):Nm(e)}var Wi=Hm,Vm=Ca,Wm=Da,Gm=Ta,Ym=fe,Um=Vi,Km=Wi,Xm=Object.prototype,qm=Xm.hasOwnProperty,Zm=Gm(function(e,t){if(Um(t)||Ym(t)){Wm(t,Km(t),e);return}for(var i in t)qm.call(t,i)&&Vm(e,i,t[i])}),Jm=Zm,Xo=Qn(Jm);function Qm(){this.__data__=[],this.size=0}var tb=Qm,eb=Ze;function ib(e,t){for(var i=e.length;i--;)if(eb(e[i][0],t))return i;return-1}var Gi=ib,nb=Gi,sb=Array.prototype,ob=sb.splice;function rb(e){var t=this.__data__,i=nb(t,e);if(i<0)return!1;var n=t.length-1;return i==n?t.pop():ob.call(t,i,1),--this.size,!0}var ab=rb,lb=Gi;function cb(e){var t=this.__data__,i=lb(t,e);return i<0?void 0:t[i][1]}var hb=cb,db=Gi;function ub(e){return db(this.__data__,e)>-1}var fb=ub,gb=Gi;function pb(e,t){var i=this.__data__,n=gb(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this}var mb=pb,bb=tb,_b=ab,yb=hb,xb=fb,vb=mb;function ge(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=bb;ge.prototype.delete=_b;ge.prototype.get=yb;ge.prototype.has=xb;ge.prototype.set=vb;var Yi=ge,wb=Yi;function Sb(){this.__data__=new wb,this.size=0}var Mb=Sb;function kb(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}var Ob=kb;function Ab(e){return this.__data__.get(e)}var Pb=Ab;function Cb(e){return this.__data__.has(e)}var Db=Cb,Tb=ee,Lb=_t,$b=Tb(Lb,"Map"),ls=$b,Rb=ee,Eb=Rb(Object,"create"),Ui=Eb,qo=Ui;function Ib(){this.__data__=qo?qo(null):{},this.size=0}var Fb=Ib;function Bb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zb=Bb,Nb=Ui,jb="__lodash_hash_undefined__",Hb=Object.prototype,Vb=Hb.hasOwnProperty;function Wb(e){var t=this.__data__;if(Nb){var i=t[e];return i===jb?void 0:i}return Vb.call(t,e)?t[e]:void 0}var Gb=Wb,Yb=Ui,Ub=Object.prototype,Kb=Ub.hasOwnProperty;function Xb(e){var t=this.__data__;return Yb?t[e]!==void 0:Kb.call(t,e)}var qb=Xb,Zb=Ui,Jb="__lodash_hash_undefined__";function Qb(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Zb&&t===void 0?Jb:t,this}var t_=Qb,e_=Fb,i_=zb,n_=Gb,s_=qb,o_=t_;function pe(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}pe.prototype.clear=e_;pe.prototype.delete=i_;pe.prototype.get=n_;pe.prototype.has=s_;pe.prototype.set=o_;var r_=pe,Zo=r_,a_=Yi,l_=ls;function c_(){this.size=0,this.__data__={hash:new Zo,map:new(l_||a_),string:new Zo}}var h_=c_;function d_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var u_=d_,f_=u_;function g_(e,t){var i=e.__data__;return f_(t)?i[typeof t=="string"?"string":"hash"]:i.map}var Ki=g_,p_=Ki;function m_(e){var t=p_(this,e).delete(e);return this.size-=t?1:0,t}var b_=m_,__=Ki;function y_(e){return __(this,e).get(e)}var x_=y_,v_=Ki;function w_(e){return v_(this,e).has(e)}var S_=w_,M_=Ki;function k_(e,t){var i=M_(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this}var O_=k_,A_=h_,P_=b_,C_=x_,D_=S_,T_=O_;function me(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}me.prototype.clear=A_;me.prototype.delete=P_;me.prototype.get=C_;me.prototype.has=D_;me.prototype.set=T_;var cs=me,L_=Yi,$_=ls,R_=cs,E_=200;function I_(e,t){var i=this.__data__;if(i instanceof L_){var n=i.__data__;if(!$_||n.length<E_-1)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new R_(n)}return i.set(e,t),this.size=i.size,this}var F_=I_,B_=Yi,z_=Mb,N_=Ob,j_=Pb,H_=Db,V_=F_;function be(e){var t=this.__data__=new B_(e);this.size=t.size}be.prototype.clear=z_;be.prototype.delete=N_;be.prototype.get=j_;be.prototype.has=H_;be.prototype.set=V_;var hs=be,W_="__lodash_hash_undefined__";function G_(e){return this.__data__.set(e,W_),this}var Y_=G_;function U_(e){return this.__data__.has(e)}var K_=U_,X_=cs,q_=Y_,Z_=K_;function Ei(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new X_;++t<i;)this.add(e[t])}Ei.prototype.add=Ei.prototype.push=q_;Ei.prototype.has=Z_;var J_=Ei;function Q_(e,t){for(var i=-1,n=e==null?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var ty=Q_;function ey(e,t){return e.has(t)}var iy=ey,ny=J_,sy=ty,oy=iy,ry=1,ay=2;function ly(e,t,i,n,s,o){var r=i&ry,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,f=i&ay?new ny:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var g=e[d],p=t[d];if(n)var m=r?n(p,g,d,t,e,o):n(g,p,d,e,t,o);if(m!==void 0){if(m)continue;u=!1;break}if(f){if(!sy(t,function(b,_){if(!oy(f,_)&&(g===b||s(g,b,i,n,o)))return f.push(_)})){u=!1;break}}else if(!(g===p||s(g,p,i,n,o))){u=!1;break}}return o.delete(e),o.delete(t),u}var Ea=ly,cy=_t,hy=cy.Uint8Array,Ia=hy;function dy(e){var t=-1,i=Array(e.size);return e.forEach(function(n,s){i[++t]=[s,n]}),i}var uy=dy;function fy(e){var t=-1,i=Array(e.size);return e.forEach(function(n){i[++t]=n}),i}var gy=fy,Jo=Hi,Qo=Ia,py=Ze,my=Ea,by=uy,_y=gy,yy=1,xy=2,vy="[object Boolean]",wy="[object Date]",Sy="[object Error]",My="[object Map]",ky="[object Number]",Oy="[object RegExp]",Ay="[object Set]",Py="[object String]",Cy="[object Symbol]",Dy="[object ArrayBuffer]",Ty="[object DataView]",tr=Jo?Jo.prototype:void 0,dn=tr?tr.valueOf:void 0;function Ly(e,t,i,n,s,o,r){switch(i){case Ty:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dy:return!(e.byteLength!=t.byteLength||!o(new Qo(e),new Qo(t)));case vy:case wy:case ky:return py(+e,+t);case Sy:return e.name==t.name&&e.message==t.message;case Oy:case Py:return e==t+"";case My:var a=by;case Ay:var l=n&yy;if(a||(a=_y),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;n|=xy,r.set(e,t);var h=my(a(e),a(t),n,s,o,r);return r.delete(e),h;case Cy:if(dn)return dn.call(e)==dn.call(t)}return!1}var $y=Ly;function Ry(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e}var Ey=Ry,Iy=Ey,Fy=Dt;function By(e,t,i){var n=t(e);return Fy(e)?n:Iy(n,i(e))}var zy=By;function Ny(e,t){for(var i=-1,n=e==null?0:e.length,s=0,o=[];++i<n;){var r=e[i];t(r,i,e)&&(o[s++]=r)}return o}var jy=Ny;function Hy(){return[]}var Vy=Hy,Wy=jy,Gy=Vy,Yy=Object.prototype,Uy=Yy.propertyIsEnumerable,er=Object.getOwnPropertySymbols,Ky=er?function(e){return e==null?[]:(e=Object(e),Wy(er(e),function(t){return Uy.call(e,t)}))}:Gy,Xy=Ky,qy=zy,Zy=Xy,Jy=Wi;function Qy(e){return qy(e,Jy,Zy)}var tx=Qy,ir=tx,ex=1,ix=Object.prototype,nx=ix.hasOwnProperty;function sx(e,t,i,n,s,o){var r=i&ex,a=ir(e),l=a.length,c=ir(t),h=c.length;if(l!=h&&!r)return!1;for(var d=l;d--;){var u=a[d];if(!(r?u in t:nx.call(t,u)))return!1}var f=o.get(e),g=o.get(t);if(f&&g)return f==t&&g==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=r;++d<l;){u=a[d];var b=e[u],_=t[u];if(n)var v=r?n(_,b,u,t,e,o):n(b,_,u,e,t,o);if(!(v===void 0?b===_||s(b,_,i,n,o):v)){p=!1;break}m||(m=u=="constructor")}if(p&&!m){var x=e.constructor,y=t.constructor;x!=y&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof y=="function"&&y instanceof y)&&(p=!1)}return o.delete(e),o.delete(t),p}var ox=sx,rx=ee,ax=_t,lx=rx(ax,"DataView"),cx=lx,hx=ee,dx=_t,ux=hx(dx,"Promise"),fx=ux,gx=ee,px=_t,mx=gx(px,"Set"),bx=mx,_x=ee,yx=_t,xx=_x(yx,"WeakMap"),vx=xx,Dn=cx,Tn=ls,Ln=fx,$n=bx,Rn=vx,Fa=ue,_e=Aa,nr="[object Map]",wx="[object Object]",sr="[object Promise]",or="[object Set]",rr="[object WeakMap]",ar="[object DataView]",Sx=_e(Dn),Mx=_e(Tn),kx=_e(Ln),Ox=_e($n),Ax=_e(Rn),Kt=Fa;(Dn&&Kt(new Dn(new ArrayBuffer(1)))!=ar||Tn&&Kt(new Tn)!=nr||Ln&&Kt(Ln.resolve())!=sr||$n&&Kt(new $n)!=or||Rn&&Kt(new Rn)!=rr)&&(Kt=function(e){var t=Fa(e),i=t==wx?e.constructor:void 0,n=i?_e(i):"";if(n)switch(n){case Sx:return ar;case Mx:return nr;case kx:return sr;case Ox:return or;case Ax:return rr}return t});var Px=Kt,un=hs,Cx=Ea,Dx=$y,Tx=ox,lr=Px,cr=Dt,hr=rs,Lx=as,$x=1,dr="[object Arguments]",ur="[object Array]",pi="[object Object]",Rx=Object.prototype,fr=Rx.hasOwnProperty;function Ex(e,t,i,n,s,o){var r=cr(e),a=cr(t),l=r?ur:lr(e),c=a?ur:lr(t);l=l==dr?pi:l,c=c==dr?pi:c;var h=l==pi,d=c==pi,u=l==c;if(u&&hr(e)){if(!hr(t))return!1;r=!0,h=!1}if(u&&!h)return o||(o=new un),r||Lx(e)?Cx(e,t,i,n,s,o):Dx(e,t,l,i,n,s,o);if(!(i&$x)){var f=h&&fr.call(e,"__wrapped__"),g=d&&fr.call(t,"__wrapped__");if(f||g){var p=f?e.value():e,m=g?t.value():t;return o||(o=new un),s(p,m,i,n,o)}}return u?(o||(o=new un),Tx(e,t,i,n,s,o)):!1}var Ix=Ex,Fx=Ix,gr=ie;function Ba(e,t,i,n,s){return e===t?!0:e==null||t==null||!gr(e)&&!gr(t)?e!==e&&t!==t:Fx(e,t,i,n,Ba,s)}var za=Ba,Bx=hs,zx=za,Nx=1,jx=2;function Hx(e,t,i,n){var s=i.length,o=s,r=!n;if(e==null)return!o;for(e=Object(e);s--;){var a=i[s];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++s<o;){a=i[s];var l=a[0],c=e[l],h=a[1];if(r&&a[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Bx;if(n)var u=n(c,h,l,e,t,d);if(!(u===void 0?zx(h,c,Nx|jx,n,d):u))return!1}}return!0}var Vx=Hx,Wx=Ct;function Gx(e){return e===e&&!Wx(e)}var Na=Gx,Yx=Na,Ux=Wi;function Kx(e){for(var t=Ux(e),i=t.length;i--;){var n=t[i],s=e[n];t[i]=[n,s,Yx(s)]}return t}var Xx=Kx;function qx(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==void 0||e in Object(i))}}var ja=qx,Zx=Vx,Jx=Xx,Qx=ja;function t0(e){var t=Jx(e);return t.length==1&&t[0][2]?Qx(t[0][0],t[0][1]):function(i){return i===e||Zx(i,e,t)}}var e0=t0,i0=ue,n0=ie,s0="[object Symbol]";function o0(e){return typeof e=="symbol"||n0(e)&&i0(e)==s0}var Xi=o0,r0=Dt,a0=Xi,l0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c0=/^\w*$/;function h0(e,t){if(r0(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||a0(e)?!0:c0.test(e)||!l0.test(e)||t!=null&&e in Object(t)}var ds=h0,Ha=cs,d0="Expected a function";function us(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(d0);var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],o=i.cache;if(o.has(s))return o.get(s);var r=e.apply(this,n);return i.cache=o.set(s,r)||o,r};return i.cache=new(us.Cache||Ha),i}us.Cache=Ha;var u0=us,f0=u0,g0=500;function p0(e){var t=f0(e,function(n){return i.size===g0&&i.clear(),n}),i=t.cache;return t}var m0=p0,b0=m0,_0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y0=/\\(\\)?/g,x0=b0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_0,function(i,n,s,o){t.push(s?o.replace(y0,"$1"):n||i)}),t}),v0=x0;function w0(e,t){for(var i=-1,n=e==null?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s}var S0=w0,pr=Hi,M0=S0,k0=Dt,O0=Xi,A0=1/0,mr=pr?pr.prototype:void 0,br=mr?mr.toString:void 0;function Va(e){if(typeof e=="string")return e;if(k0(e))return M0(e,Va)+"";if(O0(e))return br?br.call(e):"";var t=e+"";return t=="0"&&1/e==-A0?"-0":t}var P0=Va,C0=P0;function D0(e){return e==null?"":C0(e)}var T0=D0,L0=Dt,$0=ds,R0=v0,E0=T0;function I0(e,t){return L0(e)?e:$0(e,t)?[e]:R0(E0(e))}var Wa=I0,F0=Xi,B0=1/0;function z0(e){if(typeof e=="string"||F0(e))return e;var t=e+"";return t=="0"&&1/e==-B0?"-0":t}var qi=z0,N0=Wa,j0=qi;function H0(e,t){t=N0(t,e);for(var i=0,n=t.length;e!=null&&i<n;)e=e[j0(t[i++])];return i&&i==n?e:void 0}var Ga=H0,V0=Ga;function W0(e,t,i){var n=e==null?void 0:V0(e,t);return n===void 0?i:n}var G0=W0;function Y0(e,t){return e!=null&&t in Object(e)}var U0=Y0,K0=Wa,X0=os,q0=Dt,Z0=ss,J0=ns,Q0=qi;function tv(e,t,i){t=K0(t,e);for(var n=-1,s=t.length,o=!1;++n<s;){var r=Q0(t[n]);if(!(o=e!=null&&i(e,r)))break;e=e[r]}return o||++n!=s?o:(s=e==null?0:e.length,!!s&&J0(s)&&Z0(r,s)&&(q0(e)||X0(e)))}var ev=tv,iv=U0,nv=ev;function sv(e,t){return e!=null&&nv(e,t,iv)}var ov=sv,rv=za,av=G0,lv=ov,cv=ds,hv=Na,dv=ja,uv=qi,fv=1,gv=2;function pv(e,t){return cv(e)&&hv(t)?dv(uv(e),t):function(i){var n=av(i,e);return n===void 0&&n===t?lv(i,e):rv(t,n,fv|gv)}}var mv=pv;function bv(e){return function(t){return t==null?void 0:t[e]}}var _v=bv,yv=Ga;function xv(e){return function(t){return yv(t,e)}}var vv=xv,wv=_v,Sv=vv,Mv=ds,kv=qi;function Ov(e){return Mv(e)?wv(kv(e)):Sv(e)}var Av=Ov,Pv=e0,Cv=mv,Dv=is,Tv=Dt,Lv=Av;function $v(e){return typeof e=="function"?e:e==null?Dv:typeof e=="object"?Tv(e)?Cv(e[0],e[1]):Pv(e):Lv(e)}var Ya=$v,Rv=Ya,Ev=fe,Iv=Wi;function Fv(e){return function(t,i,n){var s=Object(t);if(!Ev(t)){var o=Rv(i);t=Iv(t),i=function(a){return o(s[a],a,s)}}var r=e(t,i,n);return r>-1?s[o?t[r]:r]:void 0}}var Bv=Fv;function zv(e,t,i,n){for(var s=e.length,o=i+(n?1:-1);n?o--:++o<s;)if(t(e[o],o,e))return o;return-1}var Nv=zv,jv=/\s/;function Hv(e){for(var t=e.length;t--&&jv.test(e.charAt(t)););return t}var Vv=Hv,Wv=Vv,Gv=/^\s+/;function Yv(e){return e&&e.slice(0,Wv(e)+1).replace(Gv,"")}var Uv=Yv,Kv=Uv,_r=Ct,Xv=Xi,yr=NaN,qv=/^[-+]0x[0-9a-f]+$/i,Zv=/^0b[01]+$/i,Jv=/^0o[0-7]+$/i,Qv=parseInt;function t1(e){if(typeof e=="number")return e;if(Xv(e))return yr;if(_r(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_r(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Kv(e);var i=Zv.test(e);return i||Jv.test(e)?Qv(e.slice(2),i?2:8):qv.test(e)?yr:+e}var e1=t1,i1=e1,xr=1/0,n1=17976931348623157e292;function s1(e){if(!e)return e===0?e:0;if(e=i1(e),e===xr||e===-xr){var t=e<0?-1:1;return t*n1}return e===e?e:0}var o1=s1,r1=o1;function a1(e){var t=r1(e),i=t%1;return t===t?i?t-i:t:0}var l1=a1,c1=Nv,h1=Ya,d1=l1,u1=Math.max;function f1(e,t,i){var n=e==null?0:e.length;if(!n)return-1;var s=i==null?0:d1(i);return s<0&&(s=u1(n+s,0)),c1(e,h1(t),s)}var g1=f1,p1=Bv,m1=g1,b1=p1(m1),_1=b1,y1=Qn(_1),x1=es,v1=Ze;function w1(e,t,i){(i!==void 0&&!v1(e[t],i)||i===void 0&&!(t in e))&&x1(e,t,i)}var Ua=w1;function S1(e){return function(t,i,n){for(var s=-1,o=Object(t),r=n(t),a=r.length;a--;){var l=r[e?a:++s];if(i(o[l],l,o)===!1)break}return t}}var M1=S1,k1=M1,O1=k1(),A1=O1,Ii={exports:{}};Ii.exports;(function(e,t){var i=_t,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===n,r=o?i.Buffer:void 0,a=r?r.allocUnsafe:void 0;function l(c,h){if(h)return c.slice();var d=c.length,u=a?a(d):new c.constructor(d);return c.copy(u),u}e.exports=l})(Ii,Ii.exports);var P1=Ii.exports,vr=Ia;function C1(e){var t=new e.constructor(e.byteLength);return new vr(t).set(new vr(e)),t}var D1=C1,T1=D1;function L1(e,t){var i=t?T1(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}var $1=L1;function R1(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}var E1=R1,I1=Ct,wr=Object.create,F1=function(){function e(){}return function(t){if(!I1(t))return{};if(wr)return wr(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}(),B1=F1,z1=Ra,N1=z1(Object.getPrototypeOf,Object),Ka=N1,j1=B1,H1=Ka,V1=Vi;function W1(e){return typeof e.constructor=="function"&&!V1(e)?j1(H1(e)):{}}var G1=W1,Y1=fe,U1=ie;function K1(e){return U1(e)&&Y1(e)}var X1=K1,q1=ue,Z1=Ka,J1=ie,Q1="[object Object]",tw=Function.prototype,ew=Object.prototype,Xa=tw.toString,iw=ew.hasOwnProperty,nw=Xa.call(Object);function sw(e){if(!J1(e)||q1(e)!=Q1)return!1;var t=Z1(e);if(t===null)return!0;var i=iw.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&Xa.call(i)==nw}var ow=sw;function rw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var qa=rw;function aw(e){var t=[];if(e!=null)for(var i in Object(e))t.push(i);return t}var lw=aw,cw=Ct,hw=Vi,dw=lw,uw=Object.prototype,fw=uw.hasOwnProperty;function gw(e){if(!cw(e))return dw(e);var t=hw(e),i=[];for(var n in e)n=="constructor"&&(t||!fw.call(e,n))||i.push(n);return i}var pw=gw,mw=$a,bw=pw,_w=fe;function yw(e){return _w(e)?mw(e,!0):bw(e)}var Za=yw,xw=Da,vw=Za;function ww(e){return xw(e,vw(e))}var Sw=ww,Sr=Ua,Mw=P1,kw=$1,Ow=E1,Aw=G1,Mr=os,kr=Dt,Pw=X1,Cw=rs,Dw=ts,Tw=Ct,Lw=ow,$w=as,Or=qa,Rw=Sw;function Ew(e,t,i,n,s,o,r){var a=Or(e,i),l=Or(t,i),c=r.get(l);if(c){Sr(e,i,c);return}var h=o?o(a,l,i+"",e,t,r):void 0,d=h===void 0;if(d){var u=kr(l),f=!u&&Cw(l),g=!u&&!f&&$w(l);h=l,u||f||g?kr(a)?h=a:Pw(a)?h=Ow(a):f?(d=!1,h=Mw(l,!0)):g?(d=!1,h=kw(l,!0)):h=[]:Lw(l)||Mr(l)?(h=a,Mr(a)?h=Rw(a):(!Tw(a)||Dw(a))&&(h=Aw(l))):d=!1}d&&(r.set(l,h),s(h,l,n,o,r),r.delete(l)),Sr(e,i,h)}var Iw=Ew,Fw=hs,Bw=Ua,zw=A1,Nw=Iw,jw=Ct,Hw=Za,Vw=qa;function Ja(e,t,i,n,s){e!==t&&zw(t,function(o,r){if(s||(s=new Fw),jw(o))Nw(e,t,r,i,Ja,n,s);else{var a=n?n(Vw(e,r),o,r+"",e,t,s):void 0;a===void 0&&(a=o),Bw(e,r,a)}},Hw)}var Ww=Ja,Gw=Ww,Yw=Ta,Uw=Yw(function(e,t,i){Gw(e,t,i)}),Kw=Uw,Ar=Qn(Kw);const ae=il({name:"CChart",props:{customTooltips:{type:Boolean,default:!0},data:{type:[Object,Function],required:!0},height:{type:Number,default:150},id:{type:String},options:{type:Object},plugins:{type:Array},redraw:Boolean,type:{type:String,default:"bar"},width:{type:Number,default:300},wrapper:{type:Boolean,default:!0}},emits:["getDatasetAtEvent","getElementAtEvent","getElementsAtEvent"],setup(e,{expose:t,emit:i,slots:n}){const s=lt(null),o=nl(null),r=mt(()=>typeof e.data=="function"?s.value?e.data(s.value):{datasets:[]}:Ar({},e.data)),a=mt(()=>e.customTooltips?Ar({},e.options,{plugins:{tooltip:{enabled:!1,mode:"index",position:"nearest",external:vf}}}):e.options),l=()=>{s.value&&(o.value=new kt(s.value,{type:e.type,data:r.value,options:a.value,plugins:e.plugins}))},c=f=>{o.value&&(i("getDatasetAtEvent",o.value.getElementsAtEventForMode(f,"dataset",{intersect:!0},!1),f),i("getElementAtEvent",o.value.getElementsAtEventForMode(f,"nearest",{intersect:!0},!1),f),i("getElementsAtEvent",o.value.getElementsAtEventForMode(f,"index",{intersect:!0},!1),f))},h=()=>{if(!o.value)return;if(e.options&&(o.value.options={...e.options}),!o.value.config.data){o.value.config.data=r.value,o.value.update();return}const{datasets:f=[],...g}=r.value,{datasets:p=[]}=o.value.config.data;Xo(o.value.config.data,g),o.value.config.data.datasets=f.map(m=>{const b=y1(p,_=>_.label===m.label&&_.type===m.type);return!b||!m.data?m:(b.data?b.data.length=m.data.length:b.data=[],Xo(b.data,m.data),{...b,...m,data:b.data})}),o.value&&o.value.update()},d=()=>{o.value&&o.value.destroy()};Pr(()=>{l()}),sl(()=>{d()}),ol(()=>{e.redraw?(d(),setTimeout(()=>{l()},0)):h()});const u=f=>fs("canvas",{id:e.id,height:e.height,width:e.width,onClick:g=>c(g),role:"img",ref:f},{fallbackContent:()=>n.fallback&&n.fallback()});return t({chart:o}),()=>e.wrapper?fs("div",{class:"chart-wrapper"},u(s)):u(s)}}),Xw=async function(){return await En.get("/dashboard-stats")},qw=async function(){return await En.get("/dashboard-graphs")},Zw=async function(e){return await En.get("/recent-orders",{params:e})},Qa=rl("dashboard",function(){const e=lt({total_orders:0,total_links:0,pending_links:0,revenue:0}),t=lt({linksByDA:{"DA 20 or Below":0,"DA 30+":0,"DA 40+":0,"DA 50+":0,"DA 60+":0},linksByDR:{"DR 20 or Below":0,"DR 30+":0,"DR 40+":0,"DR 50+":0,"DR 60+":0},linksByTraffic:{"5000+":0,"10000+":0,"15000+":0},linksByStatus:[],anchorText:{labels:[],counts:[]}}),i=lt([]),n=function(g,p){const m={};for(const[b,_]of Object.entries(g))(typeof p=="string"&&b.includes(p)||p instanceof Array&&p.includes(b))&&(m[b]=_);return m},s=async function(){const g=await Xw(),{data:p}=g;return e.value={...e.value,...p},p},o=async function(){const g=await qw(),{data:p}=g;return t.value.linksByDA={...t.value.linksByDA,...n(p.LinksByServicesGraph,"DA")},t.value.linksByDR={...t.value.linksByDR,...n(p.LinksByServicesGraph,"DR")},t.value.linksByTraffic={...t.value.linksByTraffic,...n(p.LinksByServicesGraph,["5000+","10000+","15000+"])},t.value.anchorText={labels:p.anchorTextGraph.map(m=>m.anchor_text),counts:p.anchorTextGraph.map(m=>m.anchor_count)},t.value.linksByStatus=p.linkStatusGraph.map(m=>m.link_count),p},r=async function(g={}){const p=await Zw(g),{data:m}=p;return i.value=m.orders,m},a=mt(()=>i.value),l=mt(()=>e.value),c=mt(()=>Object.values(t.value.linksByDA)),h=mt(()=>Object.values(t.value.linksByDR)),d=mt(()=>Object.values(t.value.linksByTraffic)),u=mt(()=>t.value.linksByStatus),f=mt(()=>t.value.anchorText);return{stats:e,graphData:t,orders:i,dashboardStats:s,dashboardGraphsAction:o,dashboardRecentOrdersLinksAction:r,ordersGetter:a,getDashboardStats:l,linkByDAGetter:c,linkByDRGetter:h,linkByTrafficGetter:d,linkByStatusGetter:u,AnchorTextGraphDataGetter:f}}),Jw={class:"dashboard-stats-box dashboard-stats-box--1"},Qw={class:"dashboard-stats-box__text"},tS={class:"dashboard-stats-box dashboard-stats-box--2"},eS={class:"dashboard-stats-box__text"},iS={class:"dashboard-stats-box dashboard-stats-box--3"},nS={class:"dashboard-stats-box__text"},sS={class:"dashboard-stats-box dashboard-stats-box--4"},oS={class:"dashboard-stats-box__text"},rS={__name:"WidgetStats",setup(e){const t=Qa();return(i,n)=>{const s=St("CCol"),o=St("CRow");return ht(),fn(o,{xl:{gutter:4},lg:{gutter:3},xs:{gutter:3}},{default:W(()=>[R(s,{xs:"6",md:"6",lg:"4",xl:"3"},{default:W(()=>[A("div",Jw,[n[1]||(n[1]=A("div",{class:"dashboard-stats-box__img"},[A("i",{class:"fas fa-box-open"})],-1)),A("div",Qw,[A("h3",null,Qe(F(t).getDashboardStats.total_orders),1),n[0]||(n[0]=A("p",null,"Total Orders",-1))])])]),_:1}),R(s,{xs:"6",md:"6",lg:"4",xl:"3"},{default:W(()=>[A("div",tS,[n[3]||(n[3]=A("div",{class:"dashboard-stats-box__img"},[A("i",{class:"fas fa-link"})],-1)),A("div",eS,[A("h3",null,Qe(F(t).getDashboardStats.total_links),1),n[2]||(n[2]=A("p",null,"Total Links",-1))])])]),_:1}),R(s,{xs:"6",md:"6",lg:"4",xl:"3"},{default:W(()=>[A("div",iS,[n[5]||(n[5]=A("div",{class:"dashboard-stats-box__img"},[A("i",{class:"fas fa-tasks"})],-1)),A("div",nS,[A("h3",null,Qe(F(t).getDashboardStats.pending_links),1),n[4]||(n[4]=A("p",null,"Pending Links",-1))])])]),_:1}),R(s,{xs:"6",md:"6",lg:"4",xl:"3"},{default:W(()=>[A("div",sS,[n[7]||(n[7]=A("div",{class:"dashboard-stats-box__img"},[A("i",{class:"fas fa-money-bill-wave"})],-1)),A("div",oS,[A("h3",null,"$"+Qe(F(t).getDashboardStats.revenue),1),n[6]||(n[6]=A("p",null,"Total Spend",-1))])])]),_:1})]),_:1})}}},aS={class:"dashboard-view"},lS={class:"d-flex flex-column gap-4"},cS={class:"d-flex justify-content-end"},hS={class:"dashboard-view__box dashboard-view__box--anchortext"},dS={class:"position-relative"},uS={key:0,class:"message"},fS={class:"dashboard-view__box dashboard-view__box--linksda"},gS={class:"position-relative"},pS={key:0,class:"message"},mS={class:"position-relative"},bS={key:0,class:"message"},_S={class:"position-relative"},yS={key:0,class:"message"},xS={class:"dashboard-view__box dashboard-view__box--linkstatus"},vS={class:"position-relative"},wS={key:0,class:"message"},SS={class:"dashboard-view__box dashboard-view__box--orders"},MS={class:"dashboard-view__box__heading d-flex align-items-center justify-content-between"},kS={key:0,class:"alert alert-warning",role:"alert"},OS={class:"dashboard-view__box dashboard-view__box--linkstatus"},AS={class:"position-relative"},PS={key:0,class:"message"},RS={__name:"Dashboard",setup(e){const t=al(),i=Qa(),n=lt(!1),s=lt(!1),o=lt(null),r=lt(null),a=lt(null),l=lt(null),c=lt(null),h=lt([{label:"Order Id",field:"id",html:!1},{label:"Order Title",field:"order_title",html:!1},{label:"Amount",field:"order_total",html:!1},{label:"Status",field:"status",html:!0},{label:"Date",field:"created_at",html:!1}]),d=async function(){try{const p=await i.dashboardStats()}catch(p){console.log(p)}},u=async function(){try{const p=await i.dashboardGraphsAction()}catch(p){console.log(p)}},f=async function(){try{const p=await i.dashboardRecentOrdersLinksAction()}catch(p){console.log(p)}},g=mt(()=>i.ordersGetter&&i.ordersGetter.length>0?i.ordersGetter.map(p=>({id:p.id,order_title:p.order_title,order_total:p.order_total?hl(p.order_total):"---",status:`<span class="badge badge--${p.status.toLowerCase().replace(" ","-")}">${p.status}</span>`,created_at:fl(p.created_at).format("YYYY-MM-DD")})):null);return Pr(async()=>{s.value=!0,n.value=!0,await d(),await u(),await f(),n.value=!1,s.value=!1}),ll(()=>[i.graphData.linksByDA,i.graphData.linksByDR,i.graphData.linksByTraffic,i.graphData.linksByStatus,i.graphData.anchorText],()=>{o.value.chart.update(),r.value.chart.update(),a.value.chart.update(),l.value.chart.update(),c.value.chart.update()}),(p,m)=>{const b=St("CCol"),_=St("CTab"),v=St("CTabList"),x=St("CTabPanel"),y=St("CTabContent"),S=St("CTabs"),M=St("CRow");return ht(),Tt(cl,null,[R(ul,{show:s.value},null,8,["show"]),A("div",aS,[A("div",lS,[A("div",cS,[R(F(gs),{to:"/orders/add",class:"btn btn-primary"},{default:W(()=>m[0]||(m[0]=[A("i",{class:"fas fa-plus"},null,-1),ve(" New Order ")])),_:1})]),R(M,{xs:{gutter:4}},{default:W(()=>[R(b,{xxl:"8",xl:"8",lg:"12",xs:"12"},{default:W(()=>[A("div",hS,[m[1]||(m[1]=A("div",{class:"dashboard-view__box__heading d-flex align-items-center justify-content-between"},[A("h3",null,"Anchors Spread")],-1)),A("div",dS,[F(i).graphData.anchorText.labels.length?yt("",!0):(ht(),Tt("div",uS," No Data Available ")),R(F(ae),{ref_key:"anchorSpreadChart",ref:c,type:"line",data:{labels:F(i).graphData.anchorText.labels,datasets:[{label:"Spread Count",backgroundColor:"#824deb33",borderColor:"#824deb",pointBackgroundColor:"#824deb",pointBorderColor:"#824deb",data:F(i).graphData.anchorText.counts,tension:.5,borderWidth:3,fill:!0}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:!1},scales:{y:{min:0,grid:{display:!1}},x:{grid:{display:!1}}}}},null,8,["data"])])])]),_:1}),R(b,{xxl:"4",xl:"4",lg:"6",md:"6",xs:"12"},{default:W(()=>[A("div",fS,[R(S,{activeItemKey:"da"},{default:W(()=>[R(v,{variant:"tabs"},{default:W(()=>[R(_,{itemKey:"da"},{default:W(()=>m[2]||(m[2]=[ve("By DA")])),_:1}),R(_,{itemKey:"dr"},{default:W(()=>m[3]||(m[3]=[ve("By DR")])),_:1}),R(_,{itemKey:"traffic"},{default:W(()=>m[4]||(m[4]=[ve("By Traffic")])),_:1})]),_:1}),R(y,null,{default:W(()=>[R(x,{itemKey:"da"},{default:W(()=>[A("div",gS,[F(i).linkByDAGetter.filter(Boolean).length?yt("",!0):(ht(),Tt("div",pS," No Data Available ")),R(F(ae),{ref_key:"linksByDAChart",ref:r,type:"doughnut",data:{labels:["DA 20 or Below","DA 30+","DA 40+","DA 50+","DA 60+"],datasets:[{backgroundColor:["#7367f0","#ea5455","#57c84d","#0396ff","#FFE985"],data:F(i).linkByDAGetter,hoverOffset:4}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{position:"left"},emptyDoughnut:{color:"rgba(255, 128, 0, 0.5)",width:2,radiusDecrease:20}}}},null,8,["data"])])]),_:1}),R(x,{itemKey:"dr"},{default:W(()=>[A("div",mS,[F(i).linkByDRGetter.filter(Boolean).length?yt("",!0):(ht(),Tt("div",bS," No Data Available ")),R(F(ae),{ref_key:"linksByDRChart",ref:a,type:"doughnut",data:{labels:["DR 20 or Below","DR 30+","DR 40+","DR 50+","DR 60+"],datasets:[{backgroundColor:["#7367f0","#ea5455","#57c84d","#0396ff","#FFE985"],data:F(i).linkByDRGetter,hoverOffset:4}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{position:"left"},emptyDoughnut:{color:"rgba(255, 128, 0, 0.5)",width:2,radiusDecrease:20}}}},null,8,["data"])])]),_:1}),R(x,{itemKey:"traffic"},{default:W(()=>[A("div",_S,[F(i).linkByTrafficGetter.filter(Boolean).length?yt("",!0):(ht(),Tt("div",yS," No Data Available ")),R(F(ae),{ref_key:"linksByTrafficChart",ref:l,type:"doughnut",data:{labels:["5000+","10000+","15000+"],datasets:[{backgroundColor:["#7367f0","#ea5455","#57c84d"],data:F(i).linkByTrafficGetter,hoverOffset:4}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:{position:"left"},emptyDoughnut:{color:"rgba(255, 128, 0, 0.5)",width:2,radiusDecrease:20}}}},null,8,["data"])])]),_:1})]),_:1})]),_:1})])]),_:1}),F(t).lg?(ht(),fn(b,{key:0,xxl:"4",xl:"4",lg:"6",md:"6",xs:"12"},{default:W(()=>[A("div",xS,[m[5]||(m[5]=A("div",{class:"dashboard-view__box__heading d-flex align-items-center justify-content-between"},[A("h3",null,"Link Status Report")],-1)),A("div",vS,[F(i).linkByStatusGetter.length?yt("",!0):(ht(),Tt("div",wS," No Data Available ")),R(F(ae),{ref_key:"linksByStatusChart",ref:o,type:"bar",labels:"Link Status",data:{labels:["Not Delivered","Outreaching","In Writing","In Submission","Delivered"],datasets:[{backgroundColor:["#7367f0","#ea5455","#57c84d","#0396ff","#FFE985"],data:F(i).linkByStatusGetter}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:!1},scales:{y:{grid:{display:!1}},x:{grid:{display:!1}}}}},null,8,["data"])])])]),_:1})):yt("",!0)]),_:1}),R(rS),R(M,{xs:{gutter:4}},{default:W(()=>[R(b,{xl:"8",lg:"12",md:"12",xs:"12"},{default:W(()=>[A("div",SS,[A("div",MS,[m[7]||(m[7]=A("h3",null,"Recent Orders",-1)),R(F(gs),{to:"/orders",class:"btn btn-outline-primary"},{default:W(()=>m[6]||(m[6]=[ve("All Orders")])),_:1})]),R(dl,{rows:g.value,columns:h.value,tableLoading:n.value,limit:5,sort:"",order:"",checkbox:!1},null,8,["rows","columns","tableLoading"]),F(i).ordersGetter.length?yt("",!0):(ht(),Tt("div",kS," No Orders Found! "))])]),_:1}),F(t).xl?(ht(),fn(b,{key:0,xl:"4",lg:"12",md:"12",xs:"12"},{default:W(()=>[A("div",OS,[m[8]||(m[8]=A("div",{class:"dashboard-view__box__heading d-flex align-items-center justify-content-between"},[A("h3",null,"Link Status Report")],-1)),A("div",AS,[F(i).linkByStatusGetter.length?yt("",!0):(ht(),Tt("div",PS," No Data Available ")),R(F(ae),{ref_key:"linksByStatusChart",ref:o,type:"bar",labels:"Link Status",data:{labels:["Not Delivered","Outreaching","In Writing","In Submission","Delivered"],datasets:[{backgroundColor:["#7367f0","#ea5455","#57c84d","#0396ff","#FFE985"],data:F(i).linkByStatusGetter}]},options:{maintainAspectRatio:!1,responsive:!0,plugins:{legend:!1},scales:{y:{grid:{display:!1}},x:{grid:{display:!1}}}}},null,8,["data"])])])]),_:1})):yt("",!0)]),_:1})])])],64)}}};export{RS as default};