import{c as x,s as w,t as A}from"./chunk-C6uGsfWa.js";import{An as OG,Ar as Tu,Ba as fe,Bn as Ow,Da as e5,Eo as kb,Er as TV,Fo as l$,Ga as g$,Go as m5,Gr as Va$1,Hi as ae$1,Ia as f$,Ic as zb,Io as lA,Is as rh$1,L as D3,Lr as Uj,Ls as rx,O as CV,Oi as Zt$1,Oo as kj,Pa as eh$1,Q as EV,Qi as bV,Qr as W$,S as Bn$1,Vc as zt$1,Vr as Uxe,Wa as g,Wo as m4,Xr as Vn$1,Yr as Vme,Ys as t5,Za as gx,_s as ph$1,as as oA,ba as d4,bc as x$1,c as A$,ec as th$1,fc as vm,fo as ih$1,fr as S,gc as wf,ho as j$,it as FB,j as Cn$1,mo as iu,nc as tx,p as Au,rt as Ex,ss as oh$1,ua as cA,vc as wp,vn as N$,xc as x2,z as DV}from"./chunk-B_pj7Jpm.js";import{t as X1}from"./chunk-CgIzqGPc.js";import{A as qn$1,O as ln$1,r as D$1,s as Jn$1,u as Qn$1}from"./chunk-BPHMC4rz.js";import{F as Y,L as Z$1,m as I$1,tt as qo$1}from"./chunk-COgN00_S.js";import{c as oi$1}from"./chunk-CEibY8iL.js";import{k as tf}from"./chunk-CR0lnyBO.js";import{t as S$1}from"./chunk-1IezKpCQ.js";import{t as S$2}from"./chunk-0S7iE8qE2.js";var cr=A((nf,lu)=>{lu.exports=`<svg width="216" height="271" viewBox="0 0 216 271" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 23.1156V-23.002L25.1602 0.0568237L-10.2515 23.1156Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 69.2328V23.1152L25.1602 46.174L-10.2515 69.2328Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 46.1742V0.0566406L59.75 23.1154L25.1618 46.1742Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M24.75 98V46L59.75 72L24.75 98Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 23.1136V-23.0039L95.1611 0.0548706L59.7494 23.1136Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 69.2328V23.1152L95.1611 46.174L59.7494 69.2328Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 46.1742V0.0566406L129.752 23.1154L95.1638 46.1742Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 23.1136V-23.0039L165.162 0.0548706L129.75 23.1136Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 69.2328V23.1152L165.162 46.174L129.75 69.2328Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 46.1742V0.0566406L199.749 23.1154L165.161 46.1742Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 23.1156V-23.002L235.162 0.0568237L199.75 23.1156Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 69.2347V23.1172L235.162 46.176L199.75 69.2347Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 121.121V75.0039L25.1602 98.0627L-10.2515 121.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 167.239V121.121L25.1602 144.18L-10.2515 167.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 144.18V98.0625L59.75 121.121L25.1618 144.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 121.121V75.0039L95.1611 98.0627L59.7494 121.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 167.239V121.121L95.1611 144.18L59.7494 167.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 144.18V98.0625L129.752 121.121L95.1638 144.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 121.121V75.0039L165.162 98.0627L129.75 121.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 167.239V121.121L165.162 144.18L129.75 167.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 144.18V98.0625L199.749 121.121L165.161 144.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 121.121V75.0039L235.162 98.0627L199.75 121.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 167.239V121.121L235.162 144.18L199.75 167.239Z" fill="currentColor" />

    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 121.116V74.998L25.1602 98.0568L-10.2515 121.116Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 167.233V121.115L25.1602 144.174L-10.2515 167.233Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 144.174V98.0566L59.75 121.115L25.1618 144.174Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 121.114V74.9961L95.1611 98.0549L59.7494 121.114Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 167.233V121.115L95.1611 144.174L59.7494 167.233Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 144.174V98.0566L129.752 121.115L95.1638 144.174Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 121.114V74.9961L165.162 98.0549L129.75 121.114Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 167.233V121.115L165.162 144.174L129.75 167.233Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 144.174V98.0566L199.749 121.115L165.161 144.174Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 121.116V74.998L235.162 98.0568L199.75 121.116Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 167.235V121.117L235.162 144.176L199.75 167.235Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 219.121V173.004L25.1602 196.063L-10.2515 219.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M-10.2515 265.239V219.121L25.1602 242.18L-10.2515 265.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M25.1618 242.18V196.062L59.75 219.121L25.1618 242.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 219.121V173.004L95.1611 196.063L59.7494 219.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M59.7494 265.239V219.121L95.1611 242.18L59.7494 265.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.1638 242.18V196.062L129.752 219.121L95.1638 242.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 219.121V173.004L165.162 196.063L129.75 219.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M129.75 265.239V219.121L165.162 242.18L129.75 265.239Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M165.161 242.18V196.062L199.749 219.121L165.161 242.18Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 219.121V173.004L235.162 196.063L199.75 219.121Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M199.75 265.239V219.121L235.162 242.18L199.75 265.239Z" fill="currentColor" />

    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.75 98V46L130.75 72L95.75 98Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M164.75 98V46L199.75 72L164.75 98Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M95.75 199V147L130.75 173L95.75 199Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M26.75 199V147L61.75 173L26.75 199Z" fill="currentColor" />
    <path fill-rule="evenodd" clip-rule="evenodd" d="M164.75 199V147L199.75 173L164.75 199Z" fill="currentColor" />
  </svg>
`});function ye(e){return e+.5|0}var Pt=(e,i,t)=>Math.max(Math.min(e,t),i);function _e(e){return Pt(ye(e*2.55),0,255)}function Lt(e){return Pt(ye(e*255),0,255)}function _t(e){return Pt(ye(e/2.55)/100,0,1)}function Us(e){return Pt(ye(e*100),0,100)}var 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};var $i=[...`0123456789ABCDEF`];var fr=e=>$i[e&15];var gr=e=>$i[(e&240)>>4]+$i[e&15];var Je=e=>(e&240)>>4===(e&15);var pr=e=>Je(e.r)&&Je(e.g)&&Je(e.b)&&Je(e.a);function mr(e){var i=e.length,t;return e[0]===`#`&&(i===4||i===5?t={r:255&at[e[1]]*17,g:255&at[e[2]]*17,b:255&at[e[3]]*17,a:i===5?at[e[4]]*17:255}:(i===7||i===9)&&(t={r:at[e[1]]<<4|at[e[2]],g:at[e[3]]<<4|at[e[4]],b:at[e[5]]<<4|at[e[6]],a:i===9?at[e[7]]<<4|at[e[8]]:255})),t}var br=(e,i)=>e<255?i(e):``;function _r(e){var i=pr(e)?fr:gr;return e?`#`+i(e.r)+i(e.g)+i(e.b)+br(e.a,i):void 0}var xr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ks(e,i,t){let n=i*Math.min(t,1-t),s=(o,a=(o+e/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function yr(e,i,t){let n=(s,o=(s+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function vr(e,i,t){let n=Ks(e,1,.5),s;for(i+t>1&&(s=1/(i+t),i*=s,t*=s),s=0;s<3;s++)n[s]*=1-i-t,n[s]+=i;return n}function Mr(e,i,t,n,s){return e===s?(i-t)/n+(i<t?6:0):i===s?(t-e)/n+2:(e-i)/n+4}function Ui(e){let t=e.r/255,n=e.g/255,s=e.b/255,o=Math.max(t,n,s),a=Math.min(t,n,s),r=(o+a)/2,l,c,h;return o!==a&&(h=o-a,c=r>.5?h/(2-o-a):h/(o+a),l=Mr(t,n,s,h,o),l=l*60+.5),[l|0,c||0,r]}function Yi(e,i,t,n){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,n)).map(Lt)}function Xi(e,i,t){return Yi(Ks,e,i,t)}function Cr(e,i,t){return Yi(vr,e,i,t)}function Sr(e,i,t){return Yi(yr,e,i,t)}function qs(e){return(e%360+360)%360}function wr(e){let i=xr.exec(e),t=255,n;if(!i)return;i[5]!==n&&(t=i[6]?_e(+i[5]):Lt(+i[5]));let s=qs(+i[2]),o=+i[3]/100,a=+i[4]/100;return i[1]===`hwb`?n=Cr(s,o,a):i[1]===`hsv`?n=Sr(s,o,a):n=Xi(s,o,a),{r:n[0],g:n[1],b:n[2],a:t}}function kr(e,i){var t=Ui(e);t[0]=qs(t[0]+i),t=Xi(t),e.r=t[0],e.g=t[1],e.b=t[2]}function Pr(e){if(!e)return;let i=Ui(e),t=i[0],n=Us(i[1]),s=Us(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${s}%, ${_t(e.a)})`:`hsl(${t}, ${n}%, ${s}%)`}var Ys={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`};var Xs={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function Lr(){let e={},i=Object.keys(Xs),t=Object.keys(Ys),n,s,o,a,r;for(n=0;n<i.length;n++){for(a=r=i[n],s=0;s<t.length;s++)o=t[s],r=r.replace(o,Ys[o]);o=parseInt(Xs[a],16),e[r]=[o>>16&255,o>>8&255,o&255]}return e}var Qe;function Or(e){Qe||(Qe=Lr(),Qe.transparent=[0,0,0,0]);let i=Qe[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var Dr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ar(e){let i=Dr.exec(e),t=255,n,s,o;if(i){if(i[7]!==n){let a=+i[7];t=i[8]?_e(a):Pt(a*255,0,255)}return n=+i[1],s=+i[3],o=+i[5],n=255&(i[2]?_e(n):Pt(n,0,255)),s=255&(i[4]?_e(s):Pt(s,0,255)),o=255&(i[6]?_e(o):Pt(o,0,255)),{r:n,g:s,b:o,a:t}}}function Tr(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${_t(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var ji=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055;var Jt=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Er(e,i,t){let n=Jt(_t(e.r)),s=Jt(_t(e.g)),o=Jt(_t(e.b));return{r:Lt(ji(n+t*(Jt(_t(i.r))-n))),g:Lt(ji(s+t*(Jt(_t(i.g))-s))),b:Lt(ji(o+t*(Jt(_t(i.b))-o))),a:e.a+t*(i.a-e.a)}}function ti(e,i,t){if(e){let n=Ui(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,i===0?360:1)),n=Xi(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function Gs(e,i){return e&&Object.assign(i||{},e)}function Zs(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=Lt(e[3]))):(i=Gs(e,{r:0,g:0,b:0,a:1}),i.a=Lt(i.a)),i}function Rr(e){return e.charAt(0)===`r`?Ar(e):wr(e)}var xe=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,n;t===`object`?n=Zs(i):t===`string`&&(n=mr(i)||Or(i)||Rr(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=Gs(this._rgb);return i&&(i.a=_t(i.a)),i}set rgb(i){this._rgb=Zs(i)}rgbString(){return this._valid?Tr(this._rgb):void 0}hexString(){return this._valid?_r(this._rgb):void 0}hslString(){return this._valid?Pr(this._rgb):void 0}mix(i,t){if(i){let n=this.rgb,s=i.rgb,o,a=t===o?.5:t,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=Er(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=Lt(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb;return i.r=i.g=i.b=ye(i.r*.3+i.g*.59+i.b*.11),this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return ti(this._rgb,2,i),this}darken(i){return ti(this._rgb,2,-i),this}saturate(i){return ti(this._rgb,1,i),this}desaturate(i){return ti(this._rgb,1,-i),this}rotate(i){return kr(this._rgb,i),this}};function ut(){}var lo=(()=>{let e=0;return()=>e++})();function O(e){return e==null}function F(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)===`[object`&&i.slice(-6)===`Array]`}function D(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function V(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function Q(e,i){return V(e)?e:i}function k(e,i){return typeof e>`u`?i:e}var co=(e,i)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/i;var Gi=(e,i)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*i:+e;function I(e,i,t){if(e&&typeof e.call==`function`)return e.apply(t,i)}function E(e,i,t,n){let s,o,a;if(F(e))if(o=e.length,n)for(s=o-1;s>=0;s--)i.call(t,e[s],s);else for(s=0;s<o;s++)i.call(t,e[s],s);else if(D(e))for(a=Object.keys(e),o=a.length,s=0;s<o;s++)i.call(t,e[a[s]],a[s])}function Ce(e,i){let t,n,s,o;if(!e||!i||e.length!==i.length)return!1;for(t=0,n=e.length;t<n;++t)if(s=e[t],o=i[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function si(e){if(F(e))return e.map(si);if(D(e)){let i=Object.create(null),t=Object.keys(e),n=t.length,s=0;for(;s<n;++s)i[t[s]]=si(e[t[s]]);return i}return e}function ho(e){return[`__proto__`,`prototype`,`constructor`].indexOf(e)===-1}function Ir(e,i,t,n){if(!ho(e))return;let s=i[e],o=t[e];D(s)&&D(o)?te(s,o,n):i[e]=si(o)}function te(e,i,t){let n=F(i)?i:[i],s=n.length;if(!D(e))return e;t=t||{};let o=t.merger||Ir,a;for(let r=0;r<s;++r){if(a=n[r],!D(a))continue;let l=Object.keys(a);for(let c=0,h=l.length;c<h;++c)o(l[c],e,a,t)}return e}function ie(e,i){return te(e,i,{merger:Fr})}function Fr(e,i,t){if(!ho(e))return;let n=i[e],s=t[e];D(n)&&D(s)?ie(n,s):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=si(s))}var Js={"":e=>e,x:e=>e.x,y:e=>e.y};function zr(e){let i=e.split(`.`),t=[],n=``;for(let s of i)n+=s,n.endsWith(`\\`)?n=n.slice(0,-1)+`.`:(t.push(n),n=``);return t}function Br(e){let i=zr(e);return t=>{for(let n of i){if(n===``)break;t=t&&t[n]}return t}}function vt(e,i){return(Js[i]||(Js[i]=Br(i)))(e)}function li(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ne=e=>typeof e<`u`;var xt=e=>typeof e==`function`;var Ji=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function uo(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var T=Math.PI;var z=2*T;var Nr=z+T;var oi=Number.POSITIVE_INFINITY;var Vr=T/180;var H=T/2;var Ht=T/4;var Qs=T*2/3;var yt=Math.log10;var ct=Math.sign;function se(e,i,t){return Math.abs(e-i)<t}function Qi(e){let i=Math.round(e);e=se(e,i,e/1e3)?i:e;let t=Math.pow(10,Math.floor(yt(e))),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function fo(e){let i=[],t=Math.sqrt(e),n;for(n=1;n<t;n++)e%n===0&&(i.push(n),i.push(e/n));return t===(t|0)&&i.push(t),i.sort((s,o)=>s-o).pop(),i}function Hr(e){return typeof e==`symbol`||typeof e==`object`&&e!==null&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function $t(e){return!Hr(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function go(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function tn(e,i,t){let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n][t],isNaN(o)||(i.min=Math.min(i.min,o),i.max=Math.max(i.max,o))}function rt(e){return e*(T/180)}function ci(e){return e*(180/T)}function en(e){if(!V(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t}function nn(e,i){let t=i.x-e.x,n=i.y-e.y,s=Math.sqrt(t*t+n*n),o=Math.atan2(n,t);return o<-.5*T&&(o+=z),{angle:o,distance:s}}function ai(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function Wr(e,i){return(e-i+Nr)%z-T}function X(e){return(e%z+z)%z}function oe(e,i,t,n){let s=X(e),o=X(i),a=X(t),r=X(o-s),l=X(a-s),c=X(s-o),h=X(s-a);return s===o||s===a||n&&o===a||r>l&&c<h}function $(e,i,t){return Math.max(i,Math.min(t,e))}function po(e){return $(e,-32768,32767)}function ft(e,i,t,n=1e-6){return e>=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function hi(e,i,t){t=t||(a=>e[a]<i);let n=e.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n}}var ht=(e,i,t,n)=>hi(e,t,n?s=>{let o=e[s][i];return o<t||o===t&&e[s+1][i]===t}:s=>e[s][i]<t);var mo=(e,i,t)=>hi(e,t,n=>e[n][i]>=t);function bo(e,i,t){let n=0,s=e.length;for(;n<s&&e[n]<i;)n++;for(;s>n&&e[s-1]>t;)s--;return n>0||s<e.length?e.slice(n,s):e}var _o=[`push`,`pop`,`shift`,`splice`,`unshift`];function xo(e,i){if(e._chartjs){e._chartjs.listeners.push(i);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),_o.forEach(t=>{let n=`_onData`+li(t),s=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let a=s.apply(this,o);return e._chartjs.listeners.forEach(r=>{typeof r[n]==`function`&&r[n](...o)}),a}})})}function sn(e,i){let t=e._chartjs;if(!t)return;let n=t.listeners,s=n.indexOf(i);s!==-1&&n.splice(s,1),!(n.length>0)&&(_o.forEach(o=>{delete e[o]}),delete e._chartjs)}function on(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var an=(function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame})();function rn(e,i){let t=[],n=!1;return function(...s){t=s,n||(n=!0,an.call(window,()=>{n=!1,e.apply(i,t)}))}}function yo(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}var di=e=>e===`start`?`left`:e===`end`?`right`:`center`;var Z=(e,i,t)=>e===`start`?i:e===`end`?t:(i+t)/2;var vo=(e,i,t,n)=>e===(n?`left`:`right`)?t:e===`center`?(i+t)/2:i;function ln(e,i,t){let n=i.length,s=0,o=n;if(e._sorted){let{iScale:a,vScale:r,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:f,maxDefined:g}=a.getUserBounds();if(f){if(s=Math.min(ht(l,h,d).lo,t?n:ht(i,h,a.getPixelForValue(d)).lo),c){let p=l.slice(0,s+1).reverse().findIndex(m=>!O(m[r.axis]));s-=Math.max(0,p)}s=$(s,0,n-1)}if(g){let p=Math.max(ht(l,a.axis,u,!0).hi+1,t?0:ht(i,h,a.getPixelForValue(u),!0).hi+1);if(c){let m=l.slice(p-1).findIndex(_=>!O(_[r.axis]));p+=Math.max(0,m)}o=$(p,s,n)-s}else o=n-s}return{start:s,count:o}}function cn(e){let{xScale:i,yScale:t,_scaleRanges:n}=e,s={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=s,!0;let o=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,s),o}var ei=e=>e===0||e===1;var to=(e,i,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*z/t));var eo=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*z/t)+1;var Qt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*H)+1,easeOutSine:e=>Math.sin(e*H),easeInOutSine:e=>-.5*(Math.cos(T*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ei(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ei(e)?e:to(e,.075,.3),easeOutElastic:e=>ei(e)?e:eo(e,.075,.3),easeInOutElastic(e){return ei(e)?e:e<.5?.5*to(e*2,.1125,.45):.5+.5*eo(e*2-1,.1125,.45)},easeInBack(e){return e*e*(2.70158*e-1.70158)},easeOutBack(e){return(e-=1)*e*(2.70158*e+1.70158)+1},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)},easeInBounce:e=>1-Qt.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Qt.easeInBounce(e*2)*.5:Qt.easeOutBounce(e*2-1)*.5+.5};function hn(e){if(e&&typeof e==`object`){let i=e.toString();return i===`[object CanvasPattern]`||i===`[object CanvasGradient]`}return!1}function dn(e){return hn(e)?e:new xe(e)}function Zi(e){return hn(e)?e:new xe(e).saturate(.5).darken(.1).hexString()}var jr=[`x`,`y`,`borderWidth`,`radius`,`tension`];var $r=[`color`,`borderColor`,`backgroundColor`];function Ur(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:i=>i!==`onProgress`&&i!==`onComplete`&&i!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:$r},numbers:{type:`number`,properties:jr}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:i=>i|0}}}})}function Yr(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var io=new Map;function Xr(e,i){i=i||{};let t=e+JSON.stringify(i),n=io.get(t);return n||(n=new Intl.NumberFormat(e,i),io.set(t,n)),n}function ae(e,i,t){return Xr(i,t).format(e)}var Mo={values(e){return F(e)?e:``+e},numeric(e,i,t){if(e===0)return`0`;let n=this.chart.options.locale,s,o=e;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>0x38d7ea4c68000)&&(s=`scientific`),o=Zr(e,t)}let a=yt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ae(e,n,l)},logarithmic(e,i,t){if(e===0)return`0`;let n=t[i].significand||e/Math.pow(10,Math.floor(yt(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?Mo.numeric.call(this,e,i,t):``}};function Zr(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var Se={formatters:Mo};function Kr(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.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:Se.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:i=>!i.startsWith(`before`)&&!i.startsWith(`after`)&&i!==`callback`&&i!==`parser`,_indexable:i=>i!==`borderDash`&&i!==`tickBorderDash`&&i!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:i=>i!==`backdropPadding`&&i!==`callback`,_indexable:i=>i!==`backdropPadding`})}var At=Object.create(null);var ui=Object.create(null);function ve(e,i){if(!i)return e;let t=i.split(`.`);for(let n=0,s=t.length;n<s;++n){let o=t[n];e=e[o]||(e[o]=Object.create(null))}return e}function Ki(e,i,t){return typeof i==`string`?te(ve(e,i),t):te(ve(e,``),i)}var qi=class{constructor(i,t){this.animation=void 0,this.backgroundColor=`rgba(0,0,0,0.1)`,this.borderColor=`rgba(0,0,0,0.1)`,this.color=`#666`,this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Zi(s.backgroundColor),this.hoverBorderColor=(n,s)=>Zi(s.borderColor),this.hoverColor=(n,s)=>Zi(s.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return Ki(this,i,t)}get(i){return ve(this,i)}describe(i,t){return Ki(ui,i,t)}override(i,t){return Ki(At,i,t)}route(i,t,n,s){let o=ve(this,i),a=ve(this,n),r=`_`+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[s];return D(l)?Object.assign({},c,l):k(l,c)},set(l){this[r]=l}}})}apply(i){i.forEach(t=>t(this))}};var B=new qi({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Ur,Yr,Kr]);function qr(e){return!e||O(e.size)||O(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function Me(e,i,t,n,s){let o=i[s];return o||(o=i[s]=e.measureText(s).width,t.push(s)),o>n&&(n=o),n}function Co(e,i,t,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(s=n.data={},o=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let a=0,r=t.length,l,c,h,d,u;for(l=0;l<r;l++)if(d=t[l],d!=null&&!F(d))a=Me(e,s,o,a,d);else if(F(d))for(c=0,h=d.length;c<h;c++)u=d[c],u!=null&&!F(u)&&(a=Me(e,s,o,a,u));e.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return a}function Tt(e,i,t){let n=e.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((i-s)*n)/n+s}function un(e,i){!i&&!e||(i=i||e.getContext(`2d`),i.save(),i.resetTransform(),i.clearRect(0,0,e.width,e.height),i.restore())}function fi(e,i,t,n){fn(e,i,t,n,null)}function fn(e,i,t,n,s){let o,a,r,l,c,h,d,u,f=i.pointStyle,g=i.rotation,p=i.radius,m=(g||0)*Vr;if(f&&typeof f==`object`&&(o=f.toString(),o===`[object HTMLImageElement]`||o===`[object HTMLCanvasElement]`)){e.save(),e.translate(t,n),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),f){default:s?e.ellipse(t,n,s/2,p,0,0,z):e.arc(t,n,p,0,z),e.closePath();break;case`triangle`:h=s?s/2:p,e.moveTo(t+Math.sin(m)*h,n-Math.cos(m)*p),m+=Qs,e.lineTo(t+Math.sin(m)*h,n-Math.cos(m)*p),m+=Qs,e.lineTo(t+Math.sin(m)*h,n-Math.cos(m)*p),e.closePath();break;case`rectRounded`:c=p*.516,l=p-c,a=Math.cos(m+Ht)*l,d=Math.cos(m+Ht)*(s?s/2-c:l),r=Math.sin(m+Ht)*l,u=Math.sin(m+Ht)*(s?s/2-c:l),e.arc(t-d,n-r,c,m-T,m-H),e.arc(t+u,n-a,c,m-H,m),e.arc(t+d,n+r,c,m,m+H),e.arc(t-u,n+a,c,m+H,m+T),e.closePath();break;case`rect`:if(!g){l=Math.SQRT1_2*p,h=s?s/2:l,e.rect(t-h,n-l,2*h,2*l);break}m+=Ht;case`rectRot`:d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(t-d,n-r),e.lineTo(t+u,n-a),e.lineTo(t+d,n+r),e.lineTo(t-u,n+a),e.closePath();break;case`crossRot`:m+=Ht;case`cross`:d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(t-d,n-r),e.lineTo(t+d,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a);break;case`star`:d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(t-d,n-r),e.lineTo(t+d,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a),m+=Ht,d=Math.cos(m)*(s?s/2:p),a=Math.cos(m)*p,r=Math.sin(m)*p,u=Math.sin(m)*(s?s/2:p),e.moveTo(t-d,n-r),e.lineTo(t+d,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a);break;case`line`:a=s?s/2:Math.cos(m)*p,r=Math.sin(m)*p,e.moveTo(t-a,n-r),e.lineTo(t+a,n+r);break;case`dash`:e.moveTo(t,n),e.lineTo(t+Math.cos(m)*(s?s/2:p),n+Math.sin(m)*p);break;case!1:e.closePath();break}e.fill(),i.borderWidth>0&&e.stroke()}}function dt(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.x<i.right+t&&e.y>i.top-t&&e.y<i.bottom+t}function we(e,i){e.save(),e.beginPath(),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}function ke(e){e.restore()}function So(e,i,t,n,s){if(!i)return e.lineTo(t.x,t.y);if(s===`middle`){let o=(i.x+t.x)/2;e.lineTo(o,i.y),e.lineTo(o,t.y)}else s===`after`!=!!n?e.lineTo(i.x,t.y):e.lineTo(t.x,i.y);e.lineTo(t.x,t.y)}function wo(e,i,t,n){if(!i)return e.lineTo(t.x,t.y);e.bezierCurveTo(n?i.cp1x:i.cp2x,n?i.cp1y:i.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y)}function Gr(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),O(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}function Jr(e,i,t,n,s){if(s.strikethrough||s.underline){let o=e.measureText(n),a=i-o.actualBoundingBoxLeft,r=i+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(a,h),e.lineTo(r,h),e.stroke()}}function Qr(e,i){let t=e.fillStyle;e.fillStyle=i.color,e.fillRect(i.left,i.top,i.width,i.height),e.fillStyle=t}function Et(e,i,t,n,s,o={}){let a=F(i)?i:[i],r=o.strokeWidth>0&&o.strokeColor!==``,l,c;for(e.save(),e.font=s.string,Gr(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Qr(e,o.backdrop),r&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),O(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,t,n,o.maxWidth)),e.fillText(c,t,n,o.maxWidth),Jr(e,t,n,c,o),n+=Number(s.lineHeight);e.restore()}function re(e,i){let{x:t,y:n,w:s,h:o,radius:a}=i;e.arc(t+a.topLeft,n+a.topLeft,a.topLeft,1.5*T,T,!0),e.lineTo(t,n+o-a.bottomLeft),e.arc(t+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,T,H,!0),e.lineTo(t+s-a.bottomRight,n+o),e.arc(t+s-a.bottomRight,n+o-a.bottomRight,a.bottomRight,H,0,!0),e.lineTo(t+s,n+a.topRight),e.arc(t+s-a.topRight,n+a.topRight,a.topRight,0,-H,!0),e.lineTo(t+a.topLeft,n)}var tl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/;var el=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function il(e,i){let t=(``+e).match(tl);if(!t||t[1]===`normal`)return i*1.2;switch(e=+t[2],t[3]){case`px`:return e;case`%`:e/=100;break}return i*e}var nl=e=>+e||0;function gi(e,i){let t={},n=D(i),s=n?Object.keys(i):i,o=D(e)?n?a=>k(e[a],e[i[a]]):a=>e[a]:()=>e;for(let a of s)t[a]=nl(o(a));return t}function gn(e){return gi(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Rt(e){return gi(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function K(e){let i=gn(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function j(e,i){e=e||{},i=i||B.font;let t=k(e.size,i.size);typeof t==`string`&&(t=parseInt(t,10));let n=k(e.style,i.style);n&&!(``+n).match(el)&&(console.warn(`Invalid font style specified: "`+n+`"`),n=void 0);let s={family:k(e.family,i.family),lineHeight:il(k(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:k(e.weight,i.weight),string:``};return s.string=qr(s),s}function le(e,i,t,n){let s=!0,o,a,r;for(o=0,a=e.length;o<a;++o)if(r=e[o],r!==void 0&&(i!==void 0&&typeof r==`function`&&(r=r(i),s=!1),t!==void 0&&F(r)&&(r=r[t%r.length],s=!1),r!==void 0))return n&&!s&&(n.cacheable=!1),r}function ko(e,i,t){let{min:n,max:s}=e,o=Gi(i,(s-n)/2),a=(r,l)=>t&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function Mt(e,i){return Object.assign(Object.create(e),i)}function pi(e,i=[``],t,n,s=()=>e[0]){let o=t||e;typeof n>`u`&&(n=Oo(`_fallback`,e));return new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>pi([r,...e],i,o,n)},{deleteProperty(r,l){return delete r[l],delete r._keys,delete e[0][l],!0},get(r,l){return Po(r,l,()=>dl(l,i,e,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(r,l){return so(r).includes(l)},ownKeys(r){return so(r)},set(r,l,c){let h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function jt(e,i,t,n){let s={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:pn(e,n),setContext:o=>jt(e,o,t,n),override:o=>jt(e.override(o),i,t,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,r){return Po(o,a,()=>ol(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,r){return e[a]=r,delete o[a],!0}})}function pn(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:s=i.allKeys}=e;return{allKeys:s,scriptable:t,indexable:n,isScriptable:xt(t)?t:()=>t,isIndexable:xt(n)?n:()=>n}}var sl=(e,i)=>e?e+li(i):i;var mn=(e,i)=>D(i)&&e!==`adapters`&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function Po(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i===`constructor`)return e[i];let n=t();return e[i]=n,n}function ol(e,i,t){let{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=e,r=n[i];return xt(r)&&a.isScriptable(i)&&(r=al(i,r,e,t)),F(r)&&r.length&&(r=rl(i,r,e,a.isIndexable)),mn(i,r)&&(r=jt(r,s,o&&o[i],a)),r}function al(e,i,t,n){let{_proxy:s,_context:o,_subProxy:a,_stack:r}=t;if(r.has(e))throw new Error(`Recursion detected: `+Array.from(r).join(`->`)+`->`+e);r.add(e);let l=i(o,a||n);return r.delete(e),mn(e,l)&&(l=bn(s._scopes,s,e,l)),l}function rl(e,i,t,n){let{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<`u`&&n(e))return i[o.index%i.length];if(D(i[0])){let l=i,c=s._scopes.filter(h=>h!==l);i=[];for(let h of l){let d=bn(c,s,e,h);i.push(jt(d,o,a&&a[e],r))}}return i}function Lo(e,i,t){return xt(e)?e(i,t):e}var ll=(e,i)=>e===!0?i:typeof e==`string`?vt(i,e):void 0;function cl(e,i,t,n,s){for(let o of i){let a=ll(t,o);if(a){e.add(a);let r=Lo(a._fallback,t,s);if(typeof r<`u`&&r!==t&&r!==n)return r}else if(a===!1&&typeof n<`u`&&t!==n)return null}return!1}function bn(e,i,t,n){let s=i._rootScopes,o=Lo(i._fallback,t,n),a=[...e,...s],r=new Set;r.add(n);let l=no(r,a,t,o||t,n);return l===null||typeof o<`u`&&o!==t&&(l=no(r,a,o,l,n),l===null)?!1:pi(Array.from(r),[``],s,o,()=>hl(i,t,n))}function no(e,i,t,n,s){for(;t;)t=cl(e,i,t,n,s);return t}function hl(e,i,t){let n=e._getTarget();i in n||(n[i]={});let s=n[i];return F(s)&&D(t)?t:s||{}}function dl(e,i,t,n){let s;for(let o of i)if(s=Oo(sl(o,e),t),typeof s<`u`)return mn(e,s)?bn(t,n,e,s):s}function Oo(e,i){for(let t of i){if(!t)continue;let n=t[e];if(typeof n<`u`)return n}}function so(e){let i=e._keys;return i||(i=e._keys=ul(e._scopes)),i}function ul(e){let i=new Set;for(let t of e)for(let n of Object.keys(t).filter(s=>!s.startsWith(`_`)))i.add(n);return Array.from(i)}function _n(e,i,t,n){let{iScale:s}=e,{key:o=`r`}=this._parsing,a=new Array(n),r,l,c,h;for(r=0,l=n;r<l;++r)c=r+t,h=i[c],a[r]={r:s.parse(vt(h,o),c)};return a}var fl=Number.EPSILON||1e-14;var ee=(e,i)=>i<e.length&&!e[i].skip&&e[i];var Do=e=>e===`x`?`y`:`x`;function gl(e,i,t,n){let s=e.skip?i:e,o=i,a=t.skip?i:t,r=ai(o,s),l=ai(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=n*c,u=n*h;return{previous:{x:o.x-d*(a.x-s.x),y:o.y-d*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}}}function pl(e,i,t){let n=e.length,s,o,a,r,l,c=ee(e,0);for(let h=0;h<n-1;++h)if(l=c,c=ee(e,h+1),!(!l||!c)){if(se(i[h],0,fl)){t[h]=t[h+1]=0;continue}s=t[h]/i[h],o=t[h+1]/i[h],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),t[h]=s*a*i[h],t[h+1]=o*a*i[h])}}function ml(e,i,t=`x`){let n=Do(t),s=e.length,o,a,r,l=ee(e,0);for(let c=0;c<s;++c){if(a=r,r=l,l=ee(e,c+1),!r)continue;let h=r[t],d=r[n];a&&(o=(h-a[t])/3,r[`cp1${t}`]=h-o,r[`cp1${n}`]=d-o*i[c]),l&&(o=(l[t]-h)/3,r[`cp2${t}`]=h+o,r[`cp2${n}`]=d+o*i[c])}}function bl(e,i=`x`){let t=Do(i),n=e.length,s=Array(n).fill(0),o=Array(n),a,r,l,c=ee(e,0);for(a=0;a<n;++a)if(r=l,l=c,c=ee(e,a+1),!!l){if(c){let h=c[i]-l[i];s[a]=h!==0?(c[t]-l[t])/h:0}o[a]=r?c?ct(s[a-1])!==ct(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}pl(e,s,o),ml(e,o,i)}function ii(e,i,t){return Math.max(Math.min(e,t),i)}function _l(e,i){let t,n,s,o,a,r=dt(e[0],i);for(t=0,n=e.length;t<n;++t)a=o,o=r,r=t<n-1&&dt(e[t+1],i),o&&(s=e[t],a&&(s.cp1x=ii(s.cp1x,i.left,i.right),s.cp1y=ii(s.cp1y,i.top,i.bottom)),r&&(s.cp2x=ii(s.cp2x,i.left,i.right),s.cp2y=ii(s.cp2y,i.top,i.bottom)))}function Ao(e,i,t,n,s){let o,a,r,l;if(i.spanGaps&&(e=e.filter(c=>!c.skip)),i.cubicInterpolationMode===`monotone`)bl(e,s);else{let c=n?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)r=e[o],l=gl(c,r,e[Math.min(o+1,a-(n?0:1))%a],i.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r}i.capBezierPoints&&_l(e,t)}function mi(){return typeof window<`u`&&typeof document<`u`}function bi(e){let i=e.parentNode;return i&&i.toString()===`[object ShadowRoot]`&&(i=i.host),i}function ri(e,i,t){let n;return typeof e==`string`?(n=parseInt(e,10),e.indexOf(`%`)!==-1&&(n=n/100*i.parentNode[t])):n=e,n}var _i=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function xl(e,i){return _i(e).getPropertyValue(i)}var yl=[`top`,`right`,`bottom`,`left`];function Wt(e,i,t){let n={};t=t?`-`+t:``;for(let s=0;s<4;s++){let o=yl[s];n[o]=parseFloat(e[i+`-`+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var vl=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function Ml(e,i){let t=e.touches,n=t&&t.length?t[0]:e,{offsetX:s,offsetY:o}=n,a=!1,r,l;if(vl(s,o,e.target))r=s,l=o;else{let c=i.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function It(e,i){if(`native`in e)return e;let{canvas:t,currentDevicePixelRatio:n}=i,s=_i(t),o=s.boxSizing===`border-box`,a=Wt(s,`padding`),r=Wt(s,`border`,`width`),{x:l,y:c,box:h}=Ml(e,t),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:g}=i;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*t.width/n),y:Math.round((c-u)/g*t.height/n)}}function Cl(e,i,t){let n,s;if(i===void 0||t===void 0){let o=e&&bi(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let a=o.getBoundingClientRect(),r=_i(o),l=Wt(r,`border`,`width`),c=Wt(r,`padding`);i=a.width-c.width-l.width,t=a.height-c.height-l.height,n=ri(r.maxWidth,o,`clientWidth`),s=ri(r.maxHeight,o,`clientHeight`)}}return{width:i,height:t,maxWidth:n||oi,maxHeight:s||oi}}var Dt=e=>Math.round(e*10)/10;function To(e,i,t,n){let s=_i(e),o=Wt(s,`margin`),a=ri(s.maxWidth,e,`clientWidth`)||oi,r=ri(s.maxHeight,e,`clientHeight`)||oi,l=Cl(e,i,t),{width:c,height:h}=l;if(s.boxSizing===`content-box`){let u=Wt(s,`border`,`width`),f=Wt(s,`padding`);c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=Dt(Math.min(c,a,l.maxWidth)),h=Dt(Math.min(h,r,l.maxHeight)),c&&!h&&(h=Dt(c/2)),(i!==void 0||t!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=Dt(Math.floor(h*n))),{width:c,height:h}}function xn(e,i,t){let n=i||1,s=Dt(e.height*n),o=Dt(e.width*n);e.height=Dt(e.height),e.width=Dt(e.width);let a=e.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(e.currentDevicePixelRatio=n,a.height=s,a.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Eo=(function(){let e=!1;try{let i={get passive(){return e=!0,!1}};mi()&&(window.addEventListener(`test`,null,i),window.removeEventListener(`test`,null,i))}catch(i){}return e})();function yn(e,i){let t=xl(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ot(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function Ro(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:n===`middle`?t<.5?e.y:i.y:n===`after`?t<1?e.y:i.y:t>0?i.y:e.y}}function Io(e,i,t,n){let s={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},a=Ot(e,s,t),r=Ot(s,o,t),l=Ot(o,i,t);return Ot(Ot(a,r,t),Ot(r,l,t),t)}var Sl=function(e,i){return{x(t){return e+e+i-t},setWidth(t){i=t},textAlign(t){return t===`center`?t:t===`right`?`left`:`right`},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}};var wl=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,i){return e+i},leftForLtr(e,i){return e}}};function Ut(e,i,t){return e?Sl(i,t):wl()}function vn(e,i){let t,n;(i===`ltr`||i===`rtl`)&&(t=e.canvas.style,n=[t.getPropertyValue(`direction`),t.getPropertyPriority(`direction`)],t.setProperty(`direction`,i,`important`),e.prevTextDirection=n)}function Mn(e,i){i!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,i[0],i[1]))}function Fo(e){return e===`angle`?{between:oe,compare:Wr,normalize:X}:{between:ft,compare:(i,t)=>i-t,normalize:i=>i}}function oo({start:e,end:i,count:t,loop:n,style:s}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t===0,style:s}}function kl(e,i,t){let{property:n,start:s,end:o}=t,{between:a,normalize:r}=Fo(n),l=i.length,{start:c,end:h,loop:d}=e,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&a(r(i[c%l][n]),s,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:e.style}}function Cn(e,i,t){if(!t)return[e];let{property:n,start:s,end:o}=t,a=i.length,{compare:r,between:l,normalize:c}=Fo(n),{start:h,end:d,loop:u,style:f}=kl(e,i,t),g=[],p=!1,m=null,_,b,y,M=()=>l(s,y,_)&&r(s,y)!==0,x=()=>r(o,_)===0||l(o,y,_),v=()=>p||M(),S=()=>!p||x();for(let C=h,w=h;C<=d;++C)b=i[C%a],!b.skip&&(_=c(b[n]),_!==y&&(p=l(_,s,o),m===null&&v()&&(m=r(_,s)===0?C:w),m!==null&&S()&&(g.push(oo({start:m,end:C,loop:u,count:a,style:f})),m=null),w=C,y=_));return m!==null&&g.push(oo({start:m,end:d,loop:u,count:a,style:f})),g}function Sn(e,i){let t=[],n=e.segments;for(let s=0;s<n.length;s++){let o=Cn(n[s],e.points,i);o.length&&t.push(...o)}return t}function Pl(e,i,t,n){let s=0,o=i-1;if(t&&!n)for(;s<i&&!e[s].skip;)s++;for(;s<i&&e[s].skip;)s++;for(s%=i,t&&(o+=s);o>s&&e[o%i].skip;)o--;return o%=i,{start:s,end:o}}function Ll(e,i,t,n){let s=e.length,o=[],a=i,r=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%s];c.skip||c.stop?r.skip||(n=!1,o.push({start:i%s,end:(l-1)%s,loop:n}),i=a=c.stop?l:null):(a=l,r.skip&&(i=l)),r=c}return a!==null&&o.push({start:i%s,end:a%s,loop:n}),o}function zo(e,i){let t=e.points,n=e.options.spanGaps,s=t.length;if(!s)return[];let o=!!e._loop,{start:a,end:r}=Pl(t,s,o,n);if(n===!0)return ao(e,[{start:a,end:r,loop:o}],t,i);return ao(e,Ll(t,a,r<a?r+s:r,!!e._fullLoop&&a===0&&r===s-1),t,i)}function ao(e,i,t,n){return!n||!n.setContext||!t?i:Ol(e,i,t,n)}function Ol(e,i,t,n){let s=e._chart.getContext(),o=ro(e.options),{_datasetIndex:a,options:{spanGaps:r}}=e,l=t.length,c=[],h=o,d=i[0].start,u=d;function f(g,p,m,_){let b=r?-1:1;if(g!==p){for(g+=l;t[g%l].skip;)g-=b;for(;t[p%l].skip;)p+=b;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:_}),h=_,d=p%l)}}for(let g of i){d=r?d:g.start;let p=t[d%l],m;for(u=d+1;u<=g.end;u++){let _=t[u%l];m=ro(n.setContext(Mt(s,{type:`segment`,p0:p,p1:_,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),Dl(m,h)&&f(d,u-1,g.loop,h),p=_,h=m}d<u-1&&f(d,u-1,g.loop,h)}return c}function ro(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Dl(e,i){if(!i)return!1;let t=[],n=function(s,o){return hn(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(e,n)!==JSON.stringify(i,n)}function ni(e,i,t){return e.options.clip?e[t]:i[t]}function Al(e,i){let{xScale:t,yScale:n}=e;return t&&n?{left:ni(t,i,`left`),right:ni(t,i,`right`),top:ni(n,i,`top`),bottom:ni(n,i,`bottom`)}:i}function wn(e,i){let t=i._clip;if(t.disabled)return!1;let n=Al(i,e.chartArea);return{left:t.left===!1?0:n.left-(t.left===!0?0:t.left),right:t.right===!1?e.width:n.right+(t.right===!0?0:t.right),top:t.top===!1?0:n.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?e.height:n.bottom+(t.bottom===!0?0:t.bottom)}}var zn=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(i,t,n,s){let o=t.listeners[s],a=t.duration;o.forEach(r=>r({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=an.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(i),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,i,`progress`)),o.length||(n.running=!1,this._notify(s,n,i,`complete`),n.initial=!1),t+=o.length}),this._lastDate=i,t===0&&(this._running=!1)}_getAnims(i){let t=this._charts,n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n}listen(i,t,n){this._getAnims(i).listeners[t].push(n)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let n=t.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(i,t,Date.now(),`complete`)}remove(i){return this._charts.delete(i)}};var Ct=new zn;var Bo=`transparent`;var Tl={boolean(e,i,t){return t>.5?i:e},color(e,i,t){let n=dn(e||Bo),s=n.valid&&dn(i||Bo);return s&&s.valid?s.mix(n,t).hexString():i},number(e,i,t){return e+(i-e)*t}};var Bn=class{constructor(i,t,n,s){let o=t[n];s=le([i.to,s,o,i.from]);let a=le([i.from,o,s]);this._active=!0,this._fn=i.fn||Tl[i.type||typeof a],this._easing=Qt[i.easing]||Qt.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=n,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(i,t,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=le([i.to,t,s,i.from]),this._from=le([i.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let t=i-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t<n),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n})})}_notify(i){let t=i?`res`:`rej`,n=this._promises||[];for(let s=0;s<n.length;s++)n[s][t]()}};var Pi=class{constructor(i,t){this._chart=i,this._properties=new Map,this.configure(t)}configure(i){if(!D(i))return;let t=Object.keys(B.animation),n=this._properties;Object.getOwnPropertyNames(i).forEach(s=>{let o=i[s];if(!D(o))return;let a={};for(let r of t)a[r]=o[r];(F(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a)})})}_animateOptions(i,t){let n=t.options,s=Rl(i,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&El(i.options.$animations,n).then(()=>{i.options=n},()=>{}),o}_createAnimations(i,t){let n=this._properties,s=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)===`$`)continue;if(c===`options`){s.push(...this._animateOptions(i,t));continue}let h=t[c],d=o[c],u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){i[c]=h;continue}o[c]=d=new Bn(u,i,c,h),s.push(d)}return s}update(i,t){if(this._properties.size===0){Object.assign(i,t);return}let n=this._createAnimations(i,t);if(n.length)return Ct.add(this._chart,n),!0}};function El(e,i){let t=[],n=Object.keys(i);for(let s=0;s<n.length;s++){let o=e[n[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function Rl(e,i){if(!i)return;let t=e.options;if(!t){e.options=i;return}return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function No(e,i){let t=e&&e.options||{},n=t.reverse,s=t.min===void 0?i:0,o=t.max===void 0?i:0;return{start:n?o:s,end:n?s:o}}function Il(e,i,t){if(t===!1)return!1;let n=No(e,t),s=No(i,t);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Fl(e){let i,t,n,s;return D(e)?(i=e.top,t=e.right,n=e.bottom,s=e.left):i=t=n=s=e,{top:i,right:t,bottom:n,left:s,disabled:e===!1}}function Ba(e,i){let t=[],n=e._getSortedDatasetMetas(i),s,o;for(s=0,o=n.length;s<o;++s)t.push(n[s].index);return t}function Vo(e,i,t,n={}){let s=e.keys,o=n.mode===`single`,a,r,l,c;if(i===null)return;let h=!1;for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===t){if(h=!0,n.all)continue;break}c=e.values[l],V(c)&&(o||i===0||ct(i)===ct(c))&&(i+=c)}return!h&&!n.all?0:i}function zl(e,i){let{iScale:t,vScale:n}=i,s=t.axis===`x`?`x`:`y`,o=n.axis===`x`?`x`:`y`,a=Object.keys(e),r=new Array(a.length),l,c,h;for(l=0,c=a.length;l<c;++l)h=a[l],r[l]={[s]:h,[o]:e[h]};return r}function kn(e,i){let t=e&&e.options.stacked;return t||t===void 0&&i.stack!==void 0}function Bl(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`}function Nl(e){let{min:i,max:t,minDefined:n,maxDefined:s}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function Vl(e,i,t){let n=e[i]||(e[i]={});return n[t]||(n[t]={})}function Ho(e,i,t,n){for(let s of i.getMatchingVisibleMetas(n).reverse()){let o=e[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function Wo(e,i){let{chart:t,_cachedMeta:n}=e,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,h=Bl(o,a,n),d=i.length,u;for(let f=0;f<d;++f){let g=i[f],{[l]:p,[c]:m}=g,_=g._stacks||(g._stacks={});u=_[c]=Vl(s,h,p),u[r]=m,u._top=Ho(u,a,!0,n.type),u._bottom=Ho(u,a,!1,n.type);let b=u._visualValues||(u._visualValues={});b[r]=m}}function Pn(e,i){let t=e.scales;return Object.keys(t).filter(n=>t[n].axis===i).shift()}function Hl(e,i){return Mt(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:`default`,type:`dataset`})}function Wl(e,i,t){return Mt(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:`default`,type:`data`})}function Pe(e,i){let t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(let s of i){let o=s._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}var Ln=e=>e===`reset`||e===`none`;var jo=(e,i)=>i?e:Object.assign({},e);var jl=(e,i,t)=>e&&!i.hidden&&i._stacked&&{keys:Ba(t,!0),values:null};var zt=(()=>{class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=kn(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&&Pe(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,s=this.getDataset(),o=(u,f,g,p)=>u===`x`?f:u===`r`?p:g,a=n.xAxisID=k(s.xAxisID,Pn(t,`x`)),r=n.yAxisID=k(s.yAxisID,Pn(t,`y`)),l=n.rAxisID=k(s.rAxisID,Pn(t,`r`)),c=n.indexAxis,h=n.iAxisID=o(c,a,r,l),d=n.vAxisID=o(c,r,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update(`reset`)}_destroy(){let t=this._cachedMeta;this._data&&sn(this._data,this),t._stacked&&Pe(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(D(n)){let o=this._cachedMeta;this._data=zl(n,o)}else if(s!==n){if(s){sn(s,this);let o=this._cachedMeta;Pe(o),o._parsed=[]}n&&Object.isExtensible(n)&&xo(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,s=this.getDataset(),o=!1;this._dataCheck();let a=n._stacked;n._stacked=kn(n.vScale,n),n.stack!==s.stack&&(o=!0,Pe(n),n.stack=s.stack),this._resyncElements(t),(o||a!==n._stacked)&&(Wo(this,n._parsed),n._stacked=kn(n.vScale,n))}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:r}=s,l=a.axis,c=t===0&&n===o.length?!0:s._sorted,h=t>0&&s._parsed[t-1],d,u,f;if(this._parsing===!1)s._parsed=o,s._sorted=!0,f=o;else{F(o[t])?f=this.parseArrayData(s,o,t,n):D(o[t])?f=this.parseObjectData(s,o,t,n):f=this.parsePrimitiveData(s,o,t,n);let g=()=>u[l]===null||h&&u[l]<h[l];for(d=0;d<n;++d)s._parsed[d+t]=u=f[d],c&&(g()&&(c=!1),h=u);s._sorted=c}r&&Wo(this,f)}parsePrimitiveData(t,n,s,o){let{iScale:a,vScale:r}=t,l=a.axis,c=r.axis,h=a.getLabels(),d=a===r,u=new Array(o),f,g,p;for(f=0,g=o;f<g;++f)p=f+s,u[f]={[l]:d||a.parse(h[p],p),[c]:r.parse(n[p],p)};return u}parseArrayData(t,n,s,o){let{xScale:a,yScale:r}=t,l=new Array(o),c,h,d,u;for(c=0,h=o;c<h;++c)d=c+s,u=n[d],l[c]={x:a.parse(u[0],d),y:r.parse(u[1],d)};return l}parseObjectData(t,n,s,o){let{xScale:a,yScale:r}=t,{xAxisKey:l=`x`,yAxisKey:c=`y`}=this._parsing,h=new Array(o),d,u,f,g;for(d=0,u=o;d<u;++d)f=d+s,g=n[f],h[d]={x:a.parse(vt(g,l),f),y:r.parse(vt(g,c),f)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,s){let o=this.chart,a=this._cachedMeta,r=n[t.axis];return Vo({keys:Ba(o,!0),values:n._stacks[t.axis]._visualValues},r,a.index,{mode:s})}updateRangeFromParsed(t,n,s,o){let a=s[n.axis],r=a===null?NaN:a,l=o&&s._stacks[n.axis];o&&l&&(o.values=l,r=Vo(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){let s=this._cachedMeta,o=s._parsed,a=s._sorted&&t===s.iScale,r=o.length,l=this._getOtherScale(t),c=jl(n,s,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=Nl(l),f,g;function p(){g=o[f];let m=g[l.axis];return!V(g[t.axis])||d>m||u<m}for(f=0;f<r&&!(!p()&&(this.updateRangeFromParsed(h,t,g,c),a));++f);if(a){for(f=r-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(h,t,g,c);break}}return h}getAllParsedValues(t){let n=this._cachedMeta._parsed,s=[],o,a,r;for(o=0,a=n.length;o<a;++o)r=n[o][t.axis],V(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,s=n.iScale,o=n.vScale,a=this.getParsed(t);return{label:s?``+s.getLabelForValue(a[s.axis]):``,value:o?``+o.getLabelForValue(a[o.axis]):``}}_update(t){let n=this._cachedMeta;this.update(t||`default`),n._clip=Fl(k(this.options.clip,Il(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,s=this._cachedMeta,o=s.data||[],a=n.chartArea,r=[],l=this._drawStart||0,c=this._drawCount||o.length-l,h=this.options.drawActiveElementsOnTop,d;for(s.dataset&&s.dataset.draw(t,a,l,c),d=l;d<l+c;++d){let u=o[d];u.hidden||(u.active&&h?r.push(u):u.draw(t,a))}for(d=0;d<r.length;++d)r[d].draw(t,a)}getStyle(t,n){let s=n?`active`:`default`;return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,n,s){let o=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];a=r.$context||(r.$context=Wl(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=Hl(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=s,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n=`default`,s){let o=n===`active`,a=this._cachedDataOpts,r=t+`-`+n,l=a[r],c=this.enableOptionSharing&&ne(s);if(l)return jo(l,c);let h=this.chart.config,d=h.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,`hover`,t,``]:[t,``],f=h.getOptionScopes(this.getDataset(),d),g=Object.keys(B.elements[t]),p=()=>this.getContext(s,o,n),m=h.resolveNamedOptions(f,g,p,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(jo(m,c))),m}_resolveAnimations(t,n,s){let o=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,n),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,s,n))}let h=new Pi(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Ln(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let s=this.resolveDataElementOptions(t,n),o=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(n,a)||a!==o;return this.updateSharedOptions(a,n,s),{sharedOptions:a,includeOptions:r}}updateElement(t,n,s,o){Ln(o)?Object.assign(t,s):this._resolveAnimations(n,o).update(t,s)}updateSharedOptions(t,n,s){t&&!Ln(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,o){t.active=o;let a=this.getStyle(n,o);this._resolveAnimations(n,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,s){this._setStyle(t,s,`active`,!1)}setHoverStyle(t,n,s){this._setStyle(t,s,`active`,!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,`active`,!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,`active`,!0)}_resyncElements(t){let n=this._data,s=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=s.length,a=n.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a)}_insertElements(t,n,s=!0){let o=this._cachedMeta,a=o.data,r=t+n,l,c=h=>{for(h.length+=n,l=h.length-1;l>=r;l--)h[l]=h[l-n]};for(c(a),l=t;l<r;++l)a[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,n),s&&this.updateElements(a,t,n,`reset`)}updateElements(t,n,s,o){}_removeElements(t,n){let s=this._cachedMeta;if(this._parsing){let o=s._parsed.splice(t,n);s._stacked&&Pe(s,o)}s.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,s,o]=t;this[n](s,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let 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,n){n&&this._sync([`_removeElements`,t,n]);let s=arguments.length-2;s&&this._sync([`_insertElements`,t,s])}_onDataUnshift(){this._sync([`_insertElements`,0,arguments.length])}}return e})();function $l(e,i){if(!e._cache.$bar){let t=e.getMatchingVisibleMetas(i),n=[];for(let s=0,o=t.length;s<o;s++)n=n.concat(t[s].controller.getAllParsedValues(e));e._cache.$bar=on(n.sort((s,o)=>s-o))}return e._cache.$bar}function Ul(e){let i=e.iScale,t=$l(i,e.type),n=i._length,s,o,a,r,l=()=>{a===32767||a===-32768||(ne(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(s=0,o=t.length;s<o;++s)a=i.getPixelForValue(t[s]),l();for(r=void 0,s=0,o=i.ticks.length;s<o;++s)a=i.getPixelForTick(s),l();return n}function Yl(e,i,t,n){let s=t.barThickness,o,a;return O(s)?(o=i.min*t.categoryPercentage,a=t.barPercentage):(o=s*n,a=1),{chunk:o/n,ratio:a,start:i.pixels[e]-o/2}}function Xl(e,i,t,n){let s=i.pixels,o=s[e],a=e>0?s[e-1]:null,r=e<s.length-1?s[e+1]:null,l=t.categoryPercentage;a===null&&(a=o-(r===null?i.end-i.start:r-o)),r===null&&(r=o+o-a);let c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:t.barPercentage,start:c}}function Zl(e,i,t,n){let s=t.parse(e[0],n),o=t.parse(e[1],n),a=Math.min(s,o),r=Math.max(s,o),l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function Na(e,i,t,n){return F(e)?Zl(e,i,t,n):i[t.axis]=t.parse(e,n),i}function $o(e,i,t,n){let s=e.iScale,o=e.vScale,a=s.getLabels(),r=s===o,l=[],c,h,d,u;for(c=t,h=t+n;c<h;++c)u=i[c],d={},d[s.axis]=r||s.parse(a[c],c),l.push(Na(u,d,o,c));return l}function On(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Kl(e,i,t){return e!==0?ct(e):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1)}function ql(e){let i,t,n,s,o;return e.horizontal?(i=e.base>e.x,t=`left`,n=`right`):(i=e.base<e.y,t=`bottom`,n=`top`),i?(s=`end`,o=`start`):(s=`start`,o=`end`),{start:t,end:n,reverse:i,top:s,bottom:o}}function Gl(e,i,t,n){let s=i.borderSkipped,o={};if(!s){e.borderSkipped=o;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:r,reverse:l,top:c,bottom:h}=ql(e);s===`middle`&&t&&(e.enableBorderRadius=!0,(t._top||0)===n?s=c:(t._bottom||0)===n?s=h:(o[Uo(h,a,r,l)]=!0,s=c)),o[Uo(s,a,r,l)]=!0,e.borderSkipped=o}function Uo(e,i,t,n){return n?(e=Jl(e,i,t),e=Yo(e,t,i)):e=Yo(e,i,t),e}function Jl(e,i,t){return e===i?t:e===t?i:e}function Yo(e,i,t){return e===`start`?i:e===`end`?t:e}function Ql(e,{inflateAmount:i},t){e.inflateAmount=i===`auto`?t===1?.33:0:i}var tc=(()=>{class e extends zt{static id=`bar`;static defaults={datasetElementType:!1,dataElementType:`bar`,categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:`number`,properties:[`x`,`y`,`base`,`width`,`height`]}}};static overrides={scales:{_index_:{type:`category`,offset:!0,grid:{offset:!0}},_value_:{type:`linear`,beginAtZero:!0}}};parsePrimitiveData(t,n,s,o){return $o(t,n,s,o)}parseArrayData(t,n,s,o){return $o(t,n,s,o)}parseObjectData(t,n,s,o){let{iScale:a,vScale:r}=t,{xAxisKey:l=`x`,yAxisKey:c=`y`}=this._parsing,h=a.axis===`x`?l:c,d=r.axis===`x`?l:c,u=[],f,g,p,m;for(f=s,g=s+o;f<g;++f)m=n[f],p={},p[a.axis]=a.parse(vt(m,h),f),u.push(Na(vt(m,d),p,r,f));return u}updateRangeFromParsed(t,n,s,o){super.updateRangeFromParsed(t,n,s,o);let a=s._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let{iScale:s,vScale:o}=this._cachedMeta,a=this.getParsed(t),r=a._custom,l=On(r)?`[`+r.start+`, `+r.end+`]`:``+o.getLabelForValue(a[o.axis]);return{label:``+s.getLabelForValue(a[s.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,s,o){let a=o===`reset`,{index:r,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),h=l.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,o);for(let g=n;g<n+s;g++){let p=this.getParsed(g),m=a||O(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(g),_=this._calculateBarIndexPixels(g,d),b=(p._stacks||{})[l.axis],y={horizontal:h,base:m.base,enableBorderRadius:!b||On(p._custom)||r===b._top||r===b._bottom,x:h?m.head:_.center,y:h?_.center:m.head,height:h?_.size:Math.abs(m.size),width:h?Math.abs(m.size):_.size};f&&(y.options=u||this.resolveDataElementOptions(g,t[g].active?`active`:o));let M=y.options||t[g].options;Gl(y,M,b,r),Ql(y,M,d.ratio),this.updateElement(t[g],g,y,o)}}_getStacks(t,n){let{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=s.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[s.axis],h=d=>{let u=d._parsed.find(g=>g[s.axis]===c),f=u&&u[d.vScale.axis];if(O(f)||isNaN(f))return!0};for(let d of o)if(!(n!==void 0&&h(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===n).shift()}_getAxis(){let t={},n=this.getFirstScaleIdForIndexAxis();for(let s of this.chart.data.datasets)t[k(this.chart.options.indexAxis===`x`?s.xAxisID:s.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,s){let o=this._getStacks(t,s),a=n!==void 0?o.indexOf(n):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,n=this._cachedMeta,s=n.iScale,o=[],a,r;for(a=0,r=n.data.length;a<r;++a)o.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));let l=t.barThickness;return{min:l||Ul(n),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:s,index:o},options:{base:a,minBarLength:r}}=this,l=a||0,c=this.getParsed(t),h=c._custom,d=On(h),u=c[n.axis],f=0,g=s?this.applyStack(n,c,s):u,p,m;g!==u&&(f=g-u,g=u),d&&(u=h.barStart,g=h.barEnd-h.barStart,u!==0&&ct(u)!==ct(h.barEnd)&&(f=0),f+=u);let _=!O(a)&&!d?a:f,b=n.getPixelForValue(_);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(f+g):p=b,m=p-b,Math.abs(m)<r){m=Kl(m,n,l)*r,u===l&&(b-=m/2);let y=n.getPixelForDecimal(0),M=n.getPixelForDecimal(1);b=Math.max(Math.min(b,Math.max(y,M)),Math.min(y,M)),p=b+m,s&&!d&&(c._stacks[n.axis]._visualValues[o]=n.getValueForPixel(p)-n.getValueForPixel(b))}if(b===n.getPixelForValue(l)){let y=ct(m)*n.getLineWidthForValue(l)/2;b+=y,m-=y}return{size:m,base:b,head:p,center:p+m/2}}_calculateBarIndexPixels(t,n){let s=n.scale,o=this.options,a=o.skipNull,r=k(o.maxBarThickness,Infinity),l,c,h=this._getAxisCount();if(n.grouped){let d=a?this._getStackCount(t):n.stackCount,u=o.barThickness===`flex`?Xl(t,n,o,d*h):Yl(t,n,o,d*h),f=this.chart.options.indexAxis===`x`?this.getDataset().xAxisID:this.getDataset().yAxisID,g=this._getAxis().indexOf(k(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+g;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(r,u.chunk*u.ratio)}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(r,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,n=t.vScale,s=t.data,o=s.length,a=0;for(;a<o;++a)this.getParsed(a)[n.axis]!==null&&!s[a].hidden&&s[a].draw(this._ctx)}}return e})();var ec=(()=>{class e extends zt{static id=`bubble`;static defaults={datasetElementType:!1,dataElementType:`point`,animations:{numbers:{type:`number`,properties:[`x`,`y`,`borderWidth`,`radius`]}}};static overrides={scales:{x:{type:`linear`},y:{type:`linear`}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,o){let a=super.parsePrimitiveData(t,n,s,o);for(let r=0;r<a.length;r++)a[r]._custom=this.resolveDataElementOptions(r+s).radius;return a}parseArrayData(t,n,s,o){let a=super.parseArrayData(t,n,s,o);for(let r=0;r<a.length;r++){let l=n[s+r];a[r]._custom=k(l[2],this.resolveDataElementOptions(r+s).radius)}return a}parseObjectData(t,n,s,o){let a=super.parseObjectData(t,n,s,o);for(let r=0;r<a.length;r++){let l=n[s+r];a[r]._custom=k(l&&l.r&&+l.r,this.resolveDataElementOptions(r+s).radius)}return a}getMaxOverflow(){let t=this._cachedMeta.data,n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),h=r._custom;return{label:s[t]||``,value:`(`+l+`, `+c+(h?`, `+h:``)+`)`}}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,o){let a=o===`reset`,{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,o),d=r.axis,u=l.axis;for(let f=n;f<n+s;f++){let g=t[f],p=!a&&this.getParsed(f),m={},_=m[d]=a?r.getPixelForDecimal(.5):r.getPixelForValue(p[d]),b=m[u]=a?l.getBasePixel():l.getPixelForValue(p[u]);m.skip=isNaN(_)||isNaN(b),h&&(m.options=c||this.resolveDataElementOptions(f,g.active?`active`:o),a&&(m.options.radius=0)),this.updateElement(g,f,m,o)}}resolveDataElementOptions(t,n){let s=this.getParsed(t),o=super.resolveDataElementOptions(t,n);o.$shared&&(o=Object.assign({},o,{$shared:!1}));let a=o.radius;return n!==`active`&&(o.radius=0),o.radius+=k(s&&s._custom,a),o}}return e})();function ic(e,i,t){let n=1,s=1,o=0,a=0;if(i<z){let r=e,l=r+i,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(y,M,x)=>oe(y,r,l,!0)?1:Math.max(M,M*t,x,x*t),g=(y,M,x)=>oe(y,r,l,!0)?-1:Math.min(M,M*t,x,x*t),p=f(0,c,d),m=f(H,h,u),_=g(T,c,d),b=g(T+H,h,u);n=(p-_)/2,s=(m-b)/2,o=-(p+_)/2,a=-(m+b)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a}}var Re=class extends zt{static id=`doughnut`;static 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`};static descriptors={_scriptable:i=>i!==`spacing`,_indexable:i=>i!==`spacing`&&!i.startsWith(`borderDash`)&&!i.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data,{labels:{pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((l,c)=>{let d=i.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:d.backgroundColor,fontColor:o,hidden:!i.getDataVisibility(c),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:s,pointStyle:n,borderRadius:a&&(r||d.borderRadius),index:c}}):[]}},onClick(i,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(i,t){super(i,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(i,t){let n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(D(n[i])){let{key:l=`value`}=this._parsing;o=c=>+vt(n[c],l)}let a,r;for(a=i,r=i+t;a<r;++a)s._parsed[a]=o(a)}}_getRotation(){return rt(this.options.rotation-90)}_getCircumference(){return rt(this.options.circumference)}_getRotationExtents(){let i=z,t=-z;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),a=s._getCircumference();i=Math.min(i,o),t=Math.max(t,o+a)}return{rotation:i,circumference:t-i}}update(i){let{chartArea:n}=this.chart,s=this._cachedMeta,o=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(co(this.options.cutout,r),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=ic(d,h,l),m=(n.width-a)/u,_=(n.height-a)/f,b=Math.max(Math.min(m,_)/2,0),y=Gi(this.options.radius,b),x=(y-Math.max(y*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*y,this.offsetY=p*y,s.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,i)}_circumference(i,t){let n=this.options,s=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(i)||s._parsed[i]===null||s.data[i].hidden?0:this.calculateCircumference(s._parsed[i]*o/z)}updateElements(i,t,n,s){let o=s===`reset`,a=this.chart,r=a.chartArea,c=a.options.animation,h=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,g=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,s),_=this._getRotation(),b;for(b=0;b<t;++b)_+=this._circumference(b,o);for(b=t;b<t+n;++b){let y=this._circumference(b,o),M=i[b],x={x:h+this.offsetX,y:d+this.offsetY,startAngle:_,endAngle:_+y,circumference:y,outerRadius:g,innerRadius:f};m&&(x.options=p||this.resolveDataElementOptions(b,M.active?`active`:s)),_+=y,this.updateElement(M,b,x,s)}}calculateTotal(){let i=this._cachedMeta,t=i.data,n=0,s;for(s=0;s<t.length;s++){let o=i._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(i){let t=this._cachedMeta.total;return t>0&&!isNaN(i)?z*(Math.abs(i)/t):0}getLabelAndValue(i){let t=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=ae(t._parsed[i],n.options.locale);return{label:s[i]||``,value:o}}getMaxBorderWidth(i){let t=0,n=this.chart,s,o,a,r,l;if(!i){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){a=n.getDatasetMeta(s),i=a.data,r=a.controller;break}}if(!i)return 0;for(s=0,o=i.length;s<o;++s)l=r.resolveDataElementOptions(s),l.borderAlign!==`inner`&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(i){let t=0;for(let n=0,s=i.length;n<s;++n){let o=this.resolveDataElementOptions(n);t=Math.max(t,o.offset||0,o.hoverOffset||0)}return t}_getRingWeightOffset(i){let t=0;for(let n=0;n<i;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(i){return Math.max(k(this.chart.data.datasets[i].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};var nc=(()=>{class e extends zt{static id=`line`;static defaults={datasetElementType:`line`,dataElementType:`point`,showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:`category`},_value_:{type:`linear`}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let n=this._cachedMeta,{dataset:s,data:o=[],_dataset:a}=n,r=this.chart._animationsDisabled,{start:l,count:c}=ln(n,o,r);this._drawStart=l,this._drawCount=c,cn(n)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,n,s,o){let a=o===`reset`,{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(n,o),f=r.axis,g=l.axis,{spanGaps:p,segment:m}=this.options,_=$t(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||o===`none`,y=n+s,M=t.length,x=n>0&&this.getParsed(n-1);for(let v=0;v<M;++v){let S=t[v],C=b?S:{};if(v<n||v>=y){C.skip=!0;continue}let w=this.getParsed(v),L=O(w[g]),P=C[f]=r.getPixelForValue(w[f],v),A=C[g]=a||L?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[g],v);C.skip=isNaN(P)||isNaN(A)||L,C.stop=v>0&&Math.abs(w[f]-x[f])>_,m&&(C.parsed=w,C.raw=h.data[v]),u&&(C.options=d||this.resolveDataElementOptions(v,S.active?`active`:o)),b||this.updateElement(S,v,C,o),x=w}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,o=t.data||[];if(!o.length)return s;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return e})();var Li=class extends zt{static id=`polarArea`;static defaults={dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:`number`,properties:[`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`]}},indexAxis:`r`,startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:s}}=i.legend.options;return t.labels.map((o,a)=>{let l=i.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!i.getDataVisibility(a),index:a}})}return[]}},onClick(i,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(i,t){super(i,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(i){let t=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=ae(t._parsed[i].r,n.options.locale);return{label:s[i]||``,value:o}}parseObjectData(i,t,n,s){return _n.bind(this)(i,t,n,s)}update(i){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,i)}getMinMax(){let i=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return i.data.forEach((n,s)=>{let o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<t.min&&(t.min=o),o>t.max&&(t.max=o))}),t}_updateRadius(){let i=this.chart,t=i.chartArea,n=i.options,s=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(s/2,0),r=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/i.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(i,t,n,s){let o=s===`reset`,a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*T,f=u,g,p=360/this.countVisibleElements();for(g=0;g<t;++g)f+=this._computeAngle(g,s,p);for(g=t;g<t+n;g++){let m=i[g],_=f,b=f+this._computeAngle(g,s,p),y=a.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=b,o&&(l.animateScale&&(y=0),l.animateRotate&&(_=b=u));let M={x:h,y:d,innerRadius:0,outerRadius:y,startAngle:_,endAngle:b,options:this.resolveDataElementOptions(g,m.active?`active`:s)};this.updateElement(m,g,M,s)}}countVisibleElements(){let i=this._cachedMeta,t=0;return i.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(i,t,n){return this.chart.getDataVisibility(i)?rt(this.resolveDataElementOptions(i,t).angle||n):0}};var rc=Object.freeze({__proto__:null,BarController:tc,BubbleController:ec,DoughnutController:Re,LineController:nc,PieController:(()=>{class e extends Re{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}}return e})(),PolarAreaController:Li,RadarController:(()=>{class e extends zt{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(t){let n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:``+n.getLabelForValue(s[n.axis])}}parseObjectData(t,n,s,o){return _n.bind(this)(t,n,s,o)}update(t){let n=this._cachedMeta,s=n.dataset,o=n.data||[],a=n.iScale.getLabels();if(s.points=o,t!==`resize`){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(s,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,n,s,o){let a=this._cachedMeta.rScale,r=o===`reset`;for(let l=n;l<n+s;l++){let c=t[l],h=this.resolveDataElementOptions(l,c.active?`active`:o),d=a.getPointPositionForValue(l,this.getParsed(l).r),u=r?a.xCenter:d.x,f=r?a.yCenter:d.y,g={x:u,y:f,angle:d.angle,skip:isNaN(u)||isNaN(f),options:h};this.updateElement(c,l,g,o)}}}return e})(),ScatterController:(()=>{class e extends zt{static id=`scatter`;static defaults={datasetElementType:!1,dataElementType:`point`,showLine:!1,fill:!1};static overrides={interaction:{mode:`point`},scales:{x:{type:`linear`},y:{type:`linear`}}};getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[t]||``,value:`(`+l+`, `+c+`)`}}update(t){let n=this._cachedMeta,{data:s=[]}=n,o=this.chart._animationsDisabled,{start:a,count:r}=ln(n,s,o);if(this._drawStart=a,this._drawCount=r,cn(n)&&(a=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement(`line`)),super.addElements()}updateElements(t,n,s,o){let a=o===`reset`,{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(n,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),g=r.axis,p=l.axis,{spanGaps:m,segment:_}=this.options,b=$t(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o===`none`,M=n>0&&this.getParsed(n-1);for(let x=n;x<n+s;++x){let v=t[x],S=this.getParsed(x),C=y?v:{},w=O(S[p]),L=C[g]=r.getPixelForValue(S[g],x),P=C[p]=a||w?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,S,c):S[p],x);C.skip=isNaN(L)||isNaN(P)||w,C.stop=x>0&&Math.abs(S[g]-M[g])>b,_&&(C.parsed=S,C.raw=h.data[x]),f&&(C.options=u||this.resolveDataElementOptions(x,v.active?`active`:o)),y||this.updateElement(v,x,C,o),M=S}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!n.length)return o;let a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,a,r)/2}}return e})()});function Yt(){throw new Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var lc={_date:class e{static override(i){Object.assign(e.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Yt()}parse(){return Yt()}format(){return Yt()}add(){return Yt()}diff(){return Yt()}startOf(){return Yt()}endOf(){return Yt()}}};function cc(e,i,t,n){let{controller:s,data:o,_sorted:a}=e,r=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(r&&i===r.axis&&i!==`r`&&a&&o.length){let c=r._reversePixels?mo:ht;if(n){if(s._sharedOptions){let h=o[0],d=typeof h.getRange==`function`&&h.getRange(i);if(d){let u=c(o,i,t-d),f=c(o,i,t+d);return{lo:u.lo,hi:f.hi}}}}else{let h=c(o,i,t);if(l){let{vScale:d}=s._cachedMeta,{_parsed:u}=e,f=u.slice(0,h.lo+1).reverse().findIndex(p=>!O(p[d.axis]));h.lo-=Math.max(0,f);let g=u.slice(h.hi).findIndex(p=>!O(p[d.axis]));h.hi+=Math.max(0,g)}return h}}return{lo:0,hi:o.length-1}}function Be(e,i,t,n,s){let o=e.getSortedVisibleDatasetMetas(),a=t[i];for(let r=0,l=o.length;r<l;++r){let{index:c,data:h}=o[r],{lo:d,hi:u}=cc(o[r],i,a,s);for(let f=d;f<=u;++f){let g=h[f];g.skip||n(g,c,f)}}}function hc(e){let i=e.indexOf(`x`)!==-1,t=e.indexOf(`y`)!==-1;return function(n,s){let o=i?Math.abs(n.x-s.x):0,a=t?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Dn(e,i,t,n,s){let o=[];return!s&&!e.isPointInArea(i)||Be(e,t,i,function(r,l,c){!s&&!dt(r,e.chartArea,0)||r.inRange(i.x,i.y,n)&&o.push({element:r,datasetIndex:l,index:c})},!0),o}function dc(e,i,t,n){let s=[];function o(a,r,l){let{startAngle:c,endAngle:h}=a.getProps([`startAngle`,`endAngle`],n),{angle:d}=nn(a,{x:i.x,y:i.y});oe(d,c,h)&&s.push({element:a,datasetIndex:r,index:l})}return Be(e,t,i,o),s}function uc(e,i,t,n,s,o){let a=[],r=hc(t),l=Number.POSITIVE_INFINITY;function c(h,d,u){let f=h.inRange(i.x,i.y,s);if(n&&!f)return;let g=h.getCenterPoint(s);if(!(!!o||e.isPointInArea(g))&&!f)return;let m=r(i,g);m<l?(a=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&a.push({element:h,datasetIndex:d,index:u})}return Be(e,t,i,c),a}function An(e,i,t,n,s,o){return!o&&!e.isPointInArea(i)?[]:t===`r`&&!n?dc(e,i,t,s):uc(e,i,t,n,s,o)}function Xo(e,i,t,n,s){let o=[],a=t===`x`?`inXRange`:`inYRange`,r=!1;return Be(e,t,i,(l,c,h)=>{l[a]&&l[a](i[t],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(i.x,i.y,s))}),n&&!r?[]:o}var fc={evaluateInteractionItems:Be,modes:{index(e,i,t,n){let s=It(i,e),o=t.axis||`x`,a=t.includeInvisible||!1,r=t.intersect?Dn(e,s,o,n,a):An(e,s,o,!1,n,a),l=[];return r.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(e,i,t,n){let s=It(i,e),o=t.axis||`xy`,a=t.includeInvisible||!1,r=t.intersect?Dn(e,s,o,n,a):An(e,s,o,!1,n,a);if(r.length>0){let l=r[0].datasetIndex,c=e.getDatasetMeta(l).data;r=[];for(let h=0;h<c.length;++h)r.push({element:c[h],datasetIndex:l,index:h})}return r},point(e,i,t,n){return Dn(e,It(i,e),t.axis||`xy`,n,t.includeInvisible||!1)},nearest(e,i,t,n){let s=It(i,e),o=t.axis||`xy`,a=t.includeInvisible||!1;return An(e,s,o,t.intersect,n,a)},x(e,i,t,n){return Xo(e,It(i,e),`x`,t.intersect,n)},y(e,i,t,n){return Xo(e,It(i,e),`y`,t.intersect,n)}}};var Va=[`left`,`top`,`right`,`bottom`];function Le(e,i){return e.filter(t=>t.pos===i)}function Zo(e,i){return e.filter(t=>Va.indexOf(t.pos)===-1&&t.box.axis===i)}function Oe(e,i){return e.sort((t,n)=>{let s=i?n:t,o=i?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function gc(e){let i=[],t,n,s,o,a,r;for(t=0,n=(e||[]).length;t<n;++t)s=e[t],{position:o,options:{stack:a,stackWeight:r=1}}=s,i.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return i}function pc(e){let i={};for(let t of e){let{stack:n,pos:s,stackWeight:o}=t;if(!n||!Va.includes(s))continue;let a=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return i}function mc(e,i){let t=pc(e),{vBoxMaxWidth:n,hBoxMaxHeight:s}=i,o,a,r;for(o=0,a=e.length;o<a;++o){r=e[o];let{fullSize:l}=r.box,c=t[r.stack],h=c&&r.stackWeight/c.weight;r.horizontal?(r.width=h?h*n:l&&i.availableWidth,r.height=s):(r.width=n,r.height=h?h*s:l&&i.availableHeight)}return t}function bc(e){let i=gc(e),t=Oe(i.filter(c=>c.box.fullSize),!0),n=Oe(Le(i,`left`),!0),s=Oe(Le(i,`right`)),o=Oe(Le(i,`top`),!0),a=Oe(Le(i,`bottom`)),r=Zo(i,`x`),l=Zo(i,`y`);return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Le(i,`chartArea`),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function Ko(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n])}function Ha(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function _c(e,i,t,n){let{pos:s,box:o}=t,a=e.maxPadding;if(!D(s)){t.size&&(e[s]-=t.size);let d=n[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,e[s]+=t.size}o.getPadding&&Ha(a,o.getPadding());let r=Math.max(0,i.outerWidth-Ko(a,e,`left`,`right`)),l=Math.max(0,i.outerHeight-Ko(a,e,`top`,`bottom`)),c=r!==e.w,h=l!==e.h;return e.w=r,e.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function xc(e){let i=e.maxPadding;function t(n){let s=Math.max(i[n]-e[n],0);return e[n]+=s,s}e.y+=t(`top`),e.x+=t(`left`),t(`right`),t(`bottom`)}function yc(e,i){let t=i.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(i[a],t[a])}),o}return n(e?[`left`,`right`]:[`top`,`bottom`])}function Te(e,i,t,n){let s=[],o,a,r,l,c,h;for(o=0,a=e.length,c=0;o<a;++o){r=e[o],l=r.box,l.update(r.width||i.w,r.height||i.h,yc(r.horizontal,i));let{same:d,other:u}=_c(i,t,r,n);c|=d&&s.length,h=h||u,l.fullSize||s.push(r)}return c&&Te(s,i,t,n)||h}function xi(e,i,t,n,s){e.top=t,e.left=i,e.right=i+n,e.bottom=t+s,e.width=n,e.height=s}function qo(e,i,t,n){let s=t.padding,{x:o,y:a}=i;for(let r of e){let l=r.box,c=n[r.stack]||{count:1,placed:0,weight:1},h=r.stackWeight/c.weight||1;if(r.horizontal){let d=i.w*h,u=c.size||l.height;ne(c.start)&&(a=c.start),l.fullSize?xi(l,s.left,a,t.outerWidth-s.right-s.left,u):xi(l,i.left+c.placed,a,d,u),c.start=a,c.placed+=d,a=l.bottom}else{let d=i.h*h,u=c.size||l.width;ne(c.start)&&(o=c.start),l.fullSize?xi(l,o,s.top,u,t.outerHeight-s.bottom-s.top):xi(l,o,i.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}i.x=o,i.y=a}var J={addBox(e,i){e.boxes||(e.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)}}]},e.boxes.push(i)},removeBox(e,i){let t=e.boxes?e.boxes.indexOf(i):-1;t!==-1&&e.boxes.splice(t,1)},configure(e,i,t){i.fullSize=t.fullSize,i.position=t.position,i.weight=t.weight},update(e,i,t,n){if(!e)return;let s=K(e.options.layout.padding),o=Math.max(i-s.width,0),a=Math.max(t-s.height,0),r=bc(e.boxes),l=r.vertical,c=r.horizontal;E(e.boxes,p=>{typeof p.beforeLayout==`function`&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);Ha(u,K(n));let f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),g=mc(l.concat(c),d);Te(r.fullSize,f,d,g),Te(l,f,d,g),Te(c,f,d,g)&&Te(l,f,d,g),xc(f),qo(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,qo(r.rightAndBottom,f,d,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{let m=p.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};var Oi=class{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,n,s){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)}}isAttached(i){return!0}updateConfig(i){}};var Vn=class extends Oi{acquireContext(i){return i&&i.getContext&&i.getContext(`2d`)||null}updateConfig(i){i.options.animation=!1}};var wi=`$chartjs`;var vc={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`};var Go=e=>e===null||e===``;function Mc(e,i){let t=e.style,n=e.getAttribute(`height`),s=e.getAttribute(`width`);if(e[wi]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||`block`,t.boxSizing=t.boxSizing||`border-box`,Go(s)){let o=yn(e,`width`);o!==void 0&&(e.width=o)}if(Go(n))if(e.style.height===``)e.height=e.width/(i||2);else{let o=yn(e,`height`);o!==void 0&&(e.height=o)}return e}var Wa=Eo?{passive:!0}:!1;function Cc(e,i,t){e&&e.addEventListener(i,t,Wa)}function Sc(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,Wa)}function wc(e,i){let t=vc[e.type]||e.type,{x:n,y:s}=It(e,i);return{type:t,chart:i,native:e,x:n!==void 0?n:null,y:s!==void 0?s:null}}function Di(e,i){for(let t of e)if(t===i||t.contains(i))return!0}function kc(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||Di(r.addedNodes,n),a=a&&!Di(r.removedNodes,n);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Pc(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||Di(r.removedNodes,n),a=a&&!Di(r.addedNodes,n);a&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}var Ie=new Map;var Jo=0;function ja(){let e=window.devicePixelRatio;e!==Jo&&(Jo=e,Ie.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function Lc(e,i){Ie.size||window.addEventListener(`resize`,ja),Ie.set(e,i)}function Oc(e){Ie.delete(e),Ie.size||window.removeEventListener(`resize`,ja)}function Dc(e,i,t){let n=e.canvas,s=n&&bi(n);if(!s)return;let o=rn((r,l)=>{let c=s.clientWidth;t(r,l),c<s.clientWidth&&t()},window),a=new ResizeObserver(r=>{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),Lc(e,o),a}function Tn(e,i,t){t&&t.disconnect(),i===`resize`&&Oc(e)}function Ac(e,i,t){let n=e.canvas,s=rn(o=>{e.ctx!==null&&t(wc(o,e))},e);return Cc(n,i,s),s}var Hn=class extends Oi{acquireContext(i,t){let n=i&&i.getContext&&i.getContext(`2d`);return n&&n.canvas===i?(Mc(i,t),n):null}releaseContext(i){let t=i.canvas;if(!t[wi])return!1;let n=t[wi].initial;[`height`,`width`].forEach(o=>{let a=n[o];O(a)?t.removeAttribute(o):t.setAttribute(o,a)});let s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[wi],!0}addEventListener(i,t,n){this.removeEventListener(i,t);let s=i.$proxies||(i.$proxies={});s[t]=({attach:kc,detach:Pc,resize:Dc}[t]||Ac)(i,t,n)}removeEventListener(i,t){let n=i.$proxies||(i.$proxies={}),s=n[t];if(!s)return;({attach:Tn,detach:Tn,resize:Tn}[t]||Sc)(i,t,s),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,n,s){return To(i,t,n,s)}isAttached(i){let t=i&&bi(i);return!!(t&&t.isConnected)}};function Tc(e){return!mi()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?Vn:Hn}var wt=(()=>{class e{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:n,y:s}=this.getProps([`x`,`y`],t);return{x:n,y:s}}hasValue(){return $t(this.x)&&$t(this.y)}getProps(t,n){let s=this.$animations;if(!n||!s)return this;let o={};return t.forEach(a=>{o[a]=s[a]&&s[a].active()?s[a]._to:this[a]}),o}}return e})();function Ec(e,i){let t=e.options.ticks,n=Rc(e),s=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?Fc(i):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return zc(i,c,o,a/s),c;let h=Ic(o,i,s);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(yi(i,c,h,O(f)?0:r-f,r),d=0,u=a-1;d<u;d++)yi(i,c,h,o[d],o[d+1]);return yi(i,c,h,l,O(f)?i.length:l+f),c}return yi(i,c,h),c}function Rc(e){let i=e.options.offset,t=e._tickSize(),n=e._length/t+(i?0:1),s=e._maxLength/t;return Math.floor(Math.min(n,s))}function Ic(e,i,t){let n=Bc(e),s=i.length/t;if(!n)return Math.max(s,1);let o=fo(n);for(let a=0,r=o.length-1;a<r;a++){let l=o[a];if(l>s)return l}return Math.max(s,1)}function Fc(e){let i=[],t,n;for(t=0,n=e.length;t<n;t++)e[t].major&&i.push(t);return i}function zc(e,i,t,n){let s=0,o=t[0],a;for(n=Math.ceil(n),a=0;a<e.length;a++)a===o&&(i.push(e[a]),s++,o=t[s*n])}function yi(e,i,t,n,s){let o=k(n,0),a=Math.min(k(s,e.length),e.length),r=0,l,c,h;for(t=Math.ceil(t),s&&(l=s-n,t=l/Math.floor(l/t)),h=o;h<0;)r++,h=Math.round(o+r*t);for(c=Math.max(o,0);c<a;c++)c===h&&(i.push(e[c]),r++,h=Math.round(o+r*t))}function Bc(e){let i=e.length,t,n;if(i<2)return!1;for(n=e[0],t=1;t<i;++t)if(e[t]-e[t-1]!==n)return!1;return n}var Nc=e=>e===`left`?`right`:e===`right`?`left`:e;var Qo=(e,i,t)=>i===`top`||i===`left`?e[i]+t:e[i]-t;var ta=(e,i)=>Math.min(i||e,e);function ea(e,i){let t=[],n=e.length/i,s=e.length,o=0;for(;o<s;o+=n)t.push(e[Math.floor(o)]);return t}function Vc(e,i,t){let n=e.ticks.length,s=Math.min(i,n-1),o=e._startPixel,a=e._endPixel,r=1e-6,l=e.getPixelForTick(s),c;if(!(t&&(n===1?c=Math.max(l-o,a-l):i===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<i?c:-c,l<o-r||l>a+r)))return l}function Hc(e,i){E(e,t=>{let n=t.gc,s=n.length/2,o;if(s>i){for(o=0;o<s;++o)delete t.data[n[o]];n.splice(0,s)}})}function De(e){return e.drawTicks?e.tickLength:0}function ia(e,i){if(!e.display)return 0;let t=j(e.font,i),n=K(e.padding);return(F(e.text)?e.text.length:1)*t.lineHeight+n.height}function Wc(e,i){return Mt(e,{scale:i,type:`scale`})}function jc(e,i,t){return Mt(e,{tick:t,index:i,type:`tick`})}function $c(e,i,t){let n=di(e);return(t&&i!==`right`||!t&&i===`right`)&&(n=Nc(n)),n}function Uc(e,i,t,n){let{top:s,left:o,bottom:a,right:r,chart:l}=e,{chartArea:c,scales:h}=l,d=0,u,f,g,p=a-s,m=r-o;if(e.isHorizontal()){if(f=Z(n,o,r),D(t)){let _=Object.keys(t)[0],b=t[_];g=h[_].getPixelForValue(b)+p-i}else t===`center`?g=(c.bottom+c.top)/2+p-i:g=Qo(e,t,i);u=r-o}else{if(D(t)){let _=Object.keys(t)[0],b=t[_];f=h[_].getPixelForValue(b)-m+i}else t===`center`?f=(c.left+c.right)/2-m+i:f=Qo(e,t,i);g=Z(n,a,s),d=t===`left`?-H:H}return{titleX:f,titleY:g,maxWidth:u,rotation:d}}var Zt=class e extends wt{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:n,_suggestedMax:s}=this;return i=Q(i,Number.POSITIVE_INFINITY),t=Q(t,Number.NEGATIVE_INFINITY),n=Q(n,Number.POSITIVE_INFINITY),s=Q(s,Number.NEGATIVE_INFINITY),{min:Q(i,n),max:Q(t,s),minDefined:V(i),maxDefined:V(t)}}getMinMax(i){let{min:t,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:t,max:n};let r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,i),s||(t=Math.min(t,a.min)),o||(n=Math.max(n,a.max));return t=o&&t>n?n:t,n=s&&t>n?t:n,{min:Q(t,Q(n,t)),max:Q(n,Q(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(i,t,n){let{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ko(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?ea(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source===`auto`)&&(this.ticks=Ec(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let i=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,i=!i),this._startPixel=t,this._endPixel=n,this._reversePixels=i,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(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(){I(this.options.afterSetDimensions,[this])}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),I(this.options[i],[this])}beforeDataLimits(){this._callHooks(`beforeDataLimits`)}determineDataLimits(){}afterDataLimits(){this._callHooks(`afterDataLimits`)}beforeBuildTicks(){this._callHooks(`beforeBuildTicks`)}buildTicks(){return[]}afterBuildTicks(){this._callHooks(`afterBuildTicks`)}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(i){let t=this.options.ticks,n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n],o.label=I(t.callback,[o.value,n,i],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let i=this.options,t=i.ticks,n=ta(this.ticks.length,i.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation,a=s,r,l,c;if(!this._isVisible()||!t.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=$(this.chart.width-d,0,this.maxWidth);r=i.offset?this.maxWidth/n:f/(n-1),d+6>r&&(r=f/(n-(i.offset?.5:1)),l=this.maxHeight-De(i.grid)-t.padding-ia(i.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=ci(Math.min(Math.asin($((h.highest.height+6)/r,-1,1)),Math.asin($(l/c,-1,1))-Math.asin($(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=ia(s,t.options.font);if(r?(i.width=this.maxWidth,i.height=De(o)+l):(i.height=this.maxHeight,i.width=De(o)+l),n.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,g=rt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let _=n.mirror?0:m*d.width+p*u.height;i.height=Math.min(this.maxHeight,i.height+_+f)}else{let _=n.mirror?0:p*d.width+m*u.height;i.width=Math.min(this.maxWidth,i.width+_+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(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,n,s){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!==`top`&&this.axis===`x`;if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=s*i.width,f=n*t.height):(u=n*i.height,f=s*t.width):o===`start`?f=t.width:o===`end`?u=i.width:o!==`inner`&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;o===`start`?(h=0,d=i.height):o===`end`&&(h=t.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+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(){I(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:t}=this.options;return t===`top`||t===`bottom`||i===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,n;for(t=0,n=i.length;t<n;t++)O(i[t].label)&&(i.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let i=this._labelSizes;if(!i){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=ea(n,t)),this._labelSizes=i=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return i}_computeLabelSizes(i,t,n){let{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(t/ta(t,n)),c=0,h=0,d,u,f,g,p,m,_,b,y,M,x;for(d=0;d<t;d+=l){if(g=i[d].label,p=this._resolveTickFontOptions(d),s.font=m=p.string,_=o[m]=o[m]||{data:{},gc:[]},b=p.lineHeight,y=M=0,!O(g)&&!F(g))y=Me(s,_.data,_.gc,y,g),M=b;else if(F(g))for(u=0,f=g.length;u<f;++u)x=g[u],!O(x)&&!F(x)&&(y=Me(s,_.data,_.gc,y,x),M+=b);a.push(y),r.push(M),c=Math.max(y,c),h=Math.max(M,h)}Hc(o,t);let v=a.indexOf(c),S=r.indexOf(h),C=w=>({width:a[w]||0,height:r[w]||0});return{first:C(0),last:C(t-1),widest:C(v),highest:C(S),widths:a,heights:r}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return po(this._alignToPixels?Tt(this.chart,t,0):t)}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){let t=this.ticks||[];if(i>=0&&i<t.length){let n=t[i];return n.$context||(n.$context=jc(this.getContext(),i,n))}return this.$context||(this.$context=Wc(this.chart.getContext(),this))}_tickSize(){let i=this.options.ticks,t=rt(this.labelRotation),n=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=i.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>r*s?r/n:l/s:l*s<r*n?l/n:r/s}_isVisible(){let i=this.options.display;return i!==`auto`?!!i:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(i){let t=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=De(o),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,_=function(N){return Tt(n,N,p)},b,y,M,x,v,S,C,w,L,P,A,Y;if(a===`top`)b=_(this.bottom),S=this.bottom-u,w=b-m,P=_(i.top)+m,Y=i.bottom;else if(a===`bottom`)b=_(this.top),P=i.top,Y=_(i.bottom)-m,S=b+m,w=this.top+u;else if(a===`left`)b=_(this.right),v=this.right-u,C=b-m,L=_(i.left)+m,A=i.right;else if(a===`right`)b=_(this.left),L=i.left,A=_(i.right)-m,v=b+m,C=this.left+u;else if(t===`x`){if(a===`center`)b=_((i.top+i.bottom)/2+.5);else if(D(a)){let N=Object.keys(a)[0],W=a[N];b=_(this.chart.scales[N].getPixelForValue(W))}P=i.top,Y=i.bottom,S=b+m,w=S+u}else if(t===`y`){if(a===`center`)b=_((i.left+i.right)/2);else if(D(a)){let N=Object.keys(a)[0],W=a[N];b=_(this.chart.scales[N].getPixelForValue(W))}v=b-m,C=v-u,L=i.left,A=i.right}let it=k(s.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/it));for(y=0;y<d;y+=R){let N=this.getContext(y),W=o.setContext(N),lt=r.setContext(N),q=W.lineWidth,Kt=W.color,Ne=lt.dash||[],qt=lt.dashOffset,fe=W.tickWidth,Bt=W.tickColor,ge=W.tickBorderDash||[],Nt=W.tickBorderDashOffset;M=Vc(this,y,l),M!==void 0&&(x=Tt(n,M,q),c?v=C=L=A=x:S=w=P=Y=x,f.push({tx1:v,ty1:S,tx2:C,ty2:w,x1:L,y1:P,x2:A,y2:Y,width:q,color:Kt,borderDash:Ne,borderDashOffset:qt,tickWidth:fe,tickColor:Bt,tickBorderDash:ge,tickBorderDashOffset:Nt}))}return this._ticksLength=d,this._borderValue=b,f}_computeLabelItems(i){let t=this.axis,n=this.options,{position:s,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=De(n.grid),f=u+h,g=d?-h:f,p=-rt(this.labelRotation),m=[],_,b,y,M,x,v,S,C,w,L,P,A,Y=`middle`;if(s===`top`)v=this.bottom-g,S=this._getXAxisLabelAlignment();else if(s===`bottom`)v=this.top+g,S=this._getXAxisLabelAlignment();else if(s===`left`){let R=this._getYAxisLabelAlignment(u);S=R.textAlign,x=R.x}else if(s===`right`){let R=this._getYAxisLabelAlignment(u);S=R.textAlign,x=R.x}else if(t===`x`){if(s===`center`)v=(i.top+i.bottom)/2+f;else if(D(s)){let R=Object.keys(s)[0],N=s[R];v=this.chart.scales[R].getPixelForValue(N)+f}S=this._getXAxisLabelAlignment()}else if(t===`y`){if(s===`center`)x=(i.left+i.right)/2-f;else if(D(s)){let R=Object.keys(s)[0],N=s[R];x=this.chart.scales[R].getPixelForValue(N)}S=this._getYAxisLabelAlignment(u).textAlign}t===`y`&&(l===`start`?Y=`top`:l===`end`&&(Y=`bottom`));let it=this._getLabelSizes();for(_=0,b=r.length;_<b;++_){y=r[_],M=y.label;let R=o.setContext(this.getContext(_));C=this.getPixelForTick(_)+o.labelOffset,w=this._resolveTickFontOptions(_),L=w.lineHeight,P=F(M)?M.length:1;let N=P/2,W=R.color,lt=R.textStrokeColor,q=R.textStrokeWidth,Kt=S;a?(x=C,S===`inner`&&(_===b-1?Kt=this.options.reverse?`left`:`right`:_===0?Kt=this.options.reverse?`right`:`left`:Kt=`center`),s===`top`?c===`near`||p!==0?A=-P*L+L/2:c===`center`?A=-it.highest.height/2-N*L+L:A=-it.highest.height+L/2:c===`near`||p!==0?A=L/2:c===`center`?A=it.highest.height/2-N*L:A=it.highest.height-P*L,d&&(A*=-1),p!==0&&!R.showLabelBackdrop&&(x+=L/2*Math.sin(p))):(v=C,A=(1-P)*L/2);let Ne;if(R.showLabelBackdrop){let qt=K(R.backdropPadding),fe=it.heights[_],Bt=it.widths[_],ge=A-qt.top,Nt=0-qt.left;switch(Y){case`middle`:ge-=fe/2;break;case`bottom`:ge-=fe;break}switch(S){case`center`:Nt-=Bt/2;break;case`right`:Nt-=Bt;break;case`inner`:_===b-1?Nt-=Bt:_>0&&(Nt-=Bt/2);break}Ne={left:Nt,top:ge,width:Bt+qt.width,height:fe+qt.height,color:R.backdropColor}}m.push({label:M,font:w,textOffset:A,options:{rotation:p,color:W,strokeColor:lt,strokeWidth:q,textAlign:Kt,textBaseline:Y,translation:[x,v],backdrop:Ne}})}return m}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-rt(this.labelRotation))return i===`top`?`left`:`right`;let s=`center`;return t.align===`start`?s=`left`:t.align===`end`?s=`right`:t.align===`inner`&&(s=`inner`),s}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=i+o,l=a.widest.width,c,h;return t===`left`?s?(h=this.right+o,n===`near`?c=`left`:n===`center`?(c=`center`,h+=l/2):(c=`right`,h+=l)):(h=this.right-r,n===`near`?c=`right`:n===`center`?(c=`center`,h-=l/2):(c=`left`,h=this.left)):t===`right`?s?(h=this.left+o,n===`near`?c=`right`:n===`center`?(c=`center`,h-=l/2):(c=`left`,h-=l)):(h=this.left+r,n===`near`?c=`left`:n===`center`?(c=`center`,h+=l/2):(c=`right`,h=this.right)):c=`right`,{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:i.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:n,top:s,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,s,o,a),i.restore())}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let s=this.ticks.findIndex(o=>o.value===i);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(i){let t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,r=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,a=s.length;o<a;++o){let l=s[o];t.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:i,ctx:t,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;let r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,h,d,u;this.isHorizontal()?(c=Tt(i,this.left,a)-a/2,h=Tt(i,this.right,r)+r/2,d=u=l):(d=Tt(i,this.top,a)-a/2,u=Tt(i,this.bottom,r)+r/2,c=h=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,d),t.lineTo(h,u),t.stroke(),t.restore()}drawLabels(i){if(!this.options.ticks.display)return;let n=this.ctx,s=this._computeLabelArea();s&&we(n,s);let o=this.getLabelItems(i);for(let a of o){let r=a.options,l=a.font,c=a.label,h=a.textOffset;Et(n,c,0,h,l,r)}s&&ke(n)}drawTitle(){let{ctx:i,options:{position:t,title:n,reverse:s}}=this;if(!n.display)return;let o=j(n.font),a=K(n.padding),r=n.align,l=o.lineHeight/2;t===`bottom`||t===`center`||D(t)?(l+=a.bottom,F(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;let{titleX:c,titleY:h,maxWidth:d,rotation:u}=Uc(this,l,t,r);Et(i,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:u,textAlign:$c(r,t,s),textBaseline:`middle`,translation:[c,h]})}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i))}_layers(){let i=this.options,t=i.ticks&&i.ticks.z||0,n=k(i.grid&&i.grid.z,-1),s=k(i.border&&i.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,s=[],o,a;for(o=0,a=t.length;o<a;++o){let r=t[o];r[n]===this.id&&(!i||r.type===i)&&s.push(r)}return s}_resolveTickFontOptions(i){return j(this.options.ticks.setContext(this.getContext(i)).font)}_maxDigits(){let i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i}};var he=class{constructor(i,t,n){this.type=i,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype)}register(i){let t=Object.getPrototypeOf(i),n;Zc(t)&&(n=this.register(t));let 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,Yc(i,a,n),this.override&&B.override(i.id,i.overrides)),a}get(i){return this.items[i]}unregister(i){let t=this.items,n=i.id,s=this.scope;n in t&&delete t[n],s&&n in B[s]&&(delete B[s][n],this.override&&delete At[n])}};function Yc(e,i,t){let n=te(Object.create(null),[t?B.get(t):{},B.get(i),e.defaults]);B.set(i,n),e.defaultRoutes&&Xc(i,e.defaultRoutes),e.descriptors&&B.describe(i,e.descriptors)}function Xc(e,i){Object.keys(i).forEach(t=>{let n=t.split(`.`),s=n.pop(),o=[e].concat(n).join(`.`),a=i[t].split(`.`),r=a.pop(),l=a.join(`.`);B.route(o,s,l,r)})}function Zc(e){return`id`in e&&`defaults`in e}var Wn=class{constructor(){this.controllers=new he(zt,`datasets`,!0),this.elements=new he(wt,`elements`),this.plugins=new he(Object,`plugins`),this.scales=new he(Zt,`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,n){[...t].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(i,o,s):E(s,a=>{let r=n||this._getRegistryForType(a);this._exec(i,r,a)})})}_exec(i,t,n){let s=li(i);I(n[`before`+s],[],n),t[i](n),I(n[`after`+s],[],n)}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(i))return n}return this.plugins}_get(i,t,n){let s=t.get(i);if(s===void 0)throw new Error(`"`+i+`" is not a registered `+n+`.`);return s}};var pt=new Wn;var jn=class{constructor(){this._init=void 0}notify(i,t,n,s){if(t===`beforeInit`&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,`install`)),this._init===void 0)return;let o=s?this._descriptors(i).filter(s):this._descriptors(i),a=this._notify(o,i,t,n);return t===`afterDestroy`&&(this._notify(o,i,`stop`),this._notify(this._init,i,`uninstall`),this._init=void 0),a}_notify(i,t,n,s){s=s||{};for(let o of i){let a=o.plugin,r=a[n];if(I(r,[t,s,o.options],a)===!1&&s.cancelable)return!1}return!0}invalidate(){O(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(i){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t}_createDescriptors(i,t){let n=i&&i.config,s=k(n.options&&n.options.plugins,{}),o=Kc(n);return s===!1&&!t?[]:Gc(i,o,s,t)}_notifyStateChanges(i){let t=this._oldCache||[],n=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(t,n),i,`stop`),this._notify(s(n,t),i,`start`)}};function Kc(e){let i={},t=[],n=Object.keys(pt.plugins.items);for(let o=0;o<n.length;o++)t.push(pt.getPlugin(n[o]));let s=e.plugins||[];for(let o=0;o<s.length;o++){let a=s[o];t.indexOf(a)===-1&&(t.push(a),i[a.id]=!0)}return{plugins:t,localIds:i}}function qc(e,i){return!i&&e===!1?null:e===!0?{}:e}function Gc(e,{plugins:i,localIds:t},n,s){let o=[],a=e.getContext();for(let r of i){let l=r.id,c=qc(n[l],s);c!==null&&o.push({plugin:r,options:Jc(e.config,{plugin:r,local:t[l]},c,a)})}return o}function Jc(e,{plugin:i,local:t},n,s){let o=e.pluginScopeKeys(i),a=e.getOptionScopes(n,o);return t&&i.defaults&&a.push(i.defaults),e.createResolver(a,s,[``],{scriptable:!1,indexable:!1,allKeys:!0})}function $n(e,i){let t=B.datasets[e]||{};return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||t.indexAxis||`x`}function Qc(e,i){let t=e;return e===`_index_`?t=i:e===`_value_`&&(t=i===`x`?`y`:`x`),t}function th(e,i){return e===i?`_index_`:`_value_`}function na(e){if(e===`x`||e===`y`||e===`r`)return e}function eh(e){if(e===`top`||e===`bottom`)return`x`;if(e===`left`||e===`right`)return`y`}function Un(e,...i){if(na(e))return e;for(let t of i){let n=t.axis||eh(t.position)||e.length>1&&na(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function sa(e,i,t){if(t[i+`AxisID`]===e)return{axis:i}}function ih(e,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return sa(e,`x`,t[0])||sa(e,`y`,t[0])}return{}}function nh(e,i){let t=At[e.type]||{scales:{}},n=i.scales||{},s=$n(e.type,i),o=Object.create(null);return Object.keys(n).forEach(a=>{let r=n[a];if(!D(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=Un(a,r,ih(a,e),B.scales[r.type]),c=th(l,s),h=t.scales||{};o[a]=ie(Object.create(null),[{axis:l},r,h[l],h[c]])}),e.data.datasets.forEach(a=>{let r=a.type||e.type,l=a.indexAxis||$n(r,i),h=(At[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=Qc(d,l),f=a[u+`AxisID`]||u;o[f]=o[f]||Object.create(null),ie(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];ie(r,[B.scales[r.type],B.scale])}),o}function $a(e){let i=e.options||(e.options={});i.plugins=k(i.plugins,{}),i.scales=nh(e,i)}function Ua(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function sh(e){return e=e||{},e.data=Ua(e.data),$a(e),e}var oa=new Map;var Ya=new Set;function vi(e,i){let t=oa.get(e);return t||(t=i(),oa.set(e,t),Ya.add(t)),t}var Ae=(e,i,t)=>{let n=vt(i,t);n!==void 0&&e.add(n)};var Yn=class{constructor(i){this._config=sh(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=Ua(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),$a(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return vi(i,()=>[[`datasets.${i}`,``]])}datasetAnimationScopeKeys(i,t){return vi(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,``]])}datasetElementScopeKeys(i,t){return vi(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,``]])}pluginScopeKeys(i){let t=i.id,n=this.type;return vi(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){let n=this._scopeCache,s=n.get(i);return(!s||t)&&(s=new Map,n.set(i,s)),s}getOptionScopes(i,t,n){let{options:s,type:o}=this,a=this._cachedScopes(i,n),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>Ae(l,i,d))),h.forEach(d=>Ae(l,s,d)),h.forEach(d=>Ae(l,At[o]||{},d)),h.forEach(d=>Ae(l,B,d)),h.forEach(d=>Ae(l,ui,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ya.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:i,type:t}=this;return[i,At[t]||{},B.datasets[t]||{},{type:t},B,ui]}resolveNamedOptions(i,t,n,s=[``]){let o={$shared:!0},{resolver:a,subPrefixes:r}=aa(this._resolverCache,i,s),l=a;if(ah(a,t)){o.$shared=!1,n=xt(n)?n():n;let c=this.createResolver(i,n,r);l=jt(a,n,c)}for(let c of t)o[c]=l[c];return o}createResolver(i,t,n=[``],s){let{resolver:o}=aa(this._resolverCache,i,n);return D(t)?jt(o,t,void 0,s):o}};function aa(e,i,t){let n=e.get(i);n||(n=new Map,e.set(i,n));let s=t.join(),o=n.get(s);return o||(o={resolver:pi(i,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes(`hover`))},n.set(s,o)),o}var oh=e=>D(e)&&Object.getOwnPropertyNames(e).some(i=>xt(e[i]));function ah(e,i){let{isScriptable:t,isIndexable:n}=pn(e);for(let s of i){let o=t(s),a=n(s),r=(a||o)&&e[s];if(o&&(xt(r)||oh(r))||a&&F(r))return!0}return!1}var rh=`4.5.1`;var lh=[`top`,`bottom`,`left`,`right`,`chartArea`];function ra(e,i){return e===`top`||e===`bottom`||lh.indexOf(e)===-1&&i===`x`}function la(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e]}}function ca(e){let i=e.chart,t=i.options.animation;i.notifyPlugins(`afterRender`),I(t&&t.onComplete,[e],i)}function ch(e){let i=e.chart,t=i.options.animation;I(t&&t.onProgress,[e],i)}function Xa(e){return mi()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var ki={};var ha=e=>{let i=Xa(e);return Object.values(ki).filter(t=>t.canvas===i).pop()};function hh(e,i,t){let n=Object.keys(e);for(let s of n){let o=+s;if(o>=i){let a=e[s];delete e[s],(t>0||o>i)&&(e[o+t]=a)}}}function dh(e,i,t,n){return!t||e.type===`mouseout`?null:n?i:e}var Ri=(()=>{class e{static defaults=B;static instances=ki;static overrides=At;static registry=pt;static version=rh;static getChart=ha;static register(...t){pt.add(...t),da()}static unregister(...t){pt.remove(...t),da()}constructor(t,n){let s=this.config=new Yn(n),o=Xa(t),a=ha(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.`);let r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||(Tc(o))),this.platform.updateConfig(s);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=lo(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new jn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=yo(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],ki[this.id]=this,!l||!c){console.error(`Failed to create chart: can't acquire context from the given item`);return}Ct.listen(this,`complete`,ca),Ct.listen(this,`progress`,ch),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:o,_aspectRatio:a}=this;return O(t)?n&&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 pt}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():xn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return un(this.canvas,this.ctx),this}stop(){return Ct.stop(this),this}resize(t,n){Ct.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let s=this.options,o=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,n,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?`resize`:`attach`;this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,xn(this,l,!0)&&(this.notifyPlugins(`resize`,{size:r}),I(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){E(this.options.scales||{},(s,o)=>{s.id=o})}buildOrUpdateScales(){let t=this.options,n=t.scales,s=this.scales,o=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{}),a=[];n&&(a=a.concat(Object.keys(n).map(r=>{let l=n[r],c=Un(r,l),h=c===`r`,d=c===`x`;return{options:l,dposition:h?`chartArea`:d?`bottom`:`left`,dtype:h?`radialLinear`:d?`category`:`linear`}}))),E(a,r=>{let l=r.options,c=l.id,h=Un(c,l),d=k(l.type,r.dtype);(l.position===void 0||ra(l.position,h)!==ra(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in s&&s[c].type===d)u=s[c];else u=new(pt.getScale(d))({id:c,type:d,ctx:this.ctx,chart:this}),s[u.id]=u;u.init(l,t)}),E(o,(r,l)=>{r||delete s[l]}),E(s,r=>{J.configure(this,r,r.options),J.addBox(this,r)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>n){for(let o=n;o<s;++o)this._destroyDatasetMeta(o);t.splice(n,s-n)}this._sortedMetasets=t.slice(0).sort(la(`order`,`index`))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((s,o)=>{n.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=n.length;s<o;s++){let a=n[s],r=this.getDatasetMeta(s),l=a.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=l,r.indexAxis=a.indexAxis||$n(l,this.options),r.order=a.order||0,r.index=s,r.label=``+a.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{let c=pt.getController(l),{datasetElementType:h,dataElementType:d}=B.datasets[l];Object.assign(c,{dataElementType:pt.getElement(d),datasetElementType:h&&pt.getElement(h)}),r.controller=new c(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){E(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(t){let n=this.config;n.update();let s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let r=0;for(let h=0,d=this.data.datasets.length;h<d;h++){let{controller:u}=this.getDatasetMeta(h),f=!o&&a.indexOf(u)===-1;u.buildOrUpdateElements(f),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),o||E(a,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins(`afterUpdate`,{mode:t}),this._layers.sort(la(`z`,`_idx`));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){E(this.scales,t=>{J.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options;(!Ji(new Set(Object.keys(this._listeners)),new Set(t.events))||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:a}of n)hh(t,o,s===`_removeElements`?-a:a)}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,s=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+`,`+r.splice(1).join(`,`))),o=s(0);for(let a=1;a<n;a++)if(!Ji(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(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;J.update(this,this.width,this.height,t);let n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],E(this.boxes,o=>{s&&o.position===`chartArea`||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins(`afterLayout`)}_updateDatasets(t){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,xt(t)?t({datasetIndex:n}):t);this.notifyPlugins(`afterDatasetsUpdate`,{mode:t})}}_updateDataset(t,n){let s=this.getDatasetMeta(t),o={meta:s,index:t,mode:n,cancelable:!0};this.notifyPlugins(`beforeDatasetUpdate`,o)!==!1&&(s.controller._update(n),o.cancelable=!1,this.notifyPlugins(`afterDatasetUpdate`,o))}render(){this.notifyPlugins(`beforeRender`,{cancelable:!0})!==!1&&(Ct.has(this)?this.attached&&!Ct.running(this)&&Ct.start(this):(this.draw(),ca({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins(`beforeDraw`,{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins(`afterDraw`)}_getSortedDatasetMetas(t){let n=this._sortedMetasets,s=[],o,a;for(o=0,a=n.length;o<a;++o){let r=n[o];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins(`beforeDatasetsDraw`,{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(t){let n=this.ctx,s={meta:t,index:t.index,cancelable:!0},o=wn(this,t);this.notifyPlugins(`beforeDatasetDraw`,s)!==!1&&(o&&we(n,o),t.controller.draw(),o&&ke(n),s.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,s))}isPointInArea(t){return dt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,s,o){let a=fc.modes[n];return typeof a==`function`?a(this,t,s,o):[]}getDatasetMeta(t){let n=this.data.datasets[t],s=this._metasets,o=s.filter(a=>a&&a._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(o)),o}getContext(){return this.$context||(this.$context=Mt(null,{chart:this,type:`chart`}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden==`boolean`?!s.hidden:!n.hidden}setDatasetVisibility(t,n){let s=this.getDatasetMeta(t);s.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,s){let o=s?`show`:`hide`,a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);ne(n)?(a.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ct.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins(`beforeDestroy`);let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),un(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ki[this.id],this.notifyPlugins(`afterDestroy`)}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,n=this.platform,s=(a,r)=>{n.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};E(this.options.events,a=>s(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,s=(c,h)=>{n.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(n.removeEventListener(this,c,h),delete t[c])},a=(c,h)=>{this.canvas&&this.resize(c,h)},r,l=()=>{o(`attach`,l),this.attached=!0,this.resize(),s(`resize`,a),s(`detach`,r)};r=()=>{this.attached=!1,o(`resize`,a),this._stop(),this._resize(0,0),s(`attach`,l)},n.isAttached(this.canvas)?l():r()}unbindEvents(){E(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},E(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,s){let o=s?`set`:`remove`,a,r,l,c;for(n===`dataset`&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller[`_`+o+`DatasetHoverStyle`]()),l=0,c=t.length;l<c;++l){r=t[l];let h=r&&this.getDatasetMeta(r.datasetIndex).controller;h&&h[o+`HoverStyle`](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],s=t.map(({datasetIndex:a,index:r})=>{let l=this.getDatasetMeta(a);if(!l)throw new Error(`No dataset found at index `+a);return{datasetIndex:a,element:l.data[r],index:r}});!Ce(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,s){let o=this.options.hover,a=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(n,t),l=s?t:a(t,n);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,n){let s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins(`beforeEvent`,s,o)===!1)return;let a=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins(`afterEvent`,s,o),(a||s.changed)&&this.render(),this}_handleEvent(t,n,s){let{_active:o=[],options:a}=this,r=n,l=this._getActiveElements(t,o,s,r),c=uo(t),h=dh(t,this._lastEvent,s,c);s&&(this._lastEvent=null,I(a.onHover,[t,l,this],this),c&&I(a.onClick,[t,l,this],this));let d=!Ce(l,o);return(d||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=h,d}_getActiveElements(t,n,s,o){if(t.type===`mouseout`)return[];if(!s)return n;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return e})();function da(){return E(Ri.instances,e=>e._plugins.invalidate())}function uh(e,i,t){let{startAngle:n,x:s,y:o,outerRadius:a,innerRadius:r,options:l}=i,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,X(n-t));if(e.beginPath(),e.arc(s,o,a-c/2,n+d/2,t-d/2),r>0){let u=Math.min(c/r,X(n-t));e.arc(s,o,r+c/2,t-u/2,n+u/2,!0)}else{let u=Math.min(c/2,a*X(n-t));if(h===`round`)e.arc(s,o,u,t-T/2,n+T/2,!0);else if(h===`bevel`){let f=2*u*u,g=-f*Math.cos(t+T/2)+s,p=-f*Math.sin(t+T/2)+o,m=f*Math.cos(n+T/2)+s,_=f*Math.sin(n+T/2)+o;e.lineTo(g,p),e.lineTo(m,_)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function fh(e,i,t){let{startAngle:n,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=i,c=s/r;e.beginPath(),e.arc(o,a,r,n-c,t+c),l>s?(c=s/l,e.arc(o,a,l,t+c,n-c,!0)):e.arc(o,a,s,t+H,n-H),e.closePath(),e.clip()}function gh(e){return gi(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function ph(e,i,t,n){let s=gh(e.options.borderRadius),o=(t-i)/2,a=Math.min(o,n*i/2),r=l=>{let c=(t-Math.min(o,l))*n/2;return $(l,0,Math.min(o,c))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:$(s.innerStart,0,a),innerEnd:$(s.innerEnd,0,a)}}function ce(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)}}function Ai(e,i,t,n,s,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+n+t-c,0),u=h>0?h+n+t+c:0,f=0,g=s-l;if(n){let W=((h>0?h-n:0)+(d>0?d-n:0))/2;f=(g-(W!==0?g*W/(W+n):g))/2}let m=(g-Math.max(.001,g*d-t/T)/d)/2,_=l+m+f,b=s-m-f,{outerStart:y,outerEnd:M,innerStart:x,innerEnd:v}=ph(i,u,d,b-_),S=d-y,C=d-M,w=_+y/S,L=b-M/C,P=u+x,A=u+v,Y=_+x/P,it=b-v/A;if(e.beginPath(),o){let R=(w+L)/2;if(e.arc(a,r,d,w,R),e.arc(a,r,d,R,L),M>0){let q=ce(C,L,a,r);e.arc(q.x,q.y,M,L,b+H)}let N=ce(A,b,a,r);if(e.lineTo(N.x,N.y),v>0){let q=ce(A,it,a,r);e.arc(q.x,q.y,v,b+H,it+Math.PI)}let W=(b-v/u+(_+x/u))/2;if(e.arc(a,r,u,b-v/u,W,!0),e.arc(a,r,u,W,_+x/u,!0),x>0){let q=ce(P,Y,a,r);e.arc(q.x,q.y,x,Y+Math.PI,_-H)}let lt=ce(S,_,a,r);if(e.lineTo(lt.x,lt.y),y>0){let q=ce(S,w,a,r);e.arc(q.x,q.y,y,_-H,w)}}else{e.moveTo(a,r);let R=Math.cos(w)*d+a,N=Math.sin(w)*d+r;e.lineTo(R,N);let W=Math.cos(L)*d+a,lt=Math.sin(L)*d+r;e.lineTo(W,lt)}e.closePath()}function mh(e,i,t,n,s){let{fullCircles:o,startAngle:a,circumference:r}=i,l=i.endAngle;if(o){Ai(e,i,t,n,l,s);for(let c=0;c<o;++c)e.fill();isNaN(r)||(l=a+(r%z||z))}return Ai(e,i,t,n,l,s),e.fill(),l}function bh(e,i,t,n,s){let{fullCircles:o,startAngle:a,circumference:r,options:l}=i,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,g=l.borderAlign===`inner`;if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=u,g?(e.lineWidth=c*2,e.lineJoin=h||`round`):(e.lineWidth=c,e.lineJoin=h||`bevel`);let p=i.endAngle;if(o){Ai(e,i,t,n,p,s);for(let m=0;m<o;++m)e.stroke();isNaN(r)||(p=a+(r%z||z))}g&&fh(e,i,p),l.selfJoin&&p-a>=T&&f===0&&h!==`miter`&&uh(e,i,p),o||(Ai(e,i,t,n,p,s),e.stroke())}var Xn=class extends wt{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:i=>i!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),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,n){let{angle:o,distance:a}=nn(this.getProps([`x`,`y`],n),{x:i,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,f=k(d,l-r),g=oe(o,r,l)&&r!==l,p=f>=z||g,m=ft(a,c+u,h+u);return p&&m}getCenterPoint(i){let{x:t,y:n,startAngle:s,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],i),{offset:l,spacing:c}=this.options,h=(s+o)/2,d=(a+r+c+l)/2;return{x:t+Math.cos(h)*d,y:n+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:t,circumference:n}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>z?Math.floor(n/z):0,n===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let r=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(r)*s,Math.sin(r)*s);let c=s*(1-Math.sin(Math.min(T,n||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,mh(i,this,c,o,a),bh(i,this,c,o,a),i.restore()}};function Za(e,i,t=i){e.lineCap=k(t.borderCapStyle,i.borderCapStyle),e.setLineDash(k(t.borderDash,i.borderDash)),e.lineDashOffset=k(t.borderDashOffset,i.borderDashOffset),e.lineJoin=k(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=k(t.borderWidth,i.borderWidth),e.strokeStyle=k(t.borderColor,i.borderColor)}function _h(e,i,t){e.lineTo(t.x,t.y)}function xh(e){return e.stepped?So:e.tension||e.cubicInterpolationMode===`monotone`?wo:_h}function Ka(e,i,t={}){let n=e.length,{start:s=0,end:o=n-1}=t,{start:a,end:r}=i,l=Math.max(s,a),c=Math.min(o,r),h=s<a&&o<a||s>r&&o>r;return{count:n,start:l,loop:i.loop,ilen:c<l&&!h?n+c-l:c-l}}function yh(e,i,t,n){let{points:s,options:o}=i,{count:a,start:r,loop:l,ilen:c}=Ka(s,t,n),h=xh(o),{move:d=!0,reverse:u}=n||{},f,g,p;for(f=0;f<=c;++f)g=s[(r+(u?c-f:f))%a],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):h(e,p,g,u,o.stepped),p=g);return l&&(g=s[(r+(u?c:0))%a],h(e,p,g,u,o.stepped)),!!l}function vh(e,i,t,n){let s=i.points,{count:o,start:a,ilen:r}=Ka(s,t,n),{move:l=!0,reverse:c}=n||{},h=0,d=0,u,f,g,p,m,_,b=M=>(a+(c?r-M:M))%o,y=()=>{p!==m&&(e.lineTo(h,m),e.lineTo(h,p),e.lineTo(h,_))};for(l&&(f=s[b(0)],e.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[b(u)],f.skip)continue;let M=f.x,x=f.y,v=M|0;v===g?(x<p?p=x:x>m&&(m=x),h=(d*h+M)/++d):(y(),e.lineTo(M,x),g=v,d=0,p=m=x),_=x}y()}function Zn(e){let i=e.options,t=i.borderDash&&i.borderDash.length;return!e._decimated&&!e._loop&&!i.tension&&i.cubicInterpolationMode!==`monotone`&&!i.stepped&&!t?vh:yh}function Mh(e){return e.stepped?Ro:e.tension||e.cubicInterpolationMode===`monotone`?Io:Ot}function Ch(e,i,t,n){let s=i._path;s||(s=i._path=new Path2D,i.path(s,t,n)&&s.closePath()),Za(e,i.options),e.stroke(s)}function Sh(e,i,t,n){let{segments:s,options:o}=i,a=Zn(i);for(let r of s)Za(e,o,r.style),e.beginPath(),a(e,i,r,{start:t,end:t+n-1})&&e.closePath(),e.stroke()}var wh=typeof Path2D==`function`;function kh(e,i,t,n){wh&&!i.options.segment?Ch(e,i,t,n):Sh(e,i,t,n)}var de=class extends wt{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:i=>i!==`borderDash`&&i!==`fill`};constructor(i){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,i&&Object.assign(this,i)}updateControlPoints(i,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let s=n.spanGaps?this._loop:this._fullLoop;Ao(this._points,n,i,s,t),this._pointsUpdated=!0}}set points(i){this._points=i,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=zo(this,this.options.segment))}first(){let i=this.segments,t=this.points;return i.length&&t[i[0].start]}last(){let i=this.segments,t=this.points,n=i.length;return n&&t[i[n-1].end]}interpolate(i,t){let n=this.options,s=i[t],o=this.points,a=Sn(this,{property:t,start:s,end:s});if(!a.length)return;let r=[],l=Mh(n),c,h;for(c=0,h=a.length;c<h;++c){let{start:d,end:u}=a[c],f=o[d],g=o[u];if(f===g){r.push(f);continue}let m=l(f,g,Math.abs((s-f[t])/(g[t]-f[t])),n.stepped);m[t]=i[t],r.push(m)}return r.length===1?r[0]:r}pathSegment(i,t,n){return Zn(this)(i,this,t,n)}path(i,t,n){let s=this.segments,o=Zn(this),a=this._loop;t=t||0,n=n||this.points.length-t;for(let r of s)a&=o(i,this,r,{start:t,end:t+n-1});return!!a}draw(i,t,n,s){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(i.save(),kh(i,this,n,s),i.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function ua(e,i,t,n){let s=e.options,{[t]:o}=e.getProps([t],n);return Math.abs(i-o)<s.radius+s.hitRadius}var Ph=(()=>{class e extends wt{static id=`point`;parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:`circle`,radius:3,rotation:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,s){let o=this.options,{x:a,y:r}=this.getProps([`x`,`y`],s);return Math.pow(t-a,2)+Math.pow(n-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,n){return ua(this,t,`x`,n)}inYRange(t,n){return ua(this,t,`y`,n)}getCenterPoint(t){let{x:n,y:s}=this.getProps([`x`,`y`],t);return{x:n,y:s}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);let s=n&&t.borderWidth||0;return(n+s)*2}draw(t,n){let s=this.options;this.skip||s.radius<.1||!dt(this,n,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,fi(t,s,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return e})();function qa(e,i){let{x:t,y:n,base:s,width:o,height:a}=e.getProps([`x`,`y`,`base`,`width`,`height`],i),r,l,c,h,d;return e.horizontal?(d=a/2,r=Math.min(t,s),l=Math.max(t,s),c=n-d,h=n+d):(d=o/2,r=t-d,l=t+d,c=Math.min(n,s),h=Math.max(n,s)),{left:r,top:c,right:l,bottom:h}}function Ft(e,i,t,n){return e?0:$(i,t,n)}function Lh(e,i,t){let n=e.options.borderWidth,s=e.borderSkipped,o=gn(n);return{t:Ft(s.top,o.top,0,t),r:Ft(s.right,o.right,0,i),b:Ft(s.bottom,o.bottom,0,t),l:Ft(s.left,o.left,0,i)}}function Oh(e,i,t){let{enableBorderRadius:n}=e.getProps([`enableBorderRadius`]),s=e.options.borderRadius,o=Rt(s),a=Math.min(i,t),r=e.borderSkipped,l=n||D(s);return{topLeft:Ft(!l||r.top||r.left,o.topLeft,0,a),topRight:Ft(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Ft(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Ft(!l||r.bottom||r.right,o.bottomRight,0,a)}}function Dh(e){let i=qa(e),t=i.right-i.left,n=i.bottom-i.top,s=Lh(e,t/2,n/2),o=Oh(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:o},inner:{x:i.left+s.l,y:i.top+s.t,w:t-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function En(e,i,t,n){let s=i===null,o=t===null,r=e&&!(s&&o)&&qa(e,n);return r&&(s||ft(i,r.left,r.right))&&(o||ft(t,r.top,r.bottom))}function Ah(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Th(e,i){e.rect(i.x,i.y,i.w,i.h)}function Rn(e,i,t={}){let n=e.x!==t.x?-i:0,s=e.y!==t.y?-i:0,o=(e.x+e.w!==t.x+t.w?i:0)-n,a=(e.y+e.h!==t.y+t.h?i:0)-s;return{x:e.x+n,y:e.y+s,w:e.w+o,h:e.h+a,radius:e.radius}}var Rh=Object.freeze({__proto__:null,ArcElement:Xn,BarElement:(()=>{class e extends wt{static id=`bar`;static defaults={borderSkipped:`start`,borderWidth:0,borderRadius:0,inflateAmount:`auto`,pointStyle:void 0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:n,options:{borderColor:s,backgroundColor:o}}=this,{inner:a,outer:r}=Dh(this),l=Ah(r.radius)?re:Th;t.save(),(r.w!==a.w||r.h!==a.h)&&(t.beginPath(),l(t,Rn(r,n,a)),t.clip(),l(t,Rn(a,-n,r)),t.fillStyle=s,t.fill(`evenodd`)),t.beginPath(),l(t,Rn(a,n)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,n,s){return En(this,t,n,s)}inXRange(t,n){return En(this,t,null,n)}inYRange(t,n){return En(this,null,t,n)}getCenterPoint(t){let{x:n,y:s,base:o,horizontal:a}=this.getProps([`x`,`y`,`base`,`horizontal`],t);return{x:a?(n+o)/2:n,y:a?s:(s+o)/2}}getRange(t){return t===`x`?this.width/2:this.height/2}}return e})(),LineElement:de,PointElement:Ph});var Kn=[`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)`];var fa=Kn.map(e=>e.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Ga(e){return Kn[e%Kn.length]}function Ja(e){return fa[e%fa.length]}function Ih(e,i){return e.borderColor=Ga(i),e.backgroundColor=Ja(i),++i}function Fh(e,i){return e.backgroundColor=e.data.map(()=>Ga(i++)),i}function zh(e,i){return e.backgroundColor=e.data.map(()=>Ja(i++)),i}function Bh(e){let i=0;return(t,n)=>{let s=e.getDatasetMeta(n).controller;s instanceof Re?i=Fh(t,i):s instanceof Li?i=zh(t,i):s&&(i=Ih(t,i))}}function ga(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}function Nh(e){return e&&(e.borderColor||e.backgroundColor)}function Vh(){return B.borderColor!==`rgba(0,0,0,0.1)`||B.backgroundColor!==`rgba(0,0,0,0.1)`}var Hh={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;let{data:{datasets:n},options:s}=e.config,{elements:o}=s,a=ga(n)||Nh(s)||o&&ga(o)||Vh();if(!t.forceOverride&&a)return;let r=Bh(e);n.forEach(r)}};function Wh(e,i,t,n,s){let o=s.samples||n;if(o>=t)return e.slice(i,i+t);let a=[],r=(t-2)/(o-2),l=0,c=i+t-1,h=i,d,u,f,g,p;for(a[l++]=e[h],d=0;d<o-2;d++){let m=0,_=0,b,y=Math.floor((d+1)*r)+1+i,M=Math.min(Math.floor((d+2)*r)+1,t)+i,x=M-y;for(b=y;b<M;b++)m+=e[b].x,_+=e[b].y;m/=x,_/=x;let v=Math.floor(d*r)+1+i,S=Math.min(Math.floor((d+1)*r)+1,t)+i,{x:C,y:w}=e[h];for(f=g=-1,b=v;b<S;b++)g=.5*Math.abs((C-m)*(e[b].y-w)-(C-e[b].x)*(_-w)),g>f&&(f=g,u=e[b],p=b);a[l++]=u,h=p}return a[l++]=e[c],a}function jh(e,i,t,n){let s=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],_=i+t-1,b=e[i].x,M=e[_].x-b;for(a=i;a<i+t;++a){r=e[a],l=(r.x-b)/M*n,c=r.y;let x$2=l|0;if(x$2===h)c<g?(g=c,d=a):c>p&&(p=c,u=a),s=(o*s+r.x)/++o;else{let v=a-1;if(!O(d)&&!O(u)){let S=Math.min(d,u),C=Math.max(d,u);S!==f&&S!==v&&m.push(x(w({},e[S]),{x:s})),C!==f&&C!==v&&m.push(x(w({},e[C]),{x:s}))}a>0&&v!==f&&m.push(e[v]),m.push(r),h=x$2,o=0,g=p=c,d=u=f=a}}return m}function Qa(e){if(e._decimated){let i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function pa(e){e.data.datasets.forEach(i=>{Qa(i)})}function $h(e,i){let t=i.length,n=0,s,{iScale:o}=e,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=$(ht(i,o.axis,a).lo,0,t-1)),c?s=$(ht(i,o.axis,r).hi+1,n,t)-n:s=t-n,{start:n,count:s}}var Uh={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled){pa(e);return}let n=e.width;e.data.datasets.forEach((s,o)=>{let{_data:a,indexAxis:r}=s,l=e.getDatasetMeta(o),c=a||s.data;if(le([r,e.options.indexAxis])===`y`||!l.controller.supportsDecimation)return;let h=e.scales[l.xAxisID];if(h.type!==`linear`&&h.type!==`time`||e.options.parsing)return;let{start:d,count:u}=$h(l,c);if(u<=(t.threshold||4*n)){Qa(s);return}O(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(t.algorithm){case`lttb`:g=Wh(c,d,u,n,t);break;case`min-max`:g=jh(c,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=g})},destroy(e){pa(e)}};function Yh(e,i,t){let n=e.segments,s=e.points,o=i.points,a=[];for(let r of n){let{start:l,end:c}=r;c=Ii(l,c,s);let h=qn(t,s[l],s[c],r.loop);if(!i.segments){a.push({source:r,target:h,start:s[l],end:s[c]});continue}let d=Sn(i,h);for(let u of d){let f=qn(t,o[u.start],o[u.end],u.loop),g=Cn(r,s,f);for(let p of g)a.push({source:p,target:u,start:{[t]:ma(h,f,`start`,Math.max)},end:{[t]:ma(h,f,`end`,Math.min)}})}}return a}function qn(e,i,t,n){if(n)return;let s=i[e],o=t[e];return e===`angle`&&(s=X(s),o=X(o)),{property:e,start:s,end:o}}function Xh(e,i){let{x:t=null,y:n=null}=e||{},s=i.points,o=[];return i.segments.forEach(({start:a,end:r})=>{r=Ii(a,r,s);let l=s[a],c=s[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function Ii(e,i,t){for(;i>e;i--){let n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function ma(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0}function tr(e,i){let t=[],n=!1;return F(e)?(n=!0,t=e):t=Xh(e,i),t.length?new de({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function ba(e){return e&&e.fill!==!1}function Zh(e,i,t){let s=e[i].fill,o=[i],a;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!V(s))return s;if(a=e[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill}return!1}function Kh(e,i,t){let n=Qh(e);if(D(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return V(s)&&Math.floor(s)===s?qh(n[0],i,s,t):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(n)>=0&&n}function qh(e,i,t,n){return(e===`-`||e===`+`)&&(t=i+t),t===i||t<0||t>=n?!1:t}function Gh(e,i){let t=null;return e===`start`?t=i.bottom:e===`end`?t=i.top:D(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t}function Jh(e,i,t){let n;return e===`start`?n=t:e===`end`?n=i.options.reverse?i.min:i.max:D(e)?n=e.value:n=i.getBaseValue(),n}function Qh(e){let i=e.options,t=i.fill,n=k(t&&t.target,t);return n===void 0&&(n=!!i.backgroundColor),n===!1||n===null?!1:n===!0?`origin`:n}function td(e){let{scale:i,index:t,line:n}=e,s=[],o=n.segments,a=n.points,r=ed(i,t);r.push(tr({x:null,y:i.bottom},n));for(let l=0;l<o.length;l++){let c=o[l];for(let h=c.start;h<=c.end;h++)id(s,a[h],r)}return new de({points:s,options:{}})}function ed(e,i){let t=[],n=e.getMatchingVisibleMetas(`line`);for(let s=0;s<n.length;s++){let o=n[s];if(o.index===i)break;o.hidden||t.unshift(o.dataset)}return t}function id(e,i,t){let n=[];for(let s=0;s<t.length;s++){let o=t[s],{first:a,last:r,point:l}=nd(o,i,`x`);if(!(!l||a&&r)){if(a)n.unshift(l);else if(e.push(l),!r)break}}e.push(...n)}function nd(e,i,t){let n=e.interpolate(i,t);if(!n)return{};let s=n[t],o=e.segments,a=e.points,r=!1,l=!1;for(let c=0;c<o.length;c++){let h=o[c],d=a[h.start][t],u=a[h.end][t];if(ft(s,d,u)){r=s===d,l=s===u;break}}return{first:r,last:l,point:n}}var Ti=class{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius}pathSegment(i,t,n){let{x:s,y:o,radius:a}=this;return t=t||{start:0,end:z},i.arc(s,o,a,t.end,t.start,!0),!n.bounds}interpolate(i){let{x:t,y:n,radius:s}=this,o=i.angle;return{x:t+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}};function sd(e){let{chart:i,fill:t,line:n}=e;if(V(t))return od(i,t);if(t===`stack`)return td(e);if(t===`shape`)return!0;let s=ad(e);return s instanceof Ti?s:tr(s,n)}function od(e,i){let t=e.getDatasetMeta(i);return t&&e.isDatasetVisible(i)?t.dataset:null}function ad(e){return(e.scale||{}).getPointPositionForValue?ld(e):rd(e)}function rd(e){let{scale:i={},fill:t}=e,n=Gh(t,i);if(V(n)){let s=i.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function ld(e){let{scale:i,fill:t}=e,n=i.options,s=i.getLabels().length,o=n.reverse?i.max:i.min,a=Jh(t,i,o),r=[];if(n.grid.circular){let l=i.getPointPositionForValue(0,o);return new Ti({x:l.x,y:l.y,radius:i.getDistanceFromCenterForValue(a)})}for(let l=0;l<s;++l)r.push(i.getPointPositionForValue(l,a));return r}function In(e,i,t){let n=sd(i),{chart:s,index:o,line:a,scale:r,axis:l}=i,c=a.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:f=d}=h||{},p=wn(s,s.getDatasetMeta(o));n&&a.points.length&&(we(e,t),cd(e,{line:a,target:n,above:u,below:f,area:t,scale:r,axis:l,clip:p}),ke(e))}function cd(e,i){let{line:t,target:n,above:s,below:o,area:a,scale:r,clip:l}=i,c=t._loop?`angle`:i.axis;e.save();let h=o;o!==s&&(c===`x`?(_a(e,n,a.top),Fn(e,{line:t,target:n,color:s,scale:r,property:c,clip:l}),e.restore(),e.save(),_a(e,n,a.bottom)):c===`y`&&(xa(e,n,a.left),Fn(e,{line:t,target:n,color:o,scale:r,property:c,clip:l}),e.restore(),e.save(),xa(e,n,a.right),h=s)),Fn(e,{line:t,target:n,color:h,scale:r,property:c,clip:l}),e.restore()}function _a(e,i,t){let{segments:n,points:s}=i,o=!0,a=!1;e.beginPath();for(let r of n){let{start:l,end:c}=r,h=s[l],d=s[Ii(l,c,s)];o?(e.moveTo(h.x,h.y),o=!1):(e.lineTo(h.x,t),e.lineTo(h.x,h.y)),a=!!i.pathSegment(e,r,{move:a}),a?e.closePath():e.lineTo(d.x,t)}e.lineTo(i.first().x,t),e.closePath(),e.clip()}function xa(e,i,t){let{segments:n,points:s}=i,o=!0,a=!1;e.beginPath();for(let r of n){let{start:l,end:c}=r,h=s[l],d=s[Ii(l,c,s)];o?(e.moveTo(h.x,h.y),o=!1):(e.lineTo(t,h.y),e.lineTo(h.x,h.y)),a=!!i.pathSegment(e,r,{move:a}),a?e.closePath():e.lineTo(t,d.y)}e.lineTo(t,i.first().y),e.closePath(),e.clip()}function Fn(e,i){let{line:t,target:n,property:s,color:o,scale:a,clip:r}=i,l=Yh(t,n,s);for(let{source:c,target:h,start:d,end:u}of l){let{style:{backgroundColor:f=o}={}}=c,g=n!==!0;e.save(),e.fillStyle=f,hd(e,a,r,g&&qn(s,d,u)),e.beginPath();let p=!!t.pathSegment(e,c),m;if(g){p?e.closePath():ya(e,n,u,s);let _=!!n.pathSegment(e,h,{move:p,reverse:!0});m=p&&_,m||ya(e,n,d,s)}e.closePath(),e.fill(m?`evenodd`:`nonzero`),e.restore()}}function hd(e,i,t,n){let s=i.chart.chartArea,{property:o,start:a,end:r}=n||{};if(o===`x`||o===`y`){let l,c,h,d;o===`x`?(l=a,c=s.top,h=r,d=s.bottom):(l=s.left,c=a,h=s.right,d=r),e.beginPath(),t&&(l=Math.max(l,t.left),h=Math.min(h,t.right),c=Math.max(c,t.top),d=Math.min(d,t.bottom)),e.rect(l,c,h-l,d-c),e.clip()}}function ya(e,i,t,n){let s=i.interpolate(t,n);s&&e.lineTo(s.x,s.y)}var dd={id:`filler`,afterDatasetsUpdate(e,i,t){let n=(e.data.datasets||[]).length,s=[],o,a,r,l;for(a=0;a<n;++a)o=e.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof de&&(l={visible:e.isDatasetVisible(a),index:a,fill:Kh(r,a,n),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<n;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=Zh(s,a,t.propagate))},beforeDraw(e,i,t){let n=t.drawTime===`beforeDraw`,s=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let a=s.length-1;a>=0;--a){let r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&In(e.ctx,r,o))}},beforeDatasetsDraw(e,i,t){if(t.drawTime!==`beforeDatasetsDraw`)return;let n=e.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;ba(o)&&In(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,i,t){let n=i.meta.$filler;!ba(n)||t.drawTime!==`beforeDatasetDraw`||In(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}};var va=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)}};var ud=(e,i)=>e!==null&&i!==null&&e.datasetIndex===i.datasetIndex&&e.index===i.index;var Ei=class extends wt{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,n){this.maxWidth=i,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},t=I(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,s)=>i.sort(n,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return}let n=i.labels,s=j(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=va(n,o),c,h;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}_fitRows(i,t,n,s){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r,d=i;o.textAlign=`left`,o.textBaseline=`middle`;let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let m=n+t/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:s},c[c.length-1]+=m+r}),d}_fitCols(i,t,n,s){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-i,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,_)=>{let{itemWidth:b,itemHeight:y}=fd(n,t,o,m,s);_>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[_]={left:g,top:f,col:p,width:b,height:y},u=Math.max(u,b),f+=y+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,a=Ut(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=Z(n,this.left+s,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=Z(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+i+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=Z(n,this.top+i+s,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=Z(n,this.top+i+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let i=this.ctx;we(i,this),this._draw(),ke(i)}}_draw(){let{options:i,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:a}=i,r=B.color,l=Ut(i.rtl,this.left,this.width),c=j(a.font),{padding:h}=a,d=c.size,u=d/2,f;this.drawTitle(),s.textAlign=l.textAlign(`left`),s.textBaseline=`middle`,s.lineWidth=.5,s.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:m}=va(a,d),_=function(v,S,C){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let w=k(C.lineWidth,1);if(s.fillStyle=k(C.fillStyle,r),s.lineCap=k(C.lineCap,`butt`),s.lineDashOffset=k(C.lineDashOffset,0),s.lineJoin=k(C.lineJoin,`miter`),s.lineWidth=w,s.strokeStyle=k(C.strokeStyle,r),s.setLineDash(k(C.lineDash,[])),a.usePointStyle){let L={radius:p*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:w},P=l.xPlus(v,g/2),A=S+u;fn(s,L,P,A,a.pointStyleWidth&&g)}else{let L=S+Math.max((d-p)/2,0),P=l.leftForLtr(v,g),A=Rt(C.borderRadius);s.beginPath(),Object.values(A).some(Y=>Y!==0)?re(s,{x:P,y:L,w:g,h:p,radius:A}):s.rect(P,L,g,p),s.fill(),w!==0&&s.stroke()}s.restore()},b=function(v,S,C){Et(s,C.text,v,S+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},y=this.isHorizontal(),M=this._computeTitleHeight();y?f={x:Z(o,this.left+h,this.right-n[0]),y:this.top+h+M,line:0}:f={x:this.left+h,y:Z(o,this.top+M+h,this.bottom-t[0].height),line:0},vn(this.ctx,i.textDirection);let x=m+h;this.legendItems.forEach((v,S)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;let C=s.measureText(v.text).width,w=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),L=g+u+C,P=f.x,A=f.y;l.setWidth(this.width),y?S>0&&P+L+h>this.right&&(A=f.y+=x,f.line++,P=f.x=Z(o,this.left+h,this.right-n[f.line])):S>0&&A+x>this.bottom&&(P=f.x=P+t[f.line].width+h,f.line++,A=f.y=Z(o,this.top+M+h,this.bottom-t[f.line].height));let Y=l.x(P);if(_(Y,A,v),P=vo(w,P+g+u,y?P+L:this.right,i.rtl),b(l.x(P),A,v),y)f.x+=L+h;else if(typeof v.text!=`string`){let it=c.lineHeight;f.y+=er(v,it)+h}else f.y+=x}),Mn(this.ctx,i.textDirection)}drawTitle(){let i=this.options,t=i.title,n=j(t.font),s=K(t.padding);if(!t.display)return;let o=Ut(i.rtl,this.left,this.width),a=this.ctx,r=t.position,l=n.size/2,c=s.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=Z(i.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+Z(i.align,this.top,this.bottom-g-i.labels.padding-this._computeTitleHeight())}let f=Z(r,d,d+u);a.textAlign=o.textAlign(di(r)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,Et(a,t.text,f,h,n)}_computeTitleHeight(){let i=this.options.title,t=j(i.font),n=K(i.padding);return i.display?t.lineHeight+n.height:0}_getLegendItemAt(i,t){let n,s,o;if(ft(i,this.left,this.right)&&ft(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],ft(i,s.left,s.left+s.width)&&ft(t,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(i){let t=this.options;if(!md(i.type,t))return;let n=this._getLegendItemAt(i.x,i.y);if(i.type===`mousemove`||i.type===`mouseout`){let s=this._hoveredItem,o=ud(s,n);s&&!o&&I(t.onLeave,[i,s,this],this),this._hoveredItem=n,n&&!o&&I(t.onHover,[i,n,this],this)}else n&&I(t.onClick,[i,n,this],this)}};function fd(e,i,t,n,s){return{itemWidth:gd(n,e,i,t),itemHeight:pd(s,n,i.lineHeight)}}function gd(e,i,t,n){let s=e.text;return s&&typeof s!=`string`&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),i+t.size/2+n.measureText(s).width}function pd(e,i,t){let n=e;return typeof i.text!=`string`&&(n=er(i,t)),n}function er(e,i){return i*(e.text?e.text.length:0)}function md(e,i){return!!((e===`mousemove`||e===`mouseout`)&&(i.onHover||i.onLeave)||i.onClick&&(e===`click`||e===`mouseup`))}var bd={id:`legend`,_element:Ei,start(e,i,t){let n=e.legend=new Ei({ctx:e.ctx,options:t,chart:e});J.configure(e,n,t),J.addBox(e,n)},stop(e){J.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){let n=e.legend;J.configure(e,n,t),n.options=t},afterUpdate(e){let i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){let n=i.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),i.hidden=!0):(s.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=K(c.borderWidth);return{text:i[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}};var Fe=class extends wt{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){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=t;let s=F(n.text)?n.text.length:1;this._padding=K(n.padding);let o=s*j(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i===`top`||i===`bottom`}_drawArgs(i){let{top:t,left:n,bottom:s,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=Z(r,n,o),d=t+i,c=o-n):(a.position===`left`?(h=n+i,d=Z(r,s,t),l=T*-.5):(h=o-i,d=Z(r,t,s),l=T*.5),c=s-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let n=j(t.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Et(i,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:di(t.align),textBaseline:`middle`,translation:[a,r]})}};function _d(e,i){let t=new Fe({ctx:e.ctx,options:i,chart:e});J.configure(e,t,i),J.addBox(e,t),e.titleBlock=t}var xd={id:`title`,_element:Fe,start(e,i,t){_d(e,t)},stop(e){let i=e.titleBlock;J.removeBox(e,i),delete e.titleBlock},beforeUpdate(e,i,t){let n=e.titleBlock;J.configure(e,n,t),n.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}};var Mi=new WeakMap;var yd={id:`subtitle`,start(e,i,t){let n=new Fe({ctx:e.ctx,options:t,chart:e});J.configure(e,n,t),J.addBox(e,n),Mi.set(e,n)},stop(e){J.removeBox(e,Mi.get(e)),Mi.delete(e)},beforeUpdate(e,i,t){let n=Mi.get(e);J.configure(e,n,t),n.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}};var Ee={average(e){if(!e.length)return!1;let i,t,n=new Set,s=0,o=0;for(i=0,t=e.length;i<t;++i){let r=e[i].element;if(r&&r.hasValue()){let l=r.tooltipPosition();n.add(l.x),s+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((r,l)=>r+l)/n.size,y:s/o}},nearest(e,i){if(!e.length)return!1;let t=i.x,n=i.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=e.length;o<a;++o){let l=e[o].element;if(l&&l.hasValue()){let h=ai(i,l.getCenterPoint());h<s&&(s=h,r=l)}}if(r){let l=r.tooltipPosition();t=l.x,n=l.y}return{x:t,y:n}}};function gt(e,i){return i&&(F(i)?Array.prototype.push.apply(e,i):e.push(i)),e}function St(e){return(typeof e==`string`||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function vd(e,i){let{element:t,datasetIndex:n,index:s}=i,o=e.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:e,label:a,parsed:o.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t}}function Ma(e,i){let t=e.chart.ctx,{body:n,footer:s,title:o}=e,{boxWidth:a,boxHeight:r}=i,l=j(i.bodyFont),c=j(i.titleFont),h=j(i.footerFont),d=o.length,u=s.length,f=n.length,g=K(i.padding),p=g.height,m=0,_=n.reduce((M,x)=>M+x.before.length+x.lines.length+x.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*i.titleSpacing+i.titleMarginBottom),_){let M=i.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*M+(_-f)*l.lineHeight+(_-1)*i.bodySpacing}u&&(p+=i.footerMarginTop+u*h.lineHeight+(u-1)*i.footerSpacing);let b=0,y=function(M){m=Math.max(m,t.measureText(M).width+b)};return t.save(),t.font=c.string,E(e.title,y),t.font=l.string,E(e.beforeBody.concat(e.afterBody),y),b=i.displayColors?a+2+i.boxPadding:0,E(n,M=>{E(M.before,y),E(M.lines,y),E(M.after,y)}),b=0,t.font=h.string,E(e.footer,y),t.restore(),m+=g.width,{width:m,height:p}}function Md(e,i){let{y:t,height:n}=i;return t<n/2?`top`:t>e.height-n/2?`bottom`:`center`}function Cd(e,i,t,n){let{x:s,width:o}=n,a=t.caretSize+t.caretPadding;if(e===`left`&&s+o+a>i.width||e===`right`&&s-o-a<0)return!0}function Sd(e,i,t,n){let{x:s,width:o}=t,{width:a,chartArea:{left:r,right:l}}=e,c=`center`;return n===`center`?c=s<=(r+l)/2?`left`:`right`:s<=o/2?c=`left`:s>=a-o/2&&(c=`right`),Cd(c,e,i,t)&&(c=`center`),c}function Ca(e,i,t){let n=t.yAlign||i.yAlign||Md(e,t);return{xAlign:t.xAlign||i.xAlign||Sd(e,i,t,n),yAlign:n}}function wd(e,i){let{x:t,width:n}=e;return i===`right`?t-=n:i===`center`&&(t-=n/2),t}function kd(e,i,t){let{y:n,height:s}=e;return i===`top`?n+=t:i===`bottom`?n-=s+t:n-=s/2,n}function Sa(e,i,t,n){let{caretSize:s,caretPadding:o,cornerRadius:a}=e,{xAlign:r,yAlign:l}=t,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Rt(a),g=wd(i,r),p=kd(i,l,c);return l===`center`?r===`left`?g+=c:r===`right`&&(g-=c):r===`left`?g-=Math.max(h,u)+s:r===`right`&&(g+=Math.max(d,f)+s),{x:$(g,0,n.width-i.width),y:$(p,0,n.height-i.height)}}function Ci(e,i,t){let n=K(t.padding);return i===`center`?e.x+e.width/2:i===`right`?e.x+e.width-n.right:e.x+n.left}function wa(e){return gt([],St(e))}function Pd(e,i,t){return Mt(e,{tooltip:i,tooltipItems:t,type:`tooltip`})}function ka(e,i){let t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}var ir={beforeTitle:ut,title(e){if(e.length>0){let i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode===`dataset`)return i.dataset.label||``;if(i.label)return i.label;if(n>0&&i.dataIndex<n)return t[i.dataIndex]}return``},afterTitle:ut,beforeBody:ut,beforeLabel:ut,label(e){if(this&&this.options&&this.options.mode===`dataset`)return e.label+`: `+e.formattedValue||e.formattedValue;let i=e.dataset.label||``;i&&(i+=`: `);let t=e.formattedValue;return O(t)||(i+=t),i},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:ut,afterBody:ut,beforeFooter:ut,footer:ut,afterFooter:ut};function tt(e,i,t,n){let s=e[i].call(t,n);return typeof s>`u`?ir[i].call(t,n):s}var Pa=(()=>{class e extends wt{static positioners=Ee;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&n.options.animation&&s.animations,a=new Pi(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Pd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:s}=n,o=tt(s,`beforeTitle`,this,t),a=tt(s,`title`,this,t),r=tt(s,`afterTitle`,this,t),l=[];return l=gt(l,St(o)),l=gt(l,St(a)),l=gt(l,St(r)),l}getBeforeBody(t,n){return wa(tt(n.callbacks,`beforeBody`,this,t))}getBody(t,n){let{callbacks:s}=n,o=[];return E(t,a=>{let r={before:[],lines:[],after:[]},l=ka(s,a);gt(r.before,St(tt(l,`beforeLabel`,this,a))),gt(r.lines,tt(l,`label`,this,a)),gt(r.after,St(tt(l,`afterLabel`,this,a))),o.push(r)}),o}getAfterBody(t,n){return wa(tt(n.callbacks,`afterBody`,this,t))}getFooter(t,n){let{callbacks:s}=n,o=tt(s,`beforeFooter`,this,t),a=tt(s,`footer`,this,t),r=tt(s,`afterFooter`,this,t),l=[];return l=gt(l,St(o)),l=gt(l,St(a)),l=gt(l,St(r)),l}_createItems(t){let n=this._active,s=this.chart.data,o=[],a=[],r=[],l=[],c,h;for(c=0,h=n.length;c<h;++c)l.push(vd(this.chart,n[c]));return t.filter&&(l=l.filter((d,u,f)=>t.filter(d,u,f,s))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,s))),E(l,d=>{let u=ka(t.callbacks,d);o.push(tt(u,`labelColor`,this,d)),a.push(tt(u,`labelPointStyle`,this,d)),r.push(tt(u,`labelTextColor`,this,d))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(t,n){let s=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=Ee[s.position].call(this,o,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let c=this._size=Ma(this,s),h=Object.assign({},l,c),d=Ca(this.chart,s,h),u=Sa(s,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,o){let a=this.getCaretPosition(t,s,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,s){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=Rt(l),{x:f,y:g}=t,{width:p,height:m}=n,_,b,y,M,x,v;return a===`center`?(x=g+m/2,o===`left`?(_=f,b=_-r,M=x+r,v=x-r):(_=f+p,b=_+r,M=x-r,v=x+r),y=_):(o===`left`?b=f+Math.max(c,d)+r:o===`right`?b=f+p-Math.max(h,u)-r:b=this.caretX,a===`top`?(M=g,x=M-r,_=b-r,y=b+r):(M=g+m,x=M+r,_=b+r,y=b-r),v=M),{x1:_,x2:b,x3:y,y1:M,y2:x,y3:v}}drawTitle(t,n,s){let o=this.title,a=o.length,r,l,c;if(a){let h=Ut(s.rtl,this.x,this.width);for(t.x=Ci(this,s.titleAlign,s),n.textAlign=h.textAlign(s.titleAlign),n.textBaseline=`middle`,r=j(s.titleFont),l=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,c=0;c<a;++c)n.fillText(o[c],h.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+l,c+1===a&&(t.y+=s.titleMarginBottom-l)}}_drawColorBox(t,n,s,o,a){let r=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:h}=a,d=j(a.bodyFont),u=Ci(this,`left`,a),f=o.x(u),g=c<d.lineHeight?(d.lineHeight-c)/2:0,p=n.y+g;if(a.usePointStyle){let m={radius:Math.min(h,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=o.leftForLtr(f,h)+h/2,b=p+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,fi(t,m,_,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,fi(t,m,_,b)}else{t.lineWidth=D(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let m=o.leftForLtr(f,h),_=o.leftForLtr(o.xPlus(f,1),h-2),b=Rt(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,re(t,{x:m,y:p,w:h,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),re(t,{x:_,y:p+1,w:h-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,h,c),t.strokeRect(m,p,h,c),t.fillStyle=r.backgroundColor,t.fillRect(_,p+1,h-2,c-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=s,u=j(s.bodyFont),f=u.lineHeight,g=0,p=Ut(s.rtl,this.x,this.width),m=function(w){n.fillText(w,p.x(t.x+g),t.y+f/2),t.y+=f+a},_=p.textAlign(r),b,y,M,x,v,S,C;for(n.textAlign=r,n.textBaseline=`middle`,n.font=u.string,t.x=Ci(this,_,s),n.fillStyle=s.bodyColor,E(this.beforeBody,m),g=l&&_!==`right`?r===`center`?h/2+d:h+2+d:0,x=0,S=o.length;x<S;++x){for(b=o[x],y=this.labelTextColors[x],n.fillStyle=y,E(b.before,m),M=b.lines,l&&M.length&&(this._drawColorBox(n,t,x,p,s),f=Math.max(u.lineHeight,c)),v=0,C=M.length;v<C;++v)m(M[v]),f=u.lineHeight;E(b.after,m)}g=0,f=u.lineHeight,E(this.afterBody,m),t.y-=a}drawFooter(t,n,s){let o=this.footer,a=o.length,r,l;if(a){let c=Ut(s.rtl,this.x,this.width);for(t.x=Ci(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=c.textAlign(s.footerAlign),n.textBaseline=`middle`,r=j(s.footerFont),n.fillStyle=s.footerColor,n.font=r.string,l=0;l<a;++l)n.fillText(o[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,n,s,o){let{xAlign:a,yAlign:r}=this,{x:l,y:c}=t,{width:h,height:d}=s,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:p}=Rt(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(l+u,c),r===`top`&&this.drawCaret(t,n,s,o),n.lineTo(l+h-f,c),n.quadraticCurveTo(l+h,c,l+h,c+f),r===`center`&&a===`right`&&this.drawCaret(t,n,s,o),n.lineTo(l+h,c+d-p),n.quadraticCurveTo(l+h,c+d,l+h-p,c+d),r===`bottom`&&this.drawCaret(t,n,s,o),n.lineTo(l+g,c+d),n.quadraticCurveTo(l,c+d,l,c+d-g),r===`center`&&a===`left`&&this.drawCaret(t,n,s,o),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){let r=Ee[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=Ma(this,t),c=Object.assign({},r,this._size),h=Ca(n,t,c),d=Sa(t,c,h,n);(o._to!==d.x||a._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let r=K(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(a,t,o,n),vn(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Mn(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let s=this._active,o=t.map(({datasetIndex:l,index:c})=>{let h=this.chart.getDatasetMeta(l);if(!h)throw new Error(`Cannot find a dataset at index `+l);return{datasetIndex:l,element:h.data[c],index:c}}),a=!Ce(s,o),r=this._positionChanged(o,n);(a||r)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,s),l=this._positionChanged(r,t),c=n||!Ce(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,s,o){let a=this.options;if(t.type===`mouseout`)return[];if(!o)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,a.mode,a,s);return a.reverse&&r.reverse(),r}_positionChanged(t,n){let{caretX:s,caretY:o,options:a}=this,r=Ee[a.position].call(this,t,n);return r!==!1&&(s!==r.x||o!==r.y)}}return e})();var Od=Object.freeze({__proto__:null,Colors:Hh,Decimation:Uh,Filler:dd,Legend:bd,SubTitle:yd,Title:xd,Tooltip:{id:`tooltip`,_element:Pa,positioners:Ee,afterInit(e,i,t){t&&(e.tooltip=new Pa({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){let i=e.tooltip;if(i&&i._willRender()){let t={tooltip:i};if(e.notifyPlugins(`beforeTooltipDraw`,x(w({},t),{cancelable:!0}))===!1)return;i.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,t)}},afterEvent(e,i){if(e.tooltip){let t=i.replay;e.tooltip.handleEvent(i.event,t,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:(e,i)=>i.bodyFont.size,boxWidth:(e,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:ir},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]}});var Dd=(e,i,t,n)=>(typeof i==`string`?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t);function Ad(e,i,t,n){let s=e.indexOf(i);if(s===-1)return Dd(e,i,t,n);return s!==e.lastIndexOf(i)?t:s}var Td=(e,i)=>e===null?null:$(Math.round(e),0,i);function La(e){let i=this.getLabels();return e>=0&&e<i.length?i[e]:e}var Ed=(()=>{class e extends Zt{static id=`category`;static defaults={ticks:{callback:La}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let s=this.getLabels();for(let{index:o,label:a}of n)s[o]===a&&s.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(O(t))return null;let s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:Ad(s,t,k(n,t),this._addedLabels),Td(n,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds===`ticks`&&(t||(s=0),n||(o=this.getLabels().length-1)),this.min=s,this.max=o}buildTicks(){let t=this.min,n=this.max,s=this.options.offset,o=[],a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=n;r++)o.push({value:r});return o}getLabelForValue(t){return La.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!=`number`&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return e})();function Rd(e,i){let t=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=e,f=o||1,g=h-1,{min:p,max:m}=i,_=!O(a),b=!O(r),y=!O(c),M=(m-p)/(d+1),x=Qi((m-p)/g/f)*f,v,S,C,w;if(x<1e-14&&!_&&!b)return[{value:p},{value:m}];w=Math.ceil(m/x)-Math.floor(p/x),w>g&&(x=Qi(w*x/g/f)*f),O(l)||(v=Math.pow(10,l),x=Math.ceil(x*v)/v),s===`ticks`?(S=Math.floor(p/x)*x,C=Math.ceil(m/x)*x):(S=p,C=m),_&&b&&o&&go((r-a)/o,x/1e3)?(w=Math.round(Math.min((r-a)/x,h)),x=(r-a)/w,S=a,C=r):y?(S=_?a:S,C=b?r:C,w=c-1,x=(C-S)/w):(w=(C-S)/x,se(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));let L=Math.max(en(x),en(S));v=Math.pow(10,O(l)?L:l),S=Math.round(S*v)/v,C=Math.round(C*v)/v;let P=0;for(_&&(u&&S!==a?(t.push({value:a}),S<a&&P++,se(Math.round((S+P*x)*v)/v,a,Oa(a,M,e))&&P++):S<a&&P++);P<w;++P){let A=Math.round((S+P*x)*v)/v;if(b&&A>r)break;t.push({value:A})}return b&&u&&C!==r?t.length&&se(t[t.length-1].value,r,Oa(r,M,e))?t[t.length-1].value=r:t.push({value:r}):(!b||C===r)&&t.push({value:C}),t}function Oa(e,i,{horizontal:t,minRotation:n}){let s=rt(n),o=(t?Math.sin(s):Math.cos(s))||.001,a=.75*i*(``+e).length;return Math.min(i/o,a)}var ue=class extends Zt{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 O(i)||(typeof i==`number`||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,a=l=>s=t?s:l,r=l=>o=n?o:l;if(i){let l=ct(s),c=ct(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),i||a(s-l)}this.min=s,this.max=o}getTickLimit(){let{maxTicksLimit:t,stepSize:n}=this.options.ticks,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,t=i.ticks,n=this.getTickLimit();n=Math.max(2,n);let a=Rd({maxTicks:n,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:t.includeBounds!==!1},this._range||this);return i.bounds===`ticks`&&tn(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(){let i=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){let s=(n-t)/Math.max(i.length-1,1)/2;t-=s,n+=s}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(i){return ae(i,this.chart.options.locale,this.options.ticks.format)}};var Id=(()=>{class e extends ue{static id=`linear`;static defaults={ticks:{callback:Se.formatters.numeric}};determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=V(t)?t:0,this.max=V(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),n=t?this.width:this.height,s=rt(this.options.ticks.minRotation),o=(t?Math.sin(s):Math.cos(s))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/o))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}return e})();var ze=e=>Math.floor(yt(e));var Xt=(e,i)=>Math.pow(10,ze(e)+i);function Da(e){return e/Math.pow(10,ze(e))===1}function Aa(e,i,t){let n=Math.pow(10,t),s=Math.floor(e/n);return Math.ceil(i/n)-s}function Fd(e,i){let n=ze(i-e);for(;Aa(e,i,n)>10;)n++;for(;Aa(e,i,n)<10;)n--;return Math.min(n,ze(e))}function zd(e,{min:i,max:t}){i=Q(e.min,i);let n=[],s=ze(i),o=Fd(i,t),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((i-l)*a)/a,h=Math.floor((i-l)/r/10)*r*10,d=Math.floor((c-h)/Math.pow(10,o)),u=Q(e.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u<t;)n.push({value:u,major:Da(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;let f=Q(e.max,u);return n.push({value:f,major:Da(f),significand:d}),n}var Bd=(()=>{class e extends Zt{static id=`logarithmic`;static defaults={ticks:{callback:Se.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){let s=ue.prototype.parse.apply(this,[t,n]);if(s===0){this._zero=!0;return}return V(s)&&s>0?s:null}determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=V(t)?Math.max(0,t):null,this.max=V(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!V(this._userMin)&&(this.min=t===Xt(this.min,0)?Xt(this.min,-1):Xt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),s=this.min,o=this.max,a=l=>s=t?s:l,r=l=>o=n?o:l;s===o&&(s<=0?(a(1),r(10)):(a(Xt(s,-1)),r(Xt(o,1)))),s<=0&&a(Xt(o,-1)),o<=0&&r(Xt(s,1)),this.min=s,this.max=o}buildTicks(){let t=this.options,s=zd({min:this._userMin,max:this._userMax},this);return t.bounds===`ticks`&&tn(s,this,`value`),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?`0`:ae(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=yt(t),this._valueRange=yt(this.max)-yt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(yt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}return e})();function Gn(e){let i=e.ticks;if(i.display&&e.display){let t=K(i.backdropPadding);return k(i.font&&i.font.size,B.font.size)+t.height}return 0}function Nd(e,i,t){return t=F(t)?t:[t],{w:Co(e,i.string,t),h:t.length*i.lineHeight}}function Ta(e,i,t,n,s){return e===n||e===s?{start:i-t/2,end:i+t/2}:e<n||e>s?{start:i-t,end:i}:{start:i,end:i+t}}function Vd(e){let i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),n=[],s=[],o=e._pointLabels.length,a=e.options.pointLabels,r=a.centerPointLabels?T/o:0;for(let l=0;l<o;l++){let c=a.setContext(e.getPointLabelContext(l));s[l]=c.padding;let h=e.getPointPosition(l,e.drawingArea+s[l],r),d=j(c.font),u=Nd(e.ctx,d,e._pointLabels[l]);n[l]=u;let f=X(e.getIndexAngle(l)+r),g=Math.round(ci(f));Hd(t,i,f,Ta(g,h.x,u.w,0,180),Ta(g,h.y,u.h,90,270))}e.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),e._pointLabelItems=$d(e,n,s)}function Hd(e,i,t,n,s){let o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t)),r=0,l=0;n.start<i.l?(r=(i.l-n.start)/o,e.l=Math.min(e.l,i.l-r)):n.end>i.r&&(r=(n.end-i.r)/o,e.r=Math.max(e.r,i.r+r)),s.start<i.t?(l=(i.t-s.start)/a,e.t=Math.min(e.t,i.t-l)):s.end>i.b&&(l=(s.end-i.b)/a,e.b=Math.max(e.b,i.b+l))}function Wd(e,i,t){let n=e.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=t,l=e.getPointPosition(i,n+s+a,o),c=Math.round(ci(X(l.angle+H))),h=Xd(l.y,r.h,c),d=Ud(c),u=Yd(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function jd(e,i){if(!i)return!0;let{left:t,top:n,right:s,bottom:o}=e;return!(dt({x:t,y:n},i)||dt({x:t,y:o},i)||dt({x:s,y:n},i)||dt({x:s,y:o},i))}function $d(e,i,t){let n=[],s=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Gn(o)/2,additionalAngle:a?T/s:0},c;for(let h=0;h<s;h++){l.padding=t[h],l.size=i[h];let d=Wd(e,h,l);n.push(d),r===`auto`&&(d.visible=jd(d,c),d.visible&&(c=d))}return n}function Ud(e){return e===0||e===180?`center`:e<180?`left`:`right`}function Yd(e,i,t){return t===`right`?e-=i:t===`center`&&(e-=i/2),e}function Xd(e,i,t){return t===90||t===270?e-=i/2:(t>270||t<90)&&(e-=i),e}function Zd(e,i,t){let{left:n,top:s,right:o,bottom:a}=t,{backdropColor:r}=i;if(!O(r)){let l=Rt(i.borderRadius),c=K(i.backdropPadding);e.fillStyle=r;let h=n-c.left,d=s-c.top,u=o-n+c.width,f=a-s+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),re(e,{x:h,y:d,w:u,h:f,radius:l}),e.fill()):e.fillRect(h,d,u,f)}}function Kd(e,i){let{ctx:t,options:{pointLabels:n}}=e;for(let s=i-1;s>=0;s--){let o=e._pointLabelItems[s];if(!o.visible)continue;let a=n.setContext(e.getPointLabelContext(s));Zd(t,a,o);let r=j(a.font),{x:l,y:c,textAlign:h}=o;Et(t,e._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:`middle`})}}function nr(e,i,t,n){let{ctx:s}=e;if(t)s.arc(e.xCenter,e.yCenter,i,0,z);else{let o=e.getPointPosition(0,i);s.moveTo(o.x,o.y);for(let a=1;a<n;a++)o=e.getPointPosition(a,i),s.lineTo(o.x,o.y)}}function qd(e,i,t,n,s){let o=e.ctx,a=i.circular,{color:r,lineWidth:l}=i;!a&&!n||!r||!l||t<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),nr(e,t,a,n),o.closePath(),o.stroke(),o.restore())}function Gd(e,i,t){return Mt(e,{label:t,index:i,type:`pointLabel`})}var Jn=class extends ue{static id=`radialLinear`;static defaults={display:!0,animate:!0,position:`chartArea`,angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Se.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":`borderColor`,"pointLabels.color":`color`,"ticks.color":`color`};static descriptors={angleLines:{_fallback:`grid`}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let i=this._padding=K(Gn(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!1);this.min=V(i)&&!isNaN(i)?i:0,this.max=V(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gn(this.options))}generateTickLabels(i){ue.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{let s=I(this.options.pointLabels.callback,[t,n],this);return s||s===0?s:``}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let i=this.options;i.display&&i.pointLabels.display?Vd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,n,s){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,n,s))}getIndexAngle(i){let t=z/(this._pointLabels.length||1),n=this.options.startAngle||0;return X(i*t+rt(n))}getDistanceFromCenterForValue(i){if(O(i))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if(O(i))return NaN;let t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){let t=this._pointLabels||[];if(i>=0&&i<t.length){let n=t[i];return Gd(this.getContext(),i,n)}}getPointPosition(i,t,n=0){let s=this.getIndexAngle(i)-H+n;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){let{left:t,top:n,right:s,bottom:o}=this._pointLabelItems[i];return{left:t,top:n,right:s,bottom:o}}drawBackground(){let{backgroundColor:i,grid:{circular:t}}=this.options;if(i){let n=this.ctx;n.save(),n.beginPath(),nr(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=i,n.fill(),n.restore()}}drawGrid(){let i=this.ctx,t=this.options,{angleLines:n,grid:s,border:o}=t,a=this._pointLabels.length,r,l,c;if(t.pointLabels.display&&Kd(this,a),s.display&&this.ticks.forEach((h,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(d),f=s.setContext(u),g=o.setContext(u);qd(this,f,l,a,g)}}),n.display){for(i.save(),r=a-1;r>=0;r--){let h=n.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(i.lineWidth=u,i.strokeStyle=d,i.setLineDash(h.borderDash),i.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(r,l),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(c.x,c.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){let i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(s),i.textAlign=`center`,i.textBaseline=`middle`,this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),h=j(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){i.font=h.string,a=i.measureText(r.label).width,i.fillStyle=c.backdropColor;let d=K(c.backdropPadding);i.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Et(i,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),i.restore()}drawTitle(){}};var Fi={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}};var et=Object.keys(Fi);function Ea(e,i){return e-i}function Ra(e,i){if(O(i))return null;let t=e._adapter,{parser:n,round:s,isoWeekday:o}=e._parseOpts,a=i;return typeof n==`function`&&(a=n(a)),V(a)||(a=typeof n==`string`?t.parse(a,n):t.parse(a)),a===null?null:(s&&(a=s===`week`&&($t(o)||o===!0)?t.startOf(a,`isoWeek`,o):t.startOf(a,s)),+a)}function Ia(e,i,t,n){let s=et.length;for(let o=et.indexOf(e);o<s-1;++o){let a=Fi[et[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-i)/(r*a.size))<=n)return et[o]}return et[s-1]}function Jd(e,i,t,n,s){for(let o=et.length-1;o>=et.indexOf(t);o--){let a=et[o];if(Fi[a].common&&e._adapter.diff(s,n,a)>=i-1)return a}return et[t?et.indexOf(t):0]}function Qd(e){for(let i=et.indexOf(e)+1,t=et.length;i<t;++i)if(Fi[et[i]].common)return et[i]}function Fa(e,i,t){if(!t)e[i]=!0;else if(t.length){let{lo:n,hi:s}=hi(t,i),o=t[n]>=i?t[n]:t[s];e[o]=!0}}function tu(e,i,t,n){let s=e._adapter,o=+s.startOf(i[0].value,n),a=i[i.length-1].value,r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=t[r],l>=0&&(i[l].major=!0);return i}function za(e,i,t){let n=[],s={},o=i.length,a,r;for(a=0;a<o;++a)r=i[a],s[r]=a,n.push({value:r,major:!1});return o===0||!t?n:tu(e,n,s,t)}var Qn=(()=>{class e extends Zt{static id=`time`;static defaults={bounds:`data`,adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:`millisecond`,displayFormats:{}},ticks:{source:`auto`,callback:!1,major:{enabled:!1}}};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,n={}){let s=t.time||(t.time={}),o=this._adapter=new lc._date(t.adapters.date);o.init(n),ie(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Ra(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,s=t.time.unit||`day`,{min:o,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(h){!r&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!r||!l)&&(c(this._getLabelBounds()),(t.bounds!==`ticks`||t.ticks.source!==`labels`)&&c(this.getMinMax(!1))),o=V(o)&&!isNaN(o)?o:+n.startOf(Date.now(),s),a=V(a)&&!isNaN(a)?a:+n.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){let t=this.options,n=t.time,s=t.ticks,o=s.source===`labels`?this.getLabelTimestamps():this._generate();t.bounds===`ticks`&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,r=this.max,l=bo(o,a,r);return this._unit=n.unit||(s.autoSkip?Ia(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Jd(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit===`year`?void 0:Qd(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),za(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,s=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?s=a:s=(a-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;n=$(n,0,r),s=$(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){let t=this._adapter,n=this.min,s=this.max,o=this.options,a=o.time,r=a.unit||Ia(a.minUnit,n,s,this._getLabelCapacity(n)),l=k(o.ticks.stepSize,1),c=r===`week`?a.isoWeekday:!1,h=$t(c)||c===!0,d={},u=n,f,g;if(h&&(u=+t.startOf(u,`isoWeek`,c)),u=+t.startOf(u,h?`day`:r),t.diff(s,n,r)>1e5*l)throw new Error(n+` and `+s+` are too far apart with stepSize of `+l+` `+r);let p=o.ticks.source===`data`&&this.getDataTimestamps();for(f=u,g=0;f<s;f=+t.add(f,l,r),g++)Fa(d,f,p);return(f===s||o.bounds===`ticks`||g===1)&&Fa(d,f,p),Object.keys(d).sort(Ea).map(m=>+m)}getLabelForValue(t){let n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime)}format(t,n){let o=this.options.time.displayFormats,a=this._unit,r=n||o[a];return this._adapter.format(t,r)}_tickFormatFunction(t,n,s,o){let a=this.options,r=a.ticks.callback;if(r)return I(r,[t,n,s],this);let l=a.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],u=h&&l[h],f=s[n],g=h&&u&&f&&f.major;return this._adapter.format(t,o||(g?u:d))}generateTickLabels(t){let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){let n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,s=this.ctx.measureText(t).width,o=rt(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(o),r=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*a+l*r,h:s*r+l*a}}_getLabelCapacity(t){let n=this.options.time,s=n.displayFormats,o=s[n.unit]||s.millisecond,a=this._tickFormatFunction(t,0,za(this,[t],this._majorUnit),o),r=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,s;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,s=o.length;n<s;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,s;if(t.length)return t;let o=this.getLabels();for(n=0,s=o.length;n<s;++n)t.push(Ra(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return on(t.sort(Ea))}}return e})();function Si(e,i,t){let n=0,s=e.length-1,o,a,r,l;t?(i>=e[n].pos&&i<=e[s].pos&&({lo:n,hi:s}=ht(e,`pos`,i)),{pos:o,time:r}=e[n],{pos:a,time:l}=e[s]):(i>=e[n].time&&i<=e[s].time&&({lo:n,hi:s}=ht(e,`time`,i)),{time:o,pos:r}=e[n],{time:a,pos:l}=e[s]);let c=a-o;return c?r+(l-r)*(i-o)/c:r}var eu=(()=>{class e extends Qn{static id=`timeseries`;static defaults=Qn.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Si(n,this.min),this._tableRange=Si(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:n,max:s}=this,o=[],a=[],r,l,c,h,d;for(r=0,l=t.length;r<l;++r)h=t[r],h>=n&&h<=s&&o.push(h);if(o.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(r=0,l=o.length;r<l;++r)d=o[r+1],c=o[r-1],h=o[r],Math.round((d+c)/2)!==h&&a.push({time:h,pos:r/(l-1)});return a}_generate(){let t=this.min,n=this.max,s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((o,a)=>o-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?t=this.normalize(n.concat(s)):t=n.length?n:s,t=this._cache.all=t,t}getDecimalForValue(t){return(Si(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return Si(this._table,s*this._tableRange+this._minPos,!0)}}return e})();var sr=[rc,Rh,Od,Object.freeze({__proto__:null,CategoryScale:Ed,LinearScale:Id,LogarithmicScale:Bd,RadialLinearScale:Jn,TimeScale:Qn,TimeSeriesScale:eu})];Ri.register(...sr);var or=Ri;var nu={root:({instance:e})=>({display:`block`,position:`relative`,width:e.width,height:e.height})};var su={root:`p-chart`};var ar=(()=>{class e extends I$1{name=`chart`;classes=su;inlineStyles=nu;static ɵfac=(()=>{let t;return function(s){return(t||(t=iu(e)))(s||e)}})();static ɵprov=S({token:e,factory:e.ɵfac})}return e})();var rr=new x$1(`CHART_INSTANCE`);var ou=(()=>{class e extends Y{el;zone;componentName=`Chart`;$pcChart=g(rr,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=g(Z$1,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}type;plugins=[];width;height;responsive=!0;ariaLabel;ariaLabelledBy;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()}onDataSelect=new zt$1;isBrowser=!1;initialized;_data;_options={};chart;_componentStyle=g(ar);constructor(t,n){super(),this.el=t,this.zone=n}onAfterViewInit(){this.initChart(),this.initialized=!0}onCanvasClick(t){if(this.chart){let n=this.chart.getElementsAtEventForMode(t,`nearest`,{intersect:!0},!1),s=this.chart.getElementsAtEventForMode(t,`dataset`,{intersect:!0},!1);n&&n[0]&&s&&this.onDataSelect.emit({originalEvent:t,element:n[0],dataset:s})}}initChart(){if(Vme(this.platformId)){let t=this.options||{};t.responsive=this.responsive,t.responsive&&(this.height||this.width)&&(t.maintainAspectRatio=!1),this.zone.runOutsideAngular(()=>{this.chart=new or(this.el.nativeElement.children[0],{type:this.type,data:this.data,options:this.options,plugins:this.plugins})})}}getCanvas(){return this.el.nativeElement.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())}onDestroy(){this.chart&&(this.chart.destroy(),this.initialized=!1,this.chart=null)}static ɵfac=function(n){return new(n||e)(fe(Bn$1),fe(ae$1))};static ɵcmp=Va$1({type:e,selectors:[[`p-chart`]],hostVars:4,hostBindings:function(n,s){n&2&&(A$(s.sx(`root`)),N$(s.cx(`root`)))},inputs:{type:`type`,plugins:`plugins`,width:`width`,height:`height`,responsive:[2,`responsive`,`responsive`,Tu],ariaLabel:`ariaLabel`,ariaLabelledBy:`ariaLabelledBy`,data:`data`,options:`options`},outputs:{onDataSelect:`onDataSelect`},features:[e5([ar,{provide:rr,useExisting:e}]),x2([Z$1]),tx],decls:1,vars:5,consts:[[`role`,`img`,3,`click`,`pBind`]],template:function(n,s){n&1&&(wp(0,`canvas`,0),rh$1(`click`,function(a){return s.onCanvasClick(a)}),kb()),n&2&&(gx(`pBind`,s.ptm(`canvas`)),eh$1(`aria-label`,s.ariaLabel)(`aria-labelledby`,s.ariaLabelledBy)(`width`,s.responsive&&!s.width?null:s.width)(`height`,s.responsive&&!s.height?null:s.height))},dependencies:[Au,Uxe,qo$1,Z$1],encapsulation:2})}return e})();var Yu=(()=>{class e{static ɵfac=function(n){return new(n||e)};static ɵmod=Vn$1({type:e});static ɵinj=Cn$1({imports:[ou,Uxe,Uxe]})}return e})();var au=[[[``,8,`icon`]],[[``,8,`label`]]];var ru=[`.icon`,`.label`];var zi=class e{help=ph$1.required();static ɵfac=function(t){return new(t||e)};static ɵcmp=Va$1({type:e,selectors:[[`my-unavailable-menu-entry`]],inputs:{help:[1,`help`]},ngContentSelectors:ru,decls:10,vars:1,consts:()=>{let i;i="Feature unavailable";let t;return t="EKKI TILTÆKT",[t,[1,`unavailable`],[1,`badge-help`],[1,`pt-badge`,`badge-secondary-on-secondary`],[`helpTitle`,i,`container`,`body`]]},template:function(t,n){t&1&&(oh$1(au),wp(0,`div`,1),ih$1(1),wp(2,`div`)(3,`div`),ih$1(4,1),kb(),wp(5,`div`,2)(6,`div`,3),l$(7,0),kb(),wp(8,`my-help`,4),j$(9),kb()()()()),t&2&&(FB(9),zb(` `,n.help(),` `))},dependencies:[m4,Jn$1,Qn$1,tf,S$1],styles:[`.unavailable[_ngcontent-%COMP%]{display:flex;align-items:center}.unavailable[_ngcontent-%COMP%]   my-help[_ngcontent-%COMP%]{color:var(--%NS%fg-200)}@media only screen and (max-width:1000px){.unavailable[_ngcontent-%COMP%]{flex-direction:column;text-align:center;align-items:center}.badge-help[_ngcontent-%COMP%]{display:flex;margin-top:.25rem}}`],changeDetection:1})};var cu=()=>({exact:!0});function hu(e,i){e&1&&(wp(0,`div`,6),th$1(1,`div`),kb())}function du(e,i){if(e&1&&(wp(0,`div`,9),th$1(1,`my-global-icon`,10),kb()),e&2){let t=f$(3).$implicit;FB(),gx(`iconName`,t.icon)}}function uu(e,i){if(e&1&&EV(0,du,2,1,`div`,9),e&2){let t=f$(2).$implicit;bV(t.icon?0:-1)}}function fu(e,i){if(e&1&&(wp(0,`span`),j$(1),kb()),e&2){let t=f$(2).$implicit;FB(),oA(t.label)}}function gu(e,i){e&1&&th$1(0,`span`,13)}function pu(e,i){e&1&&th$1(0,`span`,14)}function mu(e,i){if(e&1&&(wp(0,`my-unavailable-menu-entry`,7),rx(1,gu,1,0,`span`,11)(2,pu,1,0,`span`,12),kb()),e&2){f$();let t=g$(1),n=g$(3),s=f$().$implicit;gx(`help`,s.unavailableText()),FB(),gx(`ngTemplateOutlet`,t),FB(),gx(`ngTemplateOutlet`,n)}}function bu(e,i){e&1&&Ex(0)}function _u(e,i){e&1&&Ex(0)}function xu(e,i){if(e&1&&(wp(0,`a`,8),rx(1,bu,1,0,`ng-container`,15)(2,_u,1,0,`ng-container`,15),kb()),e&2){f$();let t=g$(1),n=g$(3),s=f$().$implicit,o=f$();gx(`routerLink`,s.routerLink)(`queryParams`,o.globalQueryParams())(`routerLinkActiveOptions`,t5(5,cu)),FB(),gx(`ngTemplateOutlet`,t),FB(),gx(`ngTemplateOutlet`,n)}}function yu(e,i){if(e&1&&(rx(0,uu,1,1,`ng-template`,null,0,m5)(2,fu,2,1,`ng-template`,null,1,m5),EV(4,mu,3,3,`my-unavailable-menu-entry`,7)(5,xu,3,6,`a`,8)),e&2){let t=f$().$implicit,n=f$();FB(4),bV(n.isUnavailable(t)?4:5)}}function vu(e,i){if(e&1&&EV(0,hu,2,0,`div`,6)(1,yu,6,1),e&2){let t=i.$implicit,n=f$();bV(t.type===`separator`?0:t.type===`link`&&n.isDisplayed(t)?1:-1)}}var hr=class e{domSanitizer=g(OG);config=ph$1.required();globalQueryParams=ph$1();lateralMenuBackground=this.domSanitizer.bypassSecurityTrustHtml(cr());isDisplayed(i){return i.isDisplayed?i.isDisplayed():!0}isUnavailable(i){return i.unavailableText?!!i.unavailableText():!1}static ɵfac=function(t){return new(t||e)};static ɵcmp=Va$1({type:e,selectors:[[`my-lateral-menu`]],inputs:{config:[1,`config`],globalQueryParams:[1,`globalQueryParams`]},decls:8,vars:2,consts:[[`icon`,``],[`label`,``],[1,`menu`],[`aria-hidden`,`true`,1,`svg-container`,3,`innerHTML`],[1,`ul-unstyle`],[1,`menu-placeholder`],[1,`separator`],[3,`help`],[`queryParamsHandling`,`merge`,`routerLinkActive`,`active`,3,`routerLink`,`queryParams`,`routerLinkActiveOptions`],[1,`global-icon-wrapper`],[3,`iconName`],[`class`,`icon`,4,`ngTemplateOutlet`],[`class`,`label`,4,`ngTemplateOutlet`],[1,`icon`],[1,`label`],[4,`ngTemplateOutlet`]],template:function(t,n){t&1&&(wp(0,`div`,2),th$1(1,`div`,3),wp(2,`h1`),j$(3),kb(),wp(4,`ul`,4),CV(5,vu,2,1,null,null,TV),kb()(),th$1(7,`div`,5)),t&2&&(FB(),gx(`innerHTML`,n.lateralMenuBackground,Ow),FB(2),oA(n.config().title),FB(2),DV(n.config().entries))},dependencies:[Au,D3,m4,vm,d4,Jn$1,Qn$1,tf,X1,zi],styles:[`menu[_ngcontent-%COMP%], .menu-placeholder[_ngcontent-%COMP%], h1[_ngcontent-%COMP%], ul[_ngcontent-%COMP%]{position:relative;z-index:1}.svg-container[_ngcontent-%COMP%]{position:absolute;top:0;opacity:.3;z-index:0;overflow:hidden;width:100%;height:100%}.svg-container[_ngcontent-%COMP%]     svg{color:var(--%NS%bg-secondary-450);-webkit-mask-image:linear-gradient(to bottom,#000 25%,transparent 100%);mask-image:linear-gradient(to bottom,#000 25%,transparent 100%)}h1[_ngcontent-%COMP%]{color:var(--%NS%fg-200);font-weight:700;margin-bottom:1rem;text-align:center;font-size:.875rem}.menu[_ngcontent-%COMP%], .menu-placeholder[_ngcontent-%COMP%]{position:sticky;top:var(--%NS%header-height);width:calc(248px - 2rem);max-height:calc(100vh - var(--%NS%header-height));z-index:12600;margin-inline-end:var(--%NS%x-margin-content)}.menu[_ngcontent-%COMP%]{padding-top:1.5rem;padding-bottom:1.5rem;background-color:var(--%NS%bg-secondary-400);border-radius:14px;overflow:auto}.global-icon-wrapper[_ngcontent-%COMP%]{display:inline-block;border-radius:100%;padding:5px;background-color:var(--%NS%bg);line-height:1;width:fit-content;height:fit-content;margin-inline-end:.75rem}.global-icon-wrapper[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%primary);display:inline-block;width:22px;height:22px;line-height:22px}li[_ngcontent-%COMP%]{list-style:none}a[_ngcontent-%COMP%], my-unavailable-menu-entry[_ngcontent-%COMP%], .separator[_ngcontent-%COMP%]{padding-inline-start:calc(1.275rem + .3vw)}@media(min-width:1200px){a[_ngcontent-%COMP%], my-unavailable-menu-entry[_ngcontent-%COMP%], .separator[_ngcontent-%COMP%]{padding-inline-start:1.5rem}}my-unavailable-menu-entry[_ngcontent-%COMP%]{color:var(--%NS%secondary-icon-color)}my-unavailable-menu-entry[_ngcontent-%COMP%]   .global-icon-wrapper[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%secondary-icon-color)!important}a[_ngcontent-%COMP%], my-unavailable-menu-entry[_ngcontent-%COMP%]{display:block;padding-top:.5rem;padding-bottom:.5rem}a[_ngcontent-%COMP%]{color:var(--%NS%fg-350)}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus, a[_ngcontent-%COMP%]:active{text-decoration:none}a[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}a[_ngcontent-%COMP%]:hover{opacity:1;color:var(--%NS%fg-400)}a.active[_ngcontent-%COMP%]{color:var(--%NS%fg-400);font-weight:700;background-color:var(--%NS%bg-secondary-350)}a.active[_ngcontent-%COMP%]   .global-icon-wrapper[_ngcontent-%COMP%]{background-color:var(--%NS%primary)}a.active[_ngcontent-%COMP%]   .global-icon-wrapper[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%bg)}.separator[_ngcontent-%COMP%]{padding-top:1rem;padding-bottom:1rem;padding-inline-end:calc(1.275rem + .3vw)}@media(min-width:1200px){.separator[_ngcontent-%COMP%]{padding-inline-end:1.5rem}}.separator[_ngcontent-%COMP%]:last-child{display:none}.separator[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:2px;width:100%;background-color:var(--%NS%bg-secondary-500);border-radius:14px}@media screen and (max-width:1000px){h1[_ngcontent-%COMP%]{width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}h1[_ngcontent-%COMP%]:not(caption){position:absolute!important}h1[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{overflow:hidden!important}ul[_ngcontent-%COMP%]{display:flex;margin:0 auto;width:fit-content}.menu-placeholder[_ngcontent-%COMP%]{display:none}.menu[_ngcontent-%COMP%]{position:fixed;bottom:0;top:unset;width:calc(100vw - var(--%NS%menu-width) - var(--%NS%x-margin-content) * 2);padding:.75rem .5rem;border:1px solid var(--%NS%bg-secondary-450);border-bottom:0;border-end-end-radius:0;border-end-start-radius:0}a[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center;align-items:center}a.active[_ngcontent-%COMP%]{background-color:inherit}a[_ngcontent-%COMP%], .separator[_ngcontent-%COMP%], my-unavailable-menu-entry[_ngcontent-%COMP%]{font-size:12px;line-height:1.2;padding:0 .5rem}.separator[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:2px;height:100%}.global-icon-wrapper[_ngcontent-%COMP%]{margin:0 0 .25rem}}@media screen and (max-width:500px){.menu[_ngcontent-%COMP%]{border-radius:0;border-width:1px 0 0;width:100vw;left:0}}`],changeDetection:1})};var dr=class e{serverService=g(Zt$1);playerSettingsService=g(S$2);inputId=ph$1.required();mode=ph$1.required();channel=ph$1();themes;selectedId;ngOnInit(){if(this.mode()===`video`&&!this.channel())throw new Error(`Channel must be specified in video mode`);this.buildOptions()}propagateChange=i=>{};writeValue(i){this.selectedId=i}registerOnChange(i){this.propagateChange=i}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId)}buildOptions(){let i=this.serverService.getHTMLConfig(),t=i.instance.name,n=this.getLabelOf(i.defaults.player.theme);this.themes=[],(this.mode()===`channel`||this.mode()===`video`)&&this.themes.push({id:`instance-default`,label:`${t} setting (${n})`}),this.mode()===`video`&&(this.themes.push({id:`channel-default`,label:`${this.channel().displayName} setting`}),this.scheduleChannelUpdate()),this.themes=this.themes.concat(this.getPlayerThemes())}scheduleChannelUpdate(){this.playerSettingsService.getChannelSettings({channelHandle:this.channel().name,raw:!0}).subscribe({next:i=>{this.themes.find(t=>t.id===`channel-default`).label=this.buildChannelLabel(i)}})}buildChannelLabel(i){let t=this.serverService.getHTMLConfig(),n=t.instance.name,s=this.getLabelOf(t.defaults.player.theme),o=i.theme,a=o===`instance-default`?`from ${n} setting: ${s}`:this.getLabelOf(o);return `${this.channel().displayName} channel setting (${a})`}getLabelOf(i){return this.getPlayerThemes().find(t=>t.id===i)?.label}getPlayerThemes(){return[{id:`galaxy`,label:"Galaxy",description:"Original theme"},{id:`lucide`,label:"Lucide",description:"A clean and modern theme"}]}static ɵfac=function(t){return new(t||e)};static ɵcmp=Va$1({type:e,selectors:[[`my-select-player-theme`]],inputs:{inputId:[1,`inputId`],mode:[1,`mode`],channel:[1,`channel`]},features:[e5([{provide:D$1,useExisting:wf(()=>e),multi:!0}])],decls:1,vars:3,consts:[[`filter`,`false`,3,`ngModelChange`,`inputId`,`items`,`ngModel`]],template:function(t,n){t&1&&(wp(0,`my-select-options`,0),lA(`ngModelChange`,function(o){return W$(n.selectedId,o)||(n.selectedId=o),o}),rh$1(`ngModelChange`,function(){return n.onModelChange()}),kb(),kj()),t&2&&(gx(`inputId`,n.inputId())(`items`,n.themes),cA(`ngModel`,n.selectedId),Uj())},dependencies:[Jn$1,qn$1,ln$1,oi$1],encapsulation:2,changeDetection:1})};export{Yu as a,dt as c,ou as d,se as f,It as i,hr as l,E as n,ct as o,I as r,dr as s,B as t,k as u};
//# debugId=ea9a8888-cc58-582b-ad45-5982113ee666
//# sourceMappingURL=chunk-BIZnpkkM2.js.map