PageSourceSearch

https://ijoo.ru/client/en-US/8861.b48b6220866bcdb3.js

js ijoo.ru collected 2026-10-07 23:49:51 UTC 209,155 bytes, 2 lines download raw bytes

vendor: 5,115 bytes, line 1
1"use strict";(self.webpackChunkPeerTube=self.webpackChunkPeerTube||[]).push([[8861],{2052:(So,Ms,Zt)=>{function T(r){return r+.5|0}Zt.d(Ms,{$:()=>Ni,A:()=>je,B:()=>Gt,C:()=>ve,D:()=>Ks,E:()=>Se,F:()=>We,G:()=>Fn,H:()=>ht,I:()=>is,J:()=>zn,K:()=>as,L:()=>tn,M:()=>qe,N:()=>be,O:()=>so,P:()=>tt,Q:()=>Pt,R:()=>yn,S:()=>qt,T:()=>rt,U:()=>Xs,V:()=>Ye,W:()=>wi,X:()=>Hi,Y:()=>fn,Z:()=>pn,_:()=>Js,a:()=>_n,a0:()=>Ki,a1:()=>xe,a2:()=>sn,a3:()=>zi,a4:()=>Ct,a5:()=>ge,a6:()=>Bi,a7:()=>Ut,a8:()=>zt,a9:()=>se,aA:()=>Hn,aB:()=>nn,aC:()=>Nn,aD:()=>Xe,aE:()=>Ft,aF:()=>Fs,aG:()=>$s,aH:()=>Zs,aI:()=>ki,aJ:()=>me,aK:()=>Us,aL:()=>Ii,aM:()=>Qt,aN:()=>$e,aO:()=>qs,aP:()=>Ne,aa:()=>qi,ab:()=>_i,ac:()=>Is,ad:()=>en,ae:()=>In,af:()=>dn,ag:()=>Hs,ah:()=>zs,ai:()=>Ns,aj:()=>Pi,ak:()=>ke,al:()=>Ln,am:()=>Zn,an:()=>hs,ao:()=>Bn,ap:()=>Vn,aq:()=>Tt,ar:()=>ji,as:()=>Me,at:()=>un,au:()=>mn,av:()=>Xi,aw:()=>Ui,ax:()=>Je,ay:()=>mt,az:()=>Wn,b:()=>nt,c:()=>on,d:()=>Vi,e:()=>vt,f:()=>Dt,g:()=>ue,h:()=>Xt,i:()=>et,j:()=>Qi,k:()=>$t,l:()=>Gs,m:()=>no,n:()=>xi,o:()=>Ri,p:()=>It,q:()=>Oi,r:()=>Di,s:()=>G,t:()=>Si,u:()=>ut,v:()=>wt,w:()=>Ai,x:()=>Ys,y:()=>Dn,z:()=>os});const U=(r,h,f)=>Math.max(Math.min(r,f),h);function Et(r){return U(T(2.55*r),0,255)}function _t(r){return U(T(255*r),0,255)}function J(r){return U(T(r/2.55)/100,0,1)}function Re(r){return U(T(100*r),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},Fe=[..."0123456789ABCDEF"],ri=r=>Fe[15&r],ks=r=>Fe[(240&r)>>4]+Fe[15&r],ae=r=>(240&r)>>4==(15&r);const hi=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function di(r,h,f){const p=h*Math.min(f,1-f),b=(_,v=(_+r/30)%12)=>f-p*Math.max(Math.min(v-3,9-v,1),-1);return[b(0),b(8),b(4)]}function ui(r,h,f){const p=(b,_=(b+r/60)%6)=>f-f*h*Math.max(Math.min(_,4-_,1),0);return[p(5),p(3),p(1)]}function Ps(r,h,f){const p=di(r,1,.5);let b;for(h+f>1&&(b=1/(h+f),h*=b,f*=b),b=0;b<3;b++)p[b]*=1-h-f,p[b]+=h;return p}function Ie(r){const f=r.r/255,p=r.g/255,b=r.b/255,_=Math.max(f,p,b),v=Math.min(f,p,b),k=(_+v)/2;let w,D,L;return _!==v&&(L=_-v,D=k>.5?L/(2-_-v):L/(_+v),w=function Cs(r,h,f,p,b){return r===b?(h-f)/p+(h<f?6:0):h===b?(f-r)/p+2:(r-h)/p+4}(f,p,b,L,_),w=60*w+.5),[0|w,D||0,k]}function re(r,h,f,p){return(Array.isArray(h)?r(h[0],h[1],h[2]):r(h,f,p)).map(_t)}function le(r,h,f){return re(di,r,h,f)}function fi(r){return(r%360+360)%360}const pi={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"},pt={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"};let ce;const Ts=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,he=r=>
1r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055,yt=r=>r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4);function de(r,h,f){if(r){let p=Ie(r);p[h]=Math.max(0,Math.min(p[h]+p[h]*f,0===h?360:1)),p=le(p),r.r=p[0],r.g=p[1],r.b=p[2]}}function bi(r,h){return r&&Object.assign(h||{},r)}function Ve(r){var h={r:0,g:0,b:0,a:255};return Array.isArray(r)?r.length>=3&&(h={r:r[0],g:r[1],b:r[2],a:255},r.length>3&&(h.a=_t(r[3]))):(h=bi(r,{r:0,g:0,b:0,a:1})).a=_t(h.a),h}function Rs(r){return"r"===r.charAt(0)?function Ls(r){const h=Ts.exec(r);let p,b,_,f=255;if(h){if(h[7]!==p){const v=+h[7];f=h[8]?Et(v):U(255*v,0,255)}return p=+h[1],b=+h[3],_=+h[5],p=255&(h[2]?Et(p):U(p,0,255)),b=255&(h[4]?Et(b):U(b,0,255)),_=255&(h[6]?Et(_):U(_,0,255)),{r:p,g:b,b:_,a:f}}}(r):function Yt(r){const h=hi.exec(r);let p,f=255;if(!h)return;h[5]!==p&&(f=h[6]?Et(+h[5]):_t(+h[5]));const b=fi(+h[2]),_=+h[3]/100,v=+h[4]/100;return p="hwb"===h[1]?function ze(r,h,f){return re(Ps,r,h,f)}(b,_,v):"hsv"===h[1]?function Ds(r,h,f){return re(ui,r,h,f)}(b,_,v):le(b,_,v),{r:p[0],g:p[1],b:p[2],a:f}}(r)}class St{constructor(h){if(h instanceof St)return h;const f=typeof h;let p;"object"===f?p=Ve(h):"string"===f&&(p=function Ss(r){var f,h=r.length;return"#"===r[0]&&(4===h||5===h?f={r:255&17*at[r[1]],g:255&17*at[r[2]],b:255&17*at[r[3]],a:5===h?17*at[r[4]]:255}:(7===h||9===h)&&(f={r:at[r[1]]<<4|at[r[2]],g:at[r[3]]<<4|at[r[4]],b:at[r[5]]<<4|at[r[6]],a:9===h?at[r[7]]<<4|at[r[8]]:255})),f}(h)||function As(r){ce||(ce=function Os(){const r={},h=Object.keys(pt),f=Object.keys(pi);let p,b,_,v,k;for(p=0;p<h.length;p++){for(v=k=h[p],b=0;b<f.length;b++)_=f[b],k=k.replace(_,pi[_]);_=parseInt(pt[v],16),r[k]=[_>>16&255,_>>8&255,255&_]}return r}(),ce.transparent=[0,0,0,0]);const h=ce[r.toLowerCase()];return h&&{r:h[0],g:h[1],b:h[2],a:4===h.length?h[3]:255}}(h)||Rs(h)),this._rgb=p,this._valid=!!p}get valid(){return this._valid}get rgb(){var h=bi(this._rgb);return h&&(h.a=J(h.a)),h}set rgb(h){this._rgb=Ve(h)}rgbString(){return this._valid?function mi(r){return r&&(r.a<255?`rgba(${r.r}, ${r.g}, ${r.b}, ${J(r.a)})`:`rgb(${r.r}, ${r.g}, ${r.b})`)}(this._rgb):void 0}hexString(){return this._valid?function ci(r){var h=(r=>ae(r.r)&&ae(r.g)&&ae(r.b)&&ae(r.a))(r)?ri:ks;return r?"#"+h(r.r)+h(r.g)+h(r.b)+((r,h)=>r<255?h(r):"")(r.a,h):void 0}(this._rgb):void 0}hslString(){return this._valid?function gi(r){if(!r)return;const h=Ie(r),f=h[0],p=Re(h[1]),b=Re(h[2]);return r.a<255?`hsla(${f}, ${p}%, ${b}%, ${J(r.a)})`:`hsl(${f}, ${p}%, ${b}%)`}(this._rgb):void 0}mix(h,f){if(h){const p=this.rgb,b=h.rgb;let _;const v=f===_?.5:f,k=2*v-1,w=p.a-b.a,D=((k*w==-1?k:(k+w)/(1+k*w))+1)/2;_=1-D,p.r=255&D*p.r+_*b.r+.5,p.g=255&D*p.g+_*b.g+.5,p.b=255&D*p.b+_*b.b+.5,p.a=v*p.a+(1-v)*b.a,this.rgb=p}return this}interpolate(h,f){return h&&(this._rgb=function Es(r,h,f){const p=yt(J(r.r)),b=yt(J(r.g)),_=yt(J(r.b));return{r:_t(he(p+f*(yt(J(h.r))-p))),g:_t(he(b+f*(yt(J(h.g))-b))),b:_t(he(_+f*(yt(J(h.b))-_))),a:r.a+f*(h.a-r.a)}}(this._rgb,h._rgb,f)),this}clone(){return new St(this.rgb)}alpha(h){return this._rgb.a=_t(h),this}clearer(h){return this._rgb.a*=1-h,this}greyscale(){const h=this._rgb,f=T(.3*h.r+.59*h.g+.11*h.b);return h.r=h.g=h.b=f,this}opaquer(h){return this._rgb.a*=1+h,this}negate(){const h=this._rgb;return h.r=255-h.r,h.g=255-h.g,h.b=255-h.b,this}lighten(h){return de(this._rgb,2,h),this}darken(h){return de(this._rgb,2,-h),this}saturate(h){return de(this._rgb,1,h),this}desaturate(h){return de(this._rgb,1,-h),this}rotate(h){return function Be(r,h){var f=Ie(r);f[0]=fi(f[0]+h),f=le(f),r.r=f[0],r.g=f[1],r.b=f[2]}(this._rgb,h),this}}function Fs(){}const Is=(()=>{let r=0;return()=>r++})();function $t(r){return null===r||typeof r>"u"}function nt(r){if(Array.isArray&&Array.isArray(r))return!0;const h=Object.prototype.toString.call(r);return"[object"===h.slice(0,7)&&"Array]"===h.slice(-6)}function et(r){return null!==r&&"[object Object]"===Object.prototype.toString.call(r)}function ue(r){return("number"==typeof r||r instanceof Number)&&isFinite(+r)}function so(r,h){return ue(r)?r:h}function wt(r,h){return typeof r>"u"?h:r}const no=(r,h)=>"string"==typeof r&&r.endsWith("%")?parseFloat(r)/100:+r/h,xi=(r,h)=>"string"==typeof r&&r.endsWith("%")?parseFloat(r)/100*h:+r;function Pt(r,h,f){if(r&&"function"==typeof r.call)return r.apply(f,h)}function We(r,h,f,p){let b,_,v;if(nt(r))if(_=r.length,p)for(b=_-1;b>=0;b--)h.call(f,r[b],b);else for(b=0;b<_;b++)h.call(f,r[b],b);else if(et(r))for(v=Object.keys(r),_=v.length,b=0;b<_;b++)h.call(f,r[v[b]],v[b])}function zs(r,h){let f,p,b,_;if(!r||!h||r.length!==h.length)return!1;for(f=0,p=r.length;f<p;++f)if(b=r[f],_=h[f],b.datasetIndex!==_.datasetIndex||b.index!==_.index)return!1;return!0}function fe(r){if(nt(r))return r.map(fe);if(et(r)){const h=Object.create(null),f=Object.keys(r),p=f.length;let b=0;for(;b<p;++b)h[f[b]]=fe(r[f[b]]);return h}return r}function Rt(r){return-1===["__proto__","prototype","constructor"].indexOf(r)}
vendor: 8,273 bytes, line 1
1function Bs(r,h,f,p){if(!Rt(r))return;const b=h[r],_=f[r];et(b)&&et(_)?Ct(b,_,p):h[r]=fe(_)}function Ct(r,h,f){const p=nt(h)?h:[h],b=p.length;if(!et(r))return r;const _=(f=f||{}).merger||Bs;let v;for(let k=0;k<b;++k){if(v=p[k],!et(v))continue;const w=Object.keys(v);for(let D=0,L=w.length;D<L;++D)_(w[D],r,v,f)}return r}function _i(r,h){return Ct(r,h,{merger:Vs})}function Vs(r,h,f){if(!Rt(r))return;const p=h[r],b=f[r];et(p)&&et(b)?_i(p,b):Object.prototype.hasOwnProperty.call(h,r)||(h[r]=fe(b))}const He={"":r=>r,x:r=>r.x,y:r=>r.y};function Dt(r,h){return(He[h]||(He[h]=function vi(r){const h=function Ws(r){const h=r.split("."),f=[];let p="";for(const b of h)p+=b,p.endsWith("\\")?p=p.slice(0,-1)+".":(f.push(p),p="");return f}(r);return f=>{for(const p of h){if(""===p)break;f=f&&f[p]}return f}}(h)))(r)}function ge(r){return r.charAt(0).toUpperCase()+r.slice(1)}const Xt=r=>typeof r<"u",Ut=r=>"function"==typeof r,Hs=(r,h)=>{if(r.size!==h.size)return!1;for(const f of r)if(!h.has(f))return!1;return!0};function Ns(r){return"mouseup"===r.type||"click"===r.type||"contextmenu"===r.type}const tt=Math.PI,rt=2*tt,Mi=rt+tt,pe=Number.POSITIVE_INFINITY,js=tt/180,ht=tt/2,dt=tt/4,Kt=2*tt/3,Qt=Math.log10,G=Math.sign;function me(r,h,f){return Math.abs(r-h)<f}function Zs(r){const h=Math.round(r);r=me(r,h,r/1e3)?h:r;const f=Math.pow(10,Math.floor(Qt(r))),p=r/f;return(p<=1?1:p<=2?2:p<=5?5:10)*f}function be(r){const h=[],f=Math.sqrt(r);let p;for(p=1;p<f;p++)r%p==0&&(h.push(p),h.push(r/p));return f===(0|f)&&h.push(f),h.sort((b,_)=>b-_).pop(),h}function Ys(r){return!isNaN(parseFloat(r))&&isFinite(r)}function ki(r,h){const f=Math.round(r);return f-h<=r&&f+h>=r}function $s(r,h,f){let p,b,_;for(p=0,b=r.length;p<b;p++)_=r[p][f],isNaN(_)||(h.min=Math.min(h.min,_),h.max=Math.max(h.max,_))}function Si(r){return r*(tt/180)}function Xs(r){return r*(180/tt)}function Us(r){if(!ue(r))return;let h=1,f=0;for(;Math.round(r*h)/h!==r;)h*=10,f++;return f}function Ks(r,h){const f=h.x-r.x,p=h.y-r.y,b=Math.sqrt(f*f+p*p);let _=Math.atan2(p,f);return _<-.5*tt&&(_+=rt),{angle:_,distance:b}}function Ft(r,h){return Math.sqrt(Math.pow(h.x-r.x,2)+Math.pow(h.y-r.y,2))}function Qs(r,h){return(r-h+Mi)%rt-tt}function mt(r){return(r%rt+rt)%rt}function It(r,h,f,p){const b=mt(r),_=mt(h),v=mt(f),k=mt(_-b),w=mt(v-b),D=mt(b-_),L=mt(b-v);return b===_||b===v||p&&_===v||k>w&&D<L}function qt(r,h,f){return Math.max(h,Math.min(f,r))}function wi(r){return qt(r,-32768,32767)}function Pi(r,h,f,p=1e-6){return r>=Math.min(h,f)-p&&r<=Math.max(h,f)+p}function Ne(r,h,f){f=f||(v=>r[v]<h);let _,p=r.length-1,b=0;for(;p-b>1;)_=b+p>>1,f(_)?b=_:p=_;return{lo:b,hi:p}}const Gt=(r,h,f,p)=>Ne(r,f,p?b=>{const _=r[b][h];return _<f||_===f&&r[b+1][h]===f}:b=>r[b][h]<f),je=(r,h,f)=>Ne(r,f,p=>r[p][h]>=f);function qs(r,h,f){let p=0,b=r.length;for(;p<b&&r[p]<h;)p++;for(;b>p&&r[b-1]>f;)b--;return p>0||b<r.length?r.slice(p,b):r}const Ci=["push","pop","shift","splice","unshift"];function Gs(r,h){r._chartjs?r._chartjs.listeners.push(h):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[h]}}),Ci.forEach(f=>{const p="_onData"+ge(f),b=r[f];Object.defineProperty(r,f,{configurable:!0,enumerable:!1,value(..._){const v=b.apply(this,_);return r._chartjs.listeners.forEach(k=>{"function"==typeof k[p]&&k[p](..._)}),v}})}))}function ut(r,h){const f=r._chartjs;if(!f)return;const p=f.listeners,b=p.indexOf(h);-1!==b&&p.splice(b,1),!(p.length>0)&&(Ci.forEach(_=>{delete r[_]}),delete r._chartjs)}function Js(r){const h=new Set(r);return h.size===r.length?r:Array.from(h)}const Di=typeof window>"u"?function(r){return r()}:window.requestAnimationFrame;function tn(r,h){let f=[],p=!1;return function(...b){f=b,p||(p=!0,Di.call(window,()=>{p=!1,r.apply(h,f)}))}}function en(r,h){let f;return function(...p){return h?(clearTimeout(f),f=setTimeout(r,h,p)):r.apply(this,p),h}}const xe=r=>"start"===r?"left":"end"===r?"right":"center",sn=(r,h,f)=>"start"===r?h:"end"===r?f:(h+f)/2,nn=(r,h,f,p)=>r===(p?"left":"right")?f:"center"===r?(h+f)/2:h;function Oi(r,h,f){const p=h.length;let b=0,_=p;if(r._sorted){const{iScale:v,_parsed:k}=r,w=v.axis,{min:D,max:L,minDefined:W,maxDefined:H}=v.getUserBounds();W&&(b=qt(Math.min(Gt(k,v.axis,D).lo,f?p:Gt(h,w,v.getPixelForValue(D)).lo),0,p-1)),_=H?qt(Math.max(Gt(k,v.axis,L,!0).hi+1,f?0:Gt(h,w,v.getPixelForValue(L),!0).hi+1),b,p)-b:p-b}return{start:b,count:_}}function Ai(r){const{xScale:h,yScale:f,_scaleRanges:p}=r,b={xmin:h.min,xmax:h.max,ymin:f.min,ymax:f.max};if(!p)return r._scaleRanges=b,!0;const _=p.xmin!==h.min||p.xmax!==h.max||p.ymin!==f.min||p.ymax!==f.max;return Object.assign(p,b),_}const Jt=r=>0===r||1===r,Ti=(r,h,f)=>-Math.pow(2,10*(r-=1))*Math.sin((r-h)*rt/f),Li=(r,h,f)=>Math.pow(2,-10*r)*Math.sin((r-h)*rt/f)+1,vt={linear:r=>r,easeInQuad:r=>r*r,easeOutQuad:r=>-r*(r-2),easeInOutQuad:r=>(r/=.5)<1?.5*r*r:-.5*(--r*(r-2)-1),easeInCubic:r=>r*r*r,easeOutCubic:r=>(r-=1)*r*r+1,easeInOutCubic:r=>(r/=.5)<1?.5*r*r*r:.5*((r-=2)*r*r+2),easeInQuart:r=>r*r*r*r,easeOutQuart:r=>-((r-=1)*r*r*r-1),easeInOutQuart:r=>(r/=.5)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2),easeInQuint:r=>r*r*r*r*r,easeOutQuint:r=>(r-=1)*r*r*r*r+1,easeInOutQuint:r=>(r/=.5)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2),easeInSine:r=>1-Math.cos(r*ht),easeOutSine:r=>Math.sin(r*ht),easeInOutSine:r=>-.5*(Math.cos(tt*r)-1),easeInExpo:r=>0===r?0:Math.pow(2,10*(r-1)),easeOutExpo:r=>1===r?1:1-Math.pow(2,-10*r),easeInOutExpo:r=>Jt(r)?r:r<.5?.5*Math.pow(2,10*(2*r-1)):.5*(2-Math.pow(2,-10*(2*r-1))),easeInCirc:r=>r>=1?r:-(Math.sqrt(1-r*r)-1),easeOutCirc:r=>Math.sqrt(1-(r-=1)*r),easeInOutCirc:r=>(r/=.5)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1),easeInElastic:r=>Jt(r)?r:Ti(r,.075,.3),easeOutElastic:r=>Jt(r)?r:Li(r,.075,.3),easeInOutElastic:r=>Jt(r)?r:r<.5?.5*Ti(2*r,.1125,.45):.5+.5*Li(2*r-1,.1125,.45),easeInBack:r=>r*r*(2.70158*r-1.70158),easeOutBack:r=>(r-=1)*r*(2.70158*r+1.70158)+1,easeInOutBack(r){let h=1.70158;return(r/=.5)<1?r*r*((1+(h*=1.525))*r-h)*.5:.5*((r-=2)*r*((1+(h*=1.525))*r+h)+2)},easeInBounce:r=>1-vt.easeOutBounce(1-r),easeOutBounce:r=>r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375,easeInOutBounce:r=>r<.5?.5*vt.easeInBounce(2*r):.5*vt.easeOutBounce(2*r-1)+.5};function _e(r){if(r&&"object"==typeof r){const h=r.toString();return"[object CanvasPattern]"===h||"[object CanvasGradient]"===h}return!1}function on(r){return _e(r)?r:new St(r)}function Ze(r){return _e(r)?r:new St(r).saturate(.5).darken(.1).hexString()}const an=["x","y","borderWidth","radius","tension"],rn=["color","borderColor","backgroundColor"],Ei=new Map;function Ri(r,h,f){return function ln(r,h){h=h||{};const f=r+JSON.stringify(h);let p=Ei.get(f);return p||(p=new Intl.NumberFormat(r,h),Ei.set(f,p)),p}(h,f).format(r)}const Fi={values:r=>nt(r)?r:""+r,numeric(r,h,f){if(0===r)return"0";const p=this.chart.options.locale;let b,_=r;if(f.length>1){const D=Math.max(Math.abs(f[0].value),Math.abs(f[f.length-1].value));(D<1e-4||D>1e15)&&(b="scientific"),_=function gt(r,h){let f=h.length>3?h[2].value-h[1].value:h[1].value-h[0].value;return Math.abs(f)>=1&&r!==Math.floor(r)&&(f=r-Math.floor(r)),f}(r,f)}const v=Qt(Math.abs(_)),k=isNaN(v)?1:Math.max(Math.min(-1*Math.floor(v),20),0),w={notation:b,minimumFractionDigits:k,maximumFractionDigits:k};return Object.assign(w,this.options.ticks.format),Ri(r,p,w)},logarithmic(r,h,f){if(0===r)return"0";const p=f[h].significand||r/Math.pow(10,Math.floor(Qt(r)));return[1,2,3,5,10,15].includes(p)||h>.8*f.length?Fi.numeric.call(this,r,h,f):""}};var Ii={formatters:Fi};const zi=Object.create(null),Bi=Object.create(null);function te(r,h){if(!h)return r;const f=h.split(".");for(let p=0,b=f.length;p<b;++p){const _=f[p];r=r[_]||(r[_]=Object.create(null))}return r}function ee(r,h,f){return"string"==typeof h?Ct(te(r,h),f):Ct(te(r,""),h)}class hn{constructor(h,f){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=p=>p.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={}
vendor: 3,696 bytes, line 1
1,this.hoverBackgroundColor=(p,b)=>Ze(b.backgroundColor),this.hoverBorderColor=(p,b)=>Ze(b.borderColor),this.hoverColor=(p,b)=>Ze(b.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(h),this.apply(f)}set(h,f){return ee(this,h,f)}get(h){return te(this,h)}describe(h,f){return ee(Bi,h,f)}override(h,f){return ee(zi,h,f)}route(h,f,p,b){const _=te(this,h),v=te(this,p),k="_"+f;Object.defineProperties(_,{[k]:{value:_[f],writable:!0},[f]:{enumerable:!0,get(){const w=this[k],D=v[b];return et(w)?Object.assign({},D,w):wt(w,D)},set(w){this[k]=w}}})}apply(h){h.forEach(f=>f(this))}}var Vi=new hn({_scriptable:r=>!r.startsWith("on"),_indexable:r=>"events"!==r,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function Ot(r){r.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),r.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:h=>"onProgress"!==h&&"onComplete"!==h&&"fn"!==h}),r.set("animations",{colors:{type:"color",properties:rn},numbers:{type:"number",properties:an}}),r.describe("animations",{_fallback:"animation"}),r.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:h=>0|h}}}})},function ye(r){r.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function cn(r){r.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(h,f)=>f.lineWidth,tickColor:(h,f)=>f.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:Ii.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),r.route("scale.ticks","color","","color"),r.route("scale.grid","color","","borderColor"),r.route("scale.border","color","","borderColor"),r.route("scale.title","color","","color"),r.describe("scale",{_fallback:!1,_scriptable:h=>!h.startsWith("before")&&!h.startsWith("after")&&"callback"!==h&&"parser"!==h,_indexable:h=>"borderDash"!==h&&"tickBorderDash"!==h&&"dash"!==h}),r.describe("scales",{_fallback:"scale"}),r.describe("scale.ticks",{_scriptable:h=>"backdropPadding"!==h&&"callback"!==h,_indexable:h=>"backdropPadding"!==h})}]);function Ye(r,h,f,p,b){let _=h[b];return _||(_=h[b]=r.measureText(b).width,f.push(b)),_>p&&(p=_),p}function $e(r,h,f,p){let b=(p=p||{}).data=p.data||{},_=p.garbageCollect=p.garbageCollect||[];p.font!==h&&(b=p.data={},_=p.garbageCollect=[],p.font=h),r.save(),r.font=h;let v=0;const k=f.length;let w,D,L,W,H;for(w=0;w<k;w++)if(W=f[w],null==W||nt(W)){if(nt(W))for(D=0,L=W.length;D<L;D++)H=W[D],null!=H&&!nt(H)&&(v=Ye(r,b,_,v,H))}else v=Ye(r,b,_,v,W);r.restore();const $=_.length/2;if($>f.length){for(w=0;w<$;w++)delete b[_[w]];_.splice(0,$)}return v}function Hi(r,h,f){const p=r.currentDevicePixelRatio,b=0!==f?Math.max(f/2,.5):0;return Math.round((h-b)*p)/p+b}function dn(r,h){(h=h||r.getContext("2d")).save(),h.resetTransform(),h.clearRect(0,0,r.width,r.height),h.restore(
vendor: 4,140 bytes, line 1
1)}function un(r,h,f,p){Xe(r,h,f,p,null)}function Xe(r,h,f,p,b){let _,v,k,w,D,L,W,H;const $=h.pointStyle,Q=h.rotation,N=h.radius;let B=(Q||0)*js;if($&&"object"==typeof $&&(_=$.toString(),"[object HTMLImageElement]"===_||"[object HTMLCanvasElement]"===_))return r.save(),r.translate(f,p),r.rotate(B),r.drawImage($,-$.width/2,-$.height/2,$.width,$.height),void r.restore();if(!(isNaN(N)||N<=0)){switch(r.beginPath(),$){default:b?r.ellipse(f,p,b/2,N,0,0,rt):r.arc(f,p,N,0,rt),r.closePath();break;case"triangle":L=b?b/2:N,r.moveTo(f+Math.sin(B)*L,p-Math.cos(B)*N),B+=Kt,r.lineTo(f+Math.sin(B)*L,p-Math.cos(B)*N),B+=Kt,r.lineTo(f+Math.sin(B)*L,p-Math.cos(B)*N),r.closePath();break;case"rectRounded":D=.516*N,w=N-D,v=Math.cos(B+dt)*w,W=Math.cos(B+dt)*(b?b/2-D:w),k=Math.sin(B+dt)*w,H=Math.sin(B+dt)*(b?b/2-D:w),r.arc(f-W,p-k,D,B-tt,B-ht),r.arc(f+H,p-v,D,B-ht,B),r.arc(f+W,p+k,D,B,B+ht),r.arc(f-H,p+v,D,B+ht,B+tt),r.closePath();break;case"rect":if(!Q){w=Math.SQRT1_2*N,L=b?b/2:w,r.rect(f-L,p-w,2*L,2*w);break}B+=dt;case"rectRot":W=Math.cos(B)*(b?b/2:N),v=Math.cos(B)*N,k=Math.sin(B)*N,H=Math.sin(B)*(b?b/2:N),r.moveTo(f-W,p-k),r.lineTo(f+H,p-v),r.lineTo(f+W,p+k),r.lineTo(f-H,p+v),r.closePath();break;case"crossRot":B+=dt;case"cross":W=Math.cos(B)*(b?b/2:N),v=Math.cos(B)*N,k=Math.sin(B)*N,H=Math.sin(B)*(b?b/2:N),r.moveTo(f-W,p-k),r.lineTo(f+W,p+k),r.moveTo(f+H,p-v),r.lineTo(f-H,p+v);break;case"star":W=Math.cos(B)*(b?b/2:N),v=Math.cos(B)*N,k=Math.sin(B)*N,H=Math.sin(B)*(b?b/2:N),r.moveTo(f-W,p-k),r.lineTo(f+W,p+k),r.moveTo(f+H,p-v),r.lineTo(f-H,p+v),B+=dt,W=Math.cos(B)*(b?b/2:N),v=Math.cos(B)*N,k=Math.sin(B)*N,H=Math.sin(B)*(b?b/2:N),r.moveTo(f-W,p-k),r.lineTo(f+W,p+k),r.moveTo(f+H,p-v),r.lineTo(f-H,p+v);break;case"line":v=b?b/2:Math.cos(B)*N,k=Math.sin(B)*N,r.moveTo(f-v,p-k),r.lineTo(f+v,p+k);break;case"dash":r.moveTo(f,p),r.lineTo(f+Math.cos(B)*(b?b/2:N),p+Math.sin(B)*N);break;case!1:r.closePath()}r.fill(),h.borderWidth>0&&r.stroke()}}function ve(r,h,f){return f=f||.5,!h||r&&r.x>h.left-f&&r.x<h.right+f&&r.y>h.top-f&&r.y<h.bottom+f}function fn(r,h){r.save(),r.beginPath(),r.rect(h.left,h.top,h.right-h.left,h.bottom-h.top),r.clip()}function Ni(r){r.restore()}function ji(r,h,f,p,b){if(!h)return r.lineTo(f.x,f.y);if("middle"===b){const _=(h.x+f.x)/2;r.lineTo(_,h.y),r.lineTo(_,f.y)}else"after"===b!=!!p?r.lineTo(h.x,f.y):r.lineTo(f.x,h.y);r.lineTo(f.x,f.y)}function Me(r,h,f,p){if(!h)return r.lineTo(f.x,f.y);r.bezierCurveTo(p?h.cp1x:h.cp2x,p?h.cp1y:h.cp2y,p?f.cp2x:f.cp1x,p?f.cp2y:f.cp1y,f.x,f.y)}function gn(r,h,f,p,b){if(b.strikethrough||b.underline){const _=r.measureText(p),v=h-_.actualBoundingBoxLeft,k=h+_.actualBoundingBoxRight,D=f+_.actualBoundingBoxDescent,L=b.strikethrough?(f-_.actualBoundingBoxAscent+D)/2:D;r.strokeStyle=r.fillStyle,r.beginPath(),r.lineWidth=b.decorationWidth||2,r.moveTo(v,L),r.lineTo(k,L),r.stroke()}}function Zi(r,h){const f=r.fillStyle;r.fillStyle=h.color,r.fillRect(h.left,h.top,h.width,h.height),r.fillStyle=f}function pn(r,h,f,p,b,_={}){const v=nt(h)?h:[h],k=_.strokeWidth>0&&""!==_.strokeColor;let w,D;for(r.save(),r.font=b.string,function ie(r,h){h.translation&&r.translate(h.translation[0],h.translation[1]),$t(h.rotation)||r.rotate(h.rotation),h.color&&(r.fillStyle=h.color),h.textAlign&&(r.textAlign=h.textAlign),h.textBaseline&&(r.textBaseline=h.textBaseline)}(r,_),w=0;w<v.length;++w)D=v[w],_.backdrop&&Zi(r,_.backdrop),k&&(_.strokeColor&&(r.strokeStyle=_.strokeColor),$t(_.strokeWidth)||(r.lineWidth=_.strokeWidth),r.strokeText(D,f,p,_.maxWidth)),r.fillText(D,f,p,_.maxWidth),gn(r,f,p,D,_),p+=Number(b.lineHeight);r.restore()}function mn(r,h){const{x:f,y:p,w:b,h:_,radius:v}=h;r.arc(f+v.topLeft,p+v.topLeft,v.topLeft,-ht,tt,!0),r.lineTo(f,p+_-v.bottomLeft),r.arc(f+v.bottomLeft,p+_-v.bottomLeft,v.bottomLeft,tt,ht,!0),r.lineTo(f+b-v.bottomRight,p+_),r.arc(f+b-v.bottomRight,p+_-v.bottomRight,v.bottomRight,ht,0,!0),r.lineTo(f+b,p+v.topRight),r.arc(f+b-v.topRight,p+v.topRight,v.topRight,0,-ht,!0),r.lineTo(f+v.topLeft,p)}const bn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Yi(r,h){const f=(""+r).match(bn);
1if(!f||"normal"===f[1])return 1.2*h;switch(r=+f[2],f[3]){case"px":return r;case"%":r/=100}return h*r}const $i=r=>+r||0;function ke(r,h){const f={},p=et(h),b=p?Object.keys(h):h,_=et(r)?p?v=>wt(r[v],r[h[v]]):v=>r[v]:()=>r;for(const v of b)f[v]=$i(_(v));return f}function Xi(r){return ke(r,{top:"y",right:"x",bottom:"y",left:"x"})}function Ui(r){return ke(r,["topLeft","topRight","bottomLeft","bottomRight"])}function Se(r){const h=Xi(r);return h.width=h.left+h.right,h.height=h.top+h.bottom,h}function Ki(r,h){let f=wt((r=r||{}).size,(h=h||Vi.font).size);"string"==typeof f&&(f=parseInt(f,10));let p=wt(r.style,h.style);p&&!(""+p).match(xn)&&(console.warn('Invalid font style specified: "'+p+'"'),p=void 0);const b={family:wt(r.family,h.family),lineHeight:Yi(wt(r.lineHeight,h.lineHeight),f),size:f,style:p,weight:wt(r.weight,h.weight),string:""};return b.string=function Wi(r){return!r||$t(r.size)||$t(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family}(b),b}function _n(r,h,f,p){let _,v,k,b=!0;for(_=0,v=r.length;_<v;++_)if(k=r[_],void 0!==k&&(void 0!==h&&"function"==typeof k&&(k=k(h),b=!1),void 0!==f&&nt(k)&&(k=k[f%k.length],b=!1),void 0!==k))return p&&!b&&(p.cacheable=!1),k}function yn(r,h,f){const{min:p,max:b}=r,_=xi(h,(b-p)/2),v=(k,w)=>f&&0===k?0:k+w;return{min:v(p,-Math.abs(_)),max:v(b,_)}}function Qi(r,h){return Object.assign(Object.create(r),h)}function se(r,h=[""],f,p,b=(()=>r[0])){const _=f||r;typeof p>"u"&&(p=Pe("_fallback",r));const v={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:r,_rootScopes:_,_fallback:p,_getTarget:b,override:k=>se([k,...r],h,_,p)};return new Proxy(v,{deleteProperty:(k,w)=>(delete k[w],delete k._keys,delete r[0][w],!0),get:(k,w)=>At(k,w,()=>function Pn(r,h,f,p){let b;for(const _ of h)if(b=Pe(vn(_,r),f),typeof b<"u")return Ue(r,b)?Ke(f,p,r,b):b}(w,h,r,k)),getOwnPropertyDescriptor:(k,w)=>Reflect.getOwnPropertyDescriptor(k._scopes[0],w),getPrototypeOf:()=>Reflect.getPrototypeOf(r[0]),has:(k,w)=>Ji(k).includes(w),ownKeys:k=>Ji(k),set(k,w,D){const L=k._storage||(k._storage=b());return k[w]=L[w]=D,delete k._keys,!0}})}function zt(r,h,f,p){const b={_cacheable:!1,_proxy:r,_context:h,_subProxy:f,_stack:new Set,_descriptors:qi(r,p),setContext:_=>zt(r,_,f,p),override:_=>zt(r.override(_),h,f,p)};return new Proxy(b,{deleteProperty:(_,v)=>(delete _[v],delete r[v],!0),get:(_,v,k)=>At(_,v,()=>function we(r,h,f){const{_proxy:p,_context:b,_subProxy:_,_descriptors:v}=r;let k=p[h];return Ut(k)&&v.isScriptable(h)&&(k=function Mn(r,h,f,p){const{_proxy:b,_context:_,_subProxy:v,_stack:k}=f;if(k.has(r))throw new Error("Recursion detected: "+Array.from(k).join("->")+"->"+r);k.add(r);let w=h(_,v||p);return k.delete(r),Ue(r,w)&&(w=Ke(b._scopes,b,r,w)),w}(h,k,r,f)),nt(k)&&k.length&&(k=function kn(r,h,f,p){const{_proxy:b,_context:_,_subProxy:v,_descriptors:k}=f;if(typeof _.index<"u"&&p(r))return h[_.index%h.length];if(et(h[0])){const w=h,D=b._scopes.filter(L=>L!==w);h=[];for(const L of w){const W=Ke(D,b,r,L);h.push(zt(W,_,v&&v[r],k))}}return h}(h,k,r,v.isIndexable)),Ue(h,k)&&(k=zt(k,b,_&&_[h],v)),k}(_,v,k)),getOwnPropertyDescriptor:(_,v)=>_._descriptors.allKeys?Reflect.has(r,v)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(r,v),getPrototypeOf:()=>Reflect.getPrototypeOf(r),has:(_,v)=>Reflect.has(r,v),ownKeys:()=>Reflect.ownKeys(r),set:(_,v,k)=>(r[v]=k,delete _[v],!0)})}function qi(r,h={scriptable:!0,indexable:!0}){const{_scriptable:f=h.scriptable,_indexable:p=h.indexable,_allKeys:b=h.allKeys}=r;return{allKeys:b,scriptable:f,indexable:p,isScriptable:Ut(f)?f:()=>f,isIndexable:Ut(p)?p:()=>p}}const vn=(r,h)=>r?r+ge(h):h,Ue=(r,h)=>et(h)&&"adapters"!==r&&(null===Object.getPrototypeOf(h)||h.constructor===Object);function At(r,h,f){if(Object.prototype.hasOwnProperty.call(r,h))return r[h];const p=f();return r[h]=p,p}function Bt(r,h,f){return Ut(r)?r(h,f):r}const Gi=(r,h)=>!0===r?h:"string"==typeof r?Dt(h,r):void 0;function Sn(r,h,f,p,b){for(const _ of h){const v=Gi(f,_);if(v){r.add(v);const k=Bt(v._fallback,f,b);if(typeof k<"u"&&k!==f&&k!==p)return k}else if(!1===v&&typeof p<"u"&&f!==p)return null}return!1}function Ke(r,h,f,p){const b=h._rootScopes,_=Bt(h._fallback,f,p),v=[...r,...b],k=new Set;k.add(p);let w=Qe(k,v,f,_||f,p);return!(null===w||typeof _<"u"&&_!==f&&(w=Qe(k,v,_,w,p),null===w))&&se(Array.from(k),[""],b,_,()=>function wn(r,h,f){const p=r._getTarget();h in p||(p[h]={});const b=p[h];return nt(b)&&et(f)?f:b||{}}(h,f,p))}function Qe(r,h,f,p,b){for(;f;)f=Sn(r,h,f,p,b);return f}function Pe(r,h){for(const f of h){if(!f)continue;const p=f[r];
1if(typeof p<"u")return p}}function Ji(r){let h=r._keys;return h||(h=r._keys=function Cn(r){const h=new Set;for(const f of r)for(const p of Object.keys(f).filter(b=>!b.startsWith("_")))h.add(p);return Array.from(h)}(r._scopes)),h}function Dn(r,h,f,p){const{iScale:b}=r,{key:_="r"}=this._parsing,v=new Array(p);let k,w,D,L;for(k=0,w=p;k<w;++k)D=k+f,L=h[D],v[k]={r:b.parse(Dt(L,_),D)};return v}const On=Number.EPSILON||1e-14,Vt=(r,h)=>h<r.length&&!r[h].skip&&r[h],ne=r=>"x"===r?"y":"x";function ts(r,h,f,p){const b=r.skip?h:r,_=h,v=f.skip?h:f,k=Ft(_,b),w=Ft(v,_);let D=k/(k+w),L=w/(k+w);D=isNaN(D)?0:D,L=isNaN(L)?0:L;const W=p*D,H=p*L;return{previous:{x:_.x-W*(v.x-b.x),y:_.y-W*(v.y-b.y)},next:{x:_.x+H*(v.x-b.x),y:_.y+H*(v.y-b.y)}}}function Ce(r,h,f){return Math.max(Math.min(r,f),h)}function Ln(r,h,f,p,b){let _,v,k,w;if(h.spanGaps&&(r=r.filter(D=>!D.skip)),"monotone"===h.cubicInterpolationMode)!function Mt(r,h="x"){const f=ne(h),p=r.length,b=Array(p).fill(0),_=Array(p);let v,k,w,D=Vt(r,0);for(v=0;v<p;++v)if(k=w,w=D,D=Vt(r,v+1),w){if(D){const L=D[h]-w[h];b[v]=0!==L?(D[f]-w[f])/L:0}_[v]=k?D?G(b[v-1])!==G(b[v])?0:(b[v-1]+b[v])/2:b[v-1]:b[v]}(function An(r,h,f){const p=r.length;let b,_,v,k,w,D=Vt(r,0);for(let L=0;L<p-1;++L)if(w=D,D=Vt(r,L+1),w&&D){if(me(h[L],0,On)){f[L]=f[L+1]=0;continue}b=f[L]/h[L],_=f[L+1]/h[L],k=Math.pow(b,2)+Math.pow(_,2),!(k<=9)&&(v=3/Math.sqrt(k),f[L]=b*v*h[L],f[L+1]=_*v*h[L])}})(r,b,_),function es(r,h,f="x"){const p=ne(f),b=r.length;let _,v,k,w=Vt(r,0);for(let D=0;D<b;++D){if(v=k,k=w,w=Vt(r,D+1),!k)continue;const L=k[f],W=k[p];v&&(_=(L-v[f])/3,k[`cp1${f}`]=L-_,k[`cp1${p}`]=W-_*h[D]),w&&(_=(w[f]-L)/3,k[`cp2${f}`]=L+_,k[`cp2${p}`]=W+_*h[D])}}(r,_,h)}(r,b);else{let D=p?r[r.length-1]:r[0];for(_=0,v=r.length;_<v;++_)k=r[_],w=ts(D,k,r[Math.min(_+1,v-(p?0:1))%v],h.tension),k.cp1x=w.previous.x,k.cp1y=w.previous.y,k.cp2x=w.next.x,k.cp2y=w.next.y,D=k}h.capBezierPoints&&function Tn(r,h){let f,p,b,_,v,k=ve(r[0],h);for(f=0,p=r.length;f<p;++f)v=_,_=k,k=f<p-1&&ve(r[f+1],h),_&&(b=r[f],v&&(b.cp1x=Ce(b.cp1x,h.left,h.right),b.cp1y=Ce(b.cp1y,h.top,h.bottom)),k&&(b.cp2x=Ce(b.cp2x,h.left,h.right),b.cp2y=Ce(b.cp2y,h.top,h.bottom)))}(r,f)}function qe(){return typeof window<"u"&&typeof document<"u"}function is(r){let h=r.parentNode;return h&&"[object ShadowRoot]"===h.toString()&&(h=h.host),h}function De(r,h,f){let p;return"string"==typeof r?(p=parseInt(r,10),-1!==r.indexOf("%")&&(p=p/100*h.parentNode[f])):p=r,p}const Wt=r=>r.ownerDocument.defaultView.getComputedStyle(r,null),En=["top","right","bottom","left"];function bt(r,h,f){const p={};f=f?"-"+f:"";for(let b=0;b<4;b++){const _=En[b];p[_]=parseFloat(r[h+"-"+_+f])||0}return p.width=p.left+p.right,p.height=p.top+p.bottom,p}const ss=(r,h,f)=>(r>0||h>0)&&(!f||!f.shadowRoot);function os(r,h){if("native"in r)return r;const{canvas:f,currentDevicePixelRatio:p}=h,b=Wt(f),_="border-box"===b.boxSizing,v=bt(b,"padding"),k=bt(b,"border","width"),{x:w,y:D,box:L}=function ns(r,h){const f=r.touches,p=f&&f.length?f[0]:r,{offsetX:b,offsetY:_}=p;let k,w,v=!1;if(ss(b,_,r.target))k=b,w=_;else{const D=h.getBoundingClientRect();k=p.clientX-D.left,w=p.clientY-D.top,v=!0}return{x:k,y:w,box:v}}(r,f),W=v.left+(L&&k.left),H=v.top+(L&&k.top);let{width:$,height:Q}=h;return _&&($-=v.width+k.width,Q-=v.height+k.height),{x:Math.round((w-W)/$*f.width/p),y:Math.round((D-H)/Q*f.height/p)}}const Ae=r=>Math.round(10*r)/10;function Fn(r,h,f,p){const b=Wt(r),_=bt(b,"margin"),v=De(b.maxWidth,r,"clientWidth")||pe,k=De(b.maxHeight,r,"clientHeight")||pe,w=function Rn(r,h,f){let p,b;if(void 0===h||void 0===f){const _=is(r);if(_){const v=_.getBoundingClientRect(),k=Wt(_),w=bt(k,"border","width"),D=bt(k,"padding");h=v.width-D.width-w.width,f=v.height-D.height-w.height,p=De(k.maxWidth,_,"clientWidth"),b=De(k.maxHeight,_,"clientHeight")}else h=r.clientWidth,f=r.clientHeight}return{width:h,height:f,maxWidth:p||pe,maxHeight:b||pe}}(r,h,f);let{width:D,height:L}=w;if("content-box"===b.boxSizing){const H=bt(b,"border","width"),$=bt(b,"padding");D-=$.width+H.width,L-=$.height+H.height}return D=Math.max(0,D-_.width),L=Math.max(0,p?D/p:L-_.height),D=Ae(Math.min(D,v,w.maxWidth)),L=Ae(Math.min(L,k,w.maxHeight)),D&&!L&&(L=Ae(D/2)),(void 0!==h||void 0!==f)&&p&&w.height&&L>w.height&&(L=w.height,D=Ae(Math.floor(L*p))),{width:D,height:L}}function In(r,h,f){const p=h||1,b=Math.floor(r.height*p),_=Math.floor(r.width*p);r.height=Math.floor(r.height),r.width=Math.floor(r.width);const v=r.canvas;return v.style&&(f||!v.style.height&&!v.style.width)&&(v.style.height=`${r.height}px`,v.style.width=`${r.width}px`),(r.currentDevicePixelRatio!==p||v.height!==b||v.width!==_)&&(r.currentDevicePixelRatio=p,v.height=b,v.width=_,r.ctx.setTransform(p,0,0,p,0,0),!0)}const as=function(){let r=!1;
1try{const h={get passive(){return r=!0,!1}};window.addEventListener("test",null,h),window.removeEventListener("test",null,h)}catch{}return r}();function zn(r,h){const f=function Oe(r,h){return Wt(r).getPropertyValue(h)}(r,h),p=f&&f.match(/^(\d+)(\.\d+)?px$/);return p?+p[1]:void 0}function Tt(r,h,f,p){return{x:r.x+f*(h.x-r.x),y:r.y+f*(h.y-r.y)}}function Bn(r,h,f,p){return{x:r.x+f*(h.x-r.x),y:"middle"===p?f<.5?r.y:h.y:"after"===p?f<1?r.y:h.y:f>0?h.y:r.y}}function Vn(r,h,f,p){const b={x:r.cp2x,y:r.cp2y},_={x:h.cp1x,y:h.cp1y},v=Tt(r,b,f),k=Tt(b,_,f),w=Tt(_,h,f),D=Tt(v,k,f),L=Tt(k,w,f);return Tt(D,L,f)}const rs=function(r,h){return{x:f=>r+r+h-f,setWidth(f){h=f},textAlign:f=>"center"===f?f:"right"===f?"left":"right",xPlus:(f,p)=>f-p,leftForLtr:(f,p)=>f-p}},ls=function(){return{x:r=>r,setWidth(r){},textAlign:r=>r,xPlus:(r,h)=>r+h,leftForLtr:(r,h)=>r}};function Wn(r,h,f){return r?rs(h,f):ls()}function Hn(r,h){let f,p;("ltr"===h||"rtl"===h)&&(f=r.canvas.style,p=[f.getPropertyValue("direction"),f.getPropertyPriority("direction")],f.setProperty("direction",h,"important"),r.prevTextDirection=p)}function Nn(r,h){void 0!==h&&(delete r.prevTextDirection,r.canvas.style.setProperty("direction",h[0],h[1]))}function Te(r){return"angle"===r?{between:It,compare:Qs,normalize:mt}:{between:Pi,compare:(h,f)=>h-f,normalize:h=>h}}
1function cs({start:r,end:h,count:f,loop:p,style:b}){return{start:r%f,end:h%f,loop:p&&(h-r+1)%f==0,style:b}}function Je(r,h,f){if(!f)return[r];const{property:p,start:b,end:_}=f,v=h.length,{compare:k,between:w,normalize:D}=Te(p),{start:L,end:W,loop:H,style:$}=function Ge(r,h,f){const{property:p,start:b,end:_}=f,{between:v,normalize:k}=Te(p),w=h.length;let H,$,{start:D,end:L,loop:W}=r;if(W){for(D+=w,L+=w,H=0,$=w;H<$&&v(k(h[D%w][p]),b,_);++H)D--,L--;D%=w,L%=w}return L<D&&(L+=w),{start:D,end:L,loop:W,style:r.style}}(r,h,f),Q=[];let it,Ht,Nt,N=!1,B=null;for(let jt=L,ps=L;jt<=W;++jt)Ht=h[jt%v],!Ht.skip&&(it=D(Ht[p]),it!==Nt&&(N=w(it,b,_),null===B&&(N||w(b,Nt,it)&&0!==k(b,Nt))&&(B=0===k(it,b)?jt:ps),null!==B&&(!N||0===k(_,it)||w(_,Nt,it))&&(Q.push(cs({start:B,end:jt,loop:H,count:v,style:$})),B=null),ps=jt,Nt=it));return null!==B&&Q.push(cs({start:B,end:W,loop:H,count:v,style:$})),Q}function hs(r,h){const f=[],p=r.segments;for(let b=0;b<p.length;b++){const _=Je(p[b],r.points,h);_.length&&f.push(..._)}return f}function Zn(r,h){const f=r.points,p=r.options.spanGaps,b=f.length;if(!b)return[];const _=!!r._loop,{start:v,end:k}=function ds(r,h,f,p){let b=0,_=h-1;if(f&&!p)for(;b<h&&!r[b].skip;)b++;for(;b<h&&r[b].skip;)b++;for(b%=h,f&&(_+=b);_>b&&r[_%h].skip;)_--;return _%=h,{start:b,end:_}}(f,b,_,p);return us(r,!0===p?[{start:v,end:k,loop:_}]:function jn(r,h,f,p){const b=r.length,_=[];let w,v=h,k=r[h];for(w=h+1;w<=f;++w){const D=r[w%b];D.skip||D.stop?k.skip||(_.push({start:h%b,end:(w-1)%b,loop:p=!1}),h=v=D.stop?w:null):(v=w,k.skip&&(h=w)),k=D}return null!==v&&_.push({start:h%b,end:v%b,loop:p}),_}(f,v,k<v?k+b:k,!!r._fullLoop&&0===v&&k===b-1),f,h)}function us(r,h,f,p){return p&&p.setContext&&f?function Yn(r,h,f,p){const b=r._chart.getContext(),_=fs(r.options),{_datasetIndex:v,options:{spanGaps:k}}=r,w=f.length,D=[];let L=_,W=h[0].start,H=W;function $(Q,N,B,it){const Ht=k?-1:1;if(Q!==N){for(Q+=w;f[Q%w].skip;)Q-=Ht;for(;f[N%w].skip;)N+=Ht;Q%w!=N%w&&(D.push({start:Q%w,end:N%w,loop:B,style:it}),L=it,W=N%w)}}for(const Q of h){W=k?W:Q.start;let B,N=f[W%w];for(H=W+1;H<=Q.end;H++){const it=f[H%w];B=fs(p.setContext(Qi(b,{type:"segment",p0:N,p1:it,p0DataIndex:(H-1)%w,p1DataIndex:H%w,datasetIndex:v}))),$n(B,L)&&$(W,H-1,Q.loop,L),N=it,L=B}W<H-1&&$(W,H-1,Q.loop,L)}return D}(r,h,f,p):h}function fs(r){return{backgroundColor:r.backgroundColor,borderCapStyle:r.borderCapStyle,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderJoinStyle:r.borderJoinStyle,borderWidth:r.borderWidth,borderColor:r.borderColor}}function $n(r,h){if(!h)return!1;const f=[],p=function(b,_){return _e(_)?(f.includes(_)||f.push(_),f.indexOf(_)):_};return JSON.stringify(r,p)!==JSON.stringify(h,p)}},58861:(So,Ms,Zt)=>{Zt.d(Ms,{S:()=>da,C:()=>ha});var T=Zt(99639),U=Zt(92833),Et=Zt(42966),u=Zt(2052);class _t{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,e,s){const a=t.duration;t.listeners[s].forEach(l=>l({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(e-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=u.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((e,s)=>{if(!e.running||!e.items.length)return;const o=e.items;let c,a=o.length-1,l=!1;for(;a>=0;--a)c=o[a],c._active?(c._total>e.duration&&(e.duration=c._total),c.tick(i),l=!0):(o[a]=o[o.length-1],o.pop());l&&(s.draw(),this._notify(s,e,i,"progress")),o.length||(e.running=!1,this._notify(s,e,i,"complete"),e.initial=!1),t+=o.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let e=t.get(i);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,e)),e}listen(i,t,e){this._getAnims(i).listeners[t].push(e)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,s)=>Math.max(e,s._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const e=t.items;let s=e.length-1;for(;s>=0;--s)e[s].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}}var J=new _t;const Re="transparent",at={boolean:(n,i,t)=>t>.5?i:n,color(n,i,t){const e=(0,u.c)(n||Re),s=e.valid&&(0,u.c)(i||Re);
1return s&&s.valid?s.mix(e,t).hexString():i},number:(n,i,t)=>n+(i-n)*t};class Fe{constructor(i,t,e,s){const o=t[e];s=(0,u.a)([i.to,s,o,i.from]);const a=(0,u.a)([i.from,o,s]);this._active=!0,this._fn=i.fn||at[i.type||typeof a],this._easing=u.e[i.easing]||u.e.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=e,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(i,t,e){if(this._active){this._notify(!1);const s=this._target[this._prop],o=e-this._start,a=this._duration-o;this._start=e,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=(0,u.a)([i.to,t,s,i.from]),this._from=(0,u.a)([i.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){const t=i-this._start,e=this._duration,s=this._prop,o=this._from,a=this._loop,l=this._to;let c;if(this._active=o!==l&&(a||t<e),!this._active)return this._target[s]=l,void this._notify(!0);t<0?this._target[s]=o:(c=t/e%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(o,l,c))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(i){const t=i?"res":"rej",e=this._promises||[];for(let s=0;s<e.length;s++)e[s][t]()}}class ri{constructor(i,t){this._chart=i,this._properties=new Map,this.configure(t)}configure(i){if(!(0,u.i)(i))return;const t=Object.keys(u.d.animation),e=this._properties;Object.getOwnPropertyNames(i).forEach(s=>{const o=i[s];if(!(0,u.i)(o))return;const a={};for(const l of t)a[l]=o[l];((0,u.b)(o.properties)&&o.properties||[s]).forEach(l=>{(l===s||!e.has(l))&&e.set(l,a)})})}_animateOptions(i,t){const e=t.options,s=function ae(n,i){if(!i)return;let t=n.options;
1if(t)return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;n.options=i}(i,e);if(!s)return[];const o=this._createAnimations(s,e);return e.$shared&&function ks(n,i){const t=[],e=Object.keys(i);for(let s=0;s<e.length;s++){const o=n[e[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}(i.options.$animations,e).then(()=>{i.options=e},()=>{}),o}_createAnimations(i,t){const e=this._properties,s=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),l=Date.now();let c;for(c=a.length-1;c>=0;--c){const d=a[c];if("$"===d.charAt(0))continue;if("options"===d){s.push(...this._animateOptions(i,t));continue}const g=t[d];let m=o[d];const x=e.get(d);if(m){if(x&&m.active()){m.update(x,g,l);continue}m.cancel()}x&&x.duration?(o[d]=m=new Fe(x,i,d,g),s.push(m)):i[d]=g}return s}update(i,t){if(0===this._properties.size)return void Object.assign(i,t);const e=this._createAnimations(i,t);return e.length?(J.add(this._chart,e),!0):void 0}}function li(n,i){const t=n&&n.options||{},e=t.reverse,s=void 0===t.min?i:0,o=void 0===t.max?i:0;return{start:e?o:s,end:e?s:o}}function ci(n,i){const t=[],e=n._getSortedDatasetMetas(i);let s,o;for(s=0,o=e.length;s<o;++s)t.push(e[s].index);return t}function hi(n,i,t,e={}){const s=n.keys,o="single"===e.mode;let a,l,c,d;if(null!==i){for(a=0,l=s.length;a<l;++a){if(c=+s[a],c===t){if(e.all)continue;break}d=n.values[c],(0,u.g)(d)&&(o||0===i||(0,u.s)(i)===(0,u.s)(d))&&(i+=d)}return i}}function ui(n,i){const t=n&&n.options.stacked;return t||void 0===t&&void 0!==i.stack}function Ie(n,i,t){const e=n[i]||(n[i]={});return e[t]||(e[t]={})}function re(n,i,t,e){for(const s of i.getMatchingVisibleMetas(e).reverse()){const o=n[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function le(n,i){const{chart:t,_cachedMeta:e}=n,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:l}=e,c=o.axis,d=a.axis,g=function Ps(n,i,t){return`${n.id}.${i.id}.${t.stack||t.type}`}(o,a,e),m=i.length;let x;for(let y=0;y<m;++y){const M=i[y],{[c]:S,[d]:P}=M;x=(M._stacks||(M._stacks={}))[d]=Ie(s,g,S),x[l]=P,x._top=re(x,a,!0,e.type),x._bottom=re(x,a,!1,e.type),(x._visualValues||(x._visualValues={}))[l]=P}}function ze(n,i){const t=n.scales;return Object.keys(t).filter(e=>t[e].axis===i).shift()}function Yt(n,i){const t=n.controller.index,e=n.vScale&&n.vScale.axis;if(e){i=i||n._parsed;for(const s of i){const o=s._stacks;if(!o||void 0===o[e]||void 0===o[e][t])return;delete o[e][t],void 0!==o[e]._visualValues&&void 0!==o[e]._visualValues[t]&&delete o[e]._visualValues[t]}}}const Be=n=>"reset"===n||"none"===n,gi=(n,i)=>i?n:Object.assign({},n);let pt=(()=>{class n{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ui(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&&Yt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),o=(x,y,M,S)=>"x"===x?y:"r"===x?S:M,a=e.xAxisID=(0,u.v)(s.xAxisID,ze(t,"x")),l=e.yAxisID=(0,u.v)(s.yAxisID,ze(t,"y")),c=e.rAxisID=(0,u.v)(s.rAxisID,ze(t,"r")),d=e.indexAxis,g=e.iAxisID=o(d,a,l,c),m=e.vAxisID=o(d,l,a,c);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(l),e.rScale=this.getScaleForId(c),e.iScale=this.getScaleForId(g),e.vScale=this.getScaleForId(m)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,u.u)(this._data,this),t._stacked&&Yt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if((0,u.i)(e))this._data=function di(n){const i=Object.keys(n),t=new Array(i.length);let e,s,o;for(e=0,s=i.length;e<s;++e)o=i[e],t[e]={x:o,y:n[o]};return t}(e);else if(s!==e){if(s){(0,u.u)(s,this);const o=this._cachedMeta;Yt(o),o._parsed=[]}
1e&&Object.isExtensible(e)&&(0,u.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let o=!1;this._dataCheck();const a=e._stacked;e._stacked=ui(e.vScale,e),e.stack!==s.stack&&(o=!0,Yt(e),e.stack=s.stack),this._resyncElements(t),(o||a!==e._stacked)&&le(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:l}=s,c=a.axis;let m,x,y,d=0===t&&e===o.length||s._sorted,g=t>0&&s._parsed[t-1];if(!1===this._parsing)s._parsed=o,s._sorted=!0,y=o;else{y=(0,u.b)(o[t])?this.parseArrayData(s,o,t,e):(0,u.i)(o[t])?this.parseObjectData(s,o,t,e):this.parsePrimitiveData(s,o,t,e);const M=()=>null===x[c]||g&&x[c]<g[c];for(m=0;m<e;++m)s._parsed[m+t]=x=y[m],d&&(M()&&(d=!1),g=x);s._sorted=d}l&&le(this,y)}parsePrimitiveData(t,e,s,o){const{iScale:a,vScale:l}=t,c=a.axis,d=l.axis,g=a.getLabels(),m=a===l,x=new Array(o);let y,M,S;for(y=0,M=o;y<M;++y)S=y+s,x[y]={[c]:m||a.parse(g[S],S),[d]:l.parse(e[S],S)};return x}parseArrayData(t,e,s,o){const{xScale:a,yScale:l}=t,c=new Array(o);let d,g,m,x;for(d=0,g=o;d<g;++d)m=d+s,x=e[m],c[d]={x:a.parse(x[0],m),y:l.parse(x[1],m)};return c}parseObjectData(t,e,s,o){const{xScale:a,yScale:l}=t,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,g=new Array(o);let m,x,y,M;for(m=0,x=o;m<x;++m)y=m+s,M=e[y],g[m]={x:a.parse((0,u.f)(M,c),y),y:l.parse((0,u.f)(M,d),y)};return g}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const a=this._cachedMeta,l=e[t.axis];return hi({keys:ci(this.chart,!0),values:e._stacks[t.axis]._visualValues},l,a.index,{mode:s})}updateRangeFromParsed(t,e,s,o){const a=s[e.axis];let l=null===a?NaN:a;const c=o&&s._stacks[e.axis];o&&c&&(o.values=c,l=hi(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,l),t.max=Math.max(t.max,l)}getMinMax(t,e){const s=this._cachedMeta,o=s._parsed,a=s._sorted&&t===s.iScale,l=o.length,c=this._getOtherScale(t),d=((n,i,t)=>n&&!i.hidden&&i._stacked&&{keys:ci(this.chart,!0),values:null})(e,s),g={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:m,max:x}=function Cs(n){const{min:i,max:t,minDefined:e,maxDefined:s}=n.getUserBounds();return{min:e?i:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}(c);let y,M;function S(){M=o[y];const P=M[c.axis];return!(0,u.g)(M[t.axis])||m>P||x<P}for(y=0;y<l&&(S()||(this.updateRangeFromParsed(g,t,M,d),!a));++y);if(a)for(y=l-1;y>=0;--y)if(!S()){this.updateRangeFromParsed(g,t,M,d);break}return g}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let o,a,l;for(o=0,a=e.length;o<a;++o)l=e[o][t.axis],(0,u.g)(l)&&s.push(l);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,o=e.vScale,a=this.getParsed(t);return{label:s?""+s.getLabelForValue(a[s.axis]):"",value:o?""+o.getLabelForValue(a[o.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function ws(n){let i,t,e,s;return(0,u.i)(n)?(i=n.top,t=n.right,e=n.bottom,s=n.left):i=t=e=s=n,{top:i,right:t,bottom:e,left:s,disabled:!1===n}}((0,u.v)(this.options.clip,function Ss(n,i,t){if(!1===t)return!1;const e=li(n,t),s=li(i,t);return{top:s.end,right:e.end,bottom:s.start,left:e.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this._cachedMeta,o=s.data||[],a=this.chart.chartArea,l=[],c=this._drawStart||0,d=this._drawCount||o.length-c,g=this.options.drawActiveElementsOnTop;let m;for(s.dataset&&s.dataset.draw(t,a,c,d),m=c;m<c+d;++m){const x=o[m];x.hidden||(x.active&&g?l.push(x):x.draw(t,a))}for(m=0;m<l.length;++m)l[m].draw(t,a)}getStyle(t,e){const s=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const o=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const l=this._cachedMeta.data[t];a=l.$context||(l.$context=function fi(n,i,t){return(0,u.j)(n,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"})}(this.getContext(),t,l)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=function Ds(n,i){return(0,u.j)(n,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=s,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const o="active"===e,a=this._cachedDataOpts,l=t+"-"+e,c=a[l],d=this.enableOptionSharing&&(0,u.h)(s);if(c)return gi(c,d);const g=this.chart.config,m=g.datasetElementScopeKeys(this._type,t),x=o?[`${t}Hover`,"hover",t,""]:[t,""],y=g.getOptionScopes(this.getDataset(),m),M=Object.keys(u.d.elements[t]),P=g.resolveNamedOptions(y,M,()=>this.getContext(s,o,e),x);return P.$shared&&(P.$shared=d,a[l]=Object.freeze(gi(P,d))),P}_resolveAnimations(t,e,s){const o=this.chart,a=this._cachedDataOpts,l=`animation-${e}`,c=a[l];if(c)return c;let d;if(!1!==o.options.animation){const m=this.chart.config,x=m.datasetAnimationScopeKeys(this._type,e),y=m.getOptionScopes(this.getDataset(),x);d=m.createResolver(y,this.getContext(t,s,e))}const g=new ri(o,d&&d.animations);return d&&d._cacheable&&(a[l]=Object.freeze(g)),g}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Be(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),o=this._sharedOptions,a=this.getSharedOptions(s),l=this.includeOptions(e,a)||a!==o;return this.updateSharedOptions(a,e,s),{sharedOptions:a,includeOptions:l}}updateElement(t,e,s,o){Be(o)?Object.assign(t,s):this._resolveAnimations(e,o).update(t,s)}updateSharedOptions(t,e,s){t&&!Be(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,o){t.active=o;const a=this.getStyle(e,o);
1this._resolveAnimations(e,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[c,d,g]of this._syncList)this[c](d,g);this._syncList=[];const o=s.length,a=e.length,l=Math.min(a,o);l&&this.parse(0,l),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a)}_insertElements(t,e,s=!0){const o=this._cachedMeta,a=o.data,l=t+e;let c;const d=g=>{for(g.length+=e,c=g.length-1;c>=l;c--)g[c]=g[c-e]};for(d(a),c=t;c<l;++c)a[c]=new this.dataElementType;this._parsing&&d(o._parsed),this.parse(t,e),s&&this.updateElements(a,t,e,"reset")}updateElements(t,e,s,o){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const o=s._parsed.splice(t,e);s._stacked&&Yt(s,o)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,o]=t;this[e](s,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return(0,T.Z)(n,"defaults",{}),(0,T.Z)(n,"datasetElementType",null),(0,T.Z)(n,"dataElementType",null),n})();
1function ce(n){const i=n.iScale,t=function Os(n,i){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas(i);let e=[];for(let s=0,o=t.length;s<o;s++)e=e.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=(0,u._)(e.sort((s,o)=>s-o))}return n._cache.$bar}(i,n.type);let s,o,a,l,e=i._length;const c=()=>{32767===a||-32768===a||((0,u.h)(l)&&(e=Math.min(e,Math.abs(a-l)||e)),l=a)};for(s=0,o=t.length;s<o;++s)a=i.getPixelForValue(t[s]),c();for(l=void 0,s=0,o=i.ticks.length;s<o;++s)a=i.getPixelForTick(s),c();return e}function mi(n,i,t,e){return(0,u.b)(n)?function Ls(n,i,t,e){const s=t.parse(n[0],e),o=t.parse(n[1],e),a=Math.min(s,o),l=Math.max(s,o);let c=a,d=l;Math.abs(a)>Math.abs(l)&&(c=l,d=a),i[t.axis]=d,i._custom={barStart:c,barEnd:d,start:s,end:o,min:a,max:l}}(n,i,t,e):i[t.axis]=t.parse(n,e),i}function he(n,i,t,e){const s=n.iScale,o=n.vScale,a=s.getLabels(),l=s===o,c=[];let d,g,m,x;for(d=t,g=t+e;d<g;++d)x=i[d],m={},m[s.axis]=l||s.parse(a[d],d),c.push(mi(x,m,o,d));return c}function yt(n){return n&&void 0!==n.barStart&&void 0!==n.barEnd}function bi(n,i,t,e){let s=i.borderSkipped;const o={};if(!s)return void(n.borderSkipped=o);if(!0===s)return void(n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:l,reverse:c,top:d,bottom:g}=function de(n){let i,t,e,s,o;return n.horizontal?(i=n.base>n.x,t="left",e="right"):(i=n.base<n.y,t="bottom",e="top"),i?(s="end",o="start"):(s="start",o="end"),{start:t,end:e,reverse:i,top:s,bottom:o}}(n);"middle"===s&&t&&(n.enableBorderRadius=!0,(t._top||0)===e?s=d:(t._bottom||0)===e?s=g:(o[Ve(g,a,l,c)]=!0,s=d)),o[Ve(s,a,l,c)]=!0,n.borderSkipped=o}function Ve(n,i,t,e){return e?(n=function Rs(n,i,t){return n===i?t:n===t?i:n}(n,i,t),n=St(n,t,i)):n=St(n,i,t),n}function St(n,i,t){return"start"===n?i:"end"===n?t:n}function io(n,{inflateAmount:i},t){n.inflateAmount="auto"===i?1===t?.33:0:i}let Fs=(()=>{class n extends pt{parsePrimitiveData(t,e,s,o){return he(t,e,s,o)}parseArrayData(t,e,s,o){return he(t,e,s,o)}parseObjectData(t,e,s,o){const{iScale:a,vScale:l}=t,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,g="x"===a.axis?c:d,m="x"===l.axis?c:d,x=[];let y,M,S,P;for(y=s,M=s+o;y<M;++y)P=e[y],S={},S[a.axis]=a.parse((0,u.f)(P,g),y),x.push(mi((0,u.f)(P,m),S,l,y));return x}updateRangeFromParsed(t,e,s,o){super.updateRangeFromParsed(t,e,s,o);const a=s._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:o}=e,a=this.getParsed(t),l=a._custom,c=yt(l)?"["+l.start+", "+l.end+"]":""+o.getLabelForValue(a[o.axis]);return{label:""+s.getLabelForValue(a[s.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,o){const a="reset"===o,{index:l,_cachedMeta:{vScale:c}}=this,d=c.getBasePixel(),g=c.isHorizontal(),m=this._getRuler(),{sharedOptions:x,includeOptions:y}=this._getSharedOptions(e,o);for(let M=e;M<e+s;M++){const S=this.getParsed(M),P=a||(0,u.k)(S[c.axis])?{base:d,head:d}:this._calculateBarValuePixels(M),O=this._calculateBarIndexPixels(M,m),C=(S._stacks||{})[c.axis],E={horizontal:g,base:P.base,enableBorderRadius:!C||yt(S._custom)||l===C._top||l===C._bottom,x:g?P.head:O.center,y:g?O.center:P.head,height:g?O.size:Math.abs(P.size),width:g?Math.abs(P.size):O.size};y&&(E.options=x||this.resolveDataElementOptions(M,t[M].active?"active":o));const F=E.options||t[M].options;bi(E,F,C,l),io(E,F,m.ratio),this.updateElement(t[M],M,E,o)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=s.options.stacked,l=[],c=d=>{const g=d.controller.getParsed(e),m=g&&g[d.vScale.axis];if((0,u.k)(m)||isNaN(m))return!0};for(const d of o)if((void 0===e||!c(d))&&((!1===a||-1===l.indexOf(d.stack)||void 0===a&&void 0===d.stack)&&l.push(d.stack),d.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){const o=this._getStacks(t,s),a=void 0!==e?o.indexOf(e):-1;return-1===a?o.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,o=[];let a,l;for(a=0,l=e.data.length;a<l;++a)o.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));const c=t.barThickness;return{min:c||ce(e),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:o},options:{base:a,minBarLength:l}}=this,c=a||0,d=this.getParsed(t),g=d._custom,m=yt(g);let S,P,x=d[e.axis],y=0,M=s?this.applyStack(e,d,s):x;M!==x&&(y=M-x,M=x),m&&(x=g.barStart,M=g.barEnd-g.barStart,0!==x&&(0,u.s)(x)!==(0,u.s)(g.barEnd)&&(y=0),y+=x);const O=(0,u.k)(a)||m?y:a;let C=e.getPixelForValue(O);if(S=this.chart.getDataVisibility(t)?e.getPixelForValue(y+M):C,P=S-C,Math.abs(P)<l){P=function Es(n,i,t){return 0!==n?(0,u.s)(n):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1)}(P,e,c)*l,x===c&&(C-=P/2);const E=e.getPixelForDecimal(0),F=e.getPixelForDecimal(1),A=Math.min(E,F),R=Math.max(E,F);C=Math.max(Math.min(C,R),A),S=C+P,s&&!m&&(d._stacks[e.axis]._visualValues[o]=e.getValueForPixel(S)-e.getValueForPixel(C))}if(C===e.getPixelForValue(c)){const E=(0,u.s)(P)*e.getLineWidthForValue(c)/2;C+=E,P-=E}return{size:P,base:C,head:S,center:S+P/2}}_calculateBarIndexPixels(t,e){const s=e.scale,o=this.options,a=o.skipNull,l=(0,u.v)(o.maxBarThickness,1/0);let c,d;if(e.grouped){const g=a?this._getStackCount(t):e.stackCount,m="flex"===o.barThickness?function Ts(n,i,t,e){const s=i.pixels,o=s[n];let a=n>0?s[n-1]:null,l=n<s.length-1?s[n+1]:null;const c=t.categoryPercentage;
1null===a&&(a=o-(null===l?i.end-i.start:l-o)),null===l&&(l=o+o-a);const d=o-(o-Math.min(a,l))/2*c;return{chunk:Math.abs(l-a)/2*c/e,ratio:t.barPercentage,start:d}}(t,e,o,g):function As(n,i,t,e){const s=t.barThickness;let o,a;return(0,u.k)(s)?(o=i.min*t.categoryPercentage,a=t.barPercentage):(o=s*e,a=1),{chunk:o/e,ratio:a,start:i.pixels[n]-o/2}}(t,e,o,g),x=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);c=m.start+m.chunk*x+m.chunk/2,d=Math.min(l,m.chunk*m.ratio)}else c=s.getPixelForValue(this.getParsed(t)[s.axis],t),d=Math.min(l,e.min*e.ratio);return{base:c-d/2,head:c+d/2,center:c,size:d}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,o=s.length;let a=0;for(;a<o;++a)null!==this.getParsed(a)[e.axis]&&s[a].draw(this._ctx)}}return(0,T.Z)(n,"id","bar"),(0,T.Z)(n,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,T.Z)(n,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}}),n})(),Is=(()=>{class n extends pt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,s,o){const a=super.parsePrimitiveData(t,e,s,o);for(let l=0;l<a.length;l++)a[l]._custom=this.resolveDataElementOptions(l+s).radius;return a}parseArrayData(t,e,s,o){const a=super.parseArrayData(t,e,s,o);for(let l=0;l<a.length;l++)a[l]._custom=(0,u.v)(e[s+l][2],this.resolveDataElementOptions(l+s).radius);return a}parseObjectData(t,e,s,o){const a=super.parseObjectData(t,e,s,o);for(let l=0;l<a.length;l++){const c=e[s+l];a[l]._custom=(0,u.v)(c&&c.r&&+c.r,this.resolveDataElementOptions(l+s).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=e,l=this.getParsed(t),c=o.getLabelForValue(l.x),d=a.getLabelForValue(l.y),g=l._custom;return{label:s[t]||"",value:"("+c+", "+d+(g?", "+g:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,o){const a="reset"===o,{iScale:l,vScale:c}=this._cachedMeta,{sharedOptions:d,includeOptions:g}=this._getSharedOptions(e,o),m=l.axis,x=c.axis;for(let y=e;y<e+s;y++){const M=t[y],S=!a&&this.getParsed(y),P={},O=P[m]=a?l.getPixelForDecimal(.5):l.getPixelForValue(S[m]),C=P[x]=a?c.getBasePixel():c.getPixelForValue(S[x]);P.skip=isNaN(O)||isNaN(C),g&&(P.options=d||this.resolveDataElementOptions(y,M.active?"active":o),a&&(P.options.radius=0)),this.updateElement(M,y,P,o)}}resolveDataElementOptions(t,e){const s=this.getParsed(t);let o=super.resolveDataElementOptions(t,e);o.$shared&&(o=Object.assign({},o,{$shared:!1}));const a=o.radius;return"active"!==e&&(o.radius=0),o.radius+=(0,u.v)(s&&s._custom,a),o}}return(0,T.Z)(n,"id","bubble"),(0,T.Z)(n,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,T.Z)(n,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}}),n})(),nt=(()=>{class n extends pt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=s;else{let l,c,a=d=>+s[d];if((0,u.i)(s[t])){const{key:d="value"}=this._parsing;a=g=>+(0,u.f)(s[g],d)}for(l=t,c=t+e;l<c;++l)o._parsed[l]=a(l)}}_getRotation(){return(0,u.t)(this.options.rotation-90)}_getCircumference(){return(0,u.t)(this.options.circumference)}_getRotationExtents(){let t=u.T,e=-u.T;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const o=this.chart.getDatasetMeta(s).controller,a=o._getRotation(),l=o._getCircumference();t=Math.min(t,a),e=Math.max(e,a+l)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,o=this._cachedMeta,a=o.data,l=this.getMaxBorderWidth()+this.getMaxOffset(a
1)+this.options.spacing,c=Math.max((Math.min(s.width,s.height)-l)/2,0),d=Math.min((0,u.m)(this.options.cutout,c),1),g=this._getRingWeight(this.index),{circumference:m,rotation:x}=this._getRotationExtents(),{ratioX:y,ratioY:M,offsetX:S,offsetY:P}=function $t(n,i,t){let e=1,s=1,o=0,a=0;if(i<u.T){const l=n,c=l+i,d=Math.cos(l),g=Math.sin(l),m=Math.cos(c),x=Math.sin(c),y=(E,F,A)=>(0,u.p)(E,l,c,!0)?1:Math.max(F,F*t,A,A*t),M=(E,F,A)=>(0,u.p)(E,l,c,!0)?-1:Math.min(F,F*t,A,A*t),S=y(0,d,m),P=y(u.H,g,x),O=M(u.P,d,m),C=M(u.P+u.H,g,x);e=(S-O)/2,s=(P-C)/2,o=-(S+O)/2,a=-(P+C)/2}return{ratioX:e,ratioY:s,offsetX:o,offsetY:a}}(x,m,d),E=Math.max(Math.min((s.width-l)/y,(s.height-l)/M)/2,0),F=(0,u.n)(this.options.radius,E),R=(F-Math.max(F*d,0))/this._getVisibleDatasetWeightTotal();this.offsetX=S*F,this.offsetY=P*F,o.total=this.calculateTotal(),this.outerRadius=F-R*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-R*g,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const s=this.options,o=this._cachedMeta,a=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*a/u.T)}updateElements(t,e,s,o){const a="reset"===o,l=this.chart,c=l.chartArea,m=(c.left+c.right)/2,x=(c.top+c.bottom)/2,y=a&&l.options.animation.animateScale,M=y?0:this.innerRadius,S=y?0:this.outerRadius,{sharedOptions:P,includeOptions:O}=this._getSharedOptions(e,o);let E,C=this._getRotation();for(E=0;E<e;++E)C+=this._circumference(E,a);for(E=e;E<e+s;++E){const F=this._circumference(E,a),A=t[E],R={x:m+this.offsetX,y:x+this.offsetY,startAngle:C,endAngle:C+F,circumference:F,outerRadius:S,innerRadius:M};O&&(R.options=P||this.resolveDataElementOptions(E,A.active?"active":o)),C+=F,this.updateElement(A,E,R,o)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let o,s=0;for(o=0;o<e.length;o++){const a=t._parsed[o];null!==a&&!isNaN(a)&&this.chart.getDataVisibility(o)&&!e[o].hidden&&(s+=Math.abs(a))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?u.T*(Math.abs(t)/e):0}getLabelAndValue(t){const s=this.chart,o=s.data.labels||[],a=(0,u.o)(this._cachedMeta._parsed[t],s.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const s=this.chart;let o,a,l,c,d;if(!t)for(o=0,a=s.data.datasets.length;o<a;++o)if(s.isDatasetVisible(o)){l=s.getDatasetMeta(o),t=l.data,c=l.controller;break}if(!t)return 0;for(o=0,a=t.length;o<a;++o)d=c.resolveDataElementOptions(o),"inner"!==d.borderAlign&&(e=Math.max(e,d.borderWidth||0,d.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,o=t.length;s<o;++s){const a=this.resolveDataElementOptions(s);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max((0,u.v)(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return(0,T.Z)(n,"id","doughnut"),(0,T.Z)(n,"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"}),(0,T.Z)(n,"descriptors",{_scriptable:i=>"spacing"!==i,_indexable:i=>"spacing"!==i&&!i.startsWith("borderDash")&&!i.startsWith("hoverBorderDash")}),(0,T.Z)(n,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e,color:s}}=i.legend.options;return t.labels.map((o,a)=>{const c=i.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(a),index:a}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update(
1)}}}}),n})(),et=(()=>{class n extends pt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:o=[],_dataset:a}=e,l=this.chart._animationsDisabled;let{start:c,count:d}=(0,u.q)(e,o,l);this._drawStart=c,this._drawCount=d,(0,u.w)(e)&&(c=0,d=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=o;const g=this.resolveDatasetElementOptions(t);this.options.showLine||(g.borderWidth=0),g.segment=this.options.segment,this.updateElement(s,void 0,{animated:!l,options:g},t),this.updateElements(o,c,d,t)}updateElements(t,e,s,o){const a="reset"===o,{iScale:l,vScale:c,_stacked:d,_dataset:g}=this._cachedMeta,{sharedOptions:m,includeOptions:x}=this._getSharedOptions(e,o),y=l.axis,M=c.axis,{spanGaps:S,segment:P}=this.options,O=(0,u.x)(S)?S:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||a||"none"===o,E=e+s,F=t.length;let A=e>0&&this.getParsed(e-1);for(let R=0;R<F;++R){const z=t[R],I=C?z:{};if(R<e||R>=E){I.skip=!0;continue}const V=this.getParsed(R),Z=(0,u.k)(V[M]),j=I[y]=l.getPixelForValue(V[y],R),Y=I[M]=a||Z?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,V,d):V[M],R);I.skip=isNaN(j)||isNaN(Y)||Z,I.stop=R>0&&Math.abs(V[y]-A[y])>O,P&&(I.parsed=V,I.raw=g.data[R]),x&&(I.options=m||this.resolveDataElementOptions(R,z.active?"active":o)),C||this.updateElement(z,R,I,o),A=V}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return s;const a=o[0].size(this.resolveDataElementOptions(0)),l=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,a,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return(0,T.Z)(n,"id","line"),(0,T.Z)(n,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,T.Z)(n,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}}),n})(),ue=(()=>{class n extends pt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const s=this.chart,o=s.data.labels||[],a=(0,u.o)(this._cachedMeta._parsed[t].r,s.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,e,s,o){return u.y.bind(this)(t,e,s,o)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((s,o)=>{const a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,o=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(o/2,0),c=(a-Math.max(s.cutoutPercentage?a/100*s.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=a-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,e,s,o){const a="reset"===o,l=this.chart,d=l.options.animation,g=this._cachedMeta.rScale,m=g.xCenter,x=g.yCenter,y=g.getIndexAngle(0)-.5*u.P;let S,M=y;const P=360/this.countVisibleElements();for(S=0;S<e;++S)M+=this._computeAngle(S,o,P);for(S=e;S<e+s;S++){const O=t[S];let C=M,E=M+this._computeAngle(S,o,P),F=l.getDataVisibility(S)?g.getDistanceFromCenterForValue(this.getParsed(S).r):0;M=E,a&&(d.animateScale&&(F=0),d.animateRotate&&(C=E=y));const A={x:m,y:x,innerRadius:0,outerRadius:F,startAngle:C,endAngle:E,options:this.resolveDataElementOptions(S,O.active?"active":o)};this.updateElement(O,S,A,o)}}countVisibleElements(){let e=0;return this._cachedMeta.data.forEach((s,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?(0,u.t)(this.resolveDataElementOptions(t,e).angle||s):0}}return(0,T.Z)(n,"id","polarArea"),(0,T.Z)(n,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,T.Z)(n,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const t=i.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e,color:s}}=i.legend.options;return t.labels.map((o,a)=>{const c=i.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(a),index:a}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update(
1)}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}}),n})();var xi=Object.freeze({__proto__:null,BarController:Fs,BubbleController:Is,DoughnutController:nt,LineController:et,PieController:(()=>{class n extends nt{}return(0,T.Z)(n,"id","pie"),(0,T.Z)(n,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"}),n})(),PolarAreaController:ue,RadarController:(()=>{class n extends pt{getLabelAndValue(t){const e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,o){return u.y.bind(this)(t,e,s,o)}update(t){const e=this._cachedMeta,s=e.dataset,o=e.data||[],a=e.iScale.getLabels();if(s.points=o,"resize"!==t){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),this.updateElement(s,void 0,{_loop:!0,_fullLoop:a.length===o.length,options:l},t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,s,o){const a=this._cachedMeta.rScale,l="reset"===o;for(let c=e;c<e+s;c++){const d=t[c],g=this.resolveDataElementOptions(c,d.active?"active":o),m=a.getPointPositionForValue(c,this.getParsed(c).r),x=l?a.xCenter:m.x,y=l?a.yCenter:m.y,M={x,y,angle:m.angle,skip:isNaN(x)||isNaN(y),options:g};this.updateElement(d,c,M,o)}}}return(0,T.Z)(n,"id","radar"),(0,T.Z)(n,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,T.Z)(n,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}}),n})(),ScatterController:(()=>{class n extends pt{getLabelAndValue(t){const e=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=e,l=this.getParsed(t),c=o.getLabelForValue(l.x),d=a.getLabelForValue(l.y);return{label:s[t]||"",value:"("+c+", "+d+")"}}update(t){const e=this._cachedMeta,{data:s=[]}=e,o=this.chart._animationsDisabled;let{start:a,count:l}=(0,u.q)(e,s,o);if(this._drawStart=a,this._drawCount=l,(0,u.w)(e)&&(a=0,l=s.length),this.options.showLine){const{dataset:c,_dataset:d}=e;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!d._decimated,c.points=s;const g=this.resolveDatasetElementOptions(t);g.segment=this.options.segment,this.updateElement(c,void 0,{animated:!o,options:g},t)}this.updateElements(s,a,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,s,o){const a="reset"===o,{iScale:l,vScale:c,_stacked:d,_dataset:g}=this._cachedMeta,m=this.resolveDataElementOptions(e,o),x=this.getSharedOptions(m),y=this.includeOptions(o,x),M=l.axis,S=c.axis,{spanGaps:P,segment:O}=this.options,C=(0,u.x)(P)?P:Number.POSITIVE_INFINITY,E=this.chart._animationsDisabled||a||"none"===o;let F=e>0&&this.getParsed(e-1);for(let A=e;A<e+s;++A){const R=t[A],z=this.getParsed(A),I=E?R:{},V=(0,u.k)(z[S]),Z=I[M]=l.getPixelForValue(z[M],A),j=I[S]=a||V?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,z,d):z[S],A);I.skip=isNaN(Z)||isNaN(j)||V,I.stop=A>0&&Math.abs(z[M]-F[M])>C,O&&(I.parsed=z,I.raw=g.data[A]),y&&(I.options=x||this.resolveDataElementOptions(A,R.active?"active":o)),E||this.updateElement(R,A,I,o),F=z}this.updateSharedOptions(x,o,m)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let c=0;for(let d=e.length-1;d>=0;--d)c=Math.max(c,e[d].size(this.resolveDataElementOptions(d))/2);return c>0&&c}const s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!e.length)return o;const a=e[0].size(this.resolveDataElementOptions(0)),l=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,a,l)/2}}return(0,T.Z)(n,"id","scatter"),(0,T.Z)(n,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,T.Z)(n,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}}),n})()});function Pt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class We{static override(i){Object.assign(We.prototype,i)}constructor(i){(0,T.Z)(this,"options",void 0),this.options=i||{}}init(){}formats(){return Pt()}parse(){return Pt()}format(){return Pt()}add(){return Pt()}diff(){return Pt()}startOf(){return Pt()}endOf(){return Pt()}}var zs__date=We;function fe(n,i,t,e){const{controller:s,data:o,_sorted:a}=n,l=s._cachedMeta.iScale;if(l&&i===l.axis&&"r"!==i&&a&&o.length){const c=l._reversePixels?u.A:u.B;if(!e)return c(o,i,t);
1if(s._sharedOptions){const d=o[0],g="function"==typeof d.getRange&&d.getRange(i);if(g){const m=c(o,i,t-g),x=c(o,i,t+g);return{lo:m.lo,hi:x.hi}}}}return{lo:0,hi:o.length-1}}function Rt(n,i,t,e,s){const o=n.getSortedVisibleDatasetMetas(),a=t[i];for(let l=0,c=o.length;l<c;++l){const{index:d,data:g}=o[l],{lo:m,hi:x}=fe(o[l],i,a,s);for(let y=m;y<=x;++y){const M=g[y];M.skip||e(M,d,y)}}}function Ct(n,i,t,e,s){const o=[];return!s&&!n.isPointInArea(i)||Rt(n,t,i,function(l,c,d){!s&&!(0,u.C)(l,n.chartArea,0)||l.inRange(i.x,i.y,e)&&o.push({element:l,datasetIndex:c,index:d})},!0),o}function yi(n,i,t,e,s,o){return o||n.isPointInArea(i)?"r"!==t||e?function Vs(n,i,t,e,s,o){let a=[];const l=function Bs(n){const i=-1!==n.indexOf("x"),t=-1!==n.indexOf("y");return function(e,s){const o=i?Math.abs(e.x-s.x):0,a=t?Math.abs(e.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}(t);let c=Number.POSITIVE_INFINITY;return Rt(n,t,i,function d(g,m,x){const y=g.inRange(i.x,i.y,s);if(e&&!y)return;const M=g.getCenterPoint(s);if(!o&&!n.isPointInArea(M)&&!y)return;const P=l(i,M);P<c?(a=[{element:g,datasetIndex:m,index:x}],c=P):P===c&&a.push({element:g,datasetIndex:m,index:x})}),a}(n,i,t,e,s,o):function _i(n,i,t,e){let s=[];return Rt(n,t,i,function o(a,l,c){const{startAngle:d,endAngle:g}=a.getProps(["startAngle","endAngle"],e),{angle:m}=(0,u.D)(a,{x:i.x,y:i.y});(0,u.p)(m,d,g)&&s.push({element:a,datasetIndex:l,index:c})}),s}(n,i,t,s):[]}function He(n,i,t,e,s){const o=[],a="x"===t?"inXRange":"inYRange";let l=!1;return Rt(n,t,i,(c,d,g)=>{c[a](i[t],s)&&(o.push({element:c,datasetIndex:d,index:g}),l=l||c.inRange(i.x,i.y,s))}),e&&!l?[]:o}var Ws={evaluateInteractionItems:Rt,modes:{index(n,i,t,e){const s=(0,u.z)(i,n),o=t.axis||"x",a=t.includeInvisible||!1,l=t.intersect?Ct(n,s,o,e,a):yi(n,s,o,!1,e,a),c=[];return l.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{const g=l[0].index,m=d.data[g];m&&!m.skip&&c.push({element:m,datasetIndex:d.index,index:g})}),c):[]},dataset(n,i,t,e){const s=(0,u.z)(i,n),o=t.axis||"xy",a=t.includeInvisible||!1;let l=t.intersect?Ct(n,s,o,e,a):yi(n,s,o,!1,e,a);if(l.length>0){const c=l[0].datasetIndex,d=n.getDatasetMeta(c).data;l=[];for(let g=0;g<d.length;++g)l.push({element:d[g],datasetIndex:c,index:g})}return l},point:(n,i,t,e)=>Ct(n,(0,u.z)(i,n),t.axis||"xy",e,t.includeInvisible||!1),nearest:(n,i,t,e)=>yi(n,(0,u.z)(i,n),t.axis||"xy",t.intersect,e,t.includeInvisible||!1),x:(n,i,t,e)=>He(n,(0,u.z)(i,n),"x",t.intersect,e),y:(n,i,t,e)=>He(n,(0,u.z)(i,n),"y",t.intersect,e)}};const vi=["left","top","right","bottom"];function Dt(n,i){return n.filter(t=>t.pos===i)}function ge(n,i){return n.filter(t=>-1===vi.indexOf(t.pos)&&t.box.axis===i)}function Xt(n,i){return n.sort((t,e)=>{const s=i?e:t,o=i?t:e;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function rt(n,i,t,e){return Math.max(n[t],i[t])+Math.max(n[e],i[e])}function Mi(n,i){n.top=Math.max(n.top,i.top),n.left=Math.max(n.left,i.left),n.bottom=Math.max(n.bottom,i.bottom),n.right=Math.max(n.right,i.right)}function pe(n,i,t,e){const{pos:s,box:o}=t,a=n.maxPadding;if(!(0,u.i)(s)){t.size&&(n[s]-=t.size);const m=e[t.stack]||{size:0,count:1};m.size=Math.max(m.size,t.horizontal?o.height:o.width),t.size=m.size/m.count,n[s]+=t.size}o.getPadding&&Mi(a,o.getPadding());const l=Math.max(0,i.outerWidth-rt(a,n,"left","right")),c=Math.max(0,i.outerHeight-rt(a,n,"top","bottom")),d=l!==n.w,g=c!==n.h;return n.w=l,n.h=c,t.horizontal?{same:d,other:g}:{same:g,other:d}}function ht(n,i){const t=i.maxPadding;return function e(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(i[a],t[a])}),o}(n?["left","right"]:["top","bottom"])}function dt(n,i,t,e){const s=[];let o,a,l,c,d,g;for(o=0,a=n.length,d=0;o<a;++o){l=n[o],c=l.box,c.update(l.width||i.w,l.height||i.h,ht(l.horizontal,i));const{same:m,other:x}=pe(i,t,l,e);d|=m&&s.length,g=g||x,c.fullSize||s.push(l)}return d&&dt(s,i,t,e)||g}function Kt(n,i,t,e,s){n.top=t,n.left=i,n.right=i+e,n.bottom=t+s,n.width=e,n.height=s}function Qt(n,i,t,e){const s=t.padding;let{x:o,y:a}=i;for(const l of n){const c=l.box,d=e[l.stack]||{count:1,placed:0,weight:1},g=l.stackWeight/d.weight||1;if(l.horizontal){const m=i.w*g,x=d.size||c.height;(0,u.h)(d.start)&&(a=d.start),c.fullSize?Kt(c,s.left,a,t.outerWidth-s.right-s.left,x):Kt(c,i.left+d.placed,a,m,x),d.start=a,d.placed+=m,a=c.bottom}else{const m=i.h*g,x=d.size||c.width;(0,u.h)(d.start)&&(o=d.start),c.fullSize?Kt(c,o,s.top,x,t.outerHeight-s.bottom-s.top):Kt(c,o,i.top+d.placed,x,m),d.start=o,d.placed+=m,o=c.right}}i.x=o,i.y=a}var G={addBox(n,i){n.boxes||(n.boxes=[]),i.fullSize=i.fullSize||!1,i.position=i.position||"top",i.weight=i.weight||0,i._layers=i._layers||function(){return[{z:0,draw(t){i.draw(t)}}]},n.boxes.push(i)},removeBox(n,i){const t=n.boxes?n.boxes.indexOf(i):-1;-1!==t&&n.boxes.splice(t,1)},configure(n,i,t){i.fullSize=t.fullSize,i.position=t.position,i.weight=t.weight},update(n,i,t,e){if(!n)return;const s=(0,u.E)(n.options.layout.padding),o=Math.max(i-s.width,0),a=Math.max(t-s.height,0),l=function tt(n){const i=function Ut(n){const i=[];let t,e,s,o,a,l;for(t=0,e=(n||[]).length;t<e;++t)s=n[t],({position:o,options:{stack:a,stackWeight:l=1}}=s),i.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:l});return i}(n),t=Xt(i.filter(d=>d.box.fullSize),!0),e=Xt(Dt(i,"left"),!0),s=Xt(Dt(i,"right")),o=Xt(Dt(i,"top"),!0),a=Xt(Dt(i,"bottom")),l=ge(i,"x"),c=ge(i,"y");return{fullSize:t,leftAndTop:e.concat(o),rightAndBottom:s.concat(c).concat(a).concat(l),chartArea:Dt(i,"chartArea"),vertical:e.concat(s).concat(c),horizontal:o.concat(a).concat(l)}}(n.boxes),c=l.vertical,d=l.horizontal;(0,u.F)(n.boxes,S=>{"function"==typeof S.beforeLayout&&S.beforeLayout()});const g=c.reduce((S,P)=>P.box.options&&!1===P.box.options.display?S:S+1,0)||1,m=Object.freeze({outerWidth:i,outerHeight:t,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/g,hBoxMaxHeight:a/2}),x=Object.assign({},s);Mi(x,(0,u.E)(e));const y=Object.assign({maxPadding:x,w:o,h:a,x:s.left,y:s.top},s),M=function Ns(n,i){const t=function Hs(n){const i={};for(const t of n){const{stack:e,pos:s,stackWeight:o}=t;if(!e||!vi.includes(s))continue;const a=i[e]||(i[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return i}(n),{vBoxMaxWidth:e,hBoxMaxHeight:s}=i;let o,a,l;for(o=0,a=n.length;o<a;++o){l=n[o];const{fullSize:c}=l.box,d=t[l.stack],g=d&&l.stackWeight/d.weight;l.horizontal?(l.width=g?g*e:c&&i.availableWidth,l.height=s):(l.width=e,l.height=g?g*s:c&&i.availableHeight)}return t}(c.concat(d),m);dt(l.fullSize,y,m,M),dt(c,y,m,M),dt(d,y,m,M)&&dt(c,y,m,M),function js(n){const i=n.maxPadding;function t(e){const s=Math.max(i[e]-n[e],0);return n[e]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}(y),Qt(l.leftAndTop,y,m,M),y.x+=y.w,y.y+=y.h,Qt(l.rightAndBottom,y,m,M),n.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},(0,u.F)(l.chartArea,S=>{const P=S.box;Object.assign(P,n.chartArea),P.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}};class me{acquireContext(i,t){}releaseContext(i){return!1}
1addEventListener(i,t,e){}removeEventListener(i,t,e){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,e,s){return t=Math.max(0,t||i.width),e=e||i.height,{width:t,height:Math.max(0,s?Math.floor(t/s):e)}}isAttached(i){return!0}updateConfig(i){}}class Zs extends me{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}}const be="$chartjs",Ys={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ki=n=>null===n||""===n,Si=!!u.K&&{passive:!0};function Us(n,i,t){n.canvas.removeEventListener(i,t,Si)}function Ft(n,i){for(const t of n)if(t===i||t.contains(i))return!0}function Qs(n,i,t){const e=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||Ft(l.addedNodes,e),a=a&&!Ft(l.removedNodes,e);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function mt(n,i,t){const e=n.canvas,s=new MutationObserver(o=>{let a=!1;for(const l of o)a=a||Ft(l.removedNodes,e),a=a&&!Ft(l.addedNodes,e);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const It=new Map;let qt=0;function wi(){const n=window.devicePixelRatio;n!==qt&&(qt=n,It.forEach((i,t)=>{t.currentDevicePixelRatio!==n&&i()}))}function Gt(n,i,t){const e=n.canvas,s=e&&(0,u.I)(e);if(!s)return;const o=(0,u.L)((l,c)=>{const d=s.clientWidth;t(l,c),d<s.clientWidth&&t()},window),a=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,g=c.contentRect.height;0===d&&0===g||o(d,g)});return a.observe(s),function Pi(n,i){It.size||window.addEventListener("resize",wi),It.set(n,i)}(n,o),a}function je(n,i,t){t&&t.disconnect(),"resize"===i&&function Ne(n){It.delete(n),It.size||window.removeEventListener("resize",wi)}(n)}function qs(n,i,t){const e=n.canvas,s=(0,u.L)(o=>{null!==n.ctx&&t(function Ks(n,i){const t=Ys[n.type]||n.type,{x:e,y:s}=(0,u.z)(n,i);return{type:t,chart:i,native:n,x:void 0!==e?e:null,y:void 0!==s?s:null}}(o,n))},n);return function Xs(n,i,t){n.addEventListener(i,t,Si)}(e,i,s),s}class Ci extends me{acquireContext(i,t){const e=i&&i.getContext&&i.getContext("2d");return e&&e.canvas===i?(function $s(n,i){const t=n.style,e=n.getAttribute("height"),s=n.getAttribute("width");if(n[be]={initial:{height:e,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ki(s)){const o=(0,u.J)(n,"width");void 0!==o&&(n.width=o)}if(ki(e))if(""===n.style.height)n.height=n.width/(i||2);else{const o=(0,u.J)(n,"height");void 0!==o&&(n.height=o)}}(i,t),e):null}releaseContext(i){const t=i.canvas;if(!t[be])return!1;const e=t[be].initial;["height","width"].forEach(o=>{const a=e[o];(0,u.k)(a)?t.removeAttribute(o):t.setAttribute(o,a)});const s=e.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[be],!0}addEventListener(i,t,e){this.removeEventListener(i,t),(i.$proxies||(i.$proxies={}))[t]=({attach:Qs,detach:mt,resize:Gt}[t]||qs)(i,t,e)}removeEventListener(i,t){const e=i.$proxies||(i.$proxies={}),s=e[t];s&&(({attach:je,detach:je,resize:je}[t]||Us)(i,t,s),e[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,e,s){return(0,u.G)(i,t,e,s)}isAttached(i){const t=(0,u.I)(i);return!(!t||!t.isConnected)}}class ut{constructor(){(0,T.Z)(this,"x",void 0),(0,T.Z)(this,"y",void 0),(0,T.Z)(this,"active",!1),(0,T.Z)(this,"options",void 0),(0,T.Z)(this,"$animations",void 0)}tooltipPosition(i){const{x:t,y:e}=this.getProps(["x","y"],i);return{x:t,y:e}}hasValue(){return(0,u.x)(this.x)&&(0,u.x)(this.y)}getProps(i,t){const e=this.$animations;if(!t||!e)return this;const s={};return i.forEach(o=>{s[o]=e[o]&&e[o].active()?e[o]._to:this[o]}),s}}function xe(n,i,t,e,s){const o=(0,u.v)(e,0),a=Math.min((0,u.v)(s,n.length),n.length);let c,d,g,l=0;for(t=Math.ceil(t),s&&(c=s-e,t=c/Math.floor(c/t)),g=o;g<0;)l++,g=Math.round(o+l*t);for(d=Math.max(o,0);d<a;d++)d===g&&(i.push(n[d]),l++,g=Math.round(o+l*t))}(0,T.Z)(ut,"defaults",{}),(0,T.Z)(ut,"defaultRoutes",void 0);const Oi=(n,i,t)=>"top"===i||"left"===i?n[i]+t:n[i]-t,Ai=(n,i)=>Math.min(i||n,n);function Jt(n,i){const t=[],e=n.length/i,s=n.length;let o=0;for(;o<s;o+=e)t.push(n[Math.floor(o)]);return t}function Ti(n,i,t){const e=n.ticks.length,s=Math.min(i,e-1),o=n._startPixel,a=n._endPixel,l=1e-6;let d,c=n.getPixelForTick(s);if(!(t&&(d=1===e?Math.max(c-o,a-c):0===i?(n.getPixelForTick(1)-c)/2:(c-n.getPixelForTick(s-1))/2,c+=s<i?d:-d,c<o-l||c>a+l)))return c}function vt(n){return n.drawTicks?n.tickLength:0}function _e(n,i){if(!n.display)return 0;const t=(0,u.a0)(n.font,i),e=(0,u.E)(n.padding);return((0,u.b)(n.text)?n.text.length:1)*t.lineHeight+e.height}function an(n,i,t){let e=(0,u.a1)(n);return(t&&"right"!==i||!t&&"right"===i)&&(e=(n=>"left"===n?"right":"right"===n?"left":n)(e)),e}class Ot extends ut{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.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(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:e,_suggestedMax:s}=this;return i=(0,u.O)(i,Number.POSITIVE_INFINITY),t=(0,u.O)(t,Number.NEGATIVE_INFINITY),e=(0,u.O)(e,Number.POSITIVE_INFINITY),s=(0,u.O)(s,Number.NEGATIVE_INFINITY),{min:(0,u.O)(i,e),max:(0,u.O)(t,s),minDefined:(0,u.g)(i),maxDefined:(0,u.g)(t)}}getMinMax(i){let a,{min:t,max:e,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:t,max:e};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)a=l[c].controller.getMinMax(this,i),s||(t=Math.min(t,a.min)),o||(e=Math.max(e,a.max));return t=o&&t>e?e:t,e=s&&t>e?t:e,{min:(0,u.O)(t,(0,u.O)(e,t)),max:(0,u.O)(e,(0,u.O)(t,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}
1getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,u.Q)(this.options.beforeUpdate,[this])}update(i,t,e){const{beginAtZero:s,grace:o,ticks:a}=this.options,l=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,u.R)(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?Jt(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function Js(n,i){const t=n.options.ticks,e=function oo(n){const i=n.options.offset,t=n._tickSize();return Math.floor(Math.min(n._length/t+(i?0:1),n._maxLength/t))}(n),s=Math.min(t.maxTicksLimit||e,e),o=t.major.enabled?function tn(n){const i=[];let t,e;for(t=0,e=n.length;t<e;t++)n[t].major&&i.push(t);return i}(i):[],a=o.length,l=o[0],c=o[a-1],d=[];if(a>s)return function en(n,i,t,e){let a,s=0,o=t[0];for(e=Math.ceil(e),a=0;a<n.length;a++)a===o&&(i.push(n[a]),s++,o=t[s*e])}(i,d,o,a/s),d;const g=function Di(n,i,t){const e=function sn(n){const i=n.length;let t,e;if(i<2)return!1;for(e=n[0],t=1;t<i;++t)if(n[t]-n[t-1]!==e)return!1;return e}(n),s=i.length/t;if(!e)return Math.max(s,1);const o=(0,u.N)(e);for(let a=0,l=o.length-1;a<l;a++){const c=o[a];if(c>s)return c}return Math.max(s,1)}(o,i,s);if(a>0){let m,x;const y=a>1?Math.round((c-l)/(a-1)):null;for(xe(i,d,g,(0,u.k)(y)?0:l-y,l),m=0,x=a-1;m<x;m++)xe(i,d,g,o[m],o[m+1]);return xe(i,d,g,c,(0,u.k)(y)?i.length:c+y),d}return xe(i,d,g),d}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,u.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,u.Q)(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(){(0,u.Q)(this.options.afterSetDimensions,[this])}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),(0,u.Q)(this.options[i],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,u.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(i){const t=this.options.ticks;let e,s,o;for(e=0,s=i.length;e<s;e++)o=i[e],o.label=(0,u.Q)(t.callback,[o.value,e,i],this)}afterTickToLabelConversion(){(0,u.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,u.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const i=this.options,t=i.ticks,e=Ai(this.ticks.length,i.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation;let l,c,d,a=s;if(!this._isVisible()||!t.display||s>=o||e<=1||!this.isHorizontal())return void(this.labelRotation=s);const g=this._getLabelSizes(),m=g.widest.width,x=g.highest.height,y=(0,u.S)(this.chart.width-m,0,this.maxWidth);l=i.offset?this.maxWidth/e:y/(e-1),m+6>l&&(l=y/(e-(i.offset?.5:1)),c=this.maxHeight-vt(i.grid)-t.padding-_e(i.title,this.chart.options.font),d=Math.sqrt(m*m+x*x),a=(0,u.U)(Math.min(Math.asin((0,u.S)((g.highest.height+6)/l,-1,1)),Math.asin((0,u.S)(c/d,-1,1))-Math.asin((0,u.S)(x/d,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){(0,u.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,u.Q)(this.options.beforeFit,[this])}fit(){const i={width:0,height:0},{chart:t,options:{ticks:e,title:s,grid:o}}=this,a=this._isVisible(),l=this.isHorizontal();if(a){const c=_e(s,t.options.font);if(l?(i.width=this.maxWidth,i.height=vt(o)+c):(i.height=this.maxHeight,i.width=vt(o)+c),e.display&&this.ticks.length){const{first:d,last:g,widest:m,highest:x}=this._getLabelSizes(),y=2*e.padding,M=(0,u.t)(this.labelRotation),S=Math.cos(M),P=Math.sin(M);l?i.height=Math.min(this.maxHeight,i.height+(e.mirror?0:P*m.width+S*x.height)+y):i.width=Math.min(this.maxWidth,i.width+(e.mirror?0:S*m.width+P*x.height)+y),this._calculatePadding(d,g,P,S)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,e,s){const{ticks:{align:o,padding:a},position:l}=this.options,c=0!==this.labelRotation,d="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const g=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let x=0,y=0;c?d?(x=s*i.width,y=e*t.height):(x=e*i.height,y=s*t.width):"start"===o?y=t.width:"end"===o?x=i.width:"inner"!==o&&(x=i.width/2,y=t.width/2),this.paddingLeft=Math.max((x-g+a)*this.width/(this.width-g),0),this.paddingRight=Math.max((y-m+a)*this.width/(this.width-m),0)}else{let g=t.height/2,m=i.height/2;"start"===o?(g=0,m=i.height):"end"===o&&(g=t.height,m=0),this.paddingTop=g+a,this.paddingBottom=m+a}}_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(){(0,u.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:i,position:t}=this.options;return"top"===t||"bottom"===t||"x"===i}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){let t,e;for(this.beforeTickToLabelConversion(),this.generateTickLabels(i),t=0,e=i.length;t<e;t++)(0,u.k)(i[t].label)&&(i.splice(t,1),e--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let i=this._labelSizes;if(!i){const t=this.options.ticks.sampleSize;let e=this.ticks;t<e.length&&(e=Jt(e,t)),this._labelSizes=i=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return i}_computeLabelSizes(i,t,e){const{ctx:s,_longestTextCache:o}=this,a=[],l=[],c=Math.floor(t/Ai(t,e));let m,x,y,M,S,P,O,C,E,F,A,d=0,g=0;for(m=0;m<t;m+=c){if(M=i[m].label,S=this._resolveTickFontOptions(m),s.font=P=S.string,O=o[P]=o[P]||{data:{},gc:[]},C=S.lineHeight,E=F=0,(0,u.k)(M)||(0,u.b)(M)){if((0,u.b)(M))for(x=0,y=M.length;x<y;++x)A=M[x],!(0,u.k)(A)&&!(0,u.b)(A)&&(E=(0,u.V)(s,O.data,O.gc,E,A),F+=C)}else E=(0,u.V)(s,O.data,O.gc,E,M),F=C;a.push(E),l.push(F),d=Math.max(E,d),g=Math.max(F,g)}!function Li(n,i){(0,u.F)(n,t=>{const e=t.gc,s=e.length/2;let o;if(s>i){for(o=0;o<s;++o)delete t.data[e[o]];e.splice(0,s)}})}(o,t);const R=a.indexOf(d),z=l.indexOf(g),I=V=>({width:a[V]||0,height:l[V]||0});
1return{first:I(0),last:I(t-1),widest:I(R),highest:I(z),widths:a,heights:l}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){const t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);const t=this._startPixel+i*this._length;return(0,u.W)(this._alignToPixels?(0,u.X)(this.chart,t,0):t)}getDecimalForPixel(i){const t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){const t=this.ticks||[];if(i>=0&&i<t.length){const e=t[i];return e.$context||(e.$context=function Ze(n,i,t){return(0,u.j)(n,{tick:t,index:i,type:"tick"})}(this.getContext(),i,e))}return this.$context||(this.$context=function on(n,i){return(0,u.j)(n,{scale:i,type:"scale"})}(this.chart.getContext(),this))}_tickSize(){const i=this.options.ticks,t=(0,u.t)(this.labelRotation),e=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=i.autoSkipPadding||0,l=o?o.widest.width+a:0,c=o?o.highest.height+a:0;return this.isHorizontal()?c*e>l*s?l/e:c/s:c*s<l*e?c/e:l/s}_isVisible(){const i=this.options.display;return"auto"!==i?!!i:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(i){const t=this.axis,e=this.chart,s=this.options,{grid:o,position:a,border:l}=s,c=o.offset,d=this.isHorizontal(),m=this.ticks.length+(c?1:0),x=vt(o),y=[],M=l.setContext(this.getContext()),S=M.display?M.width:0,P=S/2,O=function(K){return(0,u.X)(e,K,S)};let C,E,F,A,R,z,I,V,Z,j,Y,st;if("top"===a)C=O(this.bottom),z=this.bottom-x,V=C-P,j=O(i.top)+P,st=i.bottom;else if("bottom"===a)C=O(this.top),j=i.top,st=O(i.bottom)-P,z=C+P,V=this.top+x;else if("left"===a)C=O(this.right),R=this.right-x,I=C-P,Z=O(i.left)+P,Y=i.right;else if("right"===a)C=O(this.left),Z=i.left,Y=O(i.right)-P,R=C+P,I=this.left+x;else if("x"===t){if("center"===a)C=O((i.top+i.bottom)/2+.5);else if((0,u.i)(a)){const K=Object.keys(a)[0];C=O(this.chart.scales[K].getPixelForValue(a[K]))}j=i.top,st=i.bottom,z=C+P,V=z+x}else if("y"===t){if("center"===a)C=O((i.left+i.right)/2);else if((0,u.i)(a)){const K=Object.keys(a)[0];C=O(this.chart.scales[K].getPixelForValue(a[K]))}R=C-P,I=R-x,Z=i.left,Y=i.right}const ft=(0,u.v)(s.ticks.maxTicksLimit,m),X=Math.max(1,Math.ceil(m/ft));for(E=0;E<m;E+=X){const K=this.getContext(E),q=o.setContext(K),xt=l.setContext(K),ot=q.lineWidth,Le=q.color,vs=xt.dash||[],Ee=xt.dashOffset,si=q.tickWidth,ni=q.tickColor,oi=q.tickBorderDash||[],ai=q.tickBorderDashOffset;F=Ti(this,E,c),void 0!==F&&(A=(0,u.X)(e,F,ot),d?R=I=Z=Y=A:z=V=j=st=A,y.push({tx1:R,ty1:z,tx2:I,ty2:V,x1:Z,y1:j,x2:Y,y2:st,width:ot,color:Le,borderDash:vs,borderDashOffset:Ee,tickWidth:si,tickColor:ni,tickBorderDash:oi,tickBorderDashOffset:ai}))}return this._ticksLength=m,this._borderValue=C,y}_computeLabelItems(i){const t=this.axis,e=this.options,{position:s,ticks:o}=e,a=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:g,mirror:m}=o,x=vt(e.grid),y=x+g,M=m?-g:y,S=-(0,u.t)(this.labelRotation),P=[];let O,C,E,F,A,R,z,I,V,Z,j,Y,st="middle";if("top"===s)R=this.bottom-M,z=this._getXAxisLabelAlignment();else if("bottom"===s)R=this.top+M,z=this._getXAxisLabelAlignment();else if("left"===s){const X=this._getYAxisLabelAlignment(x);z=X.textAlign,A=X.x}else if("right"===s){const X=this._getYAxisLabelAlignment(x);z=X.textAlign,A=X.x}else if("x"===t){if("center"===s)R=(i.top+i.bottom)/2+y;else if((0,u.i)(s)){const X=Object.keys(s)[0];R=this.chart.scales[X].getPixelForValue(s[X])+y}z=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===s)A=(i.left+i.right)/2-y;else if((0,u.i)(s)){const X=Object.keys(s)[0];A=this.chart.scales[X].getPixelForValue(s[X])}z=this._getYAxisLabelAlignment(x).textAlign}"y"===t&&("start"===c?st="top":"end"===c&&(st="bottom"));
1const ft=this._getLabelSizes();for(O=0,C=l.length;O<C;++O){E=l[O],F=E.label;const X=o.setContext(this.getContext(O));I=this.getPixelForTick(O)+o.labelOffset,V=this._resolveTickFontOptions(O),Z=V.lineHeight,j=(0,u.b)(F)?F.length:1;const K=j/2,q=X.color,xt=X.textStrokeColor,ot=X.textStrokeWidth;let vs,Le=z;if(a?(A=I,"inner"===z&&(Le=O===C-1?this.options.reverse?"left":"right":0===O?this.options.reverse?"right":"left":"center"),Y="top"===s?"near"===d||0!==S?-j*Z+Z/2:"center"===d?-ft.highest.height/2-K*Z+Z:Z/2-ft.highest.height:"near"===d||0!==S?Z/2:"center"===d?ft.highest.height/2-K*Z:ft.highest.height-j*Z,m&&(Y*=-1),0!==S&&!X.showLabelBackdrop&&(A+=Z/2*Math.sin(S))):(R=I,Y=(1-j)*Z/2),X.showLabelBackdrop){const Ee=(0,u.E)(X.backdropPadding),si=ft.heights[O],ni=ft.widths[O];let oi=Y-Ee.top,ai=0-Ee.left;switch(st){case"middle":oi-=si/2;break;case"bottom":oi-=si}switch(z){case"center":ai-=ni/2;break;case"right":ai-=ni}vs={left:ai,top:oi,width:ni+Ee.width,height:si+Ee.height,color:X.backdropColor}}P.push({label:F,font:V,textOffset:Y,options:{rotation:S,color:q,strokeColor:xt,strokeWidth:ot,textAlign:Le,textBaseline:st,translation:[A,R],backdrop:vs}})}return P}_getXAxisLabelAlignment(){const{position:i,ticks:t}=this.options;if(-(0,u.t)(this.labelRotation))return"top"===i?"left":"right";let s="center";return"start"===t.align?s="left":"end"===t.align?s="right":"inner"===t.align&&(s="inner"),s}_getYAxisLabelAlignment(i){const{position:t,ticks:{crossAlign:e,mirror:s,padding:o}}=this.options,l=i+o,c=this._getLabelSizes().widest.width;let d,g;return"left"===t?s?(g=this.right+o,"near"===e?d="left":"center"===e?(d="center",g+=c/2):(d="right",g+=c)):(g=this.right-l,"near"===e?d="right":"center"===e?(d="center",g-=c/2):(d="left",g=this.left)):"right"===t?s?(g=this.left+o,"near"===e?d="right":"center"===e?(d="center",g-=c/2):(d="left",g-=c)):(g=this.left+l,"near"===e?d="left":"center"===e?(d="center",g+=c/2):(d="right",g=this.right)):d="right",{textAlign:d,x:g}}_computeLabelArea(){if(this.options.ticks.mirror)return;const i=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:i.height,right:this.right}
1:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:i.width}:void 0}drawBackground(){const{ctx:i,options:{backgroundColor:t},left:e,top:s,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(e,s,o,a),i.restore())}getLineWidthForValue(i){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(o=>o.value===i);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(i){const t=this.options.grid,e=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i));let o,a;const l=(c,d,g)=>{!g.width||!g.color||(e.save(),e.lineWidth=g.width,e.strokeStyle=g.color,e.setLineDash(g.borderDash||[]),e.lineDashOffset=g.borderDashOffset,e.beginPath(),e.moveTo(c.x,c.y),e.lineTo(d.x,d.y),e.stroke(),e.restore())};if(t.display)for(o=0,a=s.length;o<a;++o){const c=s[o];t.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),t.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:i,ctx:t,options:{border:e,grid:s}}=this,o=e.setContext(this.getContext()),a=e.display?o.width:0;if(!a)return;const l=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,g,m,x;this.isHorizontal()?(d=(0,u.X)(i,this.left,a)-a/2,g=(0,u.X)(i,this.right,l)+l/2,m=x=c):(m=(0,u.X)(i,this.top,a)-a/2,x=(0,u.X)(i,this.bottom,l)+l/2,d=g=c),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(d,m),t.lineTo(g,x),t.stroke(),t.restore()}drawLabels(i){if(!this.options.ticks.display)return;const e=this.ctx,s=this._computeLabelArea();s&&(0,u.Y)(e,s);const o=this.getLabelItems(i);for(const a of o)(0,u.Z)(e,a.label,0,a.textOffset,a.font,a.options);s&&(0,u.$)(e)}drawTitle(){const{ctx:i,options:{position:t,title:e,reverse:s}}=this;if(!e.display)return;const o=(0,u.a0)(e.font),a=(0,u.E)(e.padding),l=e.align;let c=o.lineHeight/2;"bottom"===t||"center"===t||(0,u.i)(t)?(c+=a.bottom,(0,u.b)(e.text)&&(c+=o.lineHeight*(e.text.length-1))):c+=a.top;const{titleX:d,titleY:g,maxWidth:m,rotation:x}=function rn(n,i,t,e){const{top:s,left:o,bottom:a,right:l,chart:c}=n,{chartArea:d,scales:g}=c;let x,y,M,m=0;const S=a-s,P=l-o;if(n.isHorizontal()){if(y=(0,u.a2)(e,o,l),(0,u.i)(t)){const O=Object.keys(t)[0];M=g[O].getPixelForValue(t[O])+S-i}else M="center"===t?(d.bottom+d.top)/2+S-i:Oi(n,t,i);x=l-o}else{if((0,u.i)(t)){const O=Object.keys(t)[0];y=g[O].getPixelForValue(t[O])-P+i}else y="center"===t?(d.left+d.right)/2-P+i:Oi(n,t,i);M=(0,u.a2)(e,a,s),m="left"===t?-u.H:u.H}return{titleX:y,titleY:M,maxWidth:x,rotation:m}}(this,c,t,l);(0,u.Z)(i,e.text,0,0,o,{color:e.color,maxWidth:m,rotation:x,textAlign:an(l,t,s),textBaseline:"middle",translation:[d,g]})}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i))}_layers(){const i=this.options,t=i.ticks&&i.ticks.z||0,e=(0,u.v)(i.grid&&i.grid.z,-1),s=(0,u.v)(i.border&&i.border.z,0);return this._isVisible()&&this.draw===Ot.prototype.draw?[{z:e,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]:[{z:t,draw:o=>{this.draw(o)}}]}getMatchingVisibleMetas(i){const t=this.chart.getSortedVisibleDatasetMetas(),e=this.axis+"AxisID",s=[];let o,a;for(o=0,a=t.length;o<a;++o){const l=t[o];l[e]===this.id&&(!i||l.type===i)&&s.push(l)}return s}_resolveTickFontOptions(i){const t=this.options.ticks.setContext(this.getContext(i));return(0,u.a0)(t.font)}_maxDigits(){const i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i}}class ye{constructor(i,t,e){this.type=i,this.scope=t,this.override=e,this.items=Object.create(null)}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype)}register(i){const t=Object.getPrototypeOf(i);let e;(function Ri(n){return"id"in n&&"defaults"in n})(t)&&(e=this.register(t));const s=this.items,o=i.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+i);return o in s||(s[o]=i,function Ei(n,i,t){const e=(0,u.a4)(Object.create(null),[t?u.d.get(t):{},u.d.get(i),n.defaults]);u.d.set(i,e),n.defaultRoutes&&function ln(n,i){Object.keys(i).forEac
1h(t=>{const e=t.split("."),s=e.pop(),o=[n].concat(e).join("."),a=i[t].split("."),l=a.pop(),c=a.join(".");u.d.route(o,s,c,l)})}(i,n.defaultRoutes),n.descriptors&&u.d.describe(i,n.descriptors)}(i,a,e),this.override&&u.d.override(i.id,i.overrides)),a}get(i){return this.items[i]}unregister(i){const t=this.items,e=i.id,s=this.scope;e in t&&delete t[e],s&&e in u.d[s]&&(delete u.d[s][e],this.override&&delete u.a3[e])}}class Fi{constructor(){this.controllers=new ye(pt,"datasets",!0),this.elements=new ye(ut,"elements"),this.plugins=new ye(Object,"plugins"),this.scales=new ye(Ot,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,e){[...t].forEach(s=>{const o=e||this._getRegistryForType(s);e||o.isForType(s)||o===this.plugins&&s.id?this._exec(i,o,s):(0,u.F)(s,a=>{const l=e||this._getRegistryForType(a);this._exec(i,l,a)})})}_exec(i,t,e){const s=(0,u.a5)(i);(0,u.Q)(e["before"+s],[],e),t[i](e),(0,u.Q)(e["after"+s],[],e)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){const e=this._typedRegistries[t];if(e.isForType(i))return e}return this.plugins}_get(i,t,e){const s=t.get(i);if(void 0===s)throw new Error('"'+i+'" is not a registered '+e+".");return s}}var gt=new Fi;class Ii{constructor(){this._init=[]}notify(i,t,e,s){"beforeInit"===t&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,"install"));const o=s?this._descriptors(i).filter(s):this._descriptors(i),a=this._notify(o,i,t,e);return"afterDestroy"===t&&(this._notify(o,i,"stop"),this._notify(this._init,i,"uninstall")),a}_notify(i,t,e,s){s=s||{};for(const o of i){const a=o.plugin;if(!1===(0,u.Q)(a[e],[t,s,o.options],a)&&s.cancelable)return!1}return!0}invalidate(){(0,u.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(i){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t}_createDescriptors(i,t){const e=i&&i.config,s=(0,u.v)(e.options&&e.options.plugins,{}),o=function cn(n){const i={},t=[],e=Object.keys(gt.plugins.items);for(let o=0;o<e.length;o++)t.push(gt.getPlugin(e[o]));const s=n.plugins||[];for(let o=0;o<s.length;o++){const a=s[o];-1===t.indexOf(a)&&(t.push(a),i[a.id]=!0)}return{plugins:t,localIds:i}}(e);return!1!==s||t?function Bi(n,{plugins:i,localIds:t},e,s){const o=[],a=n.getContext();for(const l of i){const c=l.id,d=zi(e[c],s);null!==d&&o.push({plugin:l,options:te(n.config,{plugin:l,local:t[c]},d,a)})}return o}(i,o,s,t):[]}_notifyStateChanges(i){const t=this._oldCache||[],e=this._cache,s=(o,a)=>o.filter(l=>!a.some(c=>l.plugin.id===c.plugin.id));this._notify(s(t,e),i,"stop"),this._notify(s(e,t),i,"start")}}function zi(n,i){return i||!1!==n?!0===n?{}:n:null}function te(n,{plugin:i,local:t},e,s){const o=n.pluginScopeKeys(i),a=n.getOptionScopes(e,o);return t&&i.defaults&&a.push(i.defaults),n.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ee(n,i){return((i.datasets||{})[n]||{}).indexAxis||i.indexAxis||(u.d.datasets[n]||{}).indexAxis||"x"}function Wi(n){if("x"===n||"y"===n||"r"===n)return n}function Ye(n){return"top"===n||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0}function $e(n,...i){if(Wi(n))return n;for(const t of i){const e=t.axis||Ye(t.position)||n.length>1&&Wi(n[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Hi(n,i,t){if(t[i+"AxisID"]===n)return{axis:i}}function Xe(n){const i=n.options||(n.options={});i.plugins=(0,u.v)(i.plugins,{}),i.scales=function un(n,i){const t=u.a3[n.type]||{scales:{}},e=i.scales||{},s=ee(n.type,i),o=Object.create(null);return Object.keys(e).forEach(a=>{const l=e[a];if(!(0,u.i)(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);
1const c=$e(a,l,function dn(n,i){if(i.data&&i.data.datasets){const t=i.data.datasets.filter(e=>e.xAxisID===n||e.yAxisID===n);if(t.length)return Hi(n,"x",t[0])||Hi(n,"y",t[0])}return{}}(a,n),u.d.scales[l.type]),d=function Vi(n,i){return n===i?"_index_":"_value_"}(c,s),g=t.scales||{};o[a]=(0,u.ab)(Object.create(null),[{axis:c},l,g[c],g[d]])}),n.data.datasets.forEach(a=>{const l=a.type||n.type,c=a.indexAxis||ee(l,i),g=(u.a3[l]||{}).scales||{};Object.keys(g).forEach(m=>{const x=function hn(n,i){let t=n;return"_index_"===n?t=i:"_value_"===n&&(t="x"===i?"y":"x"),t}(m,c),y=a[x+"AxisID"]||x;o[y]=o[y]||Object.create(null),(0,u.ab)(o[y],[{axis:x},e[y],g[m]])})}),Object.keys(o).forEach(a=>{const l=o[a];(0,u.ab)(l,[u.d.scales[l.type],u.d.scale])}),o}(n,i)}function ve(n){return(n=n||{}).datasets=n.datasets||[],n.labels=n.labels||[],n}const Ni=new Map,ji=new Set;function Me(n,i){let t=Ni.get(n);return t||(t=i(),Ni.set(n,t),ji.add(t)),t}const ie=(n,i,t)=>{const e=(0,u.f)(i,t);void 0!==e&&n.add(e)};class gn{constructor(i){this._config=function fn(n){return(n=n||{}).data=ve(n.data),Xe(n),n}(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=ve(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){const i=this._config;this.clearCache(),Xe(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return Me(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return Me(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return Me(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){const t=i.id;return Me(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){const e=this._scopeCache;let s=e.get(i);return(!s||t)&&(s=new Map,e.set(i,s)),s}getOptionScopes(i,t,e){const{options:s,type:o}=this,a=this._cachedScopes(i,e),l=a.get(t);if(l)return l;const c=new Set;t.forEach(g=>{i&&(c.add(i),g.forEach(m=>ie(c,i,m))),g.forEach(m=>ie(c,s,m)),g.forEach(m=>ie(c,u.a3[o]||{},m)),g.forEach(m=>ie(c,u.d,m)),g.forEach(m=>ie(c,u.a6,m))});const d=Array.from(c);return 0===d.length&&d.push(Object.create(null)),ji.has(t)&&a.set(t,d),d}chartOptionScopes(){const{options:i,type:t}=this;return[i,u.a3[t]||{},u.d.datasets[t]||{},{type:t},u.d,u.a6]}resolveNamedOptions(i,t,e,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:l}=Zi(this._resolverCache,i,s);let c=a;if(function mn(n,i){const{isScriptable:t,isIndexable:e}=(0,u.aa)(n);for(const s of i){const o=t(s),a=e(s),l=(a||o)&&n[s];if(o&&((0,u.a7)(l)||pn(l))||a&&(0,u.b)(l))return!0}return!1}(a,t)){o.$shared=!1,e=(0,u.a7)(e)?e():e;const d=this.createResolver(i,e,l);c=(0,u.a8)(a,e,d)}for(const d of t)o[d]=c[d];return o}createResolver(i,t,e=[""],s){const{resolver:o}=Zi(this._resolverCache,i,e);return(0,u.i)(t)?(0,u.a8)(o,t,void 0,s):o}}function Zi(n,i,t){let e=n.get(i);e||(e=new Map,n.set(i,e));const s=t.join();let o=e.get(s);return o||(o={resolver:(0,u.a9)(i,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},e.set(s,o)),o}const pn=n=>(0,u.i)(n)&&Object.getOwnPropertyNames(n).reduce((i,t)=>i||(0,u.a7)(n[t]),!1),xn=["top","bottom","left","right","chartArea"];function Yi(n,i){return"top"===n||"bottom"===n||-1===xn.indexOf(n)&&"x"===i}function $i(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}function ke(n){const i=n.chart,t=i.options.animation;i.notifyPlugins("afterRender"),(0,u.Q)(t&&t.onComplete,[n],i)}function Xi(n){const i=n.chart,t=i.options.animation;(0,u.Q)(t&&t.onProgress,[n],i)}function Ui(n){return(0,u.M)()&&"string"==typeof n?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Se={},Ki=n=>{const i=Ui(n);return Object.values(Se).filter(t=>t.canvas===i).pop()};function _n(n,i,t){const e=Object.keys(n);for(const s of e){const o=+s;if(o>=i){const a=n[s];delete n[s],(t>0||o>i)&&(n[o+t]=a)}}}let se=(()=>{class n{static register(...t){gt.add(...t),zt()}static unregister(...t){gt.remove(...t),zt()}constructor(t,e){const s=this.config=new gn(e),o=Ui(t),a=Ki(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const l=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||function Gs(n){return!(0,u.M)()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?Zs:Ci}(o)),this.platform.updateConfig(s);const c=this.platform.acquireContext(o,l.aspectRatio),d=c&&c.canvas,g=d&&d.height,m=d&&d.width;this.id=(0,u.ac)(),this.ctx=c,this.canvas=d,this.width=m,this.height=g,this._options=l,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 Ii,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,u.ad)(x=>this.update(x),l.resizeDelay||0),this._dataChanges=[],Se[this.id]=this,c&&d?(J.listen(this,"complete",ke),J.listen(this,"progress",Xi),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:o,_aspectRatio:a}=this;return(0,u.k)(t)?e&&a?a:o?s/o: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 gt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,u.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,u.af)(this.canvas,this.ctx),this}stop(){return J.stop(this),this}resize(t,e){J.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,l=this.platform.getMaximumSize(this.canvas,t,e,s.maintainAspectRatio&&this.aspectRatio),c=s.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,(0,u.ae)(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),(0,u.Q)(s.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){(0,u.F)(this.options.scales||{},(s,o)=>{s.id=o})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,o=Object.keys(s).reduce((l,c)=>(l[c]=!1,l),{});let a=[];e&&(a=a.concat(Object.keys(e).map(l=>{const c=e[l],d=$e(l,c),g="r"===d,m="x"===d;return{options:c,dposition:g?"chartArea":m?"bottom":"left",dtype:g?"radialLinear":m?"category":"linear"}}))),(0,u.F)(a,l=>{const c=l.options,d=c.id,g=$e(d,c),m=(0,u.v)(c.type,l.dtype);(void 0===c.position||Yi(c.position,g)!==Yi(l.dposition))&&(c.position=l.dposition),o[d]=!0;let x=null;d in s&&s[d].type===m?x=s[d]:(x=new(gt.getScale(m))({id:d,type:m,ctx:this.ctx,
1chart:this}),s[x.id]=x),x.init(c,t)}),(0,u.F)(o,(l,c)=>{l||delete s[c]}),(0,u.F)(s,l=>{G.configure(this,l,l.options),G.addBox(this,l)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>e){for(let o=e;o<s;++o)this._destroyDatasetMeta(o);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort($i("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,o)=>{0===e.filter(a=>a===s._dataset).length&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,o;for(this._removeUnreferencedMetasets(),s=0,o=e.length;s<o;s++){const a=e[s];let l=this.getDatasetMeta(s);const c=a.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(s),l=this.getDatasetMeta(s)),l.type=c,l.indexAxis=a.indexAxis||ee(c,this.options),l.order=a.order||0,l.index=s,l.label=""+a.label,l.visible=this.isDatasetVisible(s),l.controller)l.controller.updateIndex(s),l.controller.linkScales();else{const d=gt.getController(c),{datasetElementType:g,dataElementType:m}=u.d.datasets[c];Object.assign(d,{dataElementType:gt.getElement(m),datasetElementType:g&&gt.getElement(g)}),l.controller=new d(this,s),t.push(l.controller)}}return this._updateMetasets(),t}_resetElements(){(0,u.F)(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let g=0,m=this.data.datasets.length;g<m;g++){const{controller:x}=this.getDatasetMeta(g),y=!o&&-1===a.indexOf(x);x.buildOrUpdateElements(y),l=Math.max(+x.getMaxOverflow(),l)}l=this._minPadding=s.layout.autoPadding?l:0,this._updateLayout(l),o||(0,u.F)(a,g=>{g.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($i("z","_idx"));const{_active:c,_lastEvent:d}=this;d?this._eventHandler(d,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){(0,u.F)(this.scales,t=>{G.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!(0,u.ag)(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:o,count:a}of e)_n(t,o,"_removeElements"===s?-a:a)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=a=>new Set(t.filter(l=>l[0]===a).map((l,c)=>c+","+l.splice(1).join(","))),o=s(0);for(let a=1;a<e;a++)if(!(0,u.ag)(o,s(a)))return;return Array.from(o).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;G.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],(0,u.F)(this.boxes,o=>{s&&"chartArea"===o.position||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,(0,u.a7)(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),o={meta:s,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",o)&&(s.controller._update(e),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(J.has(this)?this.attached&&!J.running(this)&&J.start(this):(this.draw(),ke({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:o}=this._resizeBeforeDraw;this._resize(s,o),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let o,a;for(o=0,a=e.length;o<a;++o){const l=e[o];(!t||l.visible)&&s.push(l)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,o=!s.disabled,a=function Qi(n){const{xScale:i,yScale:t}=n;if(i&&t)return{left:i.left,right:i.right,top:t.top,bottom:t.bottom}}(t)||this.chartArea,l={meta:t,index:t.index,cancelable:!0};
1!1!==this.notifyPlugins("beforeDatasetDraw",l)&&(o&&(0,u.Y)(e,{left:!1===s.left?0:a.left-s.left,right:!1===s.right?this.width:a.right+s.right,top:!1===s.top?0:a.top-s.top,bottom:!1===s.bottom?this.height:a.bottom+s.bottom}),t.controller.draw(),o&&(0,u.$)(e),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return(0,u.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,o){const a=Ws.modes[e];return"function"==typeof a?a(this,t,s,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let o=s.filter(a=>a&&a._dataset===e).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=(0,u.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return"boolean"==typeof s.hidden?!s.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const o=s?"show":"hide",a=this.getDatasetMeta(t),l=a.controller._resolveAnimations(void 0,o);(0,u.h)(e)?(a.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),l.update(a,{visible:s}),this.update(c=>c.datasetIndex===t?o:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),J.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,u.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Se[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(a,l)=>{e.addEventListener(this,a,l),t[a]=l},o=(a,l,c)=>{a.offsetX=l,a.offsetY=c,this._eventHandler(a)};(0,u.F)(this.options.events,a=>s(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(d,g)=>{e.addEventListener(this,d,g),t[d]=g},o=(d,g)=>{t[d]&&(e.removeEventListener(this,d,g),delete t[d])},a=(d,g)=>{this.canvas&&this.resize(d,g)};let l;const c=()=>{o("attach",c),this.attached=!0,this.resize(),s("resize",a),s("detach",l)};l=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),s("attach",c)},e.isAttached(this.canvas)?c():l()}unbindEvents(){(0,u.F)(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},(0,u.F)(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const o=s?"set":"remove";let a,l,c,d;for("dataset"===e&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),c=0,d=t.length;c<d;++c){l=t[c];const g=l&&this.getDatasetMeta(l.datasetIndex).controller;g&&g[o+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:a,index:l})=>{const c=this.getDatasetMeta(a);if(!c)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:c.data[l],index:l}});!(0,u.ah)(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,s){const o=this.options.hover,a=(d,g)=>d.filter(m=>!g.some(x=>
1m.datasetIndex===x.datasetIndex&&m.index===x.index)),l=a(e,t),c=s?t:a(t,e);l.length&&this.updateHoverStyle(l,o.mode,!1),c.length&&o.mode&&this.updateHoverStyle(c,o.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=l=>(l.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",s,o))return;const a=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(a||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:o=[],options:a}=this,c=this._getActiveElements(t,o,s,e),d=(0,u.ai)(t),g=function yn(n,i,t,e){return t&&"mouseout"!==n.type?e?i:n:null}(t,this._lastEvent,s,d);s&&(this._lastEvent=null,(0,u.Q)(a.onHover,[t,c,this],this),d&&(0,u.Q)(a.onClick,[t,c,this],this));const m=!(0,u.ah)(c,o);return(m||e)&&(this._active=c,this._updateHoverStyles(c,o,e)),this._lastEvent=g,m}_getActiveElements(t,e,s,o){if("mouseout"===t.type)return[];if(!s)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return(0,T.Z)(n,"defaults",u.d),(0,T.Z)(n,"instances",Se),(0,T.Z)(n,"overrides",u.a3),(0,T.Z)(n,"registry",gt),(0,T.Z)(n,"version","4.3.0"),(0,T.Z)(n,"getChart",Ki),n})();function zt(){return(0,u.F)(se.instances,n=>n._plugins.invalidate())}function At(n,i,t,e){return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function we(n,i,t,e,s,o){const{x:a,y:l,startAngle:c,pixelMargin:d,innerRadius:g}=i,m=Math.max(i.outerRadius+e+t-d,0),x=g>0?g+e+t+d:0;let y=0;const M=s-c;if(e){const q=((g>0?g-e:0)+(m>0?m-e:0))/2;y=(M-(0!==q?M*q/(q+e):M))/2}const P=(M-Math.max(.001,M*m-t/u.P)/m)/2,O=c+P+y,C=s-P-y,{outerStart:E,outerEnd:F,innerStart:A,innerEnd:R}=function Ue(n,i,t,e){const s=function vn(n){return(0,u.ak)(n,["outerStart","outerEnd","innerStart","innerEnd"])}(n.options.borderRadius),o=(t-i)/2,a=Math.min(o,e*i/2),l=c=>{const d=(t-Math.min(o,c))*e/2;return(0,u.S)(c,0,Math.min(o,d))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:(0,u.S)(s.innerStart,0,a),innerEnd:(0,u.S)(s.innerEnd,0,a)}}(i,x,m,C-O),z=m-E,I=m-F,V=O+E/z,Z=C-F/I,j=x+A,Y=x+R,st=O+A/j,ft=C-R/Y;if(n.beginPath(),o){const X=(V+Z)/2;if(n.arc(a,l,m,V,X),n.arc(a,l,m,X,Z),F>0){const ot=At(I,Z,a,l);n.arc(ot.x,ot.y,F,Z,C+u.H)}const K=At(Y,C,a,l);if(n.lineTo(K.x,K.y),R>0){const ot=At(Y,ft,a,l);n.arc(ot.x,ot.y,R,C+u.H,ft+Math.PI)}const q=(C-R/x+(O+A/x))/2;if(n.arc(a,l,x,C-R/x,q,!0),n.arc(a,l,x,q,O+A/x,!0),A>0){const ot=At(j,st,a,l);n.arc(ot.x,ot.y,A,st+Math.PI,O-u.H)}const xt=At(z,O,a,l);if(n.lineTo(xt.x,xt.y),E>0){const ot=At(z,V,a,l);n.arc(ot.x,ot.y,E,O-u.H,V)}}else{n.moveTo(a,l);const X=Math.cos(V)*m+a,K=Math.sin(V)*m+l;n.lineTo(X,K);const q=Math.cos(Z)*m+a,xt=Math.sin(Z)*m+l;n.lineTo(q,xt)}n.closePath()}class Bt extends ut{constructor(i){super(),(0,T.Z)(this,"circumference",void 0),(0,T.Z)(this,"endAngle",void 0),(0,T.Z)(this,"fullCircles",void 0),(0,T.Z)(this,"innerRadius",void 0),(0,T.Z)(this,"outerRadius",void 0),(0,T.Z)(this,"pixelMargin",void 0),(0,T.Z)(this,"startAngle",void 0),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,t,e){const s=this.getProps(["x","y"],e),{angle:o,distance:a}=(0,u.D)(s,{x:i,y:t}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:g,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),x=(this.options.spacing+this.options.borderWidth)/2,M=(0,u.v)(m,c-l)>=u.T||(0,u.p)(o,l,c),S=(0,u.aj)(a,d+x,g+x);return M&&S}getCenterPoint(i){const{x:t,y:e,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:c,spacing:d}=this.options,g=(s+o)/2,m=(a+l+d+c)/2;return{x:t+Math.cos(g)*m,y:e+Math.sin(g)*m}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:t,circumference:e}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=e>u.T?Math.floor(e/u.T):0,0===e||this.innerRadius<0||this.outerRadius<0)return;i.save();const l=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(l)*s,Math.sin(l)*s);const d=s*(1-Math.sin(Math.min(u.P,e||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,function Mn(n,i,t,e,s){const{fullCircles:o,startAngle:a,circumference:l}=i;let c=i.endAngle;if(o){we(n,i,t,e,c,s);for(let d=0;d<o;++d)n.fill();isNaN(l)||(c=a+(l%u.T||u.T))}we(n,i,t,e,c,s),n.fill()}(i,this,d,o,a),function kn(n,i,t,e,s){const{fullCircles:o,startAngle:a,circumference:l,options:c}=i,{borderWidth:d,borderJoinStyle:g,borderDash:m,borderDashOffset:x}=c,y="inner"===c.borderAlign;if(!d)return;n.setLineDash(m||[]),n.lineDashOffset=x,y?(n.lineWidth=2*d,n.lineJoin=g||"round"):(n.lineWidth=d,n.lineJoin=g||"bevel");let M=i.endAngle;if(o){we(n,i,t,e,M,s);for(let S=0;S<o;++S)n.stroke();isNaN(l)||(M=a+(l%u.T||u.T))}y&&function qi(n,i,t){const{startAngle:e,pixelMargin:s,x:o,y:a,outerRadius:l,innerRadius:c}=i;let d=s/l;n.beginPath(),n.arc(o,a,l,e-d,t+d),c>
1s?(d=s/c,n.arc(o,a,c,t+d,e-d,!0)):n.arc(o,a,s,t+u.H,e-u.H),n.closePath(),n.clip()}(n,i,M),o||(we(n,i,t,e,M,s),n.stroke())}(i,this,d,o,a),i.restore()}}function Gi(n,i,t=i){n.lineCap=(0,u.v)(t.borderCapStyle,i.borderCapStyle),n.setLineDash((0,u.v)(t.borderDash,i.borderDash)),n.lineDashOffset=(0,u.v)(t.borderDashOffset,i.borderDashOffset),n.lineJoin=(0,u.v)(t.borderJoinStyle,i.borderJoinStyle),n.lineWidth=(0,u.v)(t.borderWidth,i.borderWidth),n.strokeStyle=(0,u.v)(t.borderColor,i.borderColor)}function Sn(n,i,t){n.lineTo(t.x,t.y)}function Qe(n,i,t={}){const e=n.length,{start:s=0,end:o=e-1}=t,{start:a,end:l}=i,c=Math.max(s,a),d=Math.min(o,l);return{count:e,start:c,loop:i.loop,ilen:d<c&&!(s<a&&o<a||s>l&&o>l)?e+d-c:d-c}}function wn(n,i,t,e){const{points:s,options:o}=i,{count:a,start:l,loop:c,ilen:d}=Qe(s,t,e),g=function Ke(n){return n.stepped?u.ar:n.tension||"monotone"===n.cubicInterpolationMode?u.as:Sn}(o);let y,M,S,{move:m=!0,reverse:x}=e||{};for(y=0;y<=d;++y)M=s[(l+(x?d-y:y))%a],!M.skip&&(m?(n.moveTo(M.x,M.y),m=!1):g(n,S,M,x,o.stepped),S=M);return c&&(M=s[(l+(x?d:0))%a],g(n,S,M,x,o.stepped)),!!c}function Pn(n,i,t,e){const s=i.points,{count:o,start:a,ilen:l}=Qe(s,t,e),{move:c=!0,reverse:d}=e||{};let x,y,M,S,P,O,g=0,m=0;const C=F=>(a+(d?l-F:F))%o,E=()=>{S!==P&&(n.lineTo(g,P),n.lineTo(g,S),n.lineTo(g,O))};for(c&&(y=s[C(0)],n.moveTo(y.x,y.y)),x=0;x<=l;++x){if(y=s[C(x)],y.skip)continue;const F=y.x,A=y.y,R=0|F;R===M?(A<S?S=A:A>P&&(P=A),g=(m*g+F)/++m):(E(),n.lineTo(F,A),M=R,m=0,S=P=A),O=A}E()}function Pe(n){const i=n.options;return n._decimated||n._loop||i.tension||"monotone"===i.cubicInterpolationMode||i.stepped||i.borderDash&&i.borderDash.length?wn:Pn}(0,T.Z)(Bt,"id","arc"),(0,T.Z)(Bt,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),(0,T.Z)(Bt,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,T.Z)(Bt,"descriptors",{_scriptable:!0,_indexable:n=>"borderDash"!==n});const On="function"==typeof Path2D;let ne=(()=>{class n extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;!s.tension&&"monotone"!==s.cubicInterpolationMode||s.stepped||this._pointsUpdated||((0,u.al)(this._points,s,t,s.spanGaps?this._loop:this._fullLoop,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,u.am)(this,this.options.segment))}first(){const t=this.segments;return t.length&&this.points[t[0].start]}last(){const t=this.segments,s=t.length;return s&&this.points[t[s-1].end]}interpolate(t,e){const s=this.options,o=t[e],a=this.points,l=(0,u.an)(this,{property:e,start:o,end:o});if(!l.length)return;const c=[],d=function Ji(n){return n.stepped?u.ao:n.tension||"monotone"===n.cubicInterpolationMode?u.ap:u.aq}(s);let g,m;for(g=0,m=l.length;g<m;++g){const{start:x,end:y}=l[g],M=a[x],S=a[y];if(M===S){c.push(M);continue}const O=d(M,S,Math.abs((o-M[e])/(S[e]-M[e])),s.stepped);O[e]=t[e],c.push(O)}return 1===c.length?c[0]:c}pathSegment(t,e,s){return Pe(this)(t,this,e,s)}path(t,e,s){const o=this.segments,a=Pe(this);let l=this._loop;e=e||0,s=s||this.points.length-e;for(const c of o)l&=a(t,this,c,{start:e,end:e+s-1});return!!l}draw(t,e,s,o){(this.points||[]).length&&(this.options||{}).borderWidth&&(t.save(),function Vt(n,i,t,e){On&&!i.options.segment?function Cn(n,i,t,e){let s=i._path;s||(s=i._path=new Path2D,i.path(s,t,e)&&s.closePath()),Gi(n,i.options),n.stroke(s)}(n,i,t,e):function Dn(n,i,t,e){const{segments:s,options:o}=i,a=Pe(i);for(const l of s)Gi(n,o,l.style),n.beginPath(),a(n,i,l,{start:t,end:t+e-1})&&n.closePath(),n.stroke()}(n,i,t,e)}(t,this,s,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return(0,T.Z)(n,"id","line"),(0,T.Z)(n,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,T.Z)(n,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,T.Z)(n,"descriptors",{_scriptable:!0,_indexable:i=>"borderDash"!==i&&"fill"!==i}),n})();function ts(n,i,t,e){const s=n.options,{[t]:o}=n.getProps([t],e);return Math.abs(i-o)<s.radius+s.hitRadius}let An=(()=>{class n extends ut{constructor(t){super(),(0,T.Z)(this,"parsed",void 0),(0,T.Z)(this,"skip",void 0),(0,T.Z)(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const o=this.options,{x:a,y:l}=this.getProps(["x","y"],s);return Math.pow(t-a,2)+Math.pow(e-l,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,e){return ts(this,t,"x",e)}inYRange(t,e){return ts(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const s=this.options;this.skip||s.radius<.1||!(0,u.C)(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,(0,u.at)(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}return(0,T.Z)(n,"id","point"),(0,T.Z)(n,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,T.Z)(n,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),n})();function es(n,i){const{x:t,y:e,base:s,width:o,height:a}=n.getProps(["x","y","base","width","height"],i);let l,c,d,g,m;return n.horizontal?(m=a/2,l=Math.min(t,s),c=Math.max(t,s),d=e-m,g=e+m):(m=o/2,l=t-m,c=t+m,d=Math.min(e,s),g=Math.max(e,s)),{left:l,top:d,right:c,bottom:g}}function Mt(n,i,t,e){return n?0:(0,u.S)(i,t,e)}function qe(n,i,t,e){const s=null===i,o=null===t,l=n&&!(s&&o)&&es(n,e);return l&&(s||(0,u.aj)(i,l.left,l.right))&&(o||(0,u.aj)(t,l.top,l.bottom))}function De(n,i){n.rect(i.x,i.y,i.w,i.h)}function Wt(n,i,t={}){const e=n.x!==t.x?-i:0,s=n.y!==t.y?-i:0;return{x:n.x+e,y:n.y+s,w:n.w+((n.x+n.w!==t.x+t.w?i:0)-e),h:n.h+((n.y+n.h!==t.y+t.h?i:0)-s),radius:n.radius}}class Oe extends ut{constructor(i){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmou
1nt=void 0,i&&Object.assign(this,i)}draw(i){const{inflateAmount:t,options:{borderColor:e,backgroundColor:s}}=this,{inner:o,outer:a}=function Ln(n){const i=es(n),t=i.right-i.left,e=i.bottom-i.top,s=function Ce(n,i,t){const s=n.borderSkipped,o=(0,u.av)(n.options.borderWidth);return{t:Mt(s.top,o.top,0,t),r:Mt(s.right,o.right,0,i),b:Mt(s.bottom,o.bottom,0,t),l:Mt(s.left,o.left,0,i)}}(n,t/2,e/2),o=function Tn(n,i,t){const{enableBorderRadius:e}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=(0,u.aw)(s),a=Math.min(i,t),l=n.borderSkipped,c=e||(0,u.i)(s);return{topLeft:Mt(!c||l.top||l.left,o.topLeft,0,a),topRight:Mt(!c||l.top||l.right,o.topRight,0,a),bottomLeft:Mt(!c||l.bottom||l.left,o.bottomLeft,0,a),bottomRight:Mt(!c||l.bottom||l.right,o.bottomRight,0,a)}}(n,t/2,e/2);return{outer:{x:i.left,y:i.top,w:t,h:e,radius:o},inner:{x:i.left+s.l,y:i.top+s.t,w:t-s.l-s.r,h:e-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))}}}}(this),l=function is(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}(a.radius)?u.au:De;i.save(),(a.w!==o.w||a.h!==o.h)&&(i.beginPath(),l(i,Wt(a,t,o)),i.clip(),l(i,Wt(o,-t,a)),i.fillStyle=e,i.fill("evenodd")),i.beginPath(),l(i,Wt(o,t)),i.fillStyle=s,i.fill(),i.restore()}inRange(i,t,e){return qe(this,i,t,e)}inXRange(i,t){return qe(this,i,null,t)}inYRange(i,t){return qe(this,null,i,t)}getCenterPoint(i){const{x:t,y:e,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],i);return{x:o?(t+s)/2:t,y:o?e:(e+s)/2}}getRange(i){return"x"===i?this.width/2:this.height/2}}(0,T.Z)(Oe,"id","bar"),(0,T.Z)(Oe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,T.Z)(Oe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var En=Object.freeze({__proto__:null,ArcElement:Bt,BarElement:Oe,LineElement:ne,PointElement:An});const bt=["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)"],ss=bt.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function ns(n){return bt[n%bt.length]}function os(n){return ss[n%ss.length]}function as(n){let i;for(i in n)if(n[i].borderColor||n[i].backgroundColor)return!0;return!1}var Tt={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,i,t){if(!t.enabled)return;const{data:{datasets:e},options:s}=n.config,{elements:o}=s;if(!t.forceOverride&&(as(e)||function zn(n){return n&&(n.borderColor||n.backgroundColor)}(s)||o&&as(o)))return;const a=function In(n){let i=0;return(t,e)=>{const s=n.getDatasetMeta(e).controller;s instanceof nt?i=function Ae(n,i){return n.backgroundColor=n.data.map(()=>ns(i++)),i}(t,i):s instanceof ue?i=function Fn(n,i){return n.backgroundColor=n.data.map(()=>os(i++)),i}(t,i):s&&(i=function Rn(n,i){return n.borderColor=ns(i),n.backgroundColor=os(i),++i}(t,i))}}(n);e.forEach(a)}};function rs(n){if(n._decimated){const i=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function ls(n){n.data.datasets.forEach(i=>{rs(i)})}var Hn={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,i,t)=>{if(!t.enabled)return void ls(n);const e=n.width;n.data.datasets.forEach((s,o)=>{const{_data:a,indexAxis:l}=s,c=n.getDatasetMeta(o),d=a||s.data;if("y"===(0,u.a)([l,n.options.indexAxis])||!c.controller.supportsDecimation)return;const g=n.scales[c.xAxisID];if("linear"!==g.type&&"time"!==g.type||n.options.parsing)return;let M,{start:m,count:x}=function Wn(n,i){const t=i.length;let s,e=0;const{iScale:o}=n,{min:a,max:l,minDefined:c,maxDefined:d}=o.getUserBounds();return c&&(e=(0,u.S)((0,u.B)(i,o.axis,a).lo,0,t-1)),s=d?(0,u.S)((0,u.B)(i,o.axis,l).hi+1,e,t)-e:t-e,{start:e,count:s}}(c,d);if(x<=(t.threshold||4*e))rs(s);else{switch((0,u.k)(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(S){this._data=S}})),t.algorithm){case"lttb":M=function Bn(n,i,t,e,s){const o=s.samples||e;if(o>=t)return n.slice(i,i+t);const a=[],l=(t-2)/(o-2);let c=0;const d=i+t-1;let m,x,y,M,S,g=i;for(a[c++]=n[g],m=0;m<o-2;m++){let C,P=0,O=0;const E=Math.floor((m+1)*l)+1+i,F=Math.min(Math.floor((m+2)*l)+1,t)+i,A=F-E;for(C=E;C<F;C++)P+=n[C].x,O+=n[C].y;P/=A,O/=A;const R=Math.floor(m*l)+1+i,z=Math.min(Math.floor((m+1)*l)+1,t)+i,{x:I,y:V}=n[g];for(y=M=-1,C=R;C<z;
1C++)M=.5*Math.abs((I-P)*(n[C].y-V)-(I-n[C].x)*(O-V)),M>y&&(y=M,x=n[C],S=C);a[c++]=x,g=S}return a[c++]=n[d],a}(d,m,x,e,t);break;case"min-max":M=function Vn(n,i,t,e){let a,l,c,d,g,m,x,y,M,S,s=0,o=0;const P=[],C=n[i].x,F=n[i+t-1].x-C;for(a=i;a<i+t;++a){l=n[a],c=(l.x-C)/F*e,d=l.y;const A=0|c;if(A===g)d<M?(M=d,m=a):d>S&&(S=d,x=a),s=(o*s+l.x)/++o;else{const R=a-1;if(!(0,u.k)(m)&&!(0,u.k)(x)){const z=Math.min(m,x),I=Math.max(m,x);z!==y&&z!==R&&P.push({...n[z],x:s}),I!==y&&I!==R&&P.push({...n[I],x:s})}a>0&&R!==y&&P.push(n[R]),P.push(l),g=A,o=0,M=S=d,m=x=y=a}}return P}(d,m,x,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=M}})},destroy(n){ls(n)}};function Te(n,i,t,e){if(e)return;let s=i[n],o=t[n];return"angle"===n&&(s=(0,u.ay)(s),o=(0,u.ay)(o)),{property:n,start:s,end:o}}function Ge(n,i,t){for(;i>n;i--){const e=t[i];if(!isNaN(e.x)&&!isNaN(e.y))break}return i}function Je(n,i,t,e){return n&&i?e(n[t],i[t]):n?n[t]:i?i[t]:0}function hs(n,i){let t=[],e=!1;return(0,u.b)(n)?(e=!0,t=n):t=function cs(n,i){const{x:t=null,y:e=null}=n||{},s=i.points,o=[];return i.segments.forEach(({start:a,end:l})=>{l=Ge(a,l,s);const c=s[a],d=s[l];null!==e?(o.push({x:c.x,y:e}),o.push({x:d.x,y:e})):null!==t&&(o.push({x:t,y:c.y}),o.push({x:t,y:d.y}))}),o}(n,i),t.length?new ne({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function ds(n){return n&&!1!==n.fill}function jn(n,i,t){let s=n[i].fill;const o=[i];let a;if(!t)return s;for(;!1!==s&&-1===o.indexOf(s);){if(!(0,u.g)(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Zn(n,i,t){const e=function $n(n){const i=n.options,t=i.fill;let e=(0,u.v)(t&&t.target,t);return void 0===e&&(e=!!i.backgroundColor),!1!==e&&null!==e&&(!0===e?"origin":e)}(n);if((0,u.i)(e))return!isNaN(e.value)&&e;let s=parseFloat(e);return(0,u.g)(s)&&Math.floor(s)===s?function us(n,i,t,e){return("-"===n||"+"===n)&&(t=i+t),!(t===i||t<0||t>=e)&&t}(e[0],i,s,t):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function f(n,i,t){const e=[];for(let s=0;s<t.length;s++){const o=t[s],{first:a,last:l,point:c}=p(o,i,"x");if(!(!c||a&&l))if(a)e.unshift(c);else if(n.push(c),!l)break}n.push(...e)}function p(n,i,t){const e=n.interpolate(i,t);if(!e)return{};const s=e[t],o=n.segments,a=n.points;let l=!1,c=!1;for(let d=0;d<o.length;d++){const g=o[d],m=a[g.start][t],x=a[g.end][t];if((0,u.aj)(s,m,x)){l=s===m,c=s===x;break}}return{first:l,last:c,point:e}}class b{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius}pathSegment(i,t,e){const{x:s,y:o,radius:a}=this;return i.arc(s,o,a,(t=t||{start:0,end:u.T}).end,t.start,!0),!e.bounds}
1interpolate(i){const{x:t,y:e,radius:s}=this,o=i.angle;return{x:t+Math.cos(o)*s,y:e+Math.sin(o)*s,angle:o}}}function L(n,i,t){const e=function _(n){const{chart:i,fill:t,line:e}=n;if((0,u.g)(t))return function v(n,i){const t=n.getDatasetMeta(i);return t&&n.isDatasetVisible(i)?t.dataset:null}(i,t);if("stack"===t)return function r(n){const{scale:i,index:t,line:e}=n,s=[],o=e.segments,a=e.points,l=function h(n,i){const t=[],e=n.getMatchingVisibleMetas("line");for(let s=0;s<e.length;s++){const o=e[s];if(o.index===i)break;o.hidden||t.unshift(o.dataset)}return t}(i,t);l.push(hs({x:null,y:i.bottom},e));for(let c=0;c<o.length;c++){const d=o[c];for(let g=d.start;g<=d.end;g++)f(s,a[g],l)}return new ne({points:s,options:{}})}(n);if("shape"===t)return!0;const s=function k(n){return(n.scale||{}).getPointPositionForValue?function D(n){const{scale:i,fill:t}=n,e=i.options,s=i.getLabels().length,o=e.reverse?i.max:i.min,a=function fs(n,i,t){let e;return e="start"===n?t:"end"===n?i.options.reverse?i.min:i.max:(0,u.i)(n)?n.value:i.getBaseValue(),e}(t,i,o),l=[];if(e.grid.circular){const c=i.getPointPositionForValue(0,o);return new b({x:c.x,y:c.y,radius:i.getDistanceFromCenterForValue(a)})}for(let c=0;c<s;++c)l.push(i.getPointPositionForValue(c,a));return l}(n):function w(n){const{scale:i={},fill:t}=n,e=function Yn(n,i){let t=null;return"start"===n?t=i.bottom:"end"===n?t=i.top:(0,u.i)(n)?t=i.getPixelForValue(n.value):i.getBasePixel&&(t=i.getBasePixel()),t}(t,i);if((0,u.g)(e)){const s=i.isHorizontal();return{x:s?e:null,y:s?null:e}}return null}(n)}(n);return s instanceof b?s:hs(s,e)}(i),{line:s,scale:o,axis:a}=i,l=s.options,c=l.fill,d=l.backgroundColor,{above:g=d,below:m=d}=c||{};e&&s.points.length&&((0,u.Y)(n,t),function W(n,i){const{line:t,target:e,above:s,below:o,area:a,scale:l}=i,c=t._loop?"angle":i.axis;n.save(),"x"===c&&o!==s&&(H(n,e,a.top),$(n,{line:t,target:e,color:s,scale:l,property:c}),n.restore(),n.save(),H(n,e,a.bottom)),$(n,{line:t,target:e,color:o,scale:l,property:c}),n.restore()}(n,{line:s,target:e,above:g,below:m,area:t,scale:o,axis:a}),(0,u.$)(n))}function H(n,i,t){const{segments:e,points:s}=i;let o=!0,a=!1;n.beginPath();for(const l of e){const{start:c,end:d}=l,g=s[c],m=s[Ge(c,d,s)];o?(n.moveTo(g.x,g.y),o=!1):(n.lineTo(g.x,t),n.lineTo(g.x,g.y)),a=!!i.pathSegment(n,l,{move:a}),a?n.closePath():n.lineTo(m.x,t)}n.lineTo(i.first().x,t),n.closePath(),n.clip()}function $(n,i){const{line:t,target:e,property:s,color:o,scale:a}=i,l=function Nn(n,i,t){const e=n.segments,s=n.points,o=i.points,a=[];for(const l of e){let{start:c,end:d}=l;d=Ge(c,d,s);const g=Te(t,s[c],s[d],l.loop);if(!i.segments){a.push({source:l,target:g,start:s[c],end:s[d]});continue}const m=(0,u.an)(i,g);for(const x of m){const y=Te(t,o[x.start],o[x.end],x.loop),M=(0,u.ax)(l,s,y);for(const S of M)a.push({source:S,target:x,start:{[t]:Je(g,y,"start",Math.max)},end:{[t]:Je(g,y,"end",Math.min)}})}}return a}(t,e,s);for(const{source:c,target:d,start:g,end:m}of l){const{style:{backgroundColor:x=o}={}}=c,y=!0!==e;n.save(),n.fillStyle=x,Q(n,a,y&&Te(s,g,m)),n.beginPath();const M=!!t.pathSegment(n,c);let S;if(y){M?n.closePath():N(n,e,m,s);const P=!!e.pathSegment(n,d,{move:M,reverse:!0});S=M&&P,S||N(n,e,g,s)}n.closePath(),n.fill(S?"evenodd":"nonzero"),n.restore()}}function Q(n,i,t){const{top:e,bottom:s}=i.chart.chartArea,{property:o,start:a,end:l}=t||{};"x"===o&&(n.beginPath(),n.rect(a,e,l-a,s-e),n.clip())}function N(n,i,t,e){const s=i.interpolate(t,e);s&&n.lineTo(s.x,s.y)}var B={id:"filler",afterDatasetsUpdate(n,i,t){const e=(n.data.datasets||[]).length,s=[];let o,a,l,c;for(a=0;a<e;++a)o=n.getDatasetMeta(a),l=o.dataset,c=null,l&&l.options&&l instanceof ne&&(c={visible:n.isDatasetVisible(a),index:a,fill:Zn(l,a,e),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:l}),o.$filler=c,s.push(c);for(a=0;a<e;++a)c=s[a],c&&!1!==c.fill&&(c.fill=jn(s,a,t.propagate))},beforeDraw(n,i,t){const e="beforeDraw"===t.drawTime,s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let a=s.length-1;a>=0;--a){const l=s[a].$filler;l&&(l.line.updateControlPoints(o,l.axis),e&&l.fill&&L(n.ctx,l,o))}},beforeDatasetsDraw(n,i,t){if("beforeDatasetsDraw"!==t.drawTime)return;const e=n.getSortedVisibleDatasetMetas();for(let s=e.length-1;s>=0;--s){const o=e[s].$filler;ds(o)&&L(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,i,t){const e=i.meta.$filler;!ds(e)||"beforeDatasetDraw"!==t.drawTime||L(n.ctx,e,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const it=(n,i)=>{let{boxHeight:t=i,boxWidth:e=i}=n;return n.usePointStyle&&(t=Math.min(t,i),e=n.pointStyleWidth||Math.min(e,i)),{boxWidth:e,boxHeight:t,itemHeight:Math.max(i,t)}};class Nt extends ut{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t,e){this.maxWidth=i,this.maxHeight=t,this._margins=e,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 i=this.options.labels||{};let t=(0,u.Q)(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(e=>i.filter(e,this.chart.data))),i.sort&&(t=t.sort((e,s)=>i.sort(e,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:t}=this;if(!i.display)return void(this.width=this.height=0);const e=i.labels,s=(0,u.a0)(e.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=it(e,o);let d,g;t.font=s.string,this.isHorizontal()?(d=this.maxWidth,g=this._fitRows(a,o,l,c)+10):(g=this.maxHeight,d=this._fitCols(a,s,l,c)+10),this.width=Math.min(d,i.maxWidth||this.maxWidth),this.height=Math.min(g,i.maxHeight||this.maxHeight)}_fitRows(i,t,e,s){const{ctx:o,maxWidth:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],g=s+l;let m=i;o.textAlign="left",o.textBaseline="middle";let x=-1,y=-g;
1return this.legendItems.forEach((M,S)=>{const P=e+t/2+o.measureText(M.text).width;(0===S||d[d.length-1]+P+2*l>a)&&(m+=g,d[d.length-(S>0?0:1)]=0,y+=g,x++),c[S]={left:0,top:y,row:x,width:P,height:s},d[d.length-1]+=P+l}),m}_fitCols(i,t,e,s){const{ctx:o,maxHeight:a,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],g=a-i;let m=l,x=0,y=0,M=0,S=0;return this.legendItems.forEach((P,O)=>{const{itemWidth:C,itemHeight:E}=function Xn(n,i,t,e,s){const o=function Un(n,i,t,e){let s=n.text;return s&&"string"!=typeof s&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),i+t.size/2+e.measureText(s).width}(e,n,i,t),a=function Kn(n,i,t){let e=n;return"string"!=typeof i.text&&(e=gs(i,t)),e}(s,e,i.lineHeight);return{itemWidth:o,itemHeight:a}}(e,t,o,P,s);O>0&&y+E+2*l>g&&(m+=x+l,d.push({width:x,height:y}),M+=x+l,S++,x=y=0),c[O]={left:M,top:y,col:S,width:C,height:E},x=Math.max(x,C),y+=E+l}),m+=x,d.push({width:x,height:y}),m}adjustHitBoxes(){if(!this.options.display)return;const i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:e,labels:{padding:s},rtl:o}}=this,a=(0,u.az)(o,this.left,this.width);if(this.isHorizontal()){let l=0,c=(0,u.a2)(e,this.left+s,this.right-this.lineWidths[l]);for(const d of t)l!==d.row&&(l=d.row,c=(0,u.a2)(e,this.left+s,this.right-this.lineWidths[l])),d.top+=this.top+i+s,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+s}else{let l=0,c=(0,u.a2)(e,this.top+i+s,this.bottom-this.columnSizes[l].height);for(const d of t)d.col!==l&&(l=d.col,c=(0,u.a2)(e,this.top+i+s,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+s,d.left
1=a.leftForLtr(a.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const i=this.ctx;(0,u.Y)(i,this),this._draw(),(0,u.$)(i)}}_draw(){const{options:i,columnSizes:t,lineWidths:e,ctx:s}=this,{align:o,labels:a}=i,l=u.d.color,c=(0,u.az)(i.rtl,this.left,this.width),d=(0,u.a0)(a.font),{padding:g}=a,m=d.size,x=m/2;let y;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:M,boxHeight:S,itemHeight:P}=it(a,m),E=this.isHorizontal(),F=this._computeTitleHeight();y=E?{x:(0,u.a2)(o,this.left+g,this.right-e[0]),y:this.top+g+F,line:0}:{x:this.left+g,y:(0,u.a2)(o,this.top+F+g,this.bottom-t[0].height),line:0},(0,u.aA)(this.ctx,i.textDirection);const A=P+g;this.legendItems.forEach((R,z)=>{s.strokeStyle=R.fontColor,s.fillStyle=R.fontColor;const I=s.measureText(R.text).width,V=c.textAlign(R.textAlign||(R.textAlign=a.textAlign)),Z=M+x+I;let j=y.x,Y=y.y;c.setWidth(this.width),E?z>0&&j+Z+g>this.right&&(Y=y.y+=A,y.line++,j=y.x=(0,u.a2)(o,this.left+g,this.right-e[y.line])):z>0&&Y+A>this.bottom&&(j=y.x=j+t[y.line].width+g,y.line++,Y=y.y=(0,u.a2)(o,this.top+F+g,this.bottom-t[y.line].height)),function(R,z,I){if(isNaN(M)||M<=0||isNaN(S)||S<0)return;s.save();const V=(0,u.v)(I.lineWidth,1);if(s.fillStyle=(0,u.v)(I.fillStyle,l),s.lineCap=(0,u.v)(I.lineCap,"butt"),s.lineDashOffset=(0,u.v)(I.lineDashOffset,0),s.lineJoin=(0,u.v)(I.lineJoin,"miter"),s.lineWidth=V,s.strokeStyle=(0,u.v)(I.strokeStyle,l),s.setLineDash((0,u.v)(I.lineDash,[])),a.usePointStyle){const Z={radius:S*Math.SQRT2/2,pointStyle:I.pointStyle,rotation:I.rotation,borderWidth:V},j=c.xPlus(R,M/2);(0,u.aD)(s,Z,j,z+x,a.pointStyleWidth&&M)}else{const Z=z+Math.max((m-S)/2,0),j=c.leftForLtr(R,M),Y=(0,u.aw)(I.borderRadius);s.beginPath(),Object.values(Y).some(st=>0!==st)?(0,u.au)(s,{x:j,y:Z,w:M,h:S,radius:Y}):s.rect(j,Z,M,S),s.fill(),0!==V&&s.stroke()}s.restore()}(c.x(j),Y,R),j=(0,u.aB)(V,j+M+x,E?j+Z:this.right,i.rtl),function(R,z,I){(0,u.Z)(s,I.text,R,z+P/2,d,{strikethrough:I.hidden,textAlign:c.textAlign(I.textAlign)})}(c.x(j),Y,R),E?y.x+=Z+g:y.y+="string"!=typeof R.text?gs(R,d.lineHeight):A}),(0,u.aC)(this.ctx,i.textDirection)}drawTitle(){const i=this.options,t=i.title,e=(0,u.a0)(t.font),s=(0,u.E)(t.padding);if(!t.display)return;const o=(0,u.az)(i.rtl,this.left,this.width),a=this.ctx,l=t.position,d=s.top+e.size/2;let g,m=this.left,x=this.width;if(this.isHorizontal())x=Math.max(...this.lineWidths),g=this.top+d,m=(0,u.a2)(i.align,m,this.right-x);else{const M=this.columnSizes.reduce((S,P)=>
1Math.max(S,P.height),0);g=d+(0,u.a2)(i.align,this.top,this.bottom-M-i.labels.padding-this._computeTitleHeight())}const y=(0,u.a2)(l,m,m+x);a.textAlign=o.textAlign((0,u.a1)(l)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=e.string,(0,u.Z)(a,t.text,y,g,e)}_computeTitleHeight(){const i=this.options.title,t=(0,u.a0)(i.font),e=(0,u.E)(i.padding);return i.display?t.lineHeight+e.height:0}_getLegendItemAt(i,t){let e,s,o;if((0,u.aj)(i,this.left,this.right)&&(0,u.aj)(t,this.top,this.bottom))for(o=this.legendHitBoxes,e=0;e<o.length;++e)if(s=o[e],(0,u.aj)(i,s.left,s.left+s.width)&&(0,u.aj)(t,s.top,s.top+s.height))return this.legendItems[e];return null}handleEvent(i){const t=this.options;if(!function jt(n,i){return!(("mousemove"!==n&&"mouseout"!==n||!i.onHover&&!i.onLeave)&&(!i.onClick||"click"!==n&&"mouseup"!==n))}(i.type,t))return;const e=this._getLegendItemAt(i.x,i.y);if("mousemove"===i.type||"mouseout"===i.type){const s=this._hoveredItem,o=((n,i)=>null!==n&&null!==i&&n.datasetIndex===i.datasetIndex&&n.index===i.index)(s,e);s&&!o&&(0,u.Q)(t.onLeave,[i,s,this],this),this._hoveredItem=e,e&&!o&&(0,u.Q)(t.onHover,[i,e,this],this)}else e&&(0,u.Q)(t.onClick,[i,e,this],this)}}function gs(n,i){return i*(n.text?n.text.length+.5:0)}var ps={id:"legend",_element:Nt,start(n,i,t){const e=n.legend=new Nt({ctx:n.ctx,options:t,chart:n});G.configure(n,e,t),G.addBox(n,e)},stop(n){G.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,i,t){const e=n.legend;G.configure(n,e,t),e.options=t},afterUpdate(n){const i=n.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(n,i){i.replay||n.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,i,t){const e=i.datasetIndex,s=t.chart;s.isDatasetVisible(e)?(s.hide(e),i.hidden=!0):(s.show(e),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const i=n.data.datasets,{labels:{usePointStyle:t,pointStyle:e,textAlign:s,color:o,useBorderRadius:a,borderRadius:l}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(t?0:void 0),g=(0,u.E)(d.borderWidth);return{text:i[c.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(g.width+g.height)/4,strokeStyle:d.borderColor,pointStyle:e||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class Qn extends ut{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t){const e=this.options;if(this.left=0,this.top=0,!e.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=i,this.height=this.bottom=t;const s=(0,u.b)(e.text)?e.text.length:1;this._padding=(0,u.E)(e.padding);const o=s*(0,u.a0)(e.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const i=this.options.position;return"top"===i||"bottom"===i}_drawArgs(i){const{top:t,left:e,bottom:s,right:o,options:a}=this,l=a.align;let d,g,m,c=0;return this.isHorizontal()?(g=(0,u.a2)(l,e,o),m=t+i,d=o-e):("left"===a.position?(g=e+i,m=(0,u.a2)(l,s,t),c=-.5*u.P):(g=o-i,m=(0,u.a2)(l,t,s),c=.5*u.P),d=s-t),{titleX:g,titleY:m,maxWidth:d,rotation:c}}draw(){const i=this.ctx,t=this.options;if(!t.display)return;const e=(0,u.a0)(t.font),o=e.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(o);(0,u.Z)(i,t.text,0,0,e,{color:t.color,maxWidth:c,rotation:d,textAlign:(0,u.a1)(t.align),textBaseline:"middle",translation:[a,l]})}}var Po={id:"title",_element:Qn,start(n,i,t){!function wo(n,i){const t=new Qn({ctx:n.ctx,options:i,chart:n});G.configure(n,t,i),G.addBox(n,t),n.titleBlock=t}(n,t)},stop(n){G.removeBox(n,n.titleBlock),delete n.titleBlock},beforeUpdate(n,i,t){const e=n.titleBlock;G.configure(n,e,t),e.options=t},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 ms=new WeakMap;var Co={id:"subtitle",start(n,i,t){const e=new Qn({ctx:n.ctx,options:t,chart:n});G.configure(n,e,t),G.addBox(n,e),ms.set(n,e)},stop(n){G.removeBox(n,ms.get(n)),ms.delete(n)},beforeUpdate(n,i,t){const e=ms.get(n);G.configure(n,e,t),e.options=t},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 ti={average(n){if(!n.length)return!1;let i,t,e=0,s=0,o=0;for(i=0,t=n.length;i<t;++i){const a=n[i].element;if(a&&a.hasValue()){const l=a.tooltipPosition();e+=l.x,s+=l.y,++o}}return{x:e/o,y:s/o}},nearest(n,i){if(!n.length)return!1;let o,a,l,t=i.x,e=i.y,s=Number.POSITIVE_INFINITY;for(o=0,a=n.length;o<a;++o){const c=n[o].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),g=(0,u.aE)(i,d);g<s&&(s=g,l=c)}}if(l){const c=l.tooltipPosition();t=c.x,e=c.y}return{x:t,y:e}}};function kt(n,i){return i&&((0,u.b)(i)?Array.prototype.push.apply(n,i):n.push(i)),n}function Lt(n){return("string"==typeof n||n instanceof String)&&n.indexOf("\n")>-1?n.split("\n"):n}function Do(n,i){const{element:t,datasetIndex:e,index:s}=i,o=n.getDatasetMeta(e).controller,{label:a,value:l}=o.getLabelAndValue(s);return{chart:n,label:a,parsed:o.getParsed(s),raw:n.data.datasets[e].data[s],formattedValue:l,dataset:o.getDataset(),dataIndex:s,datasetIndex:e,element:t}}function ao(n,i){const t=n.chart.ctx,{body:e,footer:s,title:o}=n,{boxWidth:a,boxHeight:l}=i,c=(0,u.a0)(i.bodyFont),d=(0,u.a0)(i.titleFont),g=(0,u.a0)(i.footerFont),m=o.length,x=s.length,y=e.length,M=(0,u.E)(i.padding);let S=M.height,P=0,O=e.reduce((F,A)=>F+A.before.length+A.lines.length+A.after.length,0);O+=n.beforeBody.length+n.afterBody.length,m&&(S+=m*d.lineHeight+(m-1)*i.titleSpacing+i.titleMarginBottom),O&&(S+=y*(i.displayColors?Math.max(l,c.lineHeight):c.lineHeight)+(O-y)
1*c.lineHeight+(O-1)*i.bodySpacing),x&&(S+=i.footerMarginTop+x*g.lineHeight+(x-1)*i.footerSpacing);let C=0;const E=function(F){P=Math.max(P,t.measureText(F).width+C)};return t.save(),t.font=d.string,(0,u.F)(n.title,E),t.font=c.string,(0,u.F)(n.beforeBody.concat(n.afterBody),E),C=i.displayColors?a+2+i.boxPadding:0,(0,u.F)(e,F=>{(0,u.F)(F.before,E),(0,u.F)(F.lines,E),(0,u.F)(F.after,E)}),C=0,t.font=g.string,(0,u.F)(n.footer,E),t.restore(),P+=M.width,{width:P,height:S}}function To(n,i,t,e){const{x:s,width:o}=t,{width:a,chartArea:{left:l,right:c}}=n;let d="center";return"center"===e?d=s<=(l+c)/2?"left":"right":s<=o/2?d="left":s>=a-o/2&&(d="right"),function Ao(n,i,t,e){const{x:s,width:o}=e,a=t.caretSize+t.caretPadding;if("left"===n&&s+o+a>i.width||"right"===n&&s-o-a<0)return!0}(d,n,i,t)&&(d="center"),d}function ro(n,i,t){const e=t.yAlign||i.yAlign||function Oo(n,i){const{y:t,height:e}=i;return t<e/2?"top":t>n.height-e/2?"bottom":"center"}(n,t);return{xAlign:t.xAlign||i.xAlign||To(n,i,t,e),yAlign:e}}function lo(n,i,t,e){const{caretSize:s,caretPadding:o,cornerRadius:a}=n,{xAlign:l,yAlign:c}=t,d=s+o,{topLeft:g,topRight:m,bottomLeft:x,bottomRight:y}=(0,u.aw)(a);let M=function Lo(n,i){let{x:t,width:e}=n;return"right"===i?t-=e:"center"===i&&(t-=e/2),t}(i,l);const S=function Eo(n,i,t){let{y:e,height:s}=n;return"top"===i?e+=t:e-="bottom"===i?s+t:s/2,e}(i,c,d);return"center"===c?"left"===l?M+=d:"right"===l&&(M-=d):"left"===l?M-=Math.max(g,x)+s:"right"===l&&(M+=Math.max(m,y)+s),{x:(0,u.S)(M,0,e.width-i.width),y:(0,u.S)(S,0,e.height-i.height)}}function bs(n,i,t){const e=(0,u.E)(t.padding);return"center"===i?n.x+n.width/2:"right"===i?n.x+n.width-e.right:n.x+e.left}function co(n){return kt([],Lt(n))}function ho(n,i){const t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?n.override(t):n}const uo={beforeTitle:u.aF,title(n){if(n.length>0){const i=n[0],t=i.chart.data.labels,e=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(e>0&&i.dataIndex<e)return t[i.dataIndex]}return""},afterTitle:u.aF,beforeBody:u.aF,beforeLabel:u.aF,label(n){if(this&&this.options&&"dataset"===this.options.mode)return n.label+": "+n.formattedValue||n.formattedValue;let i=n.dataset.label||"";i&&(i+=": ");const t=n.formattedValue;return(0,u.k)(t)||(i+=t),i},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:u.aF,afterBody:u.aF,beforeFooter:u.aF,footer:u.aF,afterFooter:u.aF};function lt(n,i,t,e){const s=n[i].call(t,e);return typeof s>"u"?uo[i].call(t,e):s}let fo=(()=>{class n extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&e.options.animation&&s.animations,a=new ri(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=function Ro(n,i,t){return(0,u.j)(n,{tooltip:i,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,o=lt(s,"beforeTitle",this,t),a=lt(s,"title",this,t),l=lt(s,"afterTitle",this,t);let c=[];return c=kt(c,Lt(o)),c=kt(c,Lt(a)),c=kt(c,Lt(l)),c}getBeforeBody(t,e){return co(lt(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,o=[];return(0,u.F)(t,a=>{const l={before:[],lines:[],after:[]},c=ho(s,a);kt(l.before,Lt(lt(c,"beforeLabel",this,a))),kt(l.lines,lt(c,"label",this,a)),kt(l.after,Lt(lt(c,"afterLabel",this,a))),o.push(l)}),o}getAfterBody(t,e){return co(lt(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,o=lt(s,"beforeFooter",this,t),a=lt(s,"footer",this,t),l=lt(s,"afterFooter",this,t);let c=[];return c=kt(c,Lt(o)),c=kt(c,Lt(a)),c=kt(c,Lt(l)),c}_createItems(t){const e=this._active,s=this.chart.data,o=[],a=[],l=[];let d,g,c=[];for(d=0,g=e.length;d<g;++d)c.push(Do(this.chart,e[d]));return t.filter&&(c=c.filter((m,x,y)=>t.filter(m,x,y,s))),t.itemSort&&(c=c.sort((m,x)=>t.itemSort(m,x,s))),(0,u.F)(c,m=>{const x=ho(t.callbacks,m);o.push(lt(x,"labelColor",this,m)),a.push(lt(x,"labelPointStyle",this,m)),l.push(lt(x,"labelTextColor",this,m))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=l,this.dataPoints=c,c}update(t,e){const s=this.options.setContext(this.getContext()),o=this._active;let a,l=[];
1if(o.length){const c=ti[s.position].call(this,o,this._eventPosition);l=this._createItems(s),this.title=this.getTitle(l,s),this.beforeBody=this.getBeforeBody(l,s),this.body=this.getBody(l,s),this.afterBody=this.getAfterBody(l,s),this.footer=this.getFooter(l,s);const d=this._size=ao(this,s),g=Object.assign({},c,d),m=ro(this.chart,s,g),x=lo(s,g,m,this.chart);this.xAlign=m.xAlign,this.yAlign=m.yAlign,a={opacity:1,x:x.x,y:x.y,width:d.width,height:d.height,caretX:c.x,caretY:c.y}}else 0!==this.opacity&&(a={opacity:0});this._tooltipItems=l,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,o){const a=this.getCaretPosition(t,s,o);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,s){const{xAlign:o,yAlign:a}=this,{caretSize:l,cornerRadius:c}=s,{topLeft:d,topRight:g,bottomLeft:m,bottomRight:x}=(0,u.aw)(c),{x:y,y:M}=t,{width:S,height:P}=e;let O,C,E,F,A,R;return"center"===a?(A=M+P/2,"left"===o?(O=y,C=O-l,F=A+l,R=A-l):(O=y+S,C=O+l,F=A-l,R=A+l),E=O):(C="left"===o?y+Math.max(d,m)+l:"right"===o?y+S-Math.max(g,x)-l:this.caretX,"top"===a?(F=M,A=F-l,O=C-l,E=C+l):(F=M+P,A=F+l,O=C+l,E=C-l),R=F),{x1:O,x2:C,x3:E,y1:F,y2:A,y3:R}}drawTitle(t,e,s){const o=this.title,a=o.length;let l,c,d;if(a){const g=(0,u.az)(s.rtl,this.x,this.width);for(t.x=bs(this,s.titleAlign,s),e.textAlign=g.textAlign(s.titleAlign),e.textBaseline="middle",l=(0,u.a0)(s.titleFont),c=s.titleSpacing,e.fillStyle=s.titleColor,e.font=l.string,d=0;d<a;++d)e.fillText(o[d],g.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+c,d+1===a&&(t.y+=s.titleMarginBottom-c)}}_drawColorBox(t,e,s,o,a){const l=this.labelColors[s],c=this.labelPointStyles[s],{boxHeight:d,boxWidth:g}=a,m=(0,u.a0)(a.bodyFont),x=bs(this,"left",a),y=o.x(x),S=e.y+(d<m.lineHeight?(m.lineHeight-d)/2:0);if(a.usePointStyle){const P={radius:Math.min(g,d)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},O=o.leftForLtr(y,g)+g/2,C=S+d/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,(0,u.at)(t,P,O,C),t.strokeStyle=l.borderColor,t.fillStyle=l.backgroundColor,(0,u.at)(t,P,O,C)}else{t.lineWidth=(0,u.i)(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,t.strokeStyle=l.borderColor,t.setLineDash(l.borderDash||[]),t.lineDashOffset=l.borderDashOffset||0;const P=o.leftForLtr(y,g),O=o.leftForLtr(o.xPlus(y,1),g-2),C=(0,u.aw)(l.borderRadius);Object.values(C).some(E=>0!==E)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,(0,u.au)(t,{x:P,y:S,w:g,h:d,radius:C}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),(0,u.au)(t,{x:O,y:S+1,w:g-2,h:d-2,radius:C}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(P,S,g,d),t.strokeRect(P,S,g,d),t.fillStyle=l.backgroundColor,t.fillRect(O,S+1,g-2,d-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:o}=this,{bodySpacing:a,bodyAlign:l,displayColors:c,boxHeight:d,boxWidth:g,boxPadding:m}=s,x=(0,u.a0)(s.bodyFont);let y=x.lineHeight,M=0;const S=(0,u.az)(s.rtl,this.x,this.width),P=function(V){e.fillText(V,S.x(t.x+M),t.y+y/2),t.y+=y+a},O=S.textAlign(l);let C,E,F,A,R,z,I;for(e.textAlign=l,e.textBaseline="middle",e.font=x.string,t.x=bs(this,O,s),e.fillStyle=s.bodyColor,(0,u.F)(this.beforeBody,P),M=c&&"right"!==O?"center"===l?g/2+m:g+2+m:0,A=0,z=o.length;A<z;++A){for(C=o[A],E=this.labelTextColors[A],e.fillStyle=E,(0,u.F)(C.before,P),F=C.lines,c&&F.length&&(this._drawColorBox(e,t,A,S,s),y=Math.max(x.lineHeight,d)),R=0,I=F.length;R<I;++R)P(F[R]),y=x.lineHeight;(0,u.F)(C.after,P)}M=0,y=x.lineHeight,(0,u.F)(this.afterBody,P),t.y-=a}drawFooter(t,e,s){const o=this.footer,a=o.length;let l,c;if(a){const d=(0,u.az)(s.rtl,this.x,this.width);for(t.x=bs(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=d.textAlign(s.footerAlign),e.textBaseline="middle",l=(0,u.a0)(s.footerFont),e.fillStyle=s.footerColor,e.font=l.string,c=0;c<a;++c)e.fillText(o[c],d.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+s.footerSpacing}}drawBackground(t,e,s,o){const{xAlign:a,yAlign:l}=this,{x:c,y:d}=t,{width:g,height:m}=s,{topLeft:x,topRight:y,bottomLeft:M,bottomRight:S}=(0,u.aw)(o.cornerRadius);e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.beginPath(),e.moveTo(c+x,d),"top"===l&&this.drawCaret(t,e,s,o),e.lineTo(c+g-y,d),e.quadraticCurveTo(c+g,d,c+g,d+y),"center"===l&&"right"===a&&this.drawCaret(t,e,s,o),e.lineTo(c+g,d+m-S),e.quadraticCurveTo(c+g,d+m,c+g-S,d+m),"bottom"===l&&this.drawCaret(t,e,s,o),e.lineTo(c+M,d+m),e.quadraticCurveTo(c,d+m,c,d+m-M),"center"===l&&"left"===a&&this.drawCaret(t,e,s,o),e.lineTo(c,d+x),e.quadraticCurveTo(c,d,c+x,d),e.closePath(),e.fill(),o.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){const l=ti[t.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=ao(this,t),d=Object.assign({},l,this._size),g=ro(e,t,d),m=lo(t,d,g,e);(o._to!==m.x||a._to!==m.y)&&(this.xAlign=g.xAlign,this.yAlign=g.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,m))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const l=(0,u.E)(e.padding);e.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=s,this.drawBackgroun
1d(a,t,o,e),(0,u.aA)(t,e.textDirection),a.y+=l.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),(0,u.aC)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,o=t.map(({datasetIndex:c,index:d})=>{const g=this.chart.getDatasetMeta(c);if(!g)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:g.data[d],index:d}}),a=!(0,u.ah)(s,o),l=this._positionChanged(o,e);(a||l)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,a=this._active||[],l=this._getActiveElements(t,a,e,s),c=this._positionChanged(l,t),d=e||!(0,u.ah)(l,a)||c;return d&&(this._active=l,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),d}_getActiveElements(t,e,s,o){const a=this.options;if("mouseout"===t.type)return[];if(!o)return e;const l=this.chart.getElementsAtEventForMode(t,a.mode,a,s);return a.reverse&&l.reverse(),l}_positionChanged(t,e){const{caretX:s,caretY:o,options:a}=this,l=ti[a.position].call(this,t,e);return!1!==l&&(s!==l.x||o!==l.y)}}return(0,T.Z)(n,"positioners",ti),n})();var Io=Object.freeze({__proto__:null,Colors:Tt,Decimation:Hn,Filler:B,Legend:ps,SubTitle:Co,Title:Po,Tooltip:{id:"tooltip",_element:fo,positioners:ti,afterInit(n,i,t){t&&(n.tooltip=new fo({chart:n,options:t}))},beforeUpdate(n,i,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,i,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const i=n.tooltip;if(i&&i._willRender()){const t={tooltip:i};if(!1===n.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;i.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,i){n.tooltip&&n.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,i)=>i.bodyFont.size,boxWidth:(n,i)=>i.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:uo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>"filter"!==n&&"itemSort"!==n&&"external"!==n,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function go(n){const i=this.getLabels();return n>=0&&n<i.length?i[n]:n}let Wo=(()=>{class n extends Ot{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:o,label:a}of e)s[o]===a&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,e){if((0,u.k)(t))return null;const s=this.getLabels();return((n,i)=>null===n?null:(0,u.S)(Math.round(n),0,i))(e=isFinite(e)&&s[e]===t?e:function Bo(n,i,t,e){const s=n.indexOf(i);return-1===s?((n,i,t,e)=>("string"==typeof i?(t=n.push(i)-1,e.unshift({index:t,label:i})):isNaN(i)&&(t=null),t))(n,i,t,e):s!==n.lastIndexOf(i)?t:s}(s,t,(0,u.v)(e,t),this._addedLabels),s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(s=0),e||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,o=[];let a=this.getLabels();a=0===t&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let l=t;l<=e;l++)o.push({value:l});return o}getLabelForValue(t){return go.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return(0,T.Z)(n,"id","category"),(0,T.Z)(n,"defaults",{ticks:{callback:go}}),n})();function po(n,i,{horizontal:t,minRotation:e}){const s=(0,u.t)(e),o=(t?Math.sin(s):Math.cos(s))||.001;return Math.min(i/o,.75*i*(""+n).length)}class xs extends Ot{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return(0,u.k)(i)||("number"==typeof i||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){const{beginAtZero:i}=this.options,{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:o}=this;const a=c=>s=t?s:c,l=c=>o=e?o:c;if(i){const c=(0,u.s)(s),d=(0,u.s)(o);c<0&&d<0?l(0):c>0&&d>0&&a(0)}if(s===o){let c=0===o?1:Math.abs(.05*o);l(o+c),i||a(s-c)}this.min=s,this.max=o}getTickLimit(){const i=this.options.ticks;let s,{maxTicksLimit:t,stepSize:e}=i;return e?(s=Math.ceil(this.max/e)-Math.floor(this.min/e)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const i=this.options,t=i.ticks;let e=this.getTickLimit();e=Math.max(2,e);const a=function Ho(n,i){const t=[],{bounds:s,step:o,min:a,max:l,precision:c,count:d,maxTicks:g,maxDigits:m,includeBounds:x}=n,y=o||1,M=g-1,{min:S,max:P}=i,O=!(0,u.k)(a),C=!(0,u.k)(l),E=!(0,u.k)(d),F=(P-S)/(m+1);let R,z,I,V,A=(0,u.aH)((P-S)/M/y)*y;
1if(A<1e-14&&!O&&!C)return[{value:S},{value:P}];V=Math.ceil(P/A)-Math.floor(S/A),V>M&&(A=(0,u.aH)(V*A/M/y)*y),(0,u.k)(c)||(R=Math.pow(10,c),A=Math.ceil(A*R)/R),"ticks"===s?(z=Math.floor(S/A)*A,I=Math.ceil(P/A)*A):(z=S,I=P),O&&C&&o&&(0,u.aI)((l-a)/o,A/1e3)?(V=Math.round(Math.min((l-a)/A,g)),A=(l-a)/V,z=a,I=l):E?(z=O?a:z,I=C?l:I,V=d-1,A=(I-z)/V):(V=(I-z)/A,V=(0,u.aJ)(V,Math.round(V),A/1e3)?Math.round(V):Math.ceil(V));const Z=Math.max((0,u.aK)(A),(0,u.aK)(z));R=Math.pow(10,(0,u.k)(c)?Z:c),z=Math.round(z*R)/R,I=Math.round(I*R)/R;let j=0;for(O&&(x&&z!==a?(t.push({value:a}),z<a&&j++,(0,u.aJ)(Math.round((z+j*A)*R)/R,a,po(a,F,n))&&j++):z<a&&j++);j<V;++j){const Y=Math.round((z+j*A)*R)/R;if(C&&Y>l)break;t.push({value:Y})}return C&&x&&I!==l?t.length&&(0,u.aJ)(t[t.length-1].value,l,po(l,F,n))?t[t.length-1].value=l:t.push({value:l}):(!C||I===l)&&t.push({value:I}),t}({maxTicks:e,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===i.bounds&&(0,u.aG)(a,this,"value"),i.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const i=this.ticks;let t=this.min,e=this.max;if(super.configure(),this.options.offset&&i.length){const s=(e-t)/Math.max(i.length-1,1)/2;t-=s,e+=s}this._startValue=t,this._endValue=e,this._valueRange=e-t}getLabelForValue(i){return(0,u.o)(i,this.chart.options.locale,this.options.ticks.format)}}class qn extends xs{determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=(0,u.g)(i)?i:0,this.max=(0,u.g)(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const i=this.isHorizontal(),t=i?this.width:this.height,e=(0,u.t)(this.options.ticks.minRotation),s=(i?Math.sin(e):Math.cos(e))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(i){return null===i?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}}(0,T.Z)(qn,"id","linear"),(0,T.Z)(qn,"defaults",{ticks:{callback:u.aL.formatters.numeric}});const ei=n=>Math.floor((0,u.aM)(n)),oe=(n,i)=>Math.pow(10,ei(n)+i);function mo(n){return n/Math.pow(10,ei(n))==1}function bo(n,i,t){const e=Math.pow(10,t),s=Math.floor(n/e);return Math.ceil(i/e)-s}class Gn extends Ot{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){const e=xs.prototype.parse.apply(this,[i,t]);if(0!==e)return(0,u.g)(e)&&e>0?e:null;this._zero=!0}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=(0,u.g)(i)?Math.max(0,i):null,this.max=(0,u.g)(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,u.g)(this._userMin)&&(this.min=i===oe(this.min,0)?oe(this.min,-1):oe(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:i,maxDefined:t}=this.getUserBounds();let e=this.min,s=this.max;const o=l=>e=i?e:l,a=l=>s=t?s:l;e===s&&(e<=0?(o(1),a(10)):(o(oe(e,-1)),a(oe(s,1)))),e<=0&&o(oe(s,-1)),s<=0&&a(oe(e,1)),this.min=e,this.max=s}buildTicks(){const i=this.options,e=function jo(n,{min:i,max:t}){i=(0,u.O)(n.min,i);const e=[],s=ei(i);let o=function No(n,i){let e=ei(i-n);for(;bo(n,i,e)>10;)e++;for(;bo(n,i,e)<10;)e--;return Math.min(e,ei(n))}(i,t),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),c=s>o?Math.pow(10,s):0,d=Math.round((i-c)*a)/a,g=Math.floor((i-c)/l/10)*l*10;let m=Math.floor((d-g)/Math.pow(10,o)),x=(0,u.O)(n.min,Math.round((c+g+m*Math.pow(10,o))*a)/a);for(;x<t;)e.push({value:x,major:mo(x),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(o++,m=2,a=o>=0?1:a),x=Math.round((c+g+m*Math.pow(10,o))*a)/a;const y=(0,u.O)(n.max,x);return e.push({value:y,major:mo(y),significand:m}),e}({min:this._userMin,max:this._userMax},this);return"ticks"===i.bounds&&(0,u.aG)(e,this,"value"),i.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(i){return void 0===i?"0":(0,u.o)(i,this.chart.options.locale,this.options.ticks.format)}configure(){const i=this.min;super.configure(),this._startValue=(0,u.aM)(i),this._valueRange=(0,u.aM)(this.max)-(0,u.aM)(i)}getPixelForValue(i){return(void 0===i||0===i)&&(i=this.min),null===i||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:((0,u.aM)(i)-this._startValue)/this._valueRange)}getValueForPixel(i){const t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}}function Jn(n){const i=n.ticks;if(i.display&&n.display){const t=(0,u.E)(i.backdropPadding);return(0,u.v)(i.font&&i.font.size,u.d.font.size)+t.height}return 0}function Zo(n,i,t){return t=(0,u.b)(t)?t:[t],{w:(0,u.aN)(n,i.string,t),h:t.length*i.lineHeight}}function xo(n,i,t,e,s){return n===e||n===s?{start:i-t/2,end:i+t/2}:n<e||n>s?{start:i-t,end:i}:{start:i,end:i+t}}function $o(n,i,t,e,s){const o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let l=0,c=0;e.start<i.l?(l=(i.l-e.start)/o,n.l=Math.min(n.l,i.l-l)):e.end>i.r&&(l=(e.end-i.r)/o,n.r=Math.max(n.r,i.r+l)),s.start<i.t?(c=(i.t-s.start)/a,n.t=Math.min(n.t,i.t-c)):s.end>i.b&&(c=(s.end-i.b)/a,n.b=Math.max(n.b,i.b+c))}function Xo(n,i,t){const e=n.drawingArea,{extra:s,additionalAngle:o,padding:a,size:l}=t,c=n.getPointPosition(i,e+s+a,o),d=Math.round((0,u.U)((0,u.ay)(c.angle+u.H))),g=function Go(n,i,t){return 90===t||270===t?n-=i/2:(t>270||t<90)&&(n-=i),n}(c.y,l.h,d),m=function Qo(n){return 0===n||180===n?"center":n<180?"left":"right"}(d),x=function qo(n,i,t){return"right"===t?n-=i:"center"===t&&(n-=i/2),n}(c.x,l.w,m);return{visible:!0,x:c.x,y:g,textAlign:m,left:x,top:g,right:x+l.w,bottom:g+l.h}}
1function Uo(n,i){if(!i)return!0;const{left:t,top:e,right:s,bottom:o}=n;return!((0,u.C)({x:t,y:e},i)||(0,u.C)({x:t,y:o},i)||(0,u.C)({x:s,y:e},i)||(0,u.C)({x:s,y:o},i))}function Jo(n,i,t){const{left:e,top:s,right:o,bottom:a}=t,{backdropColor:l}=i;if(!(0,u.k)(l)){const c=(0,u.aw)(i.borderRadius),d=(0,u.E)(i.backdropPadding);n.fillStyle=l;const g=e-d.left,m=s-d.top,x=o-e+d.width,y=a-s+d.height;Object.values(c).some(M=>0!==M)?(n.beginPath(),(0,u.au)(n,{x:g,y:m,w:x,h:y,radius:c}),n.fill()):n.fillRect(g,m,x,y)}}function _o(n,i,t,e){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,i,0,u.T);else{let o=n.getPointPosition(0,i);s.moveTo(o.x,o.y);for(let a=1;a<e;a++)o=n.getPointPosition(a,i),s.lineTo(o.x,o.y)}}(0,T.Z)(Gn,"id","logarithmic"),(0,T.Z)(Gn,"defaults",{ticks:{callback:u.aL.formatters.logarithmic,major:{enabled:!0}}});class ii extends xs{constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const i=this._padding=(0,u.E)(Jn(this.options)/2),t=this.width=this.maxWidth-i.width,e=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+e/2+i.top),this.drawingArea=Math.floor(Math.min(t,e)/2)}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!1);this.min=(0,u.g)(i)&&!isNaN(i)?i:0,this.max=(0,u.g)(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Jn(this.options))}generateTickLabels(i){xs.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,e)=>{const s=(0,u.Q)(this.options.pointLabels.callback,[t,e],this);return s||0===s?s:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const i=this.options;i.display&&i.pointLabels.display?function Yo(n){const i={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},i),e=[],s=[],o=n._pointLabels.length,a=n.options.pointLabels,l=a.centerPointLabels?u.P/o:0;for(let c=0;c<o;c++){const d=a.setContext(n.getPointLabelContext(c));s[c]=d.padding;const g=n.getPointPosition(c,n.drawingArea+s[c],l),m=(0,u.a0)(d.font),x=Zo(n.ctx,m,n._pointLabels[c]);e[c]=x;const y=(0,u.ay)(n.getIndexAngle(c)+l),M=Math.round((0,u.U)(y));$o(t,i,y,xo(M,g.x,x.w,0,180),xo(M,g.y,x.h,90,270))}n.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),n._pointLabelItems=function Ko(n,i,t){const e=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:a,display:l}=o.pointLabels,c={extra:Jn(o)/2,additionalAngle:a?u.P/s:0};let d;for(let g=0;g<s;g++){c.padding=t[g],c.size=i[g];const m=Xo(n,g,c);e.push(m),"auto"===l&&(m.visible=Uo(m,d),m.visible&&(d=m))}return e}(n,e,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,e,s){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((e-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,e,s))}getIndexAngle(i){return(0,u.ay)(i*(u.T/(this._pointLabels.length||1))+(0,u.t)(this.options.startAngle||0))}getDistanceFromCenterForValue(i){if((0,u.k)(i))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if((0,u.k)(i))return NaN;const t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){const t=this._pointLabels||[];if(i>=0&&i<t.length){const e=t[i];return function ia(n,i,t){return(0,u.j)(n,{label:t,index:i,type:"pointLabel"})}(this.getContext(),i,e)}}getPointPosition(i,t,e=0){const s=this.getIndexAngle(i)-u.H+e;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(i,t){return this.getPointPosition(i,this.getDistanceFromCenterForValue(t))}getBasePosition(i){return this.getPointPositionForValue(i||0,this.getBaseValue())}getPointLabelPosition(i){const{left:t,top:e,right:s,bottom:o}=this._pointLabelItems[i];return{left:t,top:e,right:s,bottom:o}}drawBackground(){const{backgroundColor:i,grid:{circular:t}}=this.options;if(i){const e=this.ctx;e.save(),e.beginPath(),_o(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),e.closePath(),e.fillStyle=i,e.fill(),e.restore(
1)}}drawGrid(){const i=this.ctx,t=this.options,{angleLines:e,grid:s,border:o}=t,a=this._pointLabels.length;let l,c,d;if(t.pointLabels.display&&function ta(n,i){const{ctx:t,options:{pointLabels:e}}=n;for(let s=i-1;s>=0;s--){const o=n._pointLabelItems[s];if(!o.visible)continue;const a=e.setContext(n.getPointLabelContext(s));Jo(t,a,o);const l=(0,u.a0)(a.font),{x:c,y:d,textAlign:g}=o;(0,u.Z)(t,n._pointLabels[s],c,d+l.lineHeight/2,l,{color:a.color,textAlign:g,textBaseline:"middle"})}}(this,a),s.display&&this.ticks.forEach((g,m)=>{if(0!==m){c=this.getDistanceFromCenterForValue(g.value);const x=this.getContext(m),y=s.setContext(x),M=o.setContext(x);!function ea(n,i,t,e,s){const o=n.ctx,a=i.circular,{color:l,lineWidth:c}=i;!a&&!e||!l||!c||t<0||(o.save(),o.strokeStyle=l,o.lineWidth=c,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),_o(n,t,a,e),o.closePath(),o.stroke(),o.restore())}(this,y,c,a,M)}}),e.display){for(i.save(),l=a-1;l>=0;l--){const g=e.setContext(this.getPointLabelContext(l)),{color:m,lineWidth:x}=g;!x||!m||(i.lineWidth=x,i.strokeStyle=m,i.setLineDash(g.borderDash),i.lineDashOffset=g.borderDashOffset,c=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),d=this.getPointPosition(l,c),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(d.x,d.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){const i=this.ctx,t=this.options,e=t.ticks;if(!e.display)return;const s=this.getIndexAngle(0);let o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(s),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((l,c)=>{if(0===c&&!t.reverse)return;const d=e.setContext(this.getContext(c)),g=(0,u.a0)(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){i.font=g.string,a=i.measureText(l.label).width,i.fillStyle=d.backdropColor;const m=(0,u.E)(d.backdropPadding);i.fillRect(-a/2-m.left,-o-g.size/2-m.top,a+m.width,g.size+m.height)}(0,u.Z)(i,l.label,0,-o,g,{color:d.color})}),i.restore()}drawTitle(){}}(0,T.Z)(ii,"id","radialLinear"),(0,T.Z)(ii,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:u.aL.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:n=>n,padding:5,centerPointLabels:!1}}),(0,T.Z)(ii,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,T.Z)(ii,"descriptors",{angleLines:{_fallback:"grid"}});const _s={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}},ct=Object.keys(_s);function sa(n,i){return n-i}function yo(n,i){if((0,u.k)(i))return null;const t=n._adapter,{parser:e,round:s,isoWeekday:o}=n._parseOpts;let a=i;return"function"==typeof e&&(a=e(a)),(0,u.g)(a)||(a="string"==typeof e?t.parse(a,e):t.parse(a)),null===a?null:(s&&(a="week"!==s||!(0,u.x)(o)&&!0!==o?t.startOf(a,s):t.startOf(a,"isoWeek",o)),+a)}function vo(n,i,t,e){const s=ct.length;for(let o=ct.indexOf(n);o<s-1;++o){const a=_s[ct[o]];if(a.common&&Math.ceil((t-i)/((a.steps?a.steps:Number.MAX_SAFE_INTEGER)*a.size))<=e)return ct[o]}return ct[s-1]}function Mo(n,i,t){if(t){if(t.length){const{lo:e,hi:s}=(0,u.aP)(t,i);n[t[e]>=i?t[e]:t[s]]=!0}}else n[i]=!0}function ko(n,i,t){const e=[],s={},o=i.length;let a,l;for(a=0;a<o;++a)l=i[a],s[l]=a,e.push({value:l,major:!1});return 0!==o&&t?function aa(n,i,t,e){const s=n._adapter,o=+s.startOf(i[0].value,e),a=i[i.length-1].value;let l,c;for(l=o;l<=a;l=+s.add(l,1,e))c=t[l],c>=0&&(i[c].major=!0);return i}(n,e,s,t):e}let to=(()=>{class n extends Ot{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),o=this._adapter=new zs__date(t.adapters.date);o.init(e),(0,u.ab)(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:yo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:o,max:a,minDefined:l,maxDefined:c}=this.getUserBounds();function d(g){!l&&!isNaN(g.min)&&(o=Math.min(o,g.min)),!c&&!isNaN(g.max)&&(a=Math.max(a,g.max))}(!l||!c)&&(d(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&d(this.getMinMax(!1))),o=(0,u.g)(o)&&!isNaN(o)?o:+e.startOf(Date.now(),s),a=(0,u.g)(a)&&!isNaN(a)?a:+e.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,o="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);
1const a=this.min,c=(0,u.aO)(o,a,this.max);return this._unit=e.unit||(s.autoSkip?vo(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):function na(n,i,t,e,s){for(let o=ct.length-1;o>=ct.indexOf(t);o--){const a=ct[o];if(_s[a].common&&n._adapter.diff(s,e,a)>=i-1)return a}return ct[t?ct.indexOf(t):0]}(this,c.length,e.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?function oa(n){for(let i=ct.indexOf(n)+1,t=ct.length;i<t;++i)if(_s[ct[i]].common)return ct[i]}(this._unit):void 0,this.initOffsets(o),t.reverse&&c.reverse(),ko(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let o,a,e=0,s=0;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),e=1===t.length?1-o:(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),s=1===t.length?a:(a-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;e=(0,u.S)(e,0,l),s=(0,u.S)(s,0,l),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,o=this.options,a=o.time,l=a.unit||vo(a.minUnit,e,s,this._getLabelCapacity(e)),c=(0,u.v)(o.ticks.stepSize,1),d="week"===l&&a.isoWeekday,g=(0,u.x)(d)||!0===d,m={};let y,M,x=e;if(g&&(x=+t.startOf(x,"isoWeek",d)),x=+t.startOf(x,g?"day":l),t.diff(s,e,l)>1e5*c)throw new Error(e+" and "+s+" are too far apart with stepSize of "+c+" "+l);const S="data"===o.ticks.source&&this.getDataTimestamps();for(y=x,M=0;y<s;y=+t.add(y,c,l),M++)Mo(m,y,S);return(y===s||"ticks"===o.bounds||1===M)&&Mo(m,y,S),Object.keys(m).sort((P,O)=>P-O).map(P=>+P)}getLabelForValue(t){const s=this.options.time;return this._adapter.format(t,s.tooltipFormat?s.tooltipFormat:s.displayFormats.datetime)}format(t,e){return this._adapter.format(t,e||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,e,s,o){const a=this.options,l=a.ticks.callback;if(l)return(0,u.Q)(l,[t,e,s],this);const c=a.time.displayFormats,d=this._unit,g=this._majorUnit,x=g&&c[g],y=s[e];return this._adapter.format(t,o||(g&&x&&y&&y.major?x:d&&c[d]))}generateTickLabels(t){let e,s,o;for(e=0,s=t.length;e<s;++e)o=t[e],o.label=this._tickFormatFunction(o.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,o=(0,u.t)(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(o),l=Math.sin(o),c=this._resolveTickFontOptions(0).size;return{w:s*a+c*l,h:s*l+c*a}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,o=s[e.unit]||s.millisecond,a=this._tickFormatFunction(t,0,ko(this,[t],this._majorUnit),o),l=this._getLabelSize(a),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let e,s,t=this._cache.data||[];if(t.length)return t;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(e=0,s=o.length;e<s;++e)t=t.concat(o[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const o=this.getLabels();for(e=0,s=o.length;e<s;++e)t.push(yo(this,o[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return(0,u._)(t.sort(sa))}}return(0,T.Z)(n,"id","time"),(0,T.Z)(n,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}}),n})();function ys(n,i,t){let o,a,l,c,e=0,s=n.length-1;t?(i>=n[e].pos&&i<=n[s].pos&&({lo:e,hi:s}=(0,u.B)(n,"pos",i)),({pos:o,time:l}=n[e]),({pos:a,time:c}=n[s])):(i>=n[e].time&&i<=n[s].time&&({lo:e,hi:s}=(0,u.B)(n,"time",i)),({time:o,pos:l}=n[e]),({time:a,pos:c}=n[s]));const d=a-o;return d?l+(c-l)*(i-o)/d:l}class eo extends to{constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=ys(t,this.min),this._tableRange=ys(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){const{min:t,max:e}=this,s=[],o=[];let a,l,c,d,g;for(a=0,l=i.length;a<l;++a)d=i[a],d>=t&&d<=e&&s.push(d);if(s.length<2)return[{time:t,pos:0},{time:e,pos:1}];for(a=0,l=s.length;a<l;++a)g=s[a+1],c=s[a-1],d=s[a],Math.round((g+c)/2)!==d&&o.push({time:d,pos:a/(l-1)});return o}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;const t=this.getDataTimestamps(),e=this.getLabelTimestamps();return i=t.length&&e.length?this.normalize(t.concat(e)):t.length?t:e,i=this._cache.all=i,i}getDecimalForValue(i){return(ys(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){const t=this._offsets,e=this.getDecimalForPixel(i)/t.factor-t.end;return ys(this._table,e*this._tableRange+this._minPos,!0)}}(0,T.Z)(eo,"id","timeseries"),(0,T.Z)(eo,"defaults",to.defaults),se.register(xi,En,Io,Object.freeze({__proto__:null,CategoryScale:Wo,LinearScale:qn,LogarithmicScale:Gn,RadialLinearScale:ii,TimeScale:to,TimeSeriesScale:eo}));const ca=se;let ha=(()=>{class n{get data(){return this._data}set data(t){this._data=t,this.reinit()}get options(){return this._options}set options(t){this._options=t,this.reinit()}constructor(t,e){(0,T.Z)(this,"platformId",void 0),(0,T.Z)(this,"el",void 0),(0,T.Z)(this,"type",void 0),(0,T.Z)(this,"plugins",[]),(0,T.Z)(this,"width",void 0),(0,T.Z)(this,"height",void 0),(0,T.Z)(this,"responsive",!0),(0,T.Z)(this,"onDataSelect",new U.vpe),(0,T.Z)(this,"isBrowser",!1),(0,T.Z)(this,"initialized",void 0),(0,T.Z)(this,"_data",void 0),(0,T.Z)(this,"_options",{}),(0,T.Z)(this,"chart",void 0),this.platformId=t,this.el=e}ngAfterViewInit(){this.initChart(),this.initialized=!0}onCanvasClick(t){if(this.chart){const e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),s=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&s&&this.onDataSelect.emit({originalEvent:t,element:e[0],dataset:s})}}initChart(){if((0,Et.NF)(this.platformId)){let t=this.options||{};t.responsive=this.responsive,t.responsive&&(this.height||this.width)&&(t.maintainAspectRatio=!1),this.chart=new ca(this.el.nativeElement.children[0].children[0],{type:this.t
1ype,data:this.data,options:this.options,plugins:this.plugins})}}getCanvas(){return this.el.nativeElement.children[0].children[0]}getBase64Image(){return this.chart.toBase64Image()}generateLegend(){if(this.chart)return this.chart.generateLegend()}refresh(){this.chart&&this.chart.update()}reinit(){this.chart&&(this.chart.destroy(),this.initChart())}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.initialized=!1,this.chart=null)}}return(0,T.Z)(n,"\u0275fac",function(t){return new(t||n)(U.Y36(U.Lbi),U.Y36(U.SBq))}),(0,T.Z)(n,"\u0275cmp",U.Xpm({type:n,selectors:[["p-chart"]],hostAttrs:[1,"p-element"],inputs:{type:"type",plugins:"plugins",width:"width",height:"height",responsive:"responsive",data:"data",options:"options"},outputs:{onDataSelect:"onDataSelect"},decls:2,vars:6,consts:[[2,"position","relative"],[3,"click"]],template:function(t,e){1&t&&(U.TgZ(0,"div",0)(1,"canvas",1),U.NdJ("click",function(o){return e.onCanvasClick(o)}),U.qZA()()),2&t&&(U.Udp("width",e.responsive&&!e.width?null:e.width)("height",e.responsive&&!e.height?null:e.height),U.xp6(1),U.uIk("width",e.responsive&&!e.width?null:e.width)("height",e.responsive&&!e.height?null:e.height))},encapsulation:2,changeDetection:0})),n})(),da=(()=>{class n{}return(0,T.Z)(n,"\u0275fac",function(t){return new(t||n)}),(0,T.Z)(n,"\u0275mod",U.oAB({type:n})),(0,T.Z)(n,"\u0275inj",U.cJS({imports:[Et.ez]})),n})()}}]);
2//# sourceMappingURL=8861.b48b6220866bcdb3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.